@@ -163,17 +163,13 @@ def lookup(self, dataset_id, key_pbs,
163163 (:class:`gcloud.datastore.datastore_v1_pb2.Key` and
164164 :class:`gcloud.datastore.datastore_v1_pb2.Entity`) and is used
165165 under the hood for methods like
166- :func:`gcloud.datastore.dataset.Dataset.get_entity `:
166+ :func:`gcloud.datastore.key.Key.get `:
167167
168168 >>> from gcloud import datastore
169169 >>> from gcloud.datastore.key import Key
170170 >>> connection = datastore.get_connection()
171- >>> dataset = connection.dataset('dataset-id')
172- >>> key = Key(dataset=dataset).kind('MyKind').id(1234)
173-
174- Using the :class:`gcloud.datastore.dataset.Dataset` helper:
175-
176- >>> dataset.get_entity(key)
171+ >>> key = Key('MyKind', 1234, dataset_id='dataset-id')
172+ >>> key.get()
177173 <Entity object>
178174
179175 Using the ``connection`` class directly:
@@ -182,7 +178,7 @@ def lookup(self, dataset_id, key_pbs,
182178 <Entity protobuf>
183179
184180 :type dataset_id: string
185- :param dataset_id: The dataset to look up the keys.
181+ :param dataset_id: The ID of the dataset to look up the keys.
186182
187183 :type key_pbs: list of :class:`gcloud.datastore.datastore_v1_pb2.Key`
188184 (or a single Key)
@@ -262,12 +258,12 @@ def run_query(self, dataset_id, query_pb, namespace=None, eventual=False):
262258 uses this method to fetch data:
263259
264260 >>> from gcloud import datastore
261+ >>> from gcloud.datastore.query import Query
265262 >>> connection = datastore.get_connection()
266- >>> dataset = connection.dataset('dataset-id')
267- >>> query = dataset.query().kind('MyKind').filter(
268- ... 'property', '=', 'val')
263+ >>> query = Query(dataset_id='dataset-id', 'MyKind')
264+ >>> query.add_filter('property', '=', 'val')
269265
270- Using the `fetch `` method...
266+ Using the query's ``fetch_page `` method...
271267
272268 >>> entities, cursor, more_results = query.fetch_page()
273269 >>> entities
@@ -319,7 +315,7 @@ def begin_transaction(self, dataset_id, serializable=False):
319315 Maps the ``DatastoreService.BeginTransaction`` protobuf RPC.
320316
321317 :type dataset_id: string
322- :param dataset_id: The dataset over which to execute the transaction.
318+ :param dataset_id: The ID dataset to which the transaction applies .
323319 """
324320
325321 if self .transaction ():
@@ -346,7 +342,7 @@ def commit(self, dataset_id, mutation_pb):
346342 Maps the ``DatastoreService.Commit`` protobuf RPC.
347343
348344 :type dataset_id: string
349- :param dataset_id: The dataset in which to perform the changes .
345+ :param dataset_id: The ID dataset to which the transaction applies .
350346
351347 :type mutation_pb: :class:`gcloud.datastore.datastore_v1_pb2.Mutation`.
352348 :param mutation_pb: The protobuf for the mutations being saved.
@@ -376,7 +372,8 @@ def rollback(self, dataset_id):
376372 if the connection isn't currently in a transaction.
377373
378374 :type dataset_id: string
379- :param dataset_id: The dataset to which the transaction belongs.
375+ :param dataset_id: The ID of the dataset to which the transaction
376+ belongs.
380377 """
381378 if not self .transaction () or not self .transaction ().id :
382379 raise ValueError ('No transaction to rollback.' )
@@ -393,7 +390,8 @@ def allocate_ids(self, dataset_id, key_pbs):
393390 Maps the ``DatastoreService.AllocateIds`` protobuf RPC.
394391
395392 :type dataset_id: string
396- :param dataset_id: The dataset to which the transaction belongs.
393+ :param dataset_id: The ID of the dataset to which the transaction
394+ belongs.
397395
398396 :type key_pbs: list of :class:`gcloud.datastore.datastore_v1_pb2.Key`
399397 :param key_pbs: The keys for which the backend should allocate IDs.
@@ -418,7 +416,7 @@ def save_entity(self, dataset_id, key_pb, properties,
418416 not passed in 'properties' no longer be set for the entity.
419417
420418 :type dataset_id: string
421- :param dataset_id: The dataset in which to save the entity.
419+ :param dataset_id: The ID of the dataset in which to save the entity.
422420
423421 :type key_pb: :class:`gcloud.datastore.datastore_v1_pb2.Key`
424422 :param key_pb: The complete or partial key for the entity.
@@ -490,7 +488,7 @@ def delete_entities(self, dataset_id, key_pbs):
490488 :func:`gcloud.datastore.entity.Entity.delete` method.
491489
492490 :type dataset_id: string
493- :param dataset_id: The dataset from which to delete the keys.
491+ :param dataset_id: The ID of the dataset from which to delete the keys.
494492
495493 :type key_pbs: list of :class:`gcloud.datastore.datastore_v1_pb2.Key`
496494 :param key_pbs: The keys to delete from the datastore.
0 commit comments