mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1962 - Refactor simplify Postgres platforms to POSTGRES and POSTGRES9
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
package io.ebean.config.dbplatform.postgres;
|
||||
|
||||
import io.ebean.config.dbplatform.IdType;
|
||||
|
||||
/**
|
||||
* Postgres v8.3 specific platform.
|
||||
* <p>
|
||||
* No support for getGeneratedKeys.
|
||||
* </p>
|
||||
*/
|
||||
public class Postgres8Platform extends PostgresPlatform {
|
||||
|
||||
public Postgres8Platform() {
|
||||
super();
|
||||
this.dbIdentity.setSupportsGetGeneratedKeys(false);
|
||||
this.dbIdentity.setIdType(IdType.SEQUENCE);
|
||||
this.columnAliasPrefix = "as c";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,7 @@ import java.sql.SQLException;
|
||||
import java.sql.Types;
|
||||
|
||||
/**
|
||||
* Postgres 10+ specific platform.
|
||||
* Postgres 10+ platform.
|
||||
* <p>
|
||||
* Defaults to use "generated by default as identity".
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ public class PostgresPlatform extends DatabasePlatform {
|
||||
|
||||
public PostgresPlatform() {
|
||||
super();
|
||||
this.platform = Platform.POSTGRES10;
|
||||
this.platform = Platform.POSTGRES;
|
||||
this.supportsNativeIlike = true;
|
||||
this.supportsDeleteTableAlias = true;
|
||||
this.selectCountWithAlias = true;
|
||||
|
||||
@@ -819,7 +819,6 @@ public class DefaultDbMigration implements DbMigration {
|
||||
case POSTGRES9:
|
||||
return new Postgres9Platform();
|
||||
case POSTGRES:
|
||||
case POSTGRES10:
|
||||
return new PostgresPlatform();
|
||||
case MYSQL55:
|
||||
return new MySql55Platform();
|
||||
|
||||
@@ -13,7 +13,6 @@ import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.nuodb.NuoDbPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.Oracle11Platform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.config.dbplatform.postgres.Postgres8Platform;
|
||||
import io.ebean.config.dbplatform.postgres.Postgres9Platform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlanywhere.SqlAnywherePlatform;
|
||||
@@ -91,9 +90,6 @@ public class DatabasePlatformFactory {
|
||||
if (dbName.equals("postgres") || dbName.equals("postgres9")) {
|
||||
return new PostgresPlatform();
|
||||
}
|
||||
if (dbName.equals("postgres8") || dbName.equals("postgres83")) {
|
||||
return new Postgres8Platform();
|
||||
}
|
||||
if (dbName.equals("oracle11") || dbName.equals("oracle10") || dbName.equals("oracle9")) {
|
||||
return new Oracle11Platform();
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ public class PlatformDdlBuilder {
|
||||
case POSTGRES9:
|
||||
return new Postgres9Ddl(platform);
|
||||
case POSTGRES:
|
||||
case POSTGRES10:
|
||||
return new PostgresDdl(platform);
|
||||
case COCKROACH:
|
||||
return new CockroachDdl(platform);
|
||||
|
||||
-1
@@ -17,7 +17,6 @@ public class DbExpressionHandlerFactory {
|
||||
return new H2DbExpression();
|
||||
case POSTGRES:
|
||||
case POSTGRES9:
|
||||
case POSTGRES10:
|
||||
return new PostgresDbExpression();
|
||||
case MYSQL55:
|
||||
case MYSQL:
|
||||
|
||||
Reference in New Issue
Block a user