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

Unified Diff: service/datastore/serialize/serialize.go

Issue 1302813003: impl/memory: Implement Queries (Closed) Base URL: https://github.com/luci/gae.git@add_multi_iterator
Patch Set: inequalities work now Created 5 years, 4 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
Index: service/datastore/serialize/serialize.go
diff --git a/service/datastore/serialize/serialize.go b/service/datastore/serialize/serialize.go
index 26c8a7720e61923aac5c9a9747f14eeae5489aec..b81445cd989dd758bebd643fb8b45e060bbbd7d1 100644
--- a/service/datastore/serialize/serialize.go
+++ b/service/datastore/serialize/serialize.go
@@ -217,7 +217,7 @@ func ReadTime(buf Buffer) (time.Time, error) {
func WriteProperty(buf Buffer, context KeyContext, p ds.Property) (err error) {
defer recoverTo(&err)
typb := byte(p.Type())
- if p.IndexSetting() == ds.NoIndex {
+ if p.IndexSetting() != ds.NoIndex {
typb |= 0x80
}
panicIf(buf.WriteByte(typb))
@@ -257,7 +257,7 @@ func ReadProperty(buf Buffer, context KeyContext, appid, namespace string) (p ds
return
}
is := ds.ShouldIndex
- if (typb & 0x80) != 0 {
+ if (typb & 0x80) == 0 {
is = ds.NoIndex
}
switch ds.PropertyType(typb & 0x7f) {

Powered by Google App Engine
This is Rietveld 408576698