use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class DateAndTimeFunctionsTest method test_36.
public void test_36() throws Exception {
String sql = "SELECT FROM_UNIXTIME(1196440219) + 0;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT FROM_UNIXTIME(1196440219) + 0;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class DateAndTimeFunctionsTest method test_28.
public void test_28() throws Exception {
String sql = "SELECT INTERVAL '1.999999' SECOND_MICROSECOND;";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT INTERVAL '1.999999' SECOND_MICROSECOND;", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class DateAndTimeFunctionsTest method test_5.
public void test_5() throws Exception {
String sql = "SELECT ADDDATE('2008-01-02', INTERVAL 31 DAY)";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT ADDDATE('2008-01-02', INTERVAL 31 DAY);", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class DateAndTimeFunctionsTest method test_3.
public void test_3() throws Exception {
String sql = "SELECT DAYNAME('2006-05-00')";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT DAYNAME('2006-05-00');", text);
}
use of com.alibaba.druid.sql.parser.SQLStatementParser in project druid by alibaba.
the class DateAndTimeFunctionsTest method test_40.
public void test_40() throws Exception {
String sql = "SELECT SUBDATE('2008-01-02', INTERVAL 31 DAY);";
SQLStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
String text = output(stmtList);
Assert.assertEquals("SELECT SUBDATE('2008-01-02', INTERVAL 31 DAY);", text);
}
Aggregations