You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>fromgcloudimportdatastore>>>dataset=datastore.get_dataset('dataset-id')
>>>withBatch() asbatch:
... do_some_work(batch)
... raiseException() # rolls back
I'm not sure why we need to have a dataset variable. I also don't know if that code even works... Might be worth chopping out? Ie, it would look like....
>>>fromgcloudimportdatastore>>>withdatastore.Batch() asbatch: # Note datastore.Batch vs Batch?
... do_some_work(batch)
... raiseException() # rolls back
The text was updated successfully, but these errors were encountered:
Looking at http://googlecloudplatform.github.io/gcloud-python/latest/datastore-batches.html#gcloud.datastore.batch.Batch
The last example for this method has a snippet:
I'm not sure why we need to have a dataset variable. I also don't know if that code even works... Might be worth chopping out? Ie, it would look like....
The text was updated successfully, but these errors were encountered: