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

Unified Diff: impl/memory/datastore_index.go

Issue 2342063003: Differentiate between single- and multi- props. (Closed)
Patch Set: Slice is now always a clone. This is marginally worse performance, but a much safer UI. Created 4 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 | « impl/memory/datastore_data.go ('k') | impl/memory/datastore_index_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/datastore_index.go
diff --git a/impl/memory/datastore_index.go b/impl/memory/datastore_index.go
index 7f3a839e9c2509ae77e11c017b2ba113208b4625..f2b5010da0f9c98f31628043c54523f8ddf7bdde 100644
--- a/impl/memory/datastore_index.go
+++ b/impl/memory/datastore_index.go
@@ -23,7 +23,8 @@ func (s qIndexSlice) Less(i, j int) bool { return s[i].Less(s[j]) }
func defaultIndexes(kind string, pmap ds.PropertyMap) []*ds.IndexDefinition {
ret := make(qIndexSlice, 0, 2*len(pmap)+1)
ret = append(ret, &ds.IndexDefinition{Kind: kind})
- for name, pvals := range pmap {
+ for name := range pmap {
+ pvals := pmap.Slice(name)
needsIndex := false
for _, v := range pvals {
if v.IndexSetting() == ds.ShouldIndex {
« no previous file with comments | « impl/memory/datastore_data.go ('k') | impl/memory/datastore_index_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698