jetbrick-orm/src/main/java/jetbrick/dao/dialect/SqlDialect.java
public String asSqlType(String type, Integer length, Integer scale) {
        if (SubStyleType.UID.equals(type)) {
            return "bigint";
        } else if (SubStyleType.UUID.equals(type)) {
            return "char(16)";
        } else if (SubStyleType.ENUM.equals(type)) {
            return "integer";
        } else if (SubStyleType.INT.equals(type)) {
            return "integer";
        } else if (SubStyleType.LONG.equals(type)) {
            return "bigint";
        } else if (SubStyleType.BIGINT.equals(type)) {
            return "decimal(38, 0)";
        } else if (SubStyleType.DOUBLE.equals(type)) {
            return "double";
        } else if (SubStyleType.DECIMAL.equals(type)) {
            return new SqlType("decimal", length, scale).toString();
        } else if (SubStyleType.CHAR.equals(type)) {
            return new SqlType("char", length, null).toString();
        } else if (SubStyleType.VARCHAR.equals(type)) {
            return new SqlType("varchar", length, null).toString();
        } else if (SubStyleType.TEXT.equals(type)) {
            return new SqlType("longvarchar", Integer.MAX_VALUE, null).toString();
        } else if (SubStyleType.BOOLEAN.equals(type)) {
            return "tinyint(1)";
        } else if (SubStyleType.DATETIME_STRING.equals(type)) {
            return "char(19)";
        } else if (SubStyleType.DATE_STRING.equals(type)) {
            return "char(10)";
        } else if (SubStyleType.TIME_STRING.equals(type)) {
            return "char(8)";
        } else if (SubStyleType.DATETIME.equals(type)) {
            return "timestamp";
        } else if (SubStyleType.TIMESTAMP.equals(type)) {
            return "timestamp";
        } else if (SubStyleType.DATE.equals(type)) {
            return "date";
        } else if (SubStyleType.TIME.equals(type)) {
            return "time";
        } else if (SubStyleType.CLOB.equals(type)) {
            return "clob";
        } else if (SubStyleType.BLOB.equals(type)) {
            return "blob";
        } else if (SubStyleType.INPUTSTREAM.equals(type)) {
            return "longvarbinary";
        } else {
            return new SqlType(type, length, scale).toString();
        }
    }
public String asSqlType(String type, Integer length, Integer scale) {
        if (SubStyleType.UID.equals(type)) {
            return "bigint";
        } else if (SubStyleType.UUID.equals(type)) {
            return "char(16)";
        } else if (SubStyleType.ENUM.equals(type)) {
            return "integer";
        } else if (SubStyleType.INT.equals(type)) {
            return "integer";
        } else if (SubStyleType.LONG.equals(type)) {
            return "bigint";
        } else if (SubStyleType.BIGINT.equals(type)) {
            return "decimal(38, 0)";
        } else if (SubStyleType.DOUBLE.equals(type)) {
            return "double";
        } else if (SubStyleType.DECIMAL.equals(type)) {
            return new SqlType("decimal", length, scale).toString();
        } else if (SubStyleType.CHAR.equals(type)) {
            return new SqlType("char", length, null).toString();
        } else if (SubStyleType.VARCHAR.equals(type)) {
            return new SqlType("varchar", length, null).toString();
        } else if (SubStyleType.TEXT.equals(type)) {
            return new SqlType("longvarchar", Integer.MAX_VALUE, null).toString();
        } else if (SubStyleType.BOOLEAN.equals(type)) {
            return "tinyint(1)";
        } else if (SubStyleType.DATETIME_STRING.equals(type)) {
            return "char(19)";
        } else if (SubStyleType.DATE_STRING.equals(type)) {
            return "char(10)";
        } else if (SubStyleType.TIME_STRING.equals(type)) {
            return "char(8)";
        } else if (SubStyleType.DATETIME.equals(type)) {
            return "timestamp";
        } else if (SubStyleType.TIMESTAMP.equals(type)) {
            return "timestamp";
        } else if (SubStyleType.DATE.equals(type)) {
            return "date";
        } else if (SubStyleType.TIME.equals(type)) {
            return "time";
        } else if (SubStyleType.CLOB.equals(type)) {
            return "clob";
        } else if (SubStyleType.BLOB.equals(type)) {
            return "blob";
        } else if (SubStyleType.INPUTSTREAM.equals(type)) {
            return "longvarbinary";
        } else {
            return new SqlType(type, length, scale).toString();
        }
    }
public String asSqlType ( String type , Integer length , Integer scale ) { if ( SubStyleType . UID . equals ( type ) ) { return "bigint" ; } else if ( SubStyleType . UUID . equals ( type ) ) { return "char(16)" ; } else if ( SubStyleType . ENUM . equals ( type ) ) { return "integer" ; } else if ( SubStyleType . INT . equals ( type ) ) { return "integer" ; } else if ( SubStyleType . LONG . equals ( type ) ) { return "bigint" ; } else if ( SubStyleType . BIGINT . equals ( type ) ) { return "decimal(38, 0)" ; } else if ( SubStyleType . DOUBLE . equals ( type ) ) { return "double" ; } else if ( SubStyleType . DECIMAL . equals ( type ) ) { return new SqlType ( "decimal" , length , scale ) . toString ( ) ; } else if ( SubStyleType . CHAR . equals ( type ) ) { return new SqlType ( "char" , length , null ) . toString ( ) ; } else if ( SubStyleType . VARCHAR . equals ( type ) ) { return new SqlType ( "varchar" , length , null ) . toString ( ) ; } else if ( SubStyleType . TEXT . equals ( type ) ) { return new SqlType ( "longvarchar" , Integer . MAX_VALUE , null ) . toString ( ) ; } else if ( SubStyleType . BOOLEAN . equals ( type ) ) { return "tinyint(1)" ; } else if ( SubStyleType . DATETIME_STRING . equals ( type ) ) { return "char(19)" ; } else if ( SubStyleType . DATE_STRING . equals ( type ) ) { return "char(10)" ; } else if ( SubStyleType . TIME_STRING . equals ( type ) ) { return "char(8)" ; } else if ( SubStyleType . DATETIME . equals ( type ) ) { return "timestamp" ; } else if ( SubStyleType . TIMESTAMP . equals ( type ) ) { return "timestamp" ; } else if ( SubStyleType . DATE . equals ( type ) ) { return "date" ; } else if ( SubStyleType . TIME . equals ( type ) ) { return "time" ; } else if ( SubStyleType . CLOB . equals ( type ) ) { return "clob" ; } else if ( SubStyleType . BLOB . equals ( type ) ) { return "blob" ; } else if ( SubStyleType . INPUTSTREAM . equals ( type ) ) { return "longvarbinary" ; } else { return new SqlType ( type , length , scale ) . toString ( ) ; } }
将数据库无关的 SubStyleType 转换成具体数据库的字段名称。特殊的字段类型由子类实现。
@param type  数据库无关的字段名称，参考 {@link SubStyleType}
将数据库无关的 SubStyleType 转换成具体数据库的字段名称。特殊的字段类型由子类实现。