|
Differentiate between single- and multi- props.
Fixes #58.
Change PropertyMap to accept either a single Property or a
PropertySlice, the former being a single Property and the latter
being a multi-property regardless of content size.
This will likely break API compatibility for packages that directly use
PropertyMap, which shouldn't be too many. Updating is not difficult:
If you want to have a single property, you can assign directly instead
of wrapping in a []Property:
PropertyMap{"Foo": MkProperty("Bar")}
If you want to have a multi-valued Property, use a PropertySlice:
PropertyMap{"Foo": PropertySlice{ds.MkProperty("Bar")}}
Note that datastore now differentiates between single-valued Properties
and multi-valued Properties. When dealing with structs, luci/gae doesn't
really care when loading, but will export them as multi- if they are backed
by a slice.
BUG=None
TEST=local
Committed: https://github.com/luci/gae/commit/c4fab9e7d5a1b17dc32257a21fde91696d6cb217
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+699 lines, -450 lines) |
Patch |
|
M |
filter/count/count_test.go
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
filter/dscache/dscache_test.go
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
filter/featureBreaker/featurebreaker_test.go
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
filter/txnBuf/query_merger.go
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
filter/txnBuf/txnbuf_test.go
|
View
|
|
6 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
impl/cloud/datastore.go
|
View
|
|
6 chunks |
+76 lines, -42 lines |
0 comments
|
Download
|
|
M |
impl/cloud/datastore_test.go
|
View
|
|
3 chunks |
+27 lines, -13 lines |
0 comments
|
Download
|
|
M |
impl/memory/datastore_data.go
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
impl/memory/datastore_index.go
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
impl/memory/datastore_index_test.go
|
View
|
|
6 chunks |
+26 lines, -26 lines |
0 comments
|
Download
|
|
M |
impl/memory/datastore_query_execution.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
impl/memory/datastore_test.go
|
View
|
|
5 chunks |
+23 lines, -8 lines |
0 comments
|
Download
|
|
M |
impl/memory/race_test.go
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
impl/memory/testing_utils_test.go
|
View
|
|
1 chunk |
+41 lines, -14 lines |
0 comments
|
Download
|
|
M |
impl/prod/everything_test.go
|
View
|
|
8 chunks |
+52 lines, -39 lines |
0 comments
|
Download
|
|
M |
impl/prod/raw_datastore_type_converter.go
|
View
|
|
1 chunk |
+33 lines, -4 lines |
0 comments
|
Download
|
|
M |
service/datastore/datastore_test.go
|
View
|
|
28 chunks |
+55 lines, -55 lines |
0 comments
|
Download
|
|
M |
service/datastore/dumper/dumper.go
|
View
|
|
1 chunk |
+18 lines, -9 lines |
0 comments
|
Download
|
|
M |
service/datastore/dumper/dumper_example_test.go
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
service/datastore/meta/eg_test.go
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
service/datastore/multiarg.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
service/datastore/pls_impl.go
|
View
|
1
2
|
6 chunks |
+28 lines, -11 lines |
0 comments
|
Download
|
|
M |
service/datastore/pls_test.go
|
View
|
|
30 chunks |
+119 lines, -115 lines |
0 comments
|
Download
|
|
M |
service/datastore/properties.go
|
View
|
1
2
|
11 chunks |
+104 lines, -41 lines |
0 comments
|
Download
|
|
M |
service/datastore/properties_test.go
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
service/datastore/serialize/serialize.go
|
View
|
|
5 chunks |
+40 lines, -17 lines |
0 comments
|
Download
|
|
M |
service/datastore/serialize/serialize_test.go
|
View
|
|
3 chunks |
+15 lines, -15 lines |
0 comments
|
Download
|
|
M |
service/datastore/size_test.go
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 12 (6 generated)
|