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

Unified Diff: impl/prod/raw_datastore.go

Issue 2986533002: [datastore] Fix querying with []byte. (Closed)
Patch Set: add crappy test Created 3 years, 5 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/prod/everything_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/raw_datastore.go
diff --git a/impl/prod/raw_datastore.go b/impl/prod/raw_datastore.go
index 1e2b9baf792f512c8b08f25c813b555edd1b82ec..e27619b7cae2613fa5f543ece2608c9f4d6e75f0 100644
--- a/impl/prod/raw_datastore.go
+++ b/impl/prod/raw_datastore.go
@@ -201,6 +201,11 @@ func (d *rdsImpl) fixQuery(fq *ds.FinalizedQuery) (*datastore.Query, error) {
return nil, err
}
+ // Filter doesn't like ByteString, even though ByteString is the indexed
+ // counterpart of []byte... sigh.
+ if ds, ok := p.Value.(datastore.ByteString); ok {
+ p.Value = []byte(ds)
+ }
ret = ret.Filter(filt, p.Value)
}
}
« no previous file with comments | « impl/prod/everything_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698