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

Unified Diff: impl/memory/datastore_query_execution.go

Issue 1365743002: Refactor serialization helpers from impl/memory -> service/datastore/serialize (Closed) Base URL: https://github.com/luci/gae.git@estimate_size
Patch Set: fix comments 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 | « impl/memory/datastore_query.go ('k') | impl/memory/datastore_query_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/datastore_query_execution.go
diff --git a/impl/memory/datastore_query_execution.go b/impl/memory/datastore_query_execution.go
index 758f7933f6749f21b94d43cbcff0b05659650edd..7da5218ee0809b48b92c80d5968251b08f6ac7ae 100644
--- a/impl/memory/datastore_query_execution.go
+++ b/impl/memory/datastore_query_execution.go
@@ -73,7 +73,7 @@ func (s *projectionStrategy) handle(rawData [][]byte, decodedProps []ds.Property
pmap[p.propertyName] = []ds.Property{decodedProps[p.suffixIndex]}
}
if s.distinct != nil {
- if !s.distinct.Add(string(bjoin(projectedRaw...))) {
+ if !s.distinct.Add(string(serialize.Join(projectedRaw...))) {
return true
}
}
@@ -156,7 +156,7 @@ func parseSuffix(ns string, suffixFormat []ds.IndexColumn, suffix []byte, count
raw[i] = suffix[:offset]
suffix = suffix[offset:]
if needInvert {
- raw[i] = invert(raw[i])
+ raw[i] = serialize.Invert(raw[i])
}
}
@@ -206,7 +206,7 @@ func executeQuery(fq *ds.FinalizedQuery, ns string, isTxn bool, idx, head *memSt
}
// TODO(riannucci): Do we need to decrement suffix instead of increment
// if we're sorting by __key__ DESCENDING?
- return queryCursor(bjoin(cursorPrefix, increment(suffix))), nil
+ return queryCursor(serialize.Join(cursorPrefix, increment(suffix))), nil
}
}
« no previous file with comments | « impl/memory/datastore_query.go ('k') | impl/memory/datastore_query_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698