Skip to content

Commit 7802dd2

Browse files
committed
Fix unit tests.
1 parent aad0431 commit 7802dd2

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

internal/knowledge/query_expression_builder_test.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,95 +70,95 @@ func TestShouldBuildExpression(t *testing.T) {
7070
}
7171

7272
var testCases = []ExpressionTestCase{
73-
ExpressionTestCase{
73+
{
7474
Cypher: "(a.value)",
7575
SQL: "(a0.value)",
7676
},
77-
ExpressionTestCase{
77+
{
7878
Cypher: "a.value OR b.value",
7979
SQL: "a0.value OR a1.value",
8080
},
81-
ExpressionTestCase{
81+
{
8282
Cypher: "a.value AND b.value",
8383
SQL: "a0.value AND a1.value",
8484
},
85-
ExpressionTestCase{
85+
{
8686
Cypher: "NOT a.value",
8787
SQL: "NOT a0.value",
8888
},
89-
ExpressionTestCase{
89+
{
9090
Cypher: "NOT NOT a.value",
9191
SQL: "a0.value",
9292
},
93-
ExpressionTestCase{
93+
{
9494
Cypher: "a.value CONTAINS 'abc'",
9595
SQL: "a0.value LIKE '%abc%'",
9696
},
97-
ExpressionTestCase{
97+
{
9898
Cypher: "a.value STARTS WITH 'abc'",
9999
SQL: "a0.value LIKE 'abc%'",
100100
},
101-
ExpressionTestCase{
101+
{
102102
Cypher: "a.value ENDS WITH 'abc'",
103103
SQL: "a0.value LIKE '%abc'",
104104
},
105-
ExpressionTestCase{
105+
{
106106
Cypher: "COUNT(a.value)",
107-
SQL: "COUNT(a0.value)",
107+
SQL: "COUNT(*)",
108108
},
109-
ExpressionTestCase{
109+
{
110110
Cypher: "a.value < b.value",
111111
SQL: "a0.value < a1.value",
112112
},
113-
ExpressionTestCase{
113+
{
114114
Cypher: "a.value = b.value",
115115
SQL: "a0.value = a1.value",
116116
},
117-
ExpressionTestCase{
117+
{
118118
Cypher: "a.value <> b.value",
119119
SQL: "a0.value <> a1.value",
120120
},
121-
ExpressionTestCase{
121+
{
122122
Cypher: "a.value = 'abc'",
123123
SQL: "a0.value = 'abc'",
124124
},
125-
ExpressionTestCase{
125+
{
126126
Cypher: "a",
127127
SQL: "a0.id, a0.value, a0.type",
128128
},
129-
ExpressionTestCase{
129+
{
130130
Cypher: "r",
131131
SQL: "r0.from_id, r0.to_id, r0.type",
132132
},
133-
ExpressionTestCase{
133+
{
134134
Cypher: "a.value",
135135
SQL: "a0.value",
136136
},
137-
ExpressionTestCase{
137+
{
138138
Cypher: "'abc'",
139139
SQL: "'abc'",
140140
},
141-
ExpressionTestCase{
141+
{
142142
Cypher: "2",
143143
SQL: "2",
144144
},
145-
ExpressionTestCase{
145+
{
146146
Cypher: "2.5",
147147
SQL: "2.500000",
148148
},
149-
ExpressionTestCase{
149+
{
150150
Cypher: "true",
151151
SQL: "true",
152152
},
153-
ExpressionTestCase{
153+
{
154154
Cypher: "false",
155155
SQL: "false",
156156
},
157-
ExpressionTestCase{
157+
{
158158
Cypher: "TRUE",
159159
SQL: "true",
160160
},
161-
ExpressionTestCase{
161+
{
162162
Cypher: "FALSE",
163163
SQL: "false",
164164
},

0 commit comments

Comments
 (0)