Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: tweak
  • Loading branch information
nicky6s committed Jan 6, 2025
commit f7952b6194cc5328e00c895ff9b9c541e7ad1053
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,10 @@ public void testPreferringClause(String sqlStr) throws JSQLParserException {

@Test
public void testDeleteWithSkylineKeywords() throws JSQLParserException {
String statement = """
DELETE
FROM mytable
WHERE low = 1 AND high = 2 AND inverse = 3 AND plus = 4 AND preferring = 5
""";
String statement =
" DELETE " +
" FROM mytable " +
" WHERE low = 1 AND high = 2 AND inverse = 3 AND plus = 4 AND preferring = 5 ";
Delete delete = (Delete) assertSqlCanBeParsedAndDeparsed(statement);
assertEquals("mytable", delete.getTable().toString());
assertEquals("low = 1 AND high = 2 AND inverse = 3 AND plus = 4 AND preferring = 5", delete.getWhere().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6134,10 +6134,9 @@ void testSelectAndInsertWithin2Ctes() throws JSQLParserException {

@Test
public void testSelectWithSkylineKeywords() throws JSQLParserException {
String statement = """
SELECT low, high, inverse, plus, preferring
FROM mytable
""";
String statement =
" SELECT low, high, inverse, plus, preferring " +
" FROM mytable ";
Select select = (Select) assertSqlCanBeParsedAndDeparsed(statement);
assertEquals("mytable", select.getPlainSelect().getFromItem().toString());
assertEquals("[low, high, inverse, plus, preferring]", select.getPlainSelect().getSelectItems().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,10 @@ public void testUpdateWithBoolean() throws JSQLParserException {

@Test
public void testUpdateWithSkylineKeywords() throws JSQLParserException {
String statement = """
UPDATE mytable
SET low = 1, high = 2, inverse = 3, plus = 4, preferring = 5
WHERE id = 6
""";
String statement =
" UPDATE mytable " +
" SET low = 1, high = 2, inverse = 3, plus = 4, preferring = 5 " +
" WHERE id = 6";
Update update = (Update) PARSER_MANAGER.parse(new StringReader(statement));
assertEquals("mytable", update.getTable().toString());
assertEquals(5, update.getUpdateSets().size());
Expand Down