use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class MathematicalFunctionsTest method test_25.
public void test_25() throws Exception {
String sql = "SELECT * FROM tbl_name ORDER BY RAND()";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT *\nFROM tbl_name\nORDER BY RAND();", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class MathematicalFunctionsTest method test_11.
public void test_11() throws Exception {
String sql = "SELECT CEILING(1.23);";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT CEILING(1.23);", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class MathematicalFunctionsTest method test_23.
public void test_23() throws Exception {
String sql = "SELECT RADIANS(90)";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT RADIANS(90);", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class MathematicalFunctionsTest method test_8.
public void test_8() throws Exception {
String sql = "SELECT ATAN(-2);";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT ATAN(-2);", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class MathematicalFunctionsTest method test_7.
public void test_7() throws Exception {
String sql = "SELECT ATAN(2);";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT ATAN(2);", text);
}
Aggregations