diff --git a/docstore/drivertest/drivertest.go b/docstore/drivertest/drivertest.go index 44051e3b32..39aaaed5cd 100644 --- a/docstore/drivertest/drivertest.go +++ b/docstore/drivertest/drivertest.go @@ -1423,6 +1423,16 @@ func testGetQuery(t *testing.T, _ Harness, coll *docstore.Collection) { q: coll.Query().Where("Score", ">=", 50).Where("Time", ">", date(4, 1)), want: func(h *HighScore) bool { return h.Score >= 50 && h.Time.After(date(4, 1)) }, }, + { + name: "PlayerIn", + q: coll.Query().Where("Player", "in", []string{"pat", "billie"}), + want: func(h *HighScore) bool { return h.Player == "pat" || h.Player == "billie" }, + }, + { + name: "PlayerNotIn", + q: coll.Query().Where("Player", "not-in", []string{"pat", "billie"}), + want: func(h *HighScore) bool { return h.Player != "pat" && h.Player != "billie" }, + }, { name: "AllByPlayerAsc", q: coll.Query().OrderBy("Player", docstore.Ascending), diff --git a/docstore/query.go b/docstore/query.go index a7180160fb..44b2bb995e 100644 --- a/docstore/query.go +++ b/docstore/query.go @@ -118,7 +118,7 @@ func (q *Query) Limit(n int) *Query { return q } if n <= 0 { - return q.invalidf("limit value of % must be greater than zero", n) + return q.invalidf("limit value of %d must be greater than zero", n) } if q.dq.Limit > 0 { return q.invalidf("query can have at most one limit clause")