use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2MySql_DataTypeTest_number_int method test_oracle2pg_int_21.
public void test_oracle2pg_int_21() throws Exception {
String sql = "number(21, 0)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToMySql(dataType);
assertEquals("decimal(21)", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_datetime method test_oracle2pg_datetime.
public void test_oracle2pg_datetime() throws Exception {
String sql = "datetime";
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_int method test_oracle2pg_smallint.
public void test_oracle2pg_smallint() throws Exception {
String sql = "smallint";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("SMALLINT", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_number_int method test_oracle2pg_int_20.
public void test_oracle2pg_int_20() throws Exception {
String sql = "number(20, 0)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("BIGINT", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2PG_DataTypeTest_number_int method test_oracle2pg_int_16.
public void test_oracle2pg_int_16() throws Exception {
String sql = "number(16, 0)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToPostgresql(dataType);
assertEquals("BIGINT", pgDataType.toString());
}
Aggregations