use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class ArithmeticOperatorsTest method test_8.
public void test_8() throws Exception {
String sql = "SELECT 102/1-1;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT 102 / 1 - 1;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class ArithmeticOperatorsTest method test_7.
public void test_7() throws Exception {
String sql = "SELECT 102/(1-1);";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT 102 / (1 - 1);", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class ArithmeticOperatorsTest method test_9.
public void test_9() throws Exception {
String sql = "SELECT a + b + c;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT a + b + c;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class ComparisonFunctionsAndOperatorsTest method test_0.
public void test_0() throws Exception {
String sql = "SELECT 1 = 0;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT 1 = 0;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class ComparisonFunctionsAndOperatorsTest method test_19.
public void test_19() throws Exception {
String sql = "SELECT GREATEST('B', 'A', 'C');";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT GREATEST('B', 'A', 'C');", text);
}
Aggregations