*
* This has been observed to work with all dialects
*/
+ @Support
DivideByOnStep divideBy(Table> divisor);
/**
diff --git a/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java
index 93dbb22ebd..0811a2c7e9 100644
--- a/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java
+++ b/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java
@@ -336,14 +336,15 @@ class InsertQueryImpl extends AbstractStoreQuery implements
// SQLite will select last_insert_rowid() after the INSER
case SQLITE:
// Sybase will select @@identity after the INSERT
+ case CUBRID:
case SYBASE:
super.prepare(ctx);
return;
// Some dialects can only return AUTO_INCREMENT values
// Other values have to be fetched in a second step
+ // [#1260] TODO CUBRID supports this, but there's a JDBC bug
case ASE:
- case CUBRID:
case DERBY:
case H2:
case INGRES:
@@ -397,6 +398,7 @@ class InsertQueryImpl extends AbstractStoreQuery implements
// TODO [#832] Fix this. This might be a driver issue. JDBC
// Generated keys don't work with jconn3, but they seem to work
// with jTDS (which is used for Sybase ASE integration)
+ case CUBRID:
case SYBASE: {
listener.executeStart(ctx);
result = ctx.statement().executeUpdate();
@@ -408,8 +410,8 @@ class InsertQueryImpl extends AbstractStoreQuery implements
// Some dialects can only retrieve "identity" (AUTO_INCREMENT) values
// Additional values have to be fetched explicitly
+ // [#1260] TODO CUBRID supports this, but there's a JDBC bug
case ASE:
- case CUBRID:
case DERBY:
case H2:
case INGRES:
diff --git a/jOOQ/src/main/java/org/jooq/impl/Val.java b/jOOQ/src/main/java/org/jooq/impl/Val.java
index 57bc2335d2..d1ccf8e5ad 100644
--- a/jOOQ/src/main/java/org/jooq/impl/Val.java
+++ b/jOOQ/src/main/java/org/jooq/impl/Val.java
@@ -153,6 +153,10 @@ class Val extends AbstractField implements Param, BindingProvider {
// [#722] TODO This is probably not entirely right.
case INGRES:
+ // [#1261] There are only a few corner-cases, where this is
+ // really needed. Check back on related CUBRID bugs
+ case CUBRID:
+
// [#1029] Postgres and [#632] Sybase need explicit casting
// in very rare cases.
case POSTGRES:
@@ -183,7 +187,7 @@ class Val extends AbstractField implements Param, BindingProvider {
SQLDataType type = getDataType(context).getSQLDataType();
// [#822] Some RDBMS need precision / scale information on BigDecimals
- if (getValue() != null && getType() == BigDecimal.class && asList(DB2, DERBY, HSQLDB).contains(context.getDialect())) {
+ if (getValue() != null && getType() == BigDecimal.class && asList(CUBRID, DB2, DERBY, HSQLDB).contains(context.getDialect())) {
// Add precision / scale on BigDecimals
int scale = ((BigDecimal) getValue()).scale();
diff --git a/jOOQ/src/main/java/org/jooq/util/cubrid/CUBRIDDataType.java b/jOOQ/src/main/java/org/jooq/util/cubrid/CUBRIDDataType.java
index 6c60d9cebc..87b3b3733d 100644
--- a/jOOQ/src/main/java/org/jooq/util/cubrid/CUBRIDDataType.java
+++ b/jOOQ/src/main/java/org/jooq/util/cubrid/CUBRIDDataType.java
@@ -79,8 +79,8 @@ public class CUBRIDDataType extends AbstractDataType {
public static final CUBRIDDataType VARCHAR = new CUBRIDDataType(SQLDataType.VARCHAR, "varchar");
public static final CUBRIDDataType CHARVARYING = new CUBRIDDataType(SQLDataType.VARCHAR, "char varying");
public static final CUBRIDDataType CHARACTERVARYING = new CUBRIDDataType(SQLDataType.VARCHAR, "character varying");
- public static final CUBRIDDataType CHAR = new CUBRIDDataType(SQLDataType.CHAR, "char");
- public static final CUBRIDDataType CHARACTER = new CUBRIDDataType(SQLDataType.CHAR, "character");
+ public static final CUBRIDDataType CHAR = new CUBRIDDataType(SQLDataType.CHAR, "char", "varchar");
+ public static final CUBRIDDataType CHARACTER = new CUBRIDDataType(SQLDataType.CHAR, "character", "varchar");
public static final CUBRIDDataType STRING = new CUBRIDDataType(SQLDataType.VARCHAR, "string");
public static final CUBRIDDataType NCHAR = new CUBRIDDataType(SQLDataType.NCHAR, "nchar");
public static final CUBRIDDataType NCHARVARYING = new CUBRIDDataType(SQLDataType.NVARCHAR, "nchar varying");