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

Unified Diff: impl/memory/datastore_index.go

Issue 1286943002: impl/memory: Make queries self-validate (Closed) Base URL: https://github.com/luci/gae.git@add_datastore_testable
Patch Set: add doc 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
Index: impl/memory/datastore_index.go
diff --git a/impl/memory/datastore_index.go b/impl/memory/datastore_index.go
index 46c2ec5173c92f6b283ba55edebd77ba8ef02c92..1fb4c0ea95727ee1cdd0becb7c4e788d7ed4ac53 100644
--- a/impl/memory/datastore_index.go
+++ b/impl/memory/datastore_index.go
@@ -165,6 +165,9 @@ func (m *matcher) match(idx *ds.IndexDefinition, sip serializedIndexablePmap) (i
m.buf.propVec = m.buf.propVec[:0]
m.buf.orders = m.buf.orders[:0]
for _, sb := range idx.SortBy {
+ if sb.Property == "__key__" {
+ panic("don't know how to build compound index on __key__")
+ }
if pv, ok := sip[sb.Property]; ok {
m.buf.propVec = append(m.buf.propVec, pv)
m.buf.orders = append(m.buf.orders, sb.Direction)

Powered by Google App Engine
This is Rietveld 408576698