Move ne comparator below eq comparator (#119)
qb: Move ne comparator below eq comparator Signed-off-by: pierdipi <pierangelodipilato@gmail.com>
This commit is contained in:
@@ -23,6 +23,16 @@ func TestCmp(t *testing.T) {
|
||||
S: "eq=?",
|
||||
N: []string{"eq"},
|
||||
},
|
||||
{
|
||||
C: Ne("ne"),
|
||||
S: "ne!=?",
|
||||
N: []string{"ne"},
|
||||
},
|
||||
{
|
||||
C: NeTuple("ne", 3),
|
||||
S: "ne!=(?,?,?)",
|
||||
N: []string{"ne_0", "ne_1", "ne_2"},
|
||||
},
|
||||
{
|
||||
C: Lt("lt"),
|
||||
S: "lt<?",
|
||||
@@ -103,16 +113,6 @@ func TestCmp(t *testing.T) {
|
||||
S: "like LIKE (?,?)",
|
||||
N: []string{"like_0", "like_1"},
|
||||
},
|
||||
{
|
||||
C: Ne("ne"),
|
||||
S: "ne!=?",
|
||||
N: []string{"ne"},
|
||||
},
|
||||
{
|
||||
C: NeTuple("ne", 3),
|
||||
S: "ne!=(?,?,?)",
|
||||
N: []string{"ne_0", "ne_1", "ne_2"},
|
||||
},
|
||||
|
||||
// Custom bind names
|
||||
{
|
||||
@@ -120,6 +120,11 @@ func TestCmp(t *testing.T) {
|
||||
S: "eq=?",
|
||||
N: []string{"name"},
|
||||
},
|
||||
{
|
||||
C: NeNamed("ne", "name"),
|
||||
S: "ne!=?",
|
||||
N: []string{"name"},
|
||||
},
|
||||
{
|
||||
C: LtNamed("lt", "name"),
|
||||
S: "lt<?",
|
||||
@@ -155,17 +160,16 @@ func TestCmp(t *testing.T) {
|
||||
S: "cntKey CONTAINS KEY ?",
|
||||
N: []string{"name"},
|
||||
},
|
||||
{
|
||||
C: NeNamed("ne", "name"),
|
||||
S: "ne!=?",
|
||||
N: []string{"name"},
|
||||
},
|
||||
|
||||
// Literals
|
||||
{
|
||||
C: EqLit("eq", "litval"),
|
||||
S: "eq=litval",
|
||||
},
|
||||
{
|
||||
C: NeLit("ne", "litval"),
|
||||
S: "ne!=litval",
|
||||
},
|
||||
{
|
||||
C: LtLit("lt", "litval"),
|
||||
S: "lt<litval",
|
||||
@@ -190,10 +194,6 @@ func TestCmp(t *testing.T) {
|
||||
C: ContainsLit("cnt", "litval"),
|
||||
S: "cnt CONTAINS litval",
|
||||
},
|
||||
{
|
||||
C: NeLit("ne", "litval"),
|
||||
S: "ne!=litval",
|
||||
},
|
||||
|
||||
// Functions
|
||||
{
|
||||
@@ -215,6 +215,11 @@ func TestCmp(t *testing.T) {
|
||||
C: EqFunc("eq", Now()),
|
||||
S: "eq=now()",
|
||||
},
|
||||
{
|
||||
C: NeFunc("ne", Fn("fn", "arg0", "arg1", "arg2")),
|
||||
S: "ne!=fn(?,?,?)",
|
||||
N: []string{"arg0", "arg1", "arg2"},
|
||||
},
|
||||
{
|
||||
C: LtFunc("eq", Now()),
|
||||
S: "eq<now()",
|
||||
@@ -233,11 +238,6 @@ func TestCmp(t *testing.T) {
|
||||
S: "eq>=maxTimeuuid(?)",
|
||||
N: []string{"arg0"},
|
||||
},
|
||||
{
|
||||
C: NeFunc("ne", Fn("fn", "arg0", "arg1", "arg2")),
|
||||
S: "ne!=fn(?,?,?)",
|
||||
N: []string{"arg0", "arg1", "arg2"},
|
||||
},
|
||||
}
|
||||
|
||||
buf := bytes.Buffer{}
|
||||
|
||||
Reference in New Issue
Block a user