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

Side by Side Diff: service/datastore/serialize/serialize_test.go

Issue 1336443003: Implement projection queries correctly. (Closed) Base URL: https://github.com/luci/gae.git@master
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 unified diff | Download patch
« no previous file with comments | « service/datastore/serialize/serialize.go ('k') | service/datastore/types.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package serialize 5 package serialize
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "fmt" 9 "fmt"
10 "io" 10 "io"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 "geo", 90 "geo",
91 ds.PropertyMap{ 91 ds.PropertyMap{
92 "G": {mp(ds.GeoPoint{Lat: 1, Lng: 2})}, 92 "G": {mp(ds.GeoPoint{Lat: 1, Lng: 2})},
93 }, 93 },
94 }, 94 },
95 { 95 {
96 "data", 96 "data",
97 ds.PropertyMap{ 97 ds.PropertyMap{
98 "S": {mp("sup"), mp("fool"), mp("nerd") }, 98 "S": {mp("sup"), mp("fool"), mp("nerd") },
99 "D.Foo.Nerd": {mp([]byte("sup")), mp([]byte("foo l"))}, 99 "D.Foo.Nerd": {mp([]byte("sup")), mp([]byte("foo l"))},
100 "B": {mp(ds.ByteString("sup")), mp(ds.B yteString("fool"))},
101 }, 100 },
102 }, 101 },
103 { 102 {
104 "time", 103 "time",
105 ds.PropertyMap{ 104 ds.PropertyMap{
106 "T": { 105 "T": {
107 mp(time.Now().UTC()), 106 mp(time.Now().UTC()),
108 mp(time.Now().Add(time.Second).UTC())}, 107 mp(time.Now().Add(time.Second).UTC())},
109 }, 108 },
110 }, 109 },
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 for i := 0; i < MaxIndexColumns+1; i++ { 445 for i := 0; i < MaxIndexColumns+1; i++ {
447 id.SortBy = append(id.SortBy, ds.IndexCo lumn{Property: "Hi", Direction: ds.ASCENDING}) 446 id.SortBy = append(id.SortBy, ds.IndexCo lumn{Property: "Hi", Direction: ds.ASCENDING})
448 } 447 }
449 data := ToBytes(*id.PrepForIdxTable()) 448 data := ToBytes(*id.PrepForIdxTable())
450 newID, err = ReadIndexDefinition(mkBuf(data)) 449 newID, err = ReadIndexDefinition(mkBuf(data))
451 So(err, ShouldErrLike, "over 64 sort orders") 450 So(err, ShouldErrLike, "over 64 sort orders")
452 }) 451 })
453 }) 452 })
454 }) 453 })
455 } 454 }
OLDNEW
« no previous file with comments | « service/datastore/serialize/serialize.go ('k') | service/datastore/types.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698