[#3765] Add support for HANA
This commit is contained in:
parent
d13180e6ff
commit
7aa41ef8bf
@ -189,6 +189,9 @@ class GenerationUtil {
|
||||
return H2DataType.OTHER.getTypeName();
|
||||
}
|
||||
|
||||
/* [pro] xx
|
||||
xxxx xxxxx
|
||||
xx [/pro] */
|
||||
case HSQLDB: {
|
||||
|
||||
// In HSQLDB 2.2.5, there has been an incompatible INFORMATION_SCHEMA change around the
|
||||
|
||||
@ -1047,10 +1047,12 @@ public abstract class AbstractDatabase implements Database {
|
||||
case H2:
|
||||
return "ARRAY".equals(dataType);
|
||||
case HSQLDB:
|
||||
/* [pro] xx
|
||||
xxxx xxxxx
|
||||
xx [/pro] */
|
||||
default:
|
||||
return dataType.endsWith("ARRAY");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static final String fetchedSize(List<?> fetched, List<?> included) {
|
||||
|
||||
@ -47,6 +47,7 @@ import org.jooq.util.cubrid.CUBRIDDatabase;
|
||||
import org.jooq.util.derby.DerbyDatabase;
|
||||
import org.jooq.util.firebird.FirebirdDatabase;
|
||||
import org.jooq.util.h2.H2Database;
|
||||
// ...
|
||||
import org.jooq.util.hsqldb.HSQLDBDatabase;
|
||||
// ...
|
||||
// ...
|
||||
@ -78,6 +79,7 @@ public class Databases {
|
||||
xxxx xxxxxxx xxxxxx x xxxxxxxxxxxxxxxxxxx xxxxxx
|
||||
xxxx xxxx xxxxxx x xxxxxxxxxxxxxxxxxx xxxxxx
|
||||
xxxx xxxx xxxxxx x xxxxxxxxxxxxxxxxxx xxxxxx
|
||||
xxxx xxxxx xxxxxx x xxxxxxxxxxxxxxxxxxx xxxxxx
|
||||
xxxx xxxxxxxxx xxxxxx x xxxxxxxxxxxxxxxxxxxxxxx xxxxxx
|
||||
xxxx xxxxxxx xxxxxx x xxxxxxxxxxxxxxxxxxxxx xxxxxx
|
||||
xxxx xxxxxxx xxxxxx x xxxxxxxxxxxxxxxxxxxxx xxxxxx
|
||||
|
||||
@ -45,6 +45,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -174,6 +174,13 @@ public enum SQLDialect {
|
||||
xx
|
||||
xxxxxxxxxxxxx xxxxx xxxxx
|
||||
|
||||
xxx
|
||||
x xxx xxx xxxx xxx xxxxxxxx
|
||||
x xxx
|
||||
x xxxx xxxxxxx xx xxxxxxxxx xx xxxxxxxxxx xxxx xxxxxxxxxxxxxx xxxxx
|
||||
xx
|
||||
xxxxxxxxxxxx xxxxxx
|
||||
|
||||
xxx
|
||||
x xxx xxxxxxxx xxx xxxxxxxx
|
||||
x xxx
|
||||
|
||||
@ -45,6 +45,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -45,6 +45,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -44,6 +44,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -44,6 +44,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@ -80,6 +81,7 @@ import org.jooq.exception.SQLDialectNotSupportedException;
|
||||
@Target({ElementType.METHOD, ElementType.FIELD})
|
||||
@Retention(RUNTIME)
|
||||
@Documented
|
||||
@Inherited
|
||||
public @interface Support {
|
||||
|
||||
/**
|
||||
|
||||
@ -44,6 +44,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -44,6 +44,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -44,6 +44,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -44,6 +44,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -44,6 +44,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -289,8 +289,9 @@ public abstract class AbstractRoutine<T> extends AbstractQueryPart implements Ro
|
||||
case H2:
|
||||
/* [pro] xx
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
|
||||
xx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx xxxx xxx
|
||||
xx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx xxxx
|
||||
xxxx xxxxxxx
|
||||
xx [/pro] */
|
||||
return executeSelect();
|
||||
|
||||
@ -82,6 +82,7 @@ class CurrentDate extends AbstractFunction<Date> {
|
||||
xxxxxx xxxxxxxxxxxxxxx xxxx xx xxxxxx xxxxxxxxxxxxxxxxxx
|
||||
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
xxxx xxxxxxx
|
||||
xx [/pro] */
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ class CurrentTime extends AbstractFunction<Time> {
|
||||
xxxxxx xxxxxxxxxxxxxxx xxxx xx xxxxxxxxx xxxxxxxxxxxxxxxxxx
|
||||
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
xxxx xxxxxxx
|
||||
xx [/pro] */
|
||||
case DERBY:
|
||||
|
||||
@ -82,6 +82,7 @@ class CurrentTimestamp extends AbstractFunction<Timestamp> {
|
||||
xxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
xxxx xxxxxxx
|
||||
xxxx xxxxxxxxxx
|
||||
xx [/pro] */
|
||||
|
||||
@ -73,6 +73,7 @@ class CurrentUser extends AbstractFunction<String> {
|
||||
xxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
xxxx xxxxxxx
|
||||
xxxx xxxxxxxxxx
|
||||
xxxx xxxxxxx
|
||||
|
||||
@ -47,6 +47,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.FIREBIRD;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
@ -153,6 +153,7 @@ class Dual extends AbstractTable<Record> {
|
||||
xxxxxxxxxxxxxxxxxxxx x xx xxxxx xx xxxxxxx
|
||||
xxxxxx
|
||||
|
||||
xxxx xxxxx
|
||||
xxxx xxxxxxx
|
||||
xxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxx
|
||||
|
||||
@ -49,6 +49,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.MARIADB;
|
||||
import static org.jooq.SQLDialect.MYSQL;
|
||||
// ...
|
||||
@ -114,14 +115,14 @@ class IsDistinctFrom<T> extends AbstractCondition {
|
||||
private final QueryPartInternal delegate(Configuration configuration) {
|
||||
|
||||
// [#3511] These dialects need to emulate the IS DISTINCT FROM predicate, optimally using INTERSECT...
|
||||
if (asList(CUBRID, DERBY).contains(configuration.dialect().family())) {
|
||||
if (asList(CUBRID, DERBY).contains(configuration.family())) {
|
||||
return (comparator == IS_DISTINCT_FROM)
|
||||
? (QueryPartInternal) notExists(select(lhs).intersect(select(rhs)))
|
||||
: (QueryPartInternal) exists(select(lhs).intersect(select(rhs)));
|
||||
}
|
||||
|
||||
// ... or using a more verbose CASE expression
|
||||
else if (asList().contains(configuration.dialect().family())) {
|
||||
else if (asList().contains(configuration.family())) {
|
||||
if (caseExpression == null) {
|
||||
if (comparator == Comparator.IS_DISTINCT_FROM) {
|
||||
caseExpression = (QueryPartInternal) decode()
|
||||
@ -147,7 +148,7 @@ class IsDistinctFrom<T> extends AbstractCondition {
|
||||
}
|
||||
|
||||
// MySQL knows the <=> operator
|
||||
else if (asList(MARIADB, MYSQL).contains(configuration.dialect())) {
|
||||
else if (asList(MARIADB, MYSQL).contains(configuration.family())) {
|
||||
if (mySQLCondition == null) {
|
||||
if (comparator == IS_DISTINCT_FROM) {
|
||||
mySQLCondition = (QueryPartInternal) condition("{not}({0} <=> {1})", lhs, rhs);
|
||||
@ -161,7 +162,7 @@ class IsDistinctFrom<T> extends AbstractCondition {
|
||||
}
|
||||
|
||||
// SQLite knows the IS / IS NOT predicate
|
||||
else if (SQLITE == configuration.dialect()) {
|
||||
else if (SQLITE == configuration.family()) {
|
||||
if (sqliteCondition == null) {
|
||||
if (comparator == IS_DISTINCT_FROM) {
|
||||
sqliteCondition = (QueryPartInternal) condition("{0} {is not} {1}", lhs, rhs);
|
||||
|
||||
@ -69,6 +69,7 @@ class Repeat extends AbstractFunction<String> {
|
||||
final Field<String> getFunction0(Configuration configuration) {
|
||||
switch (configuration.dialect().family()) {
|
||||
/* [pro] xx
|
||||
xxxx xxxxx
|
||||
xxxx xxxxxxxxx
|
||||
xxxx xxxxxxx
|
||||
xxxx xxxxxxx
|
||||
|
||||
@ -101,6 +101,7 @@ enum Term {
|
||||
xxxxxx xxxxxx
|
||||
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
xxxx xxxxxxx
|
||||
xxxx xxxxxxx
|
||||
xxxx xxxxxxx
|
||||
@ -186,6 +187,7 @@ enum Term {
|
||||
/* [pro] xx
|
||||
xxxxxx xxxxxxxxxxxxxxxxxx x
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
xxxxxx xxxxxxxxx
|
||||
|
||||
xxxx xxxxxxxxx
|
||||
@ -205,6 +207,7 @@ enum Term {
|
||||
/* [pro] xx
|
||||
xxxxxx xxxxxxxxxxxxxxxxxx x
|
||||
xxxx xxxx
|
||||
xxxx xxxxx
|
||||
xxxxxx xxxxxxxxx
|
||||
|
||||
xxxx xxxxxxxxx
|
||||
@ -227,6 +230,9 @@ enum Term {
|
||||
xxxx xxxxxxxxx
|
||||
xxxxxx xxxxxxxxxxx
|
||||
|
||||
xxxx xxxxx
|
||||
xxxxxx xxxxxx
|
||||
|
||||
xxxx xxxxxxxxxx
|
||||
xxxxxx xxxxxxx
|
||||
x
|
||||
@ -244,6 +250,9 @@ enum Term {
|
||||
xxxx xxxxxxxxx
|
||||
xxxxxx xxxxxxxxxxx
|
||||
|
||||
xxxx xxxxx
|
||||
xxxxxx xxxxxx
|
||||
|
||||
xxxx xxxxxxxxxx
|
||||
xxxxxx xxxxxx
|
||||
x
|
||||
|
||||
@ -43,6 +43,7 @@ package org.jooq.impl;
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.jooq.SQLDialect.CUBRID;
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.impl.DSL.one;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -90,7 +91,8 @@ class WindowSpecificationImpl extends AbstractQueryPart implements
|
||||
if (!partitionBy.isEmpty()) {
|
||||
|
||||
// Ignore PARTITION BY 1 clause. These databases erroneously map the
|
||||
// 1 literal onto the column index
|
||||
// 1 literal onto the column index (CUBRID, Sybase), or do not support
|
||||
// constant expressions in the PARTITION BY clause (HANA)
|
||||
if (partitionByOne && asList(CUBRID).contains(ctx.configuration().dialect())) {
|
||||
}
|
||||
else {
|
||||
|
||||
@ -46,6 +46,7 @@ import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.FIREBIRD;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
// ...
|
||||
// ...
|
||||
@ -157,6 +158,9 @@ public class JDBCUtils {
|
||||
xxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx x
|
||||
xxxxxx xxxx
|
||||
x
|
||||
xxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx x
|
||||
xxxxxx xxxxx
|
||||
x
|
||||
xxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x
|
||||
xxxxxx xxxxxxxxx
|
||||
@ -213,6 +217,8 @@ public class JDBCUtils {
|
||||
xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxx xxxx
|
||||
xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxx xxxxx
|
||||
xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxx xxxxxxxxx
|
||||
xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxx xxxxxxx
|
||||
|
||||
Loading…
Reference in New Issue
Block a user