|
Refactor keys and queries in datastore service and implementation.
* datastore.Query and datastore.FinalizedQuery are now first class objects
in the service/datastore api.
* datastore.Key is similarly a first class object. All luci/gae users will
need to interact with `*ds.Key` now. This object gained all the superpowers
that previously existed in the dskey subpackage of service/datastore.
The new Query objects are inspectable, and adjustable. Additionally, this
homogenizes they query generation between different implementations. The
normalization which normally occurs on the server-side is now done client-side.
This should ensure consistency between 'prod' and 'memory' implementations.
Additionally, the new FinalizedQuery object gains a GQL() method which should
(hopefully) allow trivial debugging by printing a query. You should be able to
copy and paste the generated GQL* into the appengine dashboard and see what
your request was querying for.
* With the exception of Cursors, which currently have no textual format in the
GQL schema.
R=dnj@chromium.org, estaab@chromium.org, maruel@chromium.org, tandrii@chromium.org, vadimsh@chromium.org
BUG= 533024
Committed: https://github.com/luci/gae/commit/f8e86bf226d6985065d19449e21d63398be39a67
Total comments: 96
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+3542 lines, -2758 lines) |
Patch |
 |
M |
filter/count/count.go
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
filter/count/count_test.go
|
View
|
1
2
3
|
9 chunks |
+20 lines, -13 lines |
0 comments
|
Download
|
 |
M |
filter/count/gi.go
|
View
|
1
2
3
|
5 chunks |
+19 lines, -21 lines |
0 comments
|
Download
|
 |
M |
filter/count/mc.go
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
filter/count/rds.go
|
View
|
|
3 chunks |
+4 lines, -22 lines |
0 comments
|
Download
|
 |
M |
filter/dscache/context.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
filter/dscache/ds.go
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
filter/dscache/ds_txn.go
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
filter/dscache/ds_txn_state.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
filter/dscache/dscache.go
|
View
|
1
2
|
3 chunks |
+38 lines, -10 lines |
0 comments
|
Download
|
 |
M |
filter/dscache/dscache_test.go
|
View
|
|
1 chunk |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
filter/dscache/globalconfig.go
|
View
|
1
2
|
2 chunks |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
filter/dscache/plan.go
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
filter/dscache/support.go
|
View
|
|
6 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
filter/featureBreaker/rds.go
|
View
|
|
1 chunk |
+23 lines, -12 lines |
0 comments
|
Download
|
 |
M |
impl/dummy/dummy.go
|
View
|
|
2 chunks |
+6 lines, -11 lines |
0 comments
|
Download
|
 |
M |
impl/dummy/dummy_test.go
|
View
|
1
2
3
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore.go
|
View
|
1
2
3
|
5 chunks |
+11 lines, -39 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_data.go
|
View
|
1
2
3
|
14 chunks |
+26 lines, -32 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_index.go
|
View
|
1
2
3
|
10 chunks |
+14 lines, -14 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_index_selection.go
|
View
|
1
2
|
19 chunks |
+26 lines, -26 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_index_test.go
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_query.go
|
View
|
1
2
|
7 chunks |
+115 lines, -570 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_query_execution.go
|
View
|
1
2
|
10 chunks |
+23 lines, -24 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_query_execution_test.go
|
View
|
1
2
3
|
15 chunks |
+73 lines, -67 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_query_test.go
|
View
|
1
2
3
|
4 chunks |
+77 lines, -313 lines |
0 comments
|
Download
|
 |
M |
impl/memory/datastore_test.go
|
View
|
1
2
3
|
20 chunks |
+42 lines, -70 lines |
0 comments
|
Download
|
 |
M |
impl/memory/gkvlite_utils.go
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
impl/memory/memcache.go
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
impl/memory/memcache_test.go
|
View
|
1
2
3
|
3 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
impl/memory/taskqueue_test.go
|
View
|
1
2
3
|
9 chunks |
+21 lines, -18 lines |
0 comments
|
Download
|
 |
M |
impl/memory/testing_utils_test.go
|
View
|
1
2
3
|
6 chunks |
+38 lines, -44 lines |
0 comments
|
Download
|
 |
M |
impl/prod/context.go
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
impl/prod/datastore_key.go
|
View
|
1
|
2 chunks |
+42 lines, -31 lines |
0 comments
|
Download
|
 |
M |
impl/prod/doc.go
|
View
|
1
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
impl/prod/memcache.go
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
impl/prod/raw_datastore.go
|
View
|
1
|
6 chunks |
+110 lines, -68 lines |
0 comments
|
Download
|
 |
M |
impl/prod/raw_datastore_type_converter.go
|
View
|
|
4 chunks |
+62 lines, -45 lines |
0 comments
|
Download
|
 |
M |
impl/prod/raw_datastore_type_converter_test.go
|
View
|
|
5 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
service/datastore/checkfilter.go
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
service/datastore/checkfilter_test.go
|
View
|
1
2
3
|
3 chunks |
+24 lines, -24 lines |
0 comments
|
Download
|
 |
M |
service/datastore/context.go
|
View
|
|
2 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
service/datastore/context_test.go
|
View
|
|
2 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
service/datastore/datastore.go
|
View
|
|
10 chunks |
+64 lines, -24 lines |
0 comments
|
Download
|
 |
M |
service/datastore/datastore_test.go
|
View
|
1
2
3
|
28 chunks |
+79 lines, -116 lines |
0 comments
|
Download
|
 |
D |
service/datastore/dskey/doc.go
|
View
|
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
D |
service/datastore/dskey/generic_key.go
|
View
|
|
1 chunk |
+0 lines, -122 lines |
0 comments
|
Download
|
 |
D |
service/datastore/dskey/key.go
|
View
|
|
1 chunk |
+0 lines, -244 lines |
0 comments
|
Download
|
 |
D |
service/datastore/dskey/key_test.go
|
View
|
|
1 chunk |
+0 lines, -257 lines |
0 comments
|
Download
|
 |
A |
service/datastore/finalized_query.go
|
View
|
1
2
3
|
1 chunk |
+337 lines, -0 lines |
0 comments
|
Download
|
 |
M |
service/datastore/index.go
|
View
|
1
2
3
|
9 chunks |
+105 lines, -46 lines |
0 comments
|
Download
|
 |
M |
service/datastore/index_test.go
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
service/datastore/interface.go
|
View
|
|
6 chunks |
+33 lines, -24 lines |
0 comments
|
Download
|
 |
A |
service/datastore/key.go
|
View
|
1
2
3
|
1 chunk |
+403 lines, -0 lines |
0 comments
|
Download
|
 |
A |
service/datastore/key_test.go
|
View
|
1
|
1 chunk |
+232 lines, -0 lines |
0 comments
|
Download
|
 |
M |
service/datastore/multiarg.go
|
View
|
1
2
3
|
12 chunks |
+31 lines, -30 lines |
0 comments
|
Download
|
 |
M |
service/datastore/pls_impl.go
|
View
|
|
3 chunks |
+5 lines, -10 lines |
0 comments
|
Download
|
 |
M |
service/datastore/pls_test.go
|
View
|
1
2
3
|
7 chunks |
+16 lines, -128 lines |
0 comments
|
Download
|
 |
M |
service/datastore/properties.go
|
View
|
1
2
3
|
10 chunks |
+193 lines, -36 lines |
0 comments
|
Download
|
 |
M |
service/datastore/properties_test.go
|
View
|
1
2
3
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
A |
service/datastore/query.go
|
View
|
1
2
3
|
1 chunk |
+709 lines, -0 lines |
0 comments
|
Download
|
 |
A |
service/datastore/query_test.go
|
View
|
|
1 chunk |
+291 lines, -0 lines |
0 comments
|
Download
|
 |
M |
service/datastore/raw_interface.go
|
View
|
1
2
|
9 chunks |
+7 lines, -63 lines |
0 comments
|
Download
|
 |
M |
service/datastore/raw_interface_test.go
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
service/datastore/reflect.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
service/datastore/serialize/serialize.go
|
View
|
1
2
|
8 chunks |
+8 lines, -14 lines |
0 comments
|
Download
|
 |
M |
service/datastore/serialize/serialize_test.go
|
View
|
1
2
3
|
12 chunks |
+105 lines, -93 lines |
0 comments
|
Download
|
 |
M |
service/datastore/testable.go
|
View
|
1
2
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
service/taskqueue/errors.go
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
service/taskqueue/taskqueue.go
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
service/taskqueue/types.go
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 17 (5 generated)
|