- 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.Mssql2008Dialect
Mssql2008Dialect.Mssql2008CriteriaBuilder, Mssql2008Dialect.Mssql2008ExpressionFunctions, Mssql2008Dialect.Mssql2008JdbcMappingVisitor, Mssql2008Dialect.Mssql2008ScriptBlockContext, Mssql2008Dialect.Mssql2008SqlLogFormattingVisitorNested 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.Mssql2008Dialect
CLOSE_QUOTE, OPEN_QUOTE, UNIQUE_CONSTRAINT_VIOLATION_ERROR_CODEFields inherited from class org.seasar.doma.jdbc.dialect.StandardDialect
expressionFunctions, jdbcMappingVisitor, sqlLogFormattingVisitor, UNIQUE_CONSTRAINT_VIOLATION_STATE_CODES -
Constructor Summary
ConstructorsConstructorDescriptionMssqlDialect(ExpressionFunctions expressionFunctions) MssqlDialect(JdbcMappingVisitor jdbcMappingVisitor) MssqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor) MssqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions) MssqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions, boolean pagingForceOffsetFetch) MssqlDialect(SqlLogFormattingVisitor sqlLogFormattingVisitor) -
Method Summary
Modifier and TypeMethodDescriptionCreates the context object to process an SQL block in a script.<ENTITY> DeleteAssemblergetDeleteAssembler(DeleteAssemblerContext<ENTITY> context) Provides an implementation ofDeleteAssemblerbased on the given context.<ENTITY> InsertAssemblergetInsertAssembler(InsertAssemblerContext<ENTITY> context) Provides an implementation ofInsertAssemblerbased on the given context.<ENTITY> MultiInsertAssemblergetMultiInsertAssembler(MultiInsertAssemblerContext<ENTITY> context) Provides an implementation ofMultiInsertAssemblerbased on the given context.getName()Returns the name of this dialect.getSequenceNextValSql(String qualifiedSequenceName, long allocationSize) Returns an SQL object to retrieve the next value from a database sequence.<ENTITY> UpdateAssemblergetUpdateAssembler(UpdateAssemblerContext<ENTITY> context) Provides an implementation ofUpdateAssemblerbased on the given context.getUpsertAssembler(UpsertAssemblerContext context) Returns the UpsertAssembler implementation for the given context.booleanDetermines whether this dialect supports auto-increment columns when inserting multiple rows.booleanDetermines whether this dialect supports database sequences.booleanDetermines whether this dialect supports upsert emulation using MERGE statements.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.Mssql2008Dialect
applyQuote, getCriteriaBuilder, getScriptBlockDelimiter, isUniqueConstraintViolated, supportsAliasInDeleteClause, supportsAliasInUpdateClause, supportsAutoGeneratedKeys, supportsIdentity, supportsSelectForUpdateMethods inherited from class org.seasar.doma.jdbc.dialect.StandardDialect
getAutoGeneratedKeysType, getCauseSQLException, getErrorCode, getExpressionFunctions, getIdentityReservationSql, getIdentitySelectSql, getJdbcMappingVisitor, getResultSetType, getRootCause, getSqlLogFormattingVisitor, getSQLState, includesIdentityColumn, removeQuote, supportsBatchUpdateResults, supportsIdentityReservation, supportsResultSetReturningAsOutParameter, 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, supportsAliasInDeleteStatement, supportsAliasInUpdateStatement, supportsBatchExecutionReturningGeneratedValues, supportsModOperator, supportsMultiRowInsertStatement, supportsParenthesesForSetOperands, supportsReturning
-
Constructor Details
-
MssqlDialect
public MssqlDialect() -
MssqlDialect
-
MssqlDialect
-
MssqlDialect
-
MssqlDialect
public MssqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor) -
MssqlDialect
public MssqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions) -
MssqlDialect
public MssqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions, boolean pagingForceOffsetFetch)
-
-
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 classMssql2008Dialect- Returns:
- the name of this dialect
-
toForUpdateSqlNode
protected SqlNode toForUpdateSqlNode(SqlNode sqlNode, SelectForUpdateType forUpdateType, int waitSeconds, String... aliases) - Overrides:
toForUpdateSqlNodein classMssql2008Dialect
-
toPagingSqlNode
- Overrides:
toPagingSqlNodein classMssql2008Dialect
-
getSequenceNextValSql
Description copied from interface:DialectReturns an SQL object to retrieve the next value from a database sequence.This method creates the SQL statement needed to get the next value from a sequence.
The allocation size parameter can be used to optimize sequence access by retrieving multiple values at once in database systems that support this feature.
This method is available only if
Dialect.supportsSequence()returnstrue.- Specified by:
getSequenceNextValSqlin interfaceDialect- Overrides:
getSequenceNextValSqlin classStandardDialect- Parameters:
qualifiedSequenceName- the fully qualified name of the sequence, which may include catalog and schema information depending on the database systemallocationSize- the number of sequence values to allocate at once for optimization; a value greater than 1 may improve performance by reducing database calls- Returns:
- the SQL object that can be executed to retrieve the next sequence value(s)
-
supportsSequence
public boolean supportsSequence()Description copied from interface:DialectDetermines whether this dialect supports database sequences.A sequence is a database object that generates a sequence of unique numbers. Sequences are commonly used to generate primary key values.
- Specified by:
supportsSequencein interfaceDialect- Overrides:
supportsSequencein classStandardDialect- Returns:
trueif this dialect supports sequences,falseotherwise
-
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
-
supportsUpsertEmulationWithMergeStatement
public boolean supportsUpsertEmulationWithMergeStatement()Description copied from interface:DialectDetermines whether this dialect supports upsert emulation using MERGE statements.An upsert operation (update or insert) can be emulated using MERGE statements in some database systems. This method indicates whether the dialect supports this approach.
The default implementation returns
false.- Returns:
trueif this dialect supports upsert emulation with MERGE statements,falseotherwise
-
createScriptBlockContext
Description copied from interface:DialectCreates the context object to process an SQL block in a script.- Specified by:
createScriptBlockContextin interfaceDialect- Overrides:
createScriptBlockContextin classMssql2008Dialect- Returns:
- the context object
-
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
-
getInsertAssembler
Description copied from interface:DialectProvides an implementation ofInsertAssemblerbased on the given context.- Specified by:
getInsertAssemblerin interfaceDialect- Overrides:
getInsertAssemblerin classStandardDialect- Type Parameters:
ENTITY- the type of the entity to be handled by the assembler- Parameters:
context- the context that holds the information required to create theInsertAssembler- Returns:
- an instance of
InsertAssemblerspecific to the provided entity context
-
getMultiInsertAssembler
public <ENTITY> MultiInsertAssembler getMultiInsertAssembler(MultiInsertAssemblerContext<ENTITY> context) Description copied from interface:DialectProvides an implementation ofMultiInsertAssemblerbased on the given context.- Specified by:
getMultiInsertAssemblerin interfaceDialect- Overrides:
getMultiInsertAssemblerin classStandardDialect- Type Parameters:
ENTITY- the type of the entity to be handled by the assembler- Parameters:
context- the context that holds the information required to create theMultiInsertAssembler- Returns:
- an instance of
MultiInsertAssemblerspecific to the provided entity context
-
getUpdateAssembler
Description copied from interface:DialectProvides an implementation ofUpdateAssemblerbased on the given context.- Specified by:
getUpdateAssemblerin interfaceDialect- Overrides:
getUpdateAssemblerin classStandardDialect- Type Parameters:
ENTITY- the type of the entity to be handled by the assembler- Parameters:
context- the context that holds the information required to create theUpdateAssembler- Returns:
- an instance of
UpdateAssemblerspecific to the provided entity context
-
getDeleteAssembler
Description copied from interface:DialectProvides an implementation ofDeleteAssemblerbased on the given context.- Specified by:
getDeleteAssemblerin interfaceDialect- Overrides:
getDeleteAssemblerin classStandardDialect- Type Parameters:
ENTITY- the type of the entity to be handled by the assembler- Parameters:
context- the context that holds the information required to create theDeleteAssembler- Returns:
- an instance of
DeleteAssemblerspecific to the provided entity context
-