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

Unified Diff: service/datastore/query_test.go

Issue 1745703002: Auto-project on distinct inequality fields. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Group similar logics. Created 4 years, 10 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
« no previous file with comments | « service/datastore/query.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/query_test.go
diff --git a/service/datastore/query_test.go b/service/datastore/query_test.go
index 6c2d483c5f9fafb124a7675a72eea01baf967a88..2a1ab97335b5638e4858e646cad5840c697aaaa2 100644
--- a/service/datastore/query_test.go
+++ b/service/datastore/query_test.go
@@ -145,6 +145,11 @@ var queryTests = []queryTest{
"SELECT DISTINCT `hello` FROM `Foo` ORDER BY `hello`, `__key__`",
nil, nil},
+ {"projecting in an inequality query",
+ nq().Gte("foo", 10).Project("bar").Distinct(true),
+ "SELECT DISTINCT `bar`, `foo` FROM `Foo` WHERE `foo` >= 10 ORDER BY `foo`, `bar`, `__key__`",
+ nil, nil},
+
{"bad ancestors",
nq().Ancestor(mkKey("goop", 0)),
"",
« no previous file with comments | « service/datastore/query.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698