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

Unified Diff: service/datastore/raw_interface.go

Issue 1279703003: Get rid of awkward proto argument to Interface.Run (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: rename test helper Created 5 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
« no previous file with comments | « service/datastore/interface.go ('k') | service/datastore/reflect.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/raw_interface.go
diff --git a/service/datastore/raw_interface.go b/service/datastore/raw_interface.go
index fc3a4a9536227134512eabb55d6dabaa89511186..fee4138f86c3812f8afdb8230fab8be0d6de1ee3 100644
--- a/service/datastore/raw_interface.go
+++ b/service/datastore/raw_interface.go
@@ -51,14 +51,19 @@ type Query interface {
Start(c Cursor) Query
}
+// CursorCB is used to obtain a Cursor while Run'ing a query on either
+// Interface or RawInterface.
+//
+// it can be invoked to obtain the current cursor.
+type CursorCB func() (Cursor, error)
+
// RawRunCB is the callback signature provided to RawInterface.Run
//
// - key is the Key of the entity
// - val is the data of the entity (or nil, if the query was keys-only)
-// - getCursor can be invoked to obtain the current cursor.
//
// Return true to continue iterating through the query results, or false to stop.
-type RawRunCB func(key Key, val PropertyMap, getCursor func() (Cursor, error)) bool
+type RawRunCB func(key Key, val PropertyMap, getCursor CursorCB) bool
// GetMultiCB is the callback signature provided to RawInterface.GetMulti
//
« no previous file with comments | « service/datastore/interface.go ('k') | service/datastore/reflect.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698