- All Implemented Interfaces:
Dialect
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class org.seasar.doma.jdbc.dialect.StandardDialect
StandardDialect.StandardCriteriaBuilder, StandardDialect.StandardExpressionFunctions, StandardDialect.StandardJdbcMappingVisitor, StandardDialect.StandardScriptBlockContext, StandardDialect.StandardSqlLogFormattingVisitor -
Field Summary
Fields inherited from class org.seasar.doma.jdbc.dialect.StandardDialect
CLOSE_QUOTE, expressionFunctions, jdbcMappingVisitor, OPEN_QUOTE, sqlLogFormattingVisitor, UNIQUE_CONSTRAINT_VIOLATION_STATE_CODES -
Constructor Summary
ConstructorsConstructorDescriptionSqliteDialect(ExpressionFunctions expressionFunctions) SqliteDialect(JdbcMappingVisitor jdbcMappingVisitor) SqliteDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor) SqliteDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions) SqliteDialect(SqlLogFormattingVisitor sqlLogFormattingVisitor) -
Method Summary
Modifier and TypeMethodDescriptionReturns the criteria builder for this dialect.getIdentitySelectSql(String catalogName, String schemaName, String tableName, String columnName, boolean isQuoteRequired, boolean isIdColumnQuoteRequired) Returns an SQL object to retrieve IDENTITY values that were generated during an insert operation.getName()Returns the name of this dialect.getUpsertAssembler(UpsertAssemblerContext context) Returns the UpsertAssembler implementation for the given context.booleanisUniqueConstraintViolated(SQLException sqlException) Determines whether the given SQLException represents a unique constraint violation.booleanDetermines whether the use of table aliases is supported in the context of a DELETE statement.booleanDetermines whether the use of table aliases is supported in the context of an UPDATE statement.booleanDetermines whether this dialect supports retrieving auto-generated keys viaStatement.getGeneratedKeys().booleanDetermines whether this dialect supports auto-increment columns when inserting multiple rows.booleanDetermines whether this dialect supports the IDENTITY column.booleanDetermines whether this dialect requires parentheses around set operation operands.protected SqlNodetoForUpdateSqlNode(SqlNode sqlNode, SelectForUpdateType forUpdateType, int waitSeconds, String... aliases) protected SqlNodetoPagingSqlNode(SqlNode sqlNode, long offset, long limit) Methods inherited from class org.seasar.doma.jdbc.dialect.StandardDialect
applyQuote, createScriptBlockContext, getAutoGeneratedKeysType, getCauseSQLException, getDeleteAssembler, getErrorCode, getExpressionFunctions, getIdentityReservationSql, getInsertAssembler, getJdbcMappingVisitor, getMultiInsertAssembler, getResultSetType, getRootCause, getScriptBlockDelimiter, getSequenceNextValSql, getSqlLogFormattingVisitor, getSQLState, getUpdateAssembler, includesIdentityColumn, removeQuote, supportsBatchUpdateResults, supportsIdentityReservation, supportsResultSetReturningAsOutParameter, supportsSelectForUpdate, supportsSequence, toCountCalculatingSqlNode, toCountGettingSqlNode, transformSelectSqlNode, transformSelectSqlNodeForGettingCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.dialect.Dialect
includesIdentityColumn, supportsAliasInDeleteClause, supportsAliasInUpdateClause, supportsBatchExecutionReturningGeneratedValues, supportsModOperator, supportsMultiRowInsertStatement, supportsReturning, supportsUpsertEmulationWithMergeStatement
-
Constructor Details
-
SqliteDialect
public SqliteDialect() -
SqliteDialect
-
SqliteDialect
-
SqliteDialect
-
SqliteDialect
public SqliteDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor) -
SqliteDialect
public SqliteDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions)
-
-
Method Details
-
getName
Description copied from interface:DialectReturns the name of this dialect.The dialect name typically identifies the database system that this dialect supports. This name can be used for logging, debugging, or to make decisions based on the specific database being used.
Each dialect implementation should return a unique and descriptive name.
- Specified by:
getNamein interfaceDialect- Overrides:
getNamein classStandardDialect- Returns:
- the name of this dialect
-
getIdentitySelectSql
public PreparedSql getIdentitySelectSql(String catalogName, String schemaName, String tableName, String columnName, boolean isQuoteRequired, boolean isIdColumnQuoteRequired) Description copied from interface:DialectReturns an SQL object to retrieve IDENTITY values that were generated during an insert operation.This method is used to create the SQL statement that retrieves the last generated identity value for a specific table and column.
This method is available only if
Dialect.supportsIdentity()returnstrue.- Specified by:
getIdentitySelectSqlin interfaceDialect- Overrides:
getIdentitySelectSqlin classStandardDialect- Parameters:
catalogName- the catalog name of the table (may benullif not applicable)schemaName- the schema name of the table (may benullif not applicable)tableName- the name of the table containing the identity columncolumnName- the name of the identity columnisQuoteRequired- whether the table name should be quoted in the SQL statementisIdColumnQuoteRequired- whether the identity column name should be quoted in the SQL statement- Returns:
- the SQL object that can be executed to retrieve the generated identity value
-
toPagingSqlNode
- Overrides:
toPagingSqlNodein classStandardDialect
-
toForUpdateSqlNode
protected SqlNode toForUpdateSqlNode(SqlNode sqlNode, SelectForUpdateType forUpdateType, int waitSeconds, String... aliases) - Overrides:
toForUpdateSqlNodein classStandardDialect
-
supportsIdentity
public boolean supportsIdentity()Description copied from interface:DialectDetermines whether this dialect supports the IDENTITY column.An IDENTITY column is a column that automatically generates a unique value for each row when data is inserted. The exact implementation varies by database system.
- Specified by:
supportsIdentityin interfaceDialect- Overrides:
supportsIdentityin classStandardDialect- Returns:
trueif this dialect supports IDENTITY columns,falseotherwise
-
supportsAutoGeneratedKeys
public boolean supportsAutoGeneratedKeys()Description copied from interface:DialectDetermines whether this dialect supports retrieving auto-generated keys viaStatement.getGeneratedKeys().This feature allows retrieving values that were automatically generated during an insert operation, such as identity column values, without executing a separate query.
- Specified by:
supportsAutoGeneratedKeysin interfaceDialect- Overrides:
supportsAutoGeneratedKeysin classStandardDialect- Returns:
trueif this dialect supports retrieving auto-generated keys,falseotherwise
-
supportsAliasInDeleteStatement
public boolean supportsAliasInDeleteStatement()Description copied from interface:DialectDetermines whether the use of table aliases is supported in the context of a DELETE statement.DELETE FROM employee t
- Returns:
- true if table aliasing is supported in DELETE statements, false otherwise
-
supportsAliasInUpdateStatement
public boolean supportsAliasInUpdateStatement()Description copied from interface:DialectDetermines whether the use of table aliases is supported in the context of an UPDATE statement.UPDATE employee t SET t.age = 30
- Returns:
- true if table aliasing is supported in UPDATE statements, false otherwise
-
supportsAutoIncrementWhenInsertingMultipleRows
public boolean supportsAutoIncrementWhenInsertingMultipleRows()Description copied from interface:DialectDetermines whether this dialect supports auto-increment columns when inserting multiple rows.Some databases do not properly handle auto-increment columns in multi-row insert statements, or have limitations on how generated values can be retrieved.
The default implementation returns
true.- Returns:
trueif this dialect supports auto-increment columns in multi-row inserts,falseotherwise
-
supportsParenthesesForSetOperands
public boolean supportsParenthesesForSetOperands()Description copied from interface:DialectDetermines whether this dialect requires parentheses around set operation operands.Set operations include UNION, INTERSECT, and EXCEPT. Some databases require parentheses around the operands of these operations, especially when they include ORDER BY or LIMIT clauses.
The default implementation returns
true.- Returns:
trueif this dialect requires parentheses for set operands,falseotherwise
-
isUniqueConstraintViolated
Description copied from interface:DialectDetermines whether the given SQLException represents a unique constraint violation.Different database systems use different error codes and states to indicate unique constraint violations. This method abstracts these differences.
- Specified by:
isUniqueConstraintViolatedin interfaceDialect- Overrides:
isUniqueConstraintViolatedin classStandardDialect- Parameters:
sqlException- the SQL exception to analyze- Returns:
trueif the exception represents a unique constraint violation,falseotherwise
-
getCriteriaBuilder
Description copied from interface:DialectReturns the criteria builder for this dialect.The criteria builder is used to construct SQL queries using the criteria API, which provides a type-safe way to build queries programmatically. The returned builder will generate SQL that is compatible with the specific database dialect.
- Specified by:
getCriteriaBuilderin interfaceDialect- Overrides:
getCriteriaBuilderin classStandardDialect- Returns:
- the criteria builder for this dialect
-
getUpsertAssembler
Description copied from interface:DialectReturns the UpsertAssembler implementation for the given context.- Specified by:
getUpsertAssemblerin interfaceDialect- Overrides:
getUpsertAssemblerin classStandardDialect- Parameters:
context- the UpsertAssemblerContext object- Returns:
- the UpsertAssembler object for the given context
-