@@ -123,7 +123,7 @@ public void longInStatementDoesntCauseStackOverflow() {
123
123
124
124
String sanitized = SqlStatementSanitizer .create (true ).sanitize (s .toString ()).getFullStatement ();
125
125
126
- assertThat (sanitized ).isEqualTo ("select col from table where col in(?)" );
126
+ assertThat (sanitized ).isEqualTo ("select col from table where col in (?)" );
127
127
}
128
128
129
129
static class SqlArgs implements ArgumentsProvider {
@@ -284,11 +284,11 @@ public Stream<? extends Arguments> provideArguments(ExtensionContext context) th
284
284
Arguments .of ("select col from table1 as t1, table2 as t2" , expect ("SELECT" , null )),
285
285
Arguments .of (
286
286
"select col from table where col in (1, 2, 3)" ,
287
- expect ("select col from table where col in(?)" , "SELECT" , "table" )),
287
+ expect ("select col from table where col in (?)" , "SELECT" , "table" )),
288
288
Arguments .of (
289
- "select 'a' IN(x, 'b') from table where col in(1) and z IN( '3', '4' )" ,
289
+ "select 'a' IN(x, 'b') from table where col in (1) and z IN( '3', '4' )" ,
290
290
expect (
291
- "select ? IN(x, ?) from table where col in(?) and z in (?)" , "SELECT" , "table" )),
291
+ "select ? IN(x, ?) from table where col in (?) and z IN (?)" , "SELECT" , "table" )),
292
292
Arguments .of ("select col from table order by col, col2" , expect ("SELECT" , "table" )),
293
293
Arguments .of ("select ąś∂ń© from źćļńĶ order by col, col2" , expect ("SELECT" , "źćļńĶ" )),
294
294
Arguments .of ("select 12345678" , expect ("select ?" , "SELECT" , null )),
@@ -316,8 +316,8 @@ public Stream<? extends Arguments> provideArguments(ExtensionContext context) th
316
316
Arguments .of (
317
317
"delete from \" my table\" where something something" , expect ("DELETE" , "my table" )),
318
318
Arguments .of (
319
- "delete from foo where x IN(1, 2, 3)" ,
320
- expect ("delete from foo where x in (?)" , "DELETE" , "foo" )),
319
+ "delete from foo where x IN (1,2, 3)" ,
320
+ expect ("delete from foo where x IN (?)" , "DELETE" , "foo" )),
321
321
Arguments .of ("delete from 12345678" , expect ("delete from ?" , "DELETE" , null )),
322
322
Arguments .of ("delete (((" , expect ("delete (((" , "DELETE" , null )),
323
323
@@ -328,8 +328,11 @@ public Stream<? extends Arguments> provideArguments(ExtensionContext context) th
328
328
"update `my table` set answer=42" ,
329
329
expect ("update `my table` set answer=?" , "UPDATE" , "my table" )),
330
330
Arguments .of (
331
- "update `my table` set answer=42 where x IN('a', 'b')" ,
332
- expect ("update `my table` set answer=? where x in(?)" , "UPDATE" , "my table" )),
331
+ "update `my table` set answer=42 where x IN('a', 'b') AND y In ('a', 'b')" ,
332
+ expect (
333
+ "update `my table` set answer=? where x IN(?) AND y In (?)" ,
334
+ "UPDATE" ,
335
+ "my table" )),
333
336
Arguments .of (
334
337
"update \" my table\" set answer=42" ,
335
338
expect ("update \" my table\" set answer=?" , "UPDATE" , "my table" )),
0 commit comments