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

Unified Diff: service/datastore/interface.go

Issue 1309933003: datastore: Add DecodeCursor to [Raw]Interface. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Use more concise formulation. 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/datastore.go ('k') | service/datastore/raw_interface.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/interface.go
diff --git a/service/datastore/interface.go b/service/datastore/interface.go
index f767a81261489630e957770586b4d24c8f92b799..a01c219f6e546371687e33f5fd6ce0066668e9e7 100644
--- a/service/datastore/interface.go
+++ b/service/datastore/interface.go
@@ -83,11 +83,17 @@ type Interface interface {
// Run stops on the first error encountered.
Run(q Query, cb interface{}) error
+ // DecodeCursor converts a string returned by a Cursor into a Cursor instance.
+ // It will return an error if the supplied string is not valid, or could not
+ // be decoded by the implementation.
+ DecodeCursor(string) (Cursor, error)
+
// GetAll retrieves all of the Query results into dst.
//
// dst must be one of:
// - *[]S or *[]*S where S is a struct
- // - *[]P or *[]*P where *P is a concrete type implementing PropertyLoadSaver
+ // - *[]P or *[]*P where *P is a concrete type implementing
+ // PropertyLoadSaver
// - *[]Key implies a keys-only query.
GetAll(q Query, dst interface{}) error
@@ -118,7 +124,7 @@ type Interface interface {
// - []S or []*S where S is a struct
// - []P or []*P where *P is a concrete type implementing PropertyLoadSaver
// - []I where I is some interface type. Each element of the slice must
- // be non-nil, and its underlying type must be either *S or *P.
+ // be non-nil, and its underlying type must be either *S or *P.
GetMulti(dst interface{}) error
// PutMulti writes items to the datastore.
« no previous file with comments | « service/datastore/datastore.go ('k') | service/datastore/raw_interface.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698