Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: service/datastore/raw_interface.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: service/datastore/raw_interface.go
diff --git a/service/datastore/raw_interface.go b/service/datastore/raw_interface.go
index 96e54d3370311ffb63b4a2e01065ab94d0a2bc80..481acf7a99896a9bdfec2e46057b052fa5cebef4 100644
--- a/service/datastore/raw_interface.go
+++ b/service/datastore/raw_interface.go
@@ -184,7 +184,15 @@ type RawInterface interface {
// - cb is not nil
DeleteMulti(keys []*Key, cb DeleteMultiCB) error
- // Testable returns the Testable interface for the implementation, or nil if
- // there is none.
- Testable() Testable
+ // WithTransaction, given a Context, returns a derived Context with the
+ // supplied datastore Transaction installed.
+ WithTransaction(Transaction) context.Context
+
+ // CurrentTransaction returns a reference to the current Transaction, or nil
+ // if the Context does not have a current Transaction.
+ CurrentTransaction() Transaction
+
+ // GetTestable returns the Testable interface for the implementation, or nil
+ // if there is none.
+ GetTestable() Testable
}

Powered by Google App Engine
This is Rietveld 408576698