@@ -194,7 +194,7 @@ def new(self, key=None, data=None, content_type='application/json',
194194 return obj
195195
196196 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 ):
198198 """
199199 Retrieve a :class:`~riak.riak_object.RiakObject` or
200200 :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,
216216 :type basic_quorum: bool
217217 :param notfound_ok: whether to treat not-found responses as successful
218218 :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
219222 :rtype: :class:`RiakObject <riak.riak_object.RiakObject>` or
220223 :class:`~riak.datatypes.Datatype`
221224
@@ -231,10 +234,12 @@ def get(self, key, r=None, pr=None, timeout=None, include_context=None,
231234 obj = RiakObject (self ._client , self , key )
232235 return obj .reload (r = r , pr = pr , timeout = timeout ,
233236 basic_quorum = basic_quorum ,
234- notfound_ok = notfound_ok )
237+ notfound_ok = notfound_ok ,
238+ head_only = head_only )
235239
236240 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 ):
238243 """
239244 Retrieves a list of keys belonging to this bucket in parallel.
240245
@@ -251,14 +256,18 @@ def multiget(self, keys, r=None, pr=None, timeout=None,
251256 :type basic_quorum: bool
252257 :param notfound_ok: whether to treat not-found responses as successful
253258 :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
254262 :rtype: list of :class:`RiakObjects <riak.riak_object.RiakObject>`,
255263 :class:`Datatypes <riak.datatypes.Datatype>`, or tuples of
256264 bucket_type, bucket, key, and the exception raised on fetch
257265 """
258266 bkeys = [(self .bucket_type .name , self .name , key ) for key in keys ]
259267 return self ._client .multiget (bkeys , r = r , pr = pr , timeout = timeout ,
260268 basic_quorum = basic_quorum ,
261- notfound_ok = notfound_ok )
269+ notfound_ok = notfound_ok ,
270+ head_only = head_only )
262271
263272 def _get_resolver (self ):
264273 if callable (self ._resolver ):
0 commit comments