@@ -194,7 +194,7 @@ def new(self, key=None, data=None, content_type='application/json',
194
194
return obj
195
195
196
196
def get (self , key , r = None , pr = None , timeout = None , include_context = None ,
197
- basic_quorum = None , notfound_ok = None ):
197
+ basic_quorum = None , notfound_ok = None , head_only = False ):
198
198
"""
199
199
Retrieve a :class:`~riak.riak_object.RiakObject` or
200
200
:class:`~riak.datatypes.Datatype`, based on the presence and value
@@ -216,6 +216,9 @@ def get(self, key, r=None, pr=None, timeout=None, include_context=None,
216
216
:type basic_quorum: bool
217
217
:param notfound_ok: whether to treat not-found responses as successful
218
218
:type notfound_ok: bool
219
+ :param head_only: whether to fetch without value, so only metadata
220
+ (only available on PB transport)
221
+ :type head_only: bool
219
222
:rtype: :class:`RiakObject <riak.riak_object.RiakObject>` or
220
223
:class:`~riak.datatypes.Datatype`
221
224
@@ -231,10 +234,12 @@ def get(self, key, r=None, pr=None, timeout=None, include_context=None,
231
234
obj = RiakObject (self ._client , self , key )
232
235
return obj .reload (r = r , pr = pr , timeout = timeout ,
233
236
basic_quorum = basic_quorum ,
234
- notfound_ok = notfound_ok )
237
+ notfound_ok = notfound_ok ,
238
+ head_only = head_only )
235
239
236
240
def multiget (self , keys , r = None , pr = None , timeout = None ,
237
- basic_quorum = None , notfound_ok = None ):
241
+ basic_quorum = None , notfound_ok = None ,
242
+ head_only = False ):
238
243
"""
239
244
Retrieves a list of keys belonging to this bucket in parallel.
240
245
@@ -251,14 +256,18 @@ def multiget(self, keys, r=None, pr=None, timeout=None,
251
256
:type basic_quorum: bool
252
257
:param notfound_ok: whether to treat not-found responses as successful
253
258
:type notfound_ok: bool
259
+ :param head_only: whether to fetch without value, so only metadata
260
+ (only available on PB transport)
261
+ :type head_only: bool
254
262
:rtype: list of :class:`RiakObjects <riak.riak_object.RiakObject>`,
255
263
:class:`Datatypes <riak.datatypes.Datatype>`, or tuples of
256
264
bucket_type, bucket, key, and the exception raised on fetch
257
265
"""
258
266
bkeys = [(self .bucket_type .name , self .name , key ) for key in keys ]
259
267
return self ._client .multiget (bkeys , r = r , pr = pr , timeout = timeout ,
260
268
basic_quorum = basic_quorum ,
261
- notfound_ok = notfound_ok )
269
+ notfound_ok = notfound_ok ,
270
+ head_only = head_only )
262
271
263
272
def _get_resolver (self ):
264
273
if callable (self ._resolver ):
0 commit comments