Index: impl/memory/datastore_index.go |
diff --git a/impl/memory/datastore_index.go b/impl/memory/datastore_index.go |
index aa84af641ba6d587a14749f5688432cca435453c..13c403f3899d270e85b775de9b11f635aba1ed9d 100644 |
--- a/impl/memory/datastore_index.go |
+++ b/impl/memory/datastore_index.go |
@@ -44,9 +44,9 @@ func defaultIndexes(kind string, pmap ds.PropertyMap) []*ds.IndexDefinition { |
return ret |
} |
-func indexEntriesWithBuiltins(k ds.Key, pm ds.PropertyMap, complexIdxs []*ds.IndexDefinition) *memStore { |
+func indexEntriesWithBuiltins(k *ds.Key, pm ds.PropertyMap, complexIdxs []*ds.IndexDefinition) *memStore { |
sip := partiallySerialize(k, pm) |
- return sip.indexEntries(k.Namespace(), append(defaultIndexes(k.Kind(), pm), complexIdxs...)) |
+ return sip.indexEntries(k.Namespace(), append(defaultIndexes(k.Last().Kind, pm), complexIdxs...)) |
} |
// serializedPvals is all of the serialized DSProperty values in qASC order. |
@@ -78,7 +78,7 @@ func serializeRow(vals []ds.Property) serializedPvals { |
return ret |
} |
-func partiallySerialize(k ds.Key, pm ds.PropertyMap) (ret serializedIndexablePmap) { |
+func partiallySerialize(k *ds.Key, pm ds.PropertyMap) (ret serializedIndexablePmap) { |
ret = make(serializedIndexablePmap, len(pm)+2) |
if k == nil { |
impossible(fmt.Errorf("key to partiallySerialize is nil")) |
@@ -289,7 +289,7 @@ func addIndex(store *memStore, ns string, compIdx []*ds.IndexDefinition) { |
prop, err := serialize.ReadProperty(bytes.NewBuffer(i.Key), serialize.WithoutContext, globalAppID, ns) |
memoryCorruption(err) |
- k := prop.Value().(ds.Key) |
+ k := prop.Value().(*ds.Key) |
sip := partiallySerialize(k, pm) |
@@ -301,7 +301,7 @@ func addIndex(store *memStore, ns string, compIdx []*ds.IndexDefinition) { |
} |
} |
-func updateIndexes(store *memStore, key ds.Key, oldEnt, newEnt ds.PropertyMap) { |
+func updateIndexes(store *memStore, key *ds.Key, oldEnt, newEnt ds.PropertyMap) { |
// load all current complex query index definitions. |
compIdx := []*ds.IndexDefinition{} |
walkCompIdxs(store, nil, func(i *ds.IndexDefinition) bool { |