| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |