Class DialectPostgreSQL
- Author:
- Florent Guillaume
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.storage.sql.jdbc.dialect.Dialect
Dialect.ArraySubQuery, Dialect.DialectIdType, Dialect.FulltextMatchInfo, Dialect.JDBCInfo
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected final boolean
protected final boolean
protected boolean
protected final boolean
protected final boolean
protected static final String
protected static final String
protected final String
protected boolean
protected String
protected final Dialect.DialectIdType
protected boolean
protected final boolean
protected final String
protected String
Fields inherited from class org.nuxeo.ecm.core.storage.sql.jdbc.dialect.Dialect
aclOptimizationsEnabled, ARRAY_SEP, clusteringEnabled, DEBUG_REAL_UUIDS, DEBUG_UUIDS, descending, DIALECT_CLASS, DIALECTS, fulltextDisabled, fulltextSearchDisabled, HEX_DIGITS, NULLS_LAST_ON_DESC_PROP, proxiesEnabled, readAclMaxSize, softDeleteEnabled, storesUpperCaseIdentifiers
-
Constructor Summary
ConstructorDescriptionDialectPostgreSQL
(DatabaseMetaData metadata, RepositoryDescriptor repositoryDescriptor) -
Method Summary
Modifier and TypeMethodDescriptionaddPagingClause
(String sql, long limit, long offset) Returns the SQL query with a paging clauseprotected static FulltextQueryAnalyzer.FulltextQuery
Returns a fulltext query that is a superset of the original one and does not have phrase searches.castIdToVarchar
(String expr) Casts an id column to a VARCHAR type.checkStoredProcedure
(String procName, String procCreate, String ddlMode, Connection connection, JDBCLogger logger, Map<String, Serializable> properties) Checks if a given stored procedure exists and is identical to the passed creation SQL.createArrayOf
(int type, Object[] elements, Connection connection) Factory method for creating Array objects, suitable for passing toPreparedStatement.setArray(int, java.sql.Array)
.boolean
When doing an UPDATE t SET ...protected static void
Gets the SQL query to get the ancestors of a set of ids.getArrayElementString
(String arrayColumnName, int arrayElementIndex) Get SQL Array Element Subscripted string.getArrayIlikeSql
(Column arrayColumn, String refName, boolean positive, Table dataHierTable) Gets the SQL string for an array column ILIKE expression.getArrayInSql
(Column arrayColumn, String cast, boolean positive, List<Serializable> params) Gets the SQL string for an array column IN expression.getArrayLikeSql
(Column arrayColumn, String refName, boolean positive, Table dataHierTable) Gets the SQL string for an array column LIKE expression.protected String
getArrayOpSql
(Column arrayColumn, String refName, boolean positive, Table dataHierTable, String op) getArraySubQuery
(Column arrayColumn, String subQueryAlias) Gets the dialect-specific subquery for an array column.getBinaryFulltextSql
(List<String> columns) Return the SQL to get the columns fulltext fieldsprotected String
getCastForArray
(String cast) protected String
getCastForId
(String id) Gets the SQL to query invalidations for this cluster node.Gets the SQL to send an invalidation to the cluster.getColumnName
(String name) protected boolean
getCreateFulltextIndexSql
(String indexName, String quotedIndexName, Table table, List<Column> columns, Model model) Gets a CREATE INDEX statement for a fulltext index.getCustomPostCreateSqls
(Table table, Model model) Additional things to execute after CREATE TABLE.Get the expression to use to cast a column to a DATE type.getDialectFulltextQuery
(String query) Get the dialect-specific version of a fulltext query.Gets the JDBC expression setting a free value for this column type.getFromResultSet
(ResultSet rs, int index, Column column) int
Specifies what columns of the fulltext table have to be indexed.getFulltextScoredMatchInfo
(String fulltextQuery, String indexName, int nthMatch, Column mainColumn, Model model, Database database) Gets the SQL information needed to do a a fulltext match, either with a direct expression in the WHERE clause, or using a join with an additional table.getGeneratedId
(Connection connection) Gets a generated id if so configured, otherwise returns null.Gets the type of id when stored in the database.getInsertOnConflictDoNothingSql
(List<Column> columns, List<Serializable> values, List<Column> outColumns, List<Serializable> outValues) Gets the SQL string for an INSERT ...getInTreeSql
(String idColumnName, String id) Gets the expression to use to check tree membership.Gets the JDBC type and string from Nuxeo's type abstraction.getMatchMixinType
(Column mixinsColumn, String mixin, boolean positive, String[] returnParam) Gets the SQL fragment to match a mixin type.boolean
Does the fulltext synthetic column have to be materialized.protected int
getNoColumnsInsertString
(Column idColumn) Gets the SQL expression to prepare the user read acls cache.getReadAclsCheckSql
(String userIdCol) Gets the expression to check if access is allowed using read acls.Gets the statement to rebuild the wall read aclsgetSecurityCheckSql
(String idColumnName) Gets the expression to use to check security.SQL to clean soft-delete documents.SQL to soft delete documents.Gets the name of the file containing the SQL statements.getSQLStatementsProperties
(Model model, Database database) Gets the properties to use with the SQL statements.getStartupSqls
(Model model, Database database) Gets the sql statements to execute after the repository init (at startup).Gets the statement to update the read aclsgetUpsertSql
(List<Column> columns, List<Serializable> values, List<Column> outColumns, List<Serializable> outValues) Gets the SQL string for an UPSERT expression.A query that, when executed, will make at least a round-trip to the server to check that the connection is alive.boolean
isAllowedConversion
(int expected, int actual, String actualName, int actualSize) Check mismatches between expected and actual JDBC types read from database introspection.boolean
Checks that clustering is supported.boolean
Checks if an exception received means that a concurrent update was detected.boolean
Whether a derived table (subselect in a FROM statement) needs an alias.boolean
True if the dialect need an extra NULLS LAST on DESC sort.protected static String
normalizeArgs
(String args) Normalize PostgreSQL type aliases.protected static String
normalizeString
(String string) void
performAdditionalStatements
(Connection connection) Let the dialect processes additional statements after tables creation and conditional statements.protected static FulltextQueryAnalyzer.FulltextQuery
Removes toplevel ANDed simple words from the query.void
setId
(PreparedStatement ps, int index, Serializable value) Sets a prepared statement value that is a Nuxeo main id (usually UUID).void
setToPreparedStatement
(PreparedStatement ps, int index, Serializable value, Column column) boolean
Checks if the dialect supports an ancestors table.boolean
Does the dialect support storing arrays in table columns.boolean
Does the dialect support passing ARRAY values (to stored procedures mostly).boolean
Checks whetherDialect.getInTreeSql(String, String)
is optimized for fast results (using an ancestors or descendants table).boolean
Does the dialect support ILIKE operatorboolean
Indicates if dialect supports pagingboolean
Does the dialect support an optimized read security checksboolean
Checks if the dialect supports storing arrays of system names (for mixins for instance).boolean
Does the dialect support UPDATE t SET ...boolean
Does the dialect support SQL-99 WITH common table expressions.toBooleanValueString
(boolean bool) Methods inherited from class org.nuxeo.ecm.core.storage.sql.jdbc.dialect.Dialect
closeQuote, createDialect, getAddColumnString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getArrayResult, getBlobLengthFunction, getCalendarFromTimestamp, getCalendarFromTimestamp, getClobCast, getConnectionSchema, getCreateIndexSql, getCustomColumnDefinition, getDescending, getDumpStart, getDumpStop, getForeignKeyConstraintName, getFromResultSetString, getFromResultSetTimestamp, getFulltextType, getIdentityGeneratedKeySql, getIgnoredColumns, getIndexName, getLikeEscaping, getMaximumArgsForIn, getMaxIndexNameSize, getNullColumnString, getPostCreateIdentityColumnSql, getPrimaryKeyConstraintName, getQuotedNameForExpression, getReturnResultSet, getSQLForDump, getTableName, getTableTypeString, getTimestampFromCalendar, getTimestampFromCalendar, hasIdentityGeneratedKey, hasNullEmptyString, isClusteringDeleteNeeded, isIdentityAlreadyPrimary, jdbcInfo, jdbcInfo, jdbcInfo, jdbcInfo, makeName, makeName, needsOracleJoins, needsOrderByKeysAfterDistinct, needsOriginalColumnInGroupBy, needsPrepareUserReadAcls, openQuote, performPostOpenStatements, qualifyIndexName, registerReturnParameter, setIdLong, setToPreparedStatementString, setToPreparedStatementTimestamp, storesUpperCaseIdentifiers, supportsArraysReturnInsteadOfRows, supportsBatchUpdateCount, supportsCircularCascadeDeleteConstraints, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsMultipleFulltextIndexes, supportsScroll, toHexString
-
Field Details
-
fulltextAnalyzer
-
supportsWith
protected final boolean supportsWith -
hierarchyCreated
protected boolean hierarchyCreated -
pathOptimizationsEnabled
protected boolean pathOptimizationsEnabled -
arrayColumnsEnabled
protected final boolean arrayColumnsEnabled -
childNameUniqueConstraintEnabled
protected final boolean childNameUniqueConstraintEnabled -
collectionUniqueConstraintEnabled
protected final boolean collectionUniqueConstraintEnabled -
disableVersionACL
protected final boolean disableVersionACL -
disableReadVersionPermission
protected final boolean disableReadVersionPermission -
usersSeparator
-
idType
-
compatibilityFulltextTable
protected boolean compatibilityFulltextTable -
unloggedKeyword
-
idSequenceName
-
FT_LIKE_SEP
- See Also:
-
FT_LIKE_COL
- See Also:
-
-
Constructor Details
-
DialectPostgreSQL
-
-
Method Details
-
getCompatibilityFulltextTable
- Throws:
SQLException
-
toBooleanValueString
- Overrides:
toBooleanValueString
in classDialect
-
getNoColumnsInsertString
- Overrides:
getNoColumnsInsertString
in classDialect
-
getCascadeDropConstraintsString
- Overrides:
getCascadeDropConstraintsString
in classDialect
-
getJDBCTypeAndString
Description copied from class:Dialect
Gets the JDBC type and string from Nuxeo's type abstraction.- Specified by:
getJDBCTypeAndString
in classDialect
-
isAllowedConversion
Description copied from class:Dialect
Check mismatches between expected and actual JDBC types read from database introspection.- Overrides:
isAllowedConversion
in classDialect
-
getGeneratedId
Description copied from class:Dialect
Gets a generated id if so configured, otherwise returns null.- Overrides:
getGeneratedId
in classDialect
- Throws:
SQLException
-
setId
Description copied from class:Dialect
Sets a prepared statement value that is a Nuxeo main id (usually UUID).- Overrides:
setId
in classDialect
- Parameters:
ps
- the prepared statementindex
- the parameter index in the prepared statementvalue
- the value to set- Throws:
SQLException
-
getId
- Throws:
SQLException
-
setToPreparedStatement
public void setToPreparedStatement(PreparedStatement ps, int index, Serializable value, Column column) throws SQLException - Specified by:
setToPreparedStatement
in classDialect
- Throws:
SQLException
-
getFromResultSet
- Specified by:
getFromResultSet
in classDialect
- Throws:
SQLException
-
getMaxNameSize
protected int getMaxNameSize()- Overrides:
getMaxNameSize
in classDialect
-
getColumnName
- Overrides:
getColumnName
in classDialect
-
getCustomPostCreateSqls
Description copied from class:Dialect
Additional things to execute after CREATE TABLE.- Overrides:
getCustomPostCreateSqls
in classDialect
-
getCreateFulltextIndexSql
public String getCreateFulltextIndexSql(String indexName, String quotedIndexName, Table table, List<Column> columns, Model model) Description copied from class:Dialect
Gets a CREATE INDEX statement for a fulltext index.- Specified by:
getCreateFulltextIndexSql
in classDialect
-
getDialectFulltextQuery
Get the dialect-specific version of a fulltext query.The result of this is passed to
getFulltextScoredMatchInfo(java.lang.String, java.lang.String, int, org.nuxeo.ecm.core.storage.sql.jdbc.db.Column, org.nuxeo.ecm.core.storage.sql.Model, org.nuxeo.ecm.core.storage.sql.jdbc.db.Database)
.- Specified by:
getDialectFulltextQuery
in classDialect
- Parameters:
query
- the CMIS-syntax-based fulltext query string- Returns:
- the dialect native fulltext query string
-
breakPhrases
protected static FulltextQueryAnalyzer.FulltextQuery breakPhrases(FulltextQueryAnalyzer.FulltextQuery ft) Returns a fulltext query that is a superset of the original one and does not have phrase searches.Negative phrases (which are at AND level) are removed, positive phrases are split into ANDed words.
-
removeToplevelAndedWords
protected static FulltextQueryAnalyzer.FulltextQuery removeToplevelAndedWords(FulltextQueryAnalyzer.FulltextQuery ft) Removes toplevel ANDed simple words from the query. -
generateLikeSql
-
getFulltextScoredMatchInfo
public Dialect.FulltextMatchInfo getFulltextScoredMatchInfo(String fulltextQuery, String indexName, int nthMatch, Column mainColumn, Model model, Database database) Description copied from class:Dialect
Gets the SQL information needed to do a a fulltext match, either with a direct expression in the WHERE clause, or using a join with an additional table.- Specified by:
getFulltextScoredMatchInfo
in classDialect
-
getMaterializeFulltextSyntheticColumn
public boolean getMaterializeFulltextSyntheticColumn()Description copied from class:Dialect
Does the fulltext synthetic column have to be materialized.- Specified by:
getMaterializeFulltextSyntheticColumn
in classDialect
-
getFulltextIndexedColumns
public int getFulltextIndexedColumns()Description copied from class:Dialect
Specifies what columns of the fulltext table have to be indexed.- Specified by:
getFulltextIndexedColumns
in classDialect
- Returns:
- 0 for none, 1 for the synthetic one, 2 for the individual ones
-
getFreeVariableSetterForType
Description copied from class:Dialect
Gets the JDBC expression setting a free value for this column type.Needed for columns that need an expression around the value being set, usually for conversion (this is the case for PostgreSQL fulltext
TSVECTOR
columns for instance).- Overrides:
getFreeVariableSetterForType
in classDialect
- Parameters:
type
- the column type- Returns:
- the expression containing a free variable
-
supportsUpdateFrom
public boolean supportsUpdateFrom()Description copied from class:Dialect
Does the dialect support UPDATE t SET ... FROM t, u WHERE ... ?- Specified by:
supportsUpdateFrom
in classDialect
-
doesUpdateFromRepeatSelf
public boolean doesUpdateFromRepeatSelf()Description copied from class:Dialect
When doing an UPDATE t SET ... FROM t, u WHERE ..., does the FROM clause need to repeate the updated table (t).- Specified by:
doesUpdateFromRepeatSelf
in classDialect
-
needsAliasForDerivedTable
public boolean needsAliasForDerivedTable()Description copied from class:Dialect
Whether a derived table (subselect in a FROM statement) needs an alias.- Overrides:
needsAliasForDerivedTable
in classDialect
-
supportsIlike
public boolean supportsIlike()Description copied from class:Dialect
Does the dialect support ILIKE operator- Overrides:
supportsIlike
in classDialect
-
supportsReadAcl
public boolean supportsReadAcl()Description copied from class:Dialect
Does the dialect support an optimized read security checks- Overrides:
supportsReadAcl
in classDialect
-
getPrepareUserReadAclsSql
Description copied from class:Dialect
Gets the SQL expression to prepare the user read acls cache. This can be used to populate a table cache.- Overrides:
getPrepareUserReadAclsSql
in classDialect
- Returns:
- and SQL expression with one parameter (principals)
-
getReadAclsCheckSql
Description copied from class:Dialect
Gets the expression to check if access is allowed using read acls. The dialect must suppportsReadAcl.- Overrides:
getReadAclsCheckSql
in classDialect
- Parameters:
userIdCol
- the quoted name of the aclr_user_map user_id column to use- Returns:
- an SQL expression with one parameter (principals) that is true if access is allowed
-
getUpdateReadAclsSql
Description copied from class:Dialect
Gets the statement to update the read acls- Overrides:
getUpdateReadAclsSql
in classDialect
-
getRebuildReadAclsSql
Description copied from class:Dialect
Gets the statement to rebuild the wall read acls- Overrides:
getRebuildReadAclsSql
in classDialect
-
getSecurityCheckSql
Description copied from class:Dialect
Gets the expression to use to check security.- Specified by:
getSecurityCheckSql
in classDialect
- Parameters:
idColumnName
- the quoted name of the id column to use- Returns:
- an SQL expression with two parameters (principals and permissions) that is true if access is allowed
-
supportsAncestorsTable
public boolean supportsAncestorsTable()Description copied from class:Dialect
Checks if the dialect supports an ancestors table.- Overrides:
supportsAncestorsTable
in classDialect
-
supportsFastDescendants
public boolean supportsFastDescendants()Description copied from class:Dialect
Checks whetherDialect.getInTreeSql(String, String)
is optimized for fast results (using an ancestors or descendants table).- Overrides:
supportsFastDescendants
in classDialect
-
getInTreeSql
Description copied from class:Dialect
Gets the expression to use to check tree membership.- Specified by:
getInTreeSql
in classDialect
- Parameters:
idColumnName
- the quoted name of the id column to useid
- the id, to check syntax with respect to specialized id column types- Returns:
- an SQL expression with one parameters for the based id that is true if the document is under base id, or
null
if the query cannot match
-
getCastForArray
-
getCastForId
-
getUpsertSql
public String getUpsertSql(List<Column> columns, List<Serializable> values, List<Column> outColumns, List<Serializable> outValues) Description copied from class:Dialect
Gets the SQL string for an UPSERT expression.- Specified by:
getUpsertSql
in classDialect
- Parameters:
columns
- the columns to upsert (first one being the key column)values
- the values to upsert (first one being the key value)outColumns
- the columns to use in the prepared statementoutValues
- the values to use in the prepared statement
-
getInsertOnConflictDoNothingSql
public String getInsertOnConflictDoNothingSql(List<Column> columns, List<Serializable> values, List<Column> outColumns, List<Serializable> outValues) Description copied from class:Dialect
Gets the SQL string for an INSERT ... ON CONFLICT DO NOTHING expression.- Overrides:
getInsertOnConflictDoNothingSql
in classDialect
- Parameters:
columns
- the columns to insert (first one being the key column)values
- the values to insert (first one being the key value)outColumns
- the columns to use in the prepared statementoutValues
- the values to use in the prepared statement
-
getMatchMixinType
public String getMatchMixinType(Column mixinsColumn, String mixin, boolean positive, String[] returnParam) Description copied from class:Dialect
Gets the SQL fragment to match a mixin type.- Overrides:
getMatchMixinType
in classDialect
-
supportsSysNameArray
public boolean supportsSysNameArray()Description copied from class:Dialect
Checks if the dialect supports storing arrays of system names (for mixins for instance).- Overrides:
supportsSysNameArray
in classDialect
-
supportsArrays
public boolean supportsArrays()Description copied from class:Dialect
Does the dialect support passing ARRAY values (to stored procedures mostly).If not, we'll simulate them using a string and a separator.
- Overrides:
supportsArrays
in classDialect
- Returns:
- true if ARRAY values are supported
-
supportsArrayColumns
public boolean supportsArrayColumns()Description copied from class:Dialect
Does the dialect support storing arrays in table columns.- Overrides:
supportsArrayColumns
in classDialect
- Returns:
- true if ARRAY columns are supported
-
getArraySubQuery
Description copied from class:Dialect
Gets the dialect-specific subquery for an array column.- Overrides:
getArraySubQuery
in classDialect
-
getArrayElementString
Description copied from class:Dialect
Get SQL Array Element Subscripted string.- Overrides:
getArrayElementString
in classDialect
-
getArrayInSql
public String getArrayInSql(Column arrayColumn, String cast, boolean positive, List<Serializable> params) Description copied from class:Dialect
Gets the SQL string for an array column IN expression.- Overrides:
getArrayInSql
in classDialect
-
getArrayLikeSql
public String getArrayLikeSql(Column arrayColumn, String refName, boolean positive, Table dataHierTable) Description copied from class:Dialect
Gets the SQL string for an array column LIKE expression.- Overrides:
getArrayLikeSql
in classDialect
-
getArrayIlikeSql
public String getArrayIlikeSql(Column arrayColumn, String refName, boolean positive, Table dataHierTable) Description copied from class:Dialect
Gets the SQL string for an array column ILIKE expression.- Overrides:
getArrayIlikeSql
in classDialect
-
getArrayOpSql
-
createArrayOf
Description copied from class:Dialect
Factory method for creating Array objects, suitable for passing toPreparedStatement.setArray(int, java.sql.Array)
.(An equivalent method is defined by JDBC4 on the
Connection
class.)- Overrides:
createArrayOf
in classDialect
- Parameters:
type
- the SQL type of the elementselements
- the elements of the arrayconnection
- the connection- Returns:
- an Array holding the elements
- Throws:
SQLException
-
getSQLStatementsFilename
Description copied from class:Dialect
Gets the name of the file containing the SQL statements.- Specified by:
getSQLStatementsFilename
in classDialect
-
getTestSQLStatementsFilename
- Specified by:
getTestSQLStatementsFilename
in classDialect
-
getSQLStatementsProperties
Description copied from class:Dialect
Gets the properties to use with the SQL statements.- Specified by:
getSQLStatementsProperties
in classDialect
-
getStartupSqls
Description copied from class:Dialect
Gets the sql statements to execute after the repository init (at startup).Used for vacuum-like operations.
- Overrides:
getStartupSqls
in classDialect
-
isClusteringSupported
public boolean isClusteringSupported()Description copied from class:Dialect
Checks that clustering is supported.- Overrides:
isClusteringSupported
in classDialect
-
getClusterInsertInvalidations
Description copied from class:Dialect
Gets the SQL to send an invalidation to the cluster.- Overrides:
getClusterInsertInvalidations
in classDialect
- Returns:
- an SQL statement with parameters for: nodeId, id, fragments, kind
-
getClusterGetInvalidations
Description copied from class:Dialect
Gets the SQL to query invalidations for this cluster node.- Overrides:
getClusterGetInvalidations
in classDialect
- Returns:
- an SQL statement returning a result set
-
isConcurrentUpdateException
Description copied from class:Dialect
Checks if an exception received means that a concurrent update was detected.- Overrides:
isConcurrentUpdateException
in classDialect
-
supportsPaging
public boolean supportsPaging()Description copied from class:Dialect
Indicates if dialect supports paging- Overrides:
supportsPaging
in classDialect
- Returns:
- true if the dialect supports paging
-
addPagingClause
Description copied from class:Dialect
Returns the SQL query with a paging clause- Overrides:
addPagingClause
in classDialect
-
supportsWith
public boolean supportsWith()Description copied from class:Dialect
Does the dialect support SQL-99 WITH common table expressions.- Overrides:
supportsWith
in classDialect
-
performAdditionalStatements
Description copied from class:Dialect
Let the dialect processes additional statements after tables creation and conditional statements. Can be used for specific upgrade procedure.- Overrides:
performAdditionalStatements
in classDialect
- Throws:
SQLException
-
getUsersSeparator
-
getValidationQuery
Description copied from class:Dialect
A query that, when executed, will make at least a round-trip to the server to check that the connection is alive.The query should throw an error if the connection is dead.
- Overrides:
getValidationQuery
in classDialect
-
getAncestorsIdsSql
Description copied from class:Dialect
Gets the SQL query to get the ancestors of a set of ids.- Overrides:
getAncestorsIdsSql
in classDialect
- Returns:
- null if not available
-
needsNullsLastOnDescSort
public boolean needsNullsLastOnDescSort()Description copied from class:Dialect
True if the dialect need an extra NULLS LAST on DESC sort.- Overrides:
needsNullsLastOnDescSort
in classDialect
-
getDateCast
Description copied from class:Dialect
Get the expression to use to cast a column to a DATE type.- Overrides:
getDateCast
in classDialect
- Returns:
- a pattern for String.format with one parameter for the column name
-
castIdToVarchar
Description copied from class:Dialect
Casts an id column to a VARCHAR type.Used for uuid/varchar joins.
- Overrides:
castIdToVarchar
in classDialect
- Returns:
- the casted expression
-
getIdType
Description copied from class:Dialect
Gets the type of id when stored in the database. -
getSoftDeleteSql
Description copied from class:Dialect
SQL to soft delete documents. SQL returned has free parameters for the array of ids and time.- Overrides:
getSoftDeleteSql
in classDialect
-
getSoftDeleteCleanupSql
Description copied from class:Dialect
SQL to clean soft-delete documents. SQL returned has free parameters max and beforeTime.- Overrides:
getSoftDeleteCleanupSql
in classDialect
-
getBinaryFulltextSql
Description copied from class:Dialect
Return the SQL to get the columns fulltext fields- Overrides:
getBinaryFulltextSql
in classDialect
-
checkStoredProcedure
public List<String> checkStoredProcedure(String procName, String procCreate, String ddlMode, Connection connection, JDBCLogger logger, Map<String, Serializable> properties) throws SQLExceptionDescription copied from class:Dialect
Checks if a given stored procedure exists and is identical to the passed creation SQL.There are 3 cases to deal with, and actions to perform:
- the stored procedure doesn't exist, and must be created (create the stored procedure);
- the stored procedure exists but is not up to date (drop the old stored procedure and re-create it);
- the stored procedure exists and is up to date (nothing to do).
When there is nothing to do,
null
is returned. Otherwise the returned value is a list of SQL statements to execute. Note that the SQL statements will include also INSERT statements to be executed to remember the creation SQL itself.- Specified by:
checkStoredProcedure
in classDialect
- Parameters:
procName
- the stored procedure nameprocCreate
- the creation SQL for the stored procedureddlMode
- the DDL modeconnection
- the connectionlogger
- the loggerproperties
- the statement execution properties- Returns:
- a list of SQL statements
- Throws:
SQLException
-
normalizeString
-
normalizeArgs
Normalize PostgreSQL type aliases.
-