@@ -70,95 +70,95 @@ func TestShouldBuildExpression(t *testing.T) {
70
70
}
71
71
72
72
var testCases = []ExpressionTestCase {
73
- ExpressionTestCase {
73
+ {
74
74
Cypher : "(a.value)" ,
75
75
SQL : "(a0.value)" ,
76
76
},
77
- ExpressionTestCase {
77
+ {
78
78
Cypher : "a.value OR b.value" ,
79
79
SQL : "a0.value OR a1.value" ,
80
80
},
81
- ExpressionTestCase {
81
+ {
82
82
Cypher : "a.value AND b.value" ,
83
83
SQL : "a0.value AND a1.value" ,
84
84
},
85
- ExpressionTestCase {
85
+ {
86
86
Cypher : "NOT a.value" ,
87
87
SQL : "NOT a0.value" ,
88
88
},
89
- ExpressionTestCase {
89
+ {
90
90
Cypher : "NOT NOT a.value" ,
91
91
SQL : "a0.value" ,
92
92
},
93
- ExpressionTestCase {
93
+ {
94
94
Cypher : "a.value CONTAINS 'abc'" ,
95
95
SQL : "a0.value LIKE '%abc%'" ,
96
96
},
97
- ExpressionTestCase {
97
+ {
98
98
Cypher : "a.value STARTS WITH 'abc'" ,
99
99
SQL : "a0.value LIKE 'abc%'" ,
100
100
},
101
- ExpressionTestCase {
101
+ {
102
102
Cypher : "a.value ENDS WITH 'abc'" ,
103
103
SQL : "a0.value LIKE '%abc'" ,
104
104
},
105
- ExpressionTestCase {
105
+ {
106
106
Cypher : "COUNT(a.value)" ,
107
- SQL : "COUNT(a0.value )" ,
107
+ SQL : "COUNT(* )" ,
108
108
},
109
- ExpressionTestCase {
109
+ {
110
110
Cypher : "a.value < b.value" ,
111
111
SQL : "a0.value < a1.value" ,
112
112
},
113
- ExpressionTestCase {
113
+ {
114
114
Cypher : "a.value = b.value" ,
115
115
SQL : "a0.value = a1.value" ,
116
116
},
117
- ExpressionTestCase {
117
+ {
118
118
Cypher : "a.value <> b.value" ,
119
119
SQL : "a0.value <> a1.value" ,
120
120
},
121
- ExpressionTestCase {
121
+ {
122
122
Cypher : "a.value = 'abc'" ,
123
123
SQL : "a0.value = 'abc'" ,
124
124
},
125
- ExpressionTestCase {
125
+ {
126
126
Cypher : "a" ,
127
127
SQL : "a0.id, a0.value, a0.type" ,
128
128
},
129
- ExpressionTestCase {
129
+ {
130
130
Cypher : "r" ,
131
131
SQL : "r0.from_id, r0.to_id, r0.type" ,
132
132
},
133
- ExpressionTestCase {
133
+ {
134
134
Cypher : "a.value" ,
135
135
SQL : "a0.value" ,
136
136
},
137
- ExpressionTestCase {
137
+ {
138
138
Cypher : "'abc'" ,
139
139
SQL : "'abc'" ,
140
140
},
141
- ExpressionTestCase {
141
+ {
142
142
Cypher : "2" ,
143
143
SQL : "2" ,
144
144
},
145
- ExpressionTestCase {
145
+ {
146
146
Cypher : "2.5" ,
147
147
SQL : "2.500000" ,
148
148
},
149
- ExpressionTestCase {
149
+ {
150
150
Cypher : "true" ,
151
151
SQL : "true" ,
152
152
},
153
- ExpressionTestCase {
153
+ {
154
154
Cypher : "false" ,
155
155
SQL : "false" ,
156
156
},
157
- ExpressionTestCase {
157
+ {
158
158
Cypher : "TRUE" ,
159
159
SQL : "true" ,
160
160
},
161
- ExpressionTestCase {
161
+ {
162
162
Cypher : "FALSE" ,
163
163
SQL : "false" ,
164
164
},
0 commit comments