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

Unified Diff: service/datastore/testable.go

Issue 1364333002: Add AutoIndex (Closed) Base URL: https://github.com/luci/gae.git@add_full_consistency
Patch Set: symbollls Created 5 years, 3 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/index_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/testable.go
diff --git a/service/datastore/testable.go b/service/datastore/testable.go
index e03fb8e76eb5bcc069fb61bf1523e9a14ac51786..14e3d8e822f1565148e4f767c0ebc3324fb63863 100644
--- a/service/datastore/testable.go
+++ b/service/datastore/testable.go
@@ -49,4 +49,12 @@ type Testable interface {
// By default the datastore is eventually consistent, and you must call
// CatchupIndexes or use Take/SetIndexSnapshot to manipulate the index state.
Consistent(always bool)
+
+ // AutoIndex controls the index creation behavior. If it is set to true, then
+ // any time the datastore encounters a missing index, it will silently create
+ // one and allow the query to succeed. If it's false, then the query will
+ // return an error describing the index which could be added with AddIndexes.
+ //
+ // By default this is false.
+ AutoIndex(bool)
}
« no previous file with comments | « service/datastore/index_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698