mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
Improve cubrid mappings
This commit is contained in:
parent
43bc8ce74b
commit
deaa495027
@ -13,6 +13,8 @@
|
||||
*/
|
||||
package com.mysema.query.sql;
|
||||
|
||||
import java.sql.Types;
|
||||
|
||||
import com.mysema.query.QueryMetadata;
|
||||
import com.mysema.query.QueryModifiers;
|
||||
import com.mysema.query.types.Ops;
|
||||
@ -72,6 +74,15 @@ public class CUBRIDTemplates extends SQLTemplates {
|
||||
add(Ops.MathOps.COTH, "(exp({0} * 2) + 1) / (exp({0} * 2) - 1)");
|
||||
add(Ops.MathOps.SINH, "(exp({0}) - exp({0} * -1)) / 2");
|
||||
add(Ops.MathOps.TANH, "(exp({0} * 2) - 1) / (exp({0} * 2) + 1)");
|
||||
|
||||
addTypeNameToCode("numeric(3,0)", Types.TINYINT, true);
|
||||
addTypeNameToCode("numeric(38,0)", Types.BIGINT, true);
|
||||
addTypeNameToCode("bit varying", Types.LONGVARBINARY);
|
||||
addTypeNameToCode("bit varying", Types.VARBINARY);
|
||||
addTypeNameToCode("bit", Types.BINARY, true);
|
||||
addTypeNameToCode("varchar", Types.LONGVARCHAR, true);
|
||||
addTypeNameToCode("double", Types.FLOAT, true);
|
||||
addTypeNameToCode("float", Types.REAL, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -19,7 +19,7 @@ public class TypesDump {
|
||||
}
|
||||
}
|
||||
|
||||
Connections.initSQLServer();
|
||||
Connections.initCubrid();
|
||||
try {
|
||||
Connection c = Connections.getConnection();
|
||||
DatabaseMetaData m = c.getMetaData();
|
||||
@ -34,6 +34,7 @@ public class TypesDump {
|
||||
String suffix = rs.getString("LITERAL_SUFFIX");
|
||||
String jdbcTypeStr = jdbcTypeField != null ? ("Types." + jdbcTypeField) : String.valueOf(jdbcType);
|
||||
System.out.println("addTypeNameToCode(\"" + name.toLowerCase() + "\", " + jdbcTypeStr + ");");
|
||||
//System.out.println(rs.getInt("PRECISION"));
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user