public class DialectMySQL extends Dialect
Dialect.ArraySubQuery, Dialect.DialectIdType, Dialect.FulltextMatchInfo, Dialect.JDBCInfo
ARRAY_SEP, DEBUG_REAL_UUIDS, DEBUG_UUIDS, DIALECT_CLASS, DIALECTS, NULLS_LAST_ON_DESC_PROP
Constructor and Description |
---|
DialectMySQL(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
|
char |
closeQuote() |
boolean |
doesUpdateFromRepeatSelf()
When doing an UPDATE t SET ...
|
String |
getAddForeignKeyConstraintString(String constraintName,
String[] foreignKeys,
String referencedTable,
String[] primaryKeys,
boolean referencesPrimaryKey) |
String |
getBinaryFulltextSql(List<String> columns)
Return the SQL to get the columns fulltext fields
|
String |
getClusterDeleteInvalidations()
Gets the SQL to delete invalidations for this cluster node.
|
String |
getClusterGetInvalidations()
Gets the SQL to query invalidations for this cluster node.
|
String |
getClusterInsertInvalidations()
Gets the SQL to send an invalidation to the cluster.
|
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)
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 |
getTableTypeString(Table table) |
String |
getTestSQLStatementsFilename() |
boolean |
isAllowedConversion(int expected,
int actual,
String actualName,
int actualSize)
Check mismatches between expected and actual JDBC types read from database introspection.
|
boolean |
isClusteringDeleteNeeded()
Does clustering fetch of invalidations (
Dialect.getClusterGetInvalidations() ) need a separate delete for them (
Dialect.getClusterDeleteInvalidations() ). |
boolean |
isClusteringSupported()
Checks that clustering is supported.
|
boolean |
isConcurrentUpdateException(Throwable t)
Checks if an exception received means that a concurrent update was detected.
|
boolean |
isConnectionClosedException(Throwable t)
Checks if an exception received means that the low level connection has been trashed and must be reset.
|
boolean |
isIdentityAlreadyPrimary()
Checks if an identity column is already defined as a primary key and does not need a separate index added.
|
boolean |
needsAliasForDerivedTable()
Whether a derived table (subselect in a FROM statement) needs an alias.
|
boolean |
needsOrderByKeysAfterDistinct()
When doing a SELECT DISTINCT that uses a ORDER BY, do the keys along which we order have to be mentioned in the
DISTINCT clause?
|
char |
openQuote() |
boolean |
qualifyIndexName() |
void |
setToPreparedStatement(PreparedStatement ps,
int index,
Serializable value,
Column column) |
boolean |
supportsIfExistsBeforeTableName() |
boolean |
supportsPaging()
Indicates if dialect supports paging
|
boolean |
supportsUpdateFrom()
Does the dialect support UPDATE t SET ...
|
castIdToVarchar, createArrayOf, createDialect, existingTableDetected, getAddColumnString, getAddPrimaryKeyConstraintString, getAncestorsIdsSql, getArrayElementString, getArrayIlikeSql, getArrayInSql, getArrayLikeSql, getArrayResult, getArraySubQuery, getBlobLengthFunction, getCalendarFromTimestamp, getCalendarFromTimestamp, getCascadeDropConstraintsString, getClobCast, getClusterNodeIdSql, getColumnName, getConnectionSchema, getCreateIndexSql, getCustomColumnDefinition, getCustomPostCreateSqls, getDateCast, getDescending, getForeignKeyConstraintName, getFreeVariableSetterForType, getFulltextType, getGeneratedId, getIdentityGeneratedKeySql, getIdType, getIgnoredColumns, getIndexName, getMatchMixinType, getMaximumArgsForIn, getNoColumnsInsertString, getNullColumnString, getPostCreateIdentityColumnSql, getPostCreateTableSqls, getPrepareUserReadAclsSql, getPrimaryKeyConstraintName, getReadAclsCheckSql, getRebuildReadAclsSql, getSoftDeleteCleanupSql, getSoftDeleteSql, getTableName, getTimestampFromCalendar, getTimestampFromCalendar, getUpdateReadAclsSql, getValidationQuery, hasIdentityGeneratedKey, hasNullEmptyString, jdbcInfo, jdbcInfo, jdbcInfo, jdbcInfo, needsNullsLastOnDescSort, needsOracleJoins, needsOriginalColumnInGroupBy, needsPrepareUserReadAcls, performAdditionalStatements, performPostOpenStatements, preCreateTable, setId, setIdLong, setToPreparedStatementTimestamp, storesUpperCaseIdentifiers, supportsAncestorsTable, supportsArrayColumns, supportsArrays, supportsArraysReturnInsteadOfRows, supportsCircularCascadeDeleteConstraints, supportsIfExistsAfterTableName, supportsIlike, supportsMultipleFulltextIndexes, supportsReadAcl, supportsSysNameArray, supportsWith, toBooleanValueString, toHexString
public DialectMySQL(DatabaseMetaData metadata, RepositoryDescriptor repositoryDescriptor) throws StorageException
StorageException
public char closeQuote()
closeQuote
in class Dialect
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKeys, String referencedTable, String[] primaryKeys, boolean referencesPrimaryKey)
getAddForeignKeyConstraintString
in class Dialect
public boolean qualifyIndexName()
qualifyIndexName
in class Dialect
public boolean supportsIfExistsBeforeTableName()
supportsIfExistsBeforeTableName
in class Dialect
public Dialect.JDBCInfo getJDBCTypeAndString(ColumnType type)
Dialect
getJDBCTypeAndString
in class Dialect
public boolean isAllowedConversion(int expected, int actual, String actualName, int actualSize)
Dialect
isAllowedConversion
in class Dialect
public void setToPreparedStatement(PreparedStatement ps, int index, Serializable value, Column column) throws SQLException
setToPreparedStatement
in class Dialect
SQLException
public Serializable getFromResultSet(ResultSet rs, int index, Column column) throws SQLException
getFromResultSet
in class Dialect
SQLException
public String getCreateFulltextIndexSql(String indexName, String quotedIndexName, Table table, List<Column> columns, Model model)
Dialect
getCreateFulltextIndexSql
in class Dialect
public String getDialectFulltextQuery(String query)
Dialect
getDialectFulltextQuery
in class Dialect
query
- the CMIS-syntax-based fulltext query stringpublic Dialect.FulltextMatchInfo getFulltextScoredMatchInfo(String fulltextQuery, String indexName, int nthMatch, Column mainColumn, Model model, Database database)
Dialect
getFulltextScoredMatchInfo
in class Dialect
public boolean getMaterializeFulltextSyntheticColumn()
Dialect
getMaterializeFulltextSyntheticColumn
in class Dialect
public int getFulltextIndexedColumns()
Dialect
getFulltextIndexedColumns
in class Dialect
public String getTableTypeString(Table table)
getTableTypeString
in class Dialect
public boolean supportsUpdateFrom()
Dialect
supportsUpdateFrom
in class Dialect
public boolean doesUpdateFromRepeatSelf()
Dialect
doesUpdateFromRepeatSelf
in class Dialect
public boolean needsOrderByKeysAfterDistinct()
Dialect
needsOrderByKeysAfterDistinct
in class Dialect
public boolean needsAliasForDerivedTable()
Dialect
needsAliasForDerivedTable
in class Dialect
public String getSecurityCheckSql(String idColumnName)
Dialect
getSecurityCheckSql
in class Dialect
idColumnName
- the quoted name of the id column to usepublic String getInTreeSql(String idColumnName)
Dialect
getInTreeSql
in class Dialect
idColumnName
- the quoted name of the id column to usepublic String getSQLStatementsFilename()
Dialect
getSQLStatementsFilename
in class Dialect
public String getTestSQLStatementsFilename()
getTestSQLStatementsFilename
in class Dialect
public Map<String,Serializable> getSQLStatementsProperties(Model model, Database database)
Dialect
getSQLStatementsProperties
in class Dialect
public boolean isConnectionClosedException(Throwable t)
Dialect
isConnectionClosedException
in class Dialect
public boolean isConcurrentUpdateException(Throwable t)
Dialect
isConcurrentUpdateException
in class Dialect
public boolean isClusteringSupported()
Dialect
isClusteringSupported
in class Dialect
public boolean isClusteringDeleteNeeded()
Dialect
Dialect.getClusterGetInvalidations()
) need a separate delete for them (
Dialect.getClusterDeleteInvalidations()
).isClusteringDeleteNeeded
in class Dialect
public String getClusterInsertInvalidations()
Dialect
getClusterInsertInvalidations
in class Dialect
public String getClusterGetInvalidations()
Dialect
getClusterGetInvalidations
in class Dialect
public String getClusterDeleteInvalidations()
Dialect
getClusterDeleteInvalidations
in class Dialect
public boolean supportsPaging()
Dialect
supportsPaging
in class Dialect
public String addPagingClause(String sql, long limit, long offset)
Dialect
addPagingClause
in class Dialect
public boolean isIdentityAlreadyPrimary()
Dialect
MySQL defines the identity column directly as primary key.
isIdentityAlreadyPrimary
in class Dialect
Copyright © 2015 Nuxeo SA. All rights reserved.