use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class LogicalOperatorsTest method test_0.
public void test_0() throws Exception {
String sql = "SELECT 10 IS TRUE;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT 10 IS true;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class LogicalOperatorsTest method test_9.
public void test_9() throws Exception {
String sql = "SELECT 1 AND NULL;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT 1\n\tAND NULL;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class LogicalOperatorsTest method test_3.
public void test_3() throws Exception {
String sql = "SELECT NOT 10;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT NOT 10;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class LogicalOperatorsTest method test_10.
public void test_10() throws Exception {
String sql = "SELECT 0 OR NULL;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT 0\n\tOR NULL;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class LogicalOperatorsTest method test_1.
public void test_1() throws Exception {
String sql = "SELECT -10 IS TRUE;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT -10 IS true;", text);
}
Aggregations