[#7628] Add support for PostgreSQL 11 - Added SQLDialect
This commit is contained in:
parent
17389bc57c
commit
a6a9dd271a
@ -122,6 +122,7 @@ public class Databases {
|
||||
case POSTGRES_9_4:
|
||||
case POSTGRES_9_5:
|
||||
case POSTGRES_10:
|
||||
case POSTGRES_11:
|
||||
case POSTGRES: result = PostgresDatabase.class; break;
|
||||
case SQLITE: result = SQLiteDatabase.class; break;
|
||||
|
||||
|
||||
@ -178,6 +178,15 @@ public enum SQLDialect {
|
||||
*/
|
||||
POSTGRES_10("Postgres", false, POSTGRES, POSTGRES_9_5),
|
||||
|
||||
/**
|
||||
* The PostgreSQL 11 dialect.
|
||||
* <p>
|
||||
* While this family (and its dialects) have been observed to work to some
|
||||
* extent on Amazon RedShift as well, we strongly suggest you use the
|
||||
* official {@link #REDSHIFT} support, instead.
|
||||
*/
|
||||
POSTGRES_11("Postgres", false, POSTGRES, POSTGRES_10),
|
||||
|
||||
/**
|
||||
* The SQLite dialect family.
|
||||
*/
|
||||
|
||||
@ -418,6 +418,7 @@ final class InsertQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
|
||||
|
||||
case POSTGRES_9_5:
|
||||
case POSTGRES_10:
|
||||
case POSTGRES_11:
|
||||
case POSTGRES: {
|
||||
toSQLInsert(ctx);
|
||||
ctx.formatSeparator()
|
||||
|
||||
@ -321,6 +321,7 @@ final class Limit extends AbstractQueryPart {
|
||||
case POSTGRES_9_4:
|
||||
case POSTGRES_9_5:
|
||||
case POSTGRES_10:
|
||||
case POSTGRES_11:
|
||||
// No break
|
||||
|
||||
// A default implementation is necessary for hashCode() and toString()
|
||||
|
||||
@ -633,7 +633,8 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
case POSTGRES_9_3:
|
||||
case POSTGRES_9_4:
|
||||
case POSTGRES_9_5:
|
||||
case POSTGRES_10: {
|
||||
case POSTGRES_10:
|
||||
case POSTGRES_11: {
|
||||
if (getLimit().isApplicable() && getLimit().withTies())
|
||||
toSQLReferenceLimitWithWindowFunctions(context);
|
||||
else
|
||||
|
||||
@ -63,6 +63,7 @@ import static org.jooq.SQLDialect.MYSQL_8_0;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
import static org.jooq.SQLDialect.POSTGRES_10;
|
||||
import static org.jooq.SQLDialect.POSTGRES_11;
|
||||
import static org.jooq.SQLDialect.POSTGRES_9_3;
|
||||
import static org.jooq.SQLDialect.POSTGRES_9_4;
|
||||
import static org.jooq.SQLDialect.POSTGRES_9_5;
|
||||
@ -238,6 +239,9 @@ public class JDBCUtils {
|
||||
if (majorVersion >= 10)
|
||||
return POSTGRES_10;
|
||||
|
||||
if (majorVersion >= 11)
|
||||
return POSTGRES_11;
|
||||
|
||||
return POSTGRES;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user