-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
After #509 is in, We need to decouple Transaction from Connection and allow Transaction to inherit from Batch.
Things to be done
- Change
Transactionto inherit fromBatch(Derive 'Transaction' from 'Batch'. #516) - Track "active" batches / transactions in a thread-local stack (Push batch / transaction onto a thread-local stack inside 'with'. #518)
- Replace
Key.get()with top-leveldatastore.get()(Rename get_entities() to get(). #520, Allow get() to take a single key (in addition to a list) #521, Remove Key.get() and Entity.reload() #522) - Replace
Entity.save()with top-leveldatastore.put()(#514: adddatastore.putAPI, remove `Entity.save' #548) - Replace
Key.delete()witg top-leveldatastore.delete()(Remove Key.get() and Entity.reload() #522) - Remove non-RPC methods
save_entity()anddelete_entities()fromConnection(#514: rip outConnectioncruft #550) - Remove
Connection.mutation(). (#514: rip outConnectioncruft #550) - Remove
Connection.transaction()(#514: rip outConnectioncruft #550)
Also relevant: #447 (Transaction and Batch should not have a dataset_id until they have objects to work with)
For reference, RPC methods are:
- Lookup
- RunQuery
- BeginTransaction
- Commit
- Rollback
- AllocateIds
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.