Add qb.ContainsKey to query keys in a map (#57)
qb: add ContainsKey and ContainsKeyNamed
This commit is contained in:
committed by
Michał Matczuk
parent
9b530002fa
commit
2f13a81c46
@@ -53,6 +53,11 @@ func TestCmp(t *testing.T) {
|
||||
S: "cnt CONTAINS ?",
|
||||
N: []string{"cnt"},
|
||||
},
|
||||
{
|
||||
C: ContainsKey("cntKey"),
|
||||
S: "cntKey CONTAINS KEY ?",
|
||||
N: []string{"cntKey"},
|
||||
},
|
||||
|
||||
// Custom bind names
|
||||
{
|
||||
@@ -90,6 +95,11 @@ func TestCmp(t *testing.T) {
|
||||
S: "cnt CONTAINS ?",
|
||||
N: []string{"name"},
|
||||
},
|
||||
{
|
||||
C: ContainsKeyNamed("cntKey", "name"),
|
||||
S: "cntKey CONTAINS KEY ?",
|
||||
N: []string{"name"},
|
||||
},
|
||||
|
||||
// Literals
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user