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

Unified Diff: impl/memory/datastore_query.go

Issue 1550903002: impl/memory: Fix time serialization encoding. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Move logic to serialize, add blobstore.Key support. Created 5 years 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 | « no previous file | impl/memory/datastore_query_execution_test.go » ('j') | service/datastore/properties.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/datastore_query.go
diff --git a/impl/memory/datastore_query.go b/impl/memory/datastore_query.go
index 856f4c19bf0c110f29999217dfff28464245c12c..8c731730068f4be3fcb74b9c45f3d788154dbffc 100644
--- a/impl/memory/datastore_query.go
+++ b/impl/memory/datastore_query.go
@@ -107,7 +107,7 @@ func numComponents(fq *ds.FinalizedQuery) int {
// it is nil.
//
// NOTE: if fq specifies a descending sort order for the inequality, the bounds
-// will be inverted, incremented, and fliped.
+// will be inverted, incremented, and flipped.
func GetBinaryBounds(fq *ds.FinalizedQuery) (lower, upper []byte) {
// Pick up the start/end range from the inequalities, if any.
//
@@ -117,7 +117,7 @@ func GetBinaryBounds(fq *ds.FinalizedQuery) (lower, upper []byte) {
if ineqProp := fq.IneqFilterProp(); ineqProp != "" {
_, startOp, startV := fq.IneqFilterLow()
if startOp != "" {
- lower = serialize.ToBytes(startV)
+ lower = serialize.ToBytes(serialize.RawProperty(startV))
if startOp == ">" {
lower = increment(lower)
}
@@ -125,7 +125,7 @@ func GetBinaryBounds(fq *ds.FinalizedQuery) (lower, upper []byte) {
_, endOp, endV := fq.IneqFilterHigh()
if endOp != "" {
- upper = serialize.ToBytes(endV)
+ upper = serialize.ToBytes(serialize.RawProperty(endV))
if endOp == "<=" {
upper = increment(upper)
}
@@ -180,7 +180,7 @@ func reduce(fq *ds.FinalizedQuery, aid, ns string, isTxn bool) (*reducedQuery, e
for prop, vals := range eqFilts {
sVals := stringset.New(len(vals))
for _, v := range vals {
- sVals.Add(string(serialize.ToBytes(v)))
+ sVals.Add(string(serialize.ToBytes(serialize.RawProperty(v))))
}
ret.eqFilters[prop] = sVals
}
« no previous file with comments | « no previous file | impl/memory/datastore_query_execution_test.go » ('j') | service/datastore/properties.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698