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

Unified Diff: service/datastore/datastore.go

Issue 1302813003: impl/memory: Implement Queries (Closed) Base URL: https://github.com/luci/gae.git@add_multi_iterator
Patch Set: stringSet everywhere 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 | « impl/memory/testing_utils_test.go ('k') | service/datastore/index.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/datastore.go
diff --git a/service/datastore/datastore.go b/service/datastore/datastore.go
index cbf30e675992aa1ab67c1142c283cab58e05e8b7..cb5544704617ed998ed12cedc7921151a4e736d8 100644
--- a/service/datastore/datastore.go
+++ b/service/datastore/datastore.go
@@ -32,6 +32,10 @@ func (d *datastoreImpl) DecodeCursor(s string) (Cursor, error) {
}
func (d *datastoreImpl) Run(q Query, cbIface interface{}) error {
+ if cbIface == nil {
+ return fmt.Errorf("cannot use nil callback when Running query")
+ }
+
// TODO(riannucci): Profile and determine if any of this is causing a real
// slowdown. Could potentially cache reflection stuff by cbType?
cbTyp := reflect.TypeOf(cbIface)
« no previous file with comments | « impl/memory/testing_utils_test.go ('k') | service/datastore/index.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698