use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_datetime method test_oracle2pg_timestamp2.
public void test_oracle2pg_timestamp2() throws Exception {
String sql = "TIMESTAMP WITH TIME ZONE";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("TIMESTAMP WITH TIME ZONE", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_datetime method test_oracle2pg_timestamp.
public void test_oracle2pg_timestamp() throws Exception {
String sql = "timestamp";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("TIMESTAMP", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_datetime method test_oracle2pg_timestamp_arg.
public void test_oracle2pg_timestamp_arg() throws Exception {
String sql = "timestamp(2)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("TIMESTAMP(2)", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_double method test_oracle2pg_float.
public void test_oracle2pg_float() throws Exception {
String sql = "float";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("DOUBLE PRECISION", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_double method test_oracle2pg_double.
public void test_oracle2pg_double() throws Exception {
String sql = "double";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("DOUBLE PRECISION", pgDataType.toString());
}
Aggregations