File tree 2 files changed +56
-2
lines changed
2 files changed +56
-2
lines changed Original file line number Diff line number Diff line change @@ -177,3 +177,57 @@ func TestParse3(t *testing.T) {
177
177
})
178
178
}
179
179
}
180
+
181
+ func TestParse4 (t * testing.T ) {
182
+ type args struct {
183
+ s string
184
+ }
185
+ tests := []struct {
186
+ name string
187
+ args args
188
+ want interface {}
189
+ wantErr bool
190
+ dbgBreak bool
191
+ }{{
192
+ name : "1" ,
193
+ args : args {s : `
194
+ SELECT
195
+ Account.Id
196
+ , Account.Name
197
+ , Account.Owner.Name
198
+ , Id
199
+ , Name
200
+ , (SELECT Id, Name
201
+ FROM Account.Cases
202
+ WHERE Id in (SELECT CaseId FROM LiveChatTranscript WHERE StartTime = TODAY))
203
+ FROM
204
+ Contact
205
+ WHERE
206
+ (Account.Name like 'foo%'
207
+ or
208
+ Account.Name like 'bar%') and Account.Owner.Name = 'aaa'
209
+ ` },
210
+ want : nil ,
211
+ wantErr : false ,
212
+ }}
213
+
214
+ for _ , tt := range tests {
215
+ t .Run (tt .name , func (t * testing.T ) {
216
+ if tt .dbgBreak {
217
+ t .Log ("debug" )
218
+ }
219
+
220
+ got , err := parser .Parse (tt .args .s )
221
+ if (err != nil ) != tt .wantErr {
222
+ t .Errorf ("Parse() error = %v, wantErr %v" , err , tt .wantErr )
223
+ return
224
+ }
225
+ if err != nil {
226
+ return
227
+ }
228
+
229
+ s := visualizer .Visualize (got )
230
+ fmt .Print (s )
231
+ })
232
+ }
233
+ }
Original file line number Diff line number Diff line change 3
3
< head >
4
4
< meta charset ="UTF-8 ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
- < title > Go WebAssembly Open SOQL query visualizer</ title >
6
+ < title > Go wasm Open SOQL query visualizer</ title >
7
7
< link rel ="icon "
8
8
href ="https://shellyln.github.io/assets/image/open-soql-logo.svg "
9
9
type ="image/svg+xml ">
@@ -60,7 +60,7 @@ <h4 class="title"><img
60
60
class ="logo " alt ="logo "
61
61
src ="https://shellyln.github.io/assets/image/open-soql-logo.svg "
62
62
title ="Open SOQL logo "
63
- > Go WebAssembly Open SOQL query visualizer < span id ="version "> </ span > </ h4 >
63
+ > Go wasm Open SOQL query visualizer < span id ="version "> </ span > </ h4 >
64
64
< div class ="sub "> Powered by < a
65
65
href ="https://github.com/shellyln/go-open-soql-parser "
66
66
target ="_blank "> go-open-soql-parser</ a > </ div >
You can’t perform that action at this time.
0 commit comments