public class DialectDerby extends Dialect
Dialect.ArraySubQuery, Dialect.DialectIdType, Dialect.FulltextMatchInfo, Dialect.JDBCInfoaclOptimizationsEnabled, 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 and Description |
|---|
DialectDerby(DatabaseMetaData metadata,
RepositoryDescriptor repositoryDescriptor) |
| Modifier and Type | Method and Description |
|---|---|
String |
addPagingClause(String sql,
long limit,
long offset)
Returns the SQL query with a paging clause
|
List<String> |
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.
|
boolean |
doesUpdateFromRepeatSelf()
When doing an UPDATE t SET ...
|
String |
getClobCast(boolean inOrderBy)
When using a CLOB field in an expression, is some casting required and with what pattern?
|
String |
getCreateFulltextIndexSql(String indexName,
String quotedIndexName,
Table table,
List<Column> columns,
Model model)
Gets a CREATE INDEX statement for a fulltext index.
|
String |
getDialectFulltextQuery(String query)
Get the dialect-specific version of a fulltext query.
|
Serializable |
getFromResultSet(ResultSet rs,
int index,
Column column) |
int |
getFulltextIndexedColumns()
Specifies what columns of the fulltext table have to be indexed.
|
Dialect.FulltextMatchInfo |
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.
|
String |
getInTreeSql(String idColumnName,
String id)
Gets the expression to use to check tree membership.
|
Dialect.JDBCInfo |
getJDBCTypeAndString(ColumnType type)
Gets the JDBC type and string from Nuxeo's type abstraction.
|
boolean |
getMaterializeFulltextSyntheticColumn()
Does the fulltext synthetic column have to be materialized.
|
String |
getSecurityCheckSql(String idColumnName)
Gets the expression to use to check security.
|
String |
getSQLStatementsFilename()
Gets the name of the file containing the SQL statements.
|
Map<String,Serializable> |
getSQLStatementsProperties(Model model,
Database database)
Gets the properties to use with the SQL statements.
|
String |
getTestSQLStatementsFilename() |
String |
getValidationQuery()
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 |
isConcurrentUpdateException(Throwable t)
Checks if an exception received means that a concurrent update was detected.
|
boolean |
needsAliasForDerivedTable()
Whether a derived table (subselect in a FROM statement) needs an alias.
|
void |
setToPreparedStatement(PreparedStatement ps,
int index,
Serializable value,
Column column) |
boolean |
supportsPaging()
Indicates if dialect supports paging
|
boolean |
supportsUpdateFrom()
Does the dialect support UPDATE t SET ...
|
castIdToVarchar, closeQuote, createArrayOf, createDialect, getAddColumnString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAncestorsIdsSql, getArrayElementString, getArrayIlikeSql, getArrayInSql, getArrayLikeSql, getArrayResult, getArraySubQuery, getBinaryFulltextSql, getBlobLengthFunction, getCalendarFromTimestamp, getCalendarFromTimestamp, getCascadeDropConstraintsString, getClusterGetInvalidations, getClusterInsertInvalidations, getColumnName, getConnectionSchema, getCreateIndexSql, getCustomColumnDefinition, getCustomPostCreateSqls, getDateCast, getDescending, getDumpStart, getDumpStop, getForeignKeyConstraintName, getFreeVariableSetterForType, getFromResultSetString, getFromResultSetTimestamp, getFulltextType, getGeneratedId, getIdentityGeneratedKeySql, getIdType, getIgnoredColumns, getIndexName, getLikeEscaping, getMatchMixinType, getMaximumArgsForIn, getMaxIndexNameSize, getMaxNameSize, getNoColumnsInsertString, getNullColumnString, getPostCreateIdentityColumnSql, getPrepareUserReadAclsSql, getPrimaryKeyConstraintName, getReadAclsCheckSql, getRebuildReadAclsSql, getSoftDeleteCleanupSql, getSoftDeleteSql, getSQLForDump, getStartupSqls, getTableName, getTableTypeString, getTimestampFromCalendar, getTimestampFromCalendar, getUpdateReadAclsSql, hasIdentityGeneratedKey, hasNullEmptyString, isClusteringDeleteNeeded, isClusteringSupported, isIdentityAlreadyPrimary, jdbcInfo, jdbcInfo, jdbcInfo, jdbcInfo, makeName, makeName, needsNullsLastOnDescSort, needsOracleJoins, needsOrderByKeysAfterDistinct, needsOriginalColumnInGroupBy, needsPrepareUserReadAcls, openQuote, performAdditionalStatements, performPostOpenStatements, qualifyIndexName, setId, setIdLong, setToPreparedStatementString, setToPreparedStatementTimestamp, storesUpperCaseIdentifiers, supportsAncestorsTable, supportsArrayColumns, supportsArrays, supportsArraysReturnInsteadOfRows, supportsCircularCascadeDeleteConstraints, supportsFastDescendants, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsIlike, supportsMultipleFulltextIndexes, supportsReadAcl, supportsSysNameArray, supportsWith, toBooleanValueString, toHexStringpublic DialectDerby(DatabaseMetaData metadata, RepositoryDescriptor repositoryDescriptor)
public Dialect.JDBCInfo getJDBCTypeAndString(ColumnType type)
DialectgetJDBCTypeAndString in class Dialectpublic boolean isAllowedConversion(int expected, int actual, String actualName, int actualSize)
DialectisAllowedConversion in class Dialectpublic void setToPreparedStatement(PreparedStatement ps, int index, Serializable value, Column column) throws SQLException
setToPreparedStatement in class DialectSQLExceptionpublic Serializable getFromResultSet(ResultSet rs, int index, Column column) throws SQLException
getFromResultSet in class DialectSQLExceptionpublic int getFulltextIndexedColumns()
DialectgetFulltextIndexedColumns in class Dialectpublic boolean getMaterializeFulltextSyntheticColumn()
DialectgetMaterializeFulltextSyntheticColumn in class Dialectpublic String getCreateFulltextIndexSql(String indexName, String quotedIndexName, Table table, List<Column> columns, Model model)
DialectgetCreateFulltextIndexSql in class Dialectpublic String getDialectFulltextQuery(String query)
DialectgetDialectFulltextQuery in class Dialectquery - the CMIS-syntax-based fulltext query stringpublic Dialect.FulltextMatchInfo getFulltextScoredMatchInfo(String fulltextQuery, String indexName, int nthMatch, Column mainColumn, Model model, Database database)
DialectgetFulltextScoredMatchInfo in class Dialectpublic boolean supportsUpdateFrom()
DialectsupportsUpdateFrom in class Dialectpublic boolean doesUpdateFromRepeatSelf()
DialectdoesUpdateFromRepeatSelf in class Dialectpublic boolean needsAliasForDerivedTable()
DialectneedsAliasForDerivedTable in class Dialectpublic String getClobCast(boolean inOrderBy)
DialectNeeded for Derby and H2.
getClobCast in class DialectinOrderBy - true if the expression is for an ORDER BY columnnull
if no cast is requiredpublic String getSecurityCheckSql(String idColumnName)
DialectgetSecurityCheckSql in class DialectidColumnName - the quoted name of the id column to usepublic String getInTreeSql(String idColumnName, String id)
DialectgetInTreeSql in class DialectidColumnName - the quoted name of the id column to useid - the id, to check syntax with respect to specialized id column typesnull if the query cannot matchpublic String getSQLStatementsFilename()
DialectgetSQLStatementsFilename in class Dialectpublic String getTestSQLStatementsFilename()
getTestSQLStatementsFilename in class Dialectpublic Map<String,Serializable> getSQLStatementsProperties(Model model, Database database)
DialectgetSQLStatementsProperties in class Dialectpublic String getValidationQuery()
DialectThe query should throw an error if the connection is dead.
getValidationQuery in class Dialectpublic boolean supportsPaging()
DialectsupportsPaging in class Dialectpublic String addPagingClause(String sql, long limit, long offset)
DialectaddPagingClause in class Dialectpublic boolean isConcurrentUpdateException(Throwable t)
DialectisConcurrentUpdateException in class Dialectpublic List<String> checkStoredProcedure(String procName, String procCreate, String ddlMode, Connection connection, JDBCLogger logger, Map<String,Serializable> properties) throws SQLException
DialectThere are 3 cases to deal with, and actions to perform:
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.
checkStoredProcedure in class DialectprocName - the stored procedure nameprocCreate - the creation SQL for the stored procedureddlMode - the DDL modeconnection - the connectionlogger - the loggerproperties - the statement execution propertiesSQLExceptionCopyright © 2016 Nuxeo SA. All rights reserved.