use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2MySql_DataTypeTest_number_int method test_oracle2pg_int_17.
public void test_oracle2pg_int_17() throws Exception {
String sql = "number(17, 0)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToMySql(dataType);
assertEquals("bigint", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2MySql_DataTypeTest_number_int method test_oracle2pg_int_3.
public void test_oracle2pg_int_3() throws Exception {
String sql = "number(3, 0)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToMySql(dataType);
assertEquals("smallint", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2MySql_DataTypeTest_number_int method test_oracle2pg_int_8.
public void test_oracle2pg_int_8() throws Exception {
String sql = "number(8, 0)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToMySql(dataType);
assertEquals("int", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2MySql_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.transformOracleToMySql(dataType);
assertEquals("bigint", pgDataType.toString());
}
use of com.alibaba.druid.sql.ast.SQLDataType in project druid by alibaba.
the class Oracle2MySql_DataTypeTest_number_int method test_oracle2pg_int_1.
public void test_oracle2pg_int_1() throws Exception {
String sql = "number(1, 0)";
SQLDataType dataType = SQLParserUtils.createExprParser(sql, JdbcConstants.ORACLE).parseDataType();
SQLDataType pgDataType = SQLTransformUtils.transformOracleToMySql(dataType);
assertEquals("tinyint", pgDataType.toString());
}
Aggregations