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

Unified Diff: service/datastore/query_test.go

Issue 1409613002: Use the sort.Search api correctly. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years, 2 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
« service/datastore/query.go ('K') | « 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 3d88c64f89ea85ea1a88cefd3b154ac4a2d297d9..6c2d483c5f9fafb124a7675a72eea01baf967a88 100644
--- a/service/datastore/query_test.go
+++ b/service/datastore/query_test.go
@@ -253,6 +253,12 @@ var queryTests = []queryTest{
nil,
nq().Order("a", "c").Eq("b", 2)},
+ {"duplicate equality filters are ignored",
+ nq().Eq("b", 10, -1, 2, 2, 7, 1, 2, 10, -1, 7, 1, 2),
+ "SELECT * FROM `Foo` WHERE `b` = -1 AND `b` = 1 AND `b` = 2 AND `b` = 7 AND `b` = 10 ORDER BY `__key__`",
+ nil,
+ nq().Eq("b", -1, 1, 2, 7, 10)},
+
{"duplicate orders are ignored",
nq().Order("a").Order("a").Order("a"),
"SELECT * FROM `Foo` ORDER BY `a`, `__key__`",
« service/datastore/query.go ('K') | « service/datastore/query.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698