func (d *dataStoreData) fixKeyLocked(ents *memCollection, key *ds.Key) (*ds.Key, error) { if key.Incomplete() { id, err := d.allocateIDsLocked(ents, key, 1) if err != nil { return key, err } key = ds.NewKey(key.AppID(), key.Namespace(), key.Kind(), "", id, key.Parent()) } return key, nil }
func rootIDsKey(kind string) []byte { return keyBytes(ds.NewKey("", "", "__entity_root_ids__", kind, 0, nil)) }
func groupIDsKey(key *ds.Key) []byte { return keyBytes(ds.NewKey("", "", "__entity_group_ids__", "", 1, key.Root())) }