forked from JSQLParser/JSqlParser
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
141 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/test/java/net/sf/jsqlparser/expression/operators/relational/InExpressionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package net.sf.jsqlparser.expression.operators.relational; | ||
|
||
import net.sf.jsqlparser.JSQLParserException; | ||
import net.sf.jsqlparser.test.TestUtils; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class InExpressionTest { | ||
|
||
@Test | ||
void testOracleInWithoutBrackets() throws JSQLParserException { | ||
String sqlStr="select 1 from dual where a in 1 "; | ||
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true); | ||
} | ||
|
||
|
||
@Test | ||
void testOracleInWithBrackets() throws JSQLParserException { | ||
String sqlStr="select 1 from dual where a in (1) "; | ||
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true); | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/test/java/net/sf/jsqlparser/statement/ReferentialActionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package net.sf.jsqlparser.statement; | ||
|
||
import net.sf.jsqlparser.JSQLParserException; | ||
import net.sf.jsqlparser.test.TestUtils; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class ReferentialActionTest { | ||
|
||
@Test | ||
void testCaseSensitivity() throws JSQLParserException { | ||
String sqlStr= "CREATE TABLE DATABASES\n" | ||
+ "(\n" | ||
+ "NAME VARCHAR(50) NOT NULL,\n" | ||
+ "OWNER VARCHAR(50) NOT NULL,\n" | ||
+ "PRIMARY KEY (NAME),\n" | ||
+ "FOREIGN KEY(OWNER) REFERENCES USERS (USERNAME) ON delete cascade\n" | ||
+ ")"; | ||
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters