Class PostgresPlatform
java.lang.Object
io.ebean.config.dbplatform.DatabasePlatform
io.ebean.config.dbplatform.postgres.PostgresPlatform
- Direct Known Subclasses:
CockroachPlatform,Postgres9Platform
public class PostgresPlatform extends DatabasePlatform
Postgres 10+ platform.
Defaults to use "generated by default as identity".
-
Nested Class Summary
Nested classes/interfaces inherited from class io.ebean.config.dbplatform.DatabasePlatform
DatabasePlatform.OnQueryOnly -
Constructor Summary
Constructors Constructor Description PostgresPlatform() -
Method Summary
Modifier and Type Method Description voidconfigure(PlatformConfig config)Configure the platform given the server configuration.PlatformIdGeneratorcreateSequenceIdGenerator(BackgroundExecutor be, DataSource ds, int stepSize, String seqName)Create a Postgres specific sequence IdGenerator.booleanisNativeArrayType()So we can generate varchar[], int[], uuid[] column definitions and use the associated scalar types.StringtablePartitionInit(String tableName, io.ebean.annotation.PartitionMode mode, String property, String pkey)Return SQL using built in partition helper functions to create some initial partitions.booleantablePartitionsExist(Connection connection, String table)Return true if partitions exist for the given table.Methods inherited from class io.ebean.config.dbplatform.DatabasePlatform
completeSql, convertQuotedIdentifiers, createSchemaIfNotExists, escapeLikeString, fromForUpdate, getBasicSqlLimiter, getBlobDbType, getBooleanDbType, getClobDbType, getCloseQuote, getColumnAliasPrefix, getDbDefaultValue, getDbEncrypt, getDbIdentity, getDbTypeMap, getHistorySupport, getLikeClause, getMaxConstraintNameLength, getMaxTableNameLength, getName, getOnQueryOnly, getOpenQuote, getPersistBatchOnCascade, getPlatform, getSqlLimiter, isCaseSensitiveCollation, isDdlAutoCommit, isForwardOnlyHintOnFindIterate, isIdInExpandedForm, isInlineSqlUpdateLimit, isNativeUuidType, isPlatform, isSelectCountWithAlias, isSelectCountWithColumnAlias, isSequenceBatchMode, isSupportsDeleteTableAlias, isSupportsNativeIlike, isSupportsResultSetConcurrencyModeUpdatable, isSupportsSavepointId, isTreatEmptyStringsAsNull, schemaExists, setColumnAliasPrefix, setDbEncrypt, setDbFalseLiteral, setDbTrueLiteral, setForwardOnlyHintOnFindIterate, setHistorySupport, setOnQueryOnly, setSequenceBatchMode, setSupportsResultSetConcurrencyModeUpdatable, tableExists, translate, truncateStatement, unQuote, useExtraTransactionOnIterateSecondaryQueries
-
Constructor Details
-
PostgresPlatform
public PostgresPlatform()
-
-
Method Details
-
configure
Description copied from class:DatabasePlatformConfigure the platform given the server configuration.- Overrides:
configurein classDatabasePlatform
-
isNativeArrayType
So we can generate varchar[], int[], uuid[] column definitions and use the associated scalar types.- Overrides:
isNativeArrayTypein classDatabasePlatform
-
createSequenceIdGenerator
public PlatformIdGenerator createSequenceIdGenerator(BackgroundExecutor be, DataSource ds, int stepSize, String seqName)Create a Postgres specific sequence IdGenerator.- Overrides:
createSequenceIdGeneratorin classDatabasePlatform- Parameters:
be- the BackgroundExecutor that can be used to load the sequence if desiredds- the DataSourcestepSize- the sequence allocation size as defined by mapping (defaults to 50)seqName- the name of the sequence
-
tablePartitionsExist
Description copied from class:DatabasePlatformReturn true if partitions exist for the given table.- Overrides:
tablePartitionsExistin classDatabasePlatform- Throws:
SQLException
-
tablePartitionInit
public String tablePartitionInit(String tableName, io.ebean.annotation.PartitionMode mode, String property, String pkey)Return SQL using built in partition helper functions to create some initial partitions.Only use this if extra-ddl doesn't have some initial partitions defined (which it should).
- Overrides:
tablePartitionInitin classDatabasePlatform
-