Class SqlServerDatabaseDialect
java.lang.Object
io.debezium.connector.jdbc.dialect.GeneralDatabaseDialect
io.debezium.connector.jdbc.dialect.sqlserver.SqlServerDatabaseDialect
- All Implemented Interfaces:
DatabaseDialect
A
DatabaseDialect implementation for SQL Server.- Author:
- Chris Cranford
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSqlServerDatabaseDialect(JdbcSinkConnectorConfig config, org.hibernate.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionGets the prefix used before adding column-clauses inALTER TABLEstatements.Gets the suffix used after adding the column-clauses inALTER TABLEstatements.Returns the default format for binding a byte arraygetInsertStatement(TableDescriptor table, SinkRecordDescriptor record) Construct aINSERT INTOstatement specific for this dialect.intGets the maximum precision allowed for a dialect's time data type.intGets the maximum precision allowed for a dialect's timestamp data type.intGets the maximum length of a VARCHAR field in a primary key column.getUpsertStatement(TableDescriptor table, SinkRecordDescriptor record) Construct aUPSERTstatement specific for this dialect.protected voidprivate StringwrapWithIdentityInsert(TableDescriptor table, String sqlStatement) Methods inherited from class io.debezium.connector.jdbc.dialect.GeneralDatabaseDialect
addColumnDefaultValue, bindValue, columnNameFromField, columnNameFromField, columnQueryBindingFromField, getAlterTableColumnDelimiter, getAlterTableColumnPrefix, getAlterTableColumnSuffix, getAlterTableStatement, getColumnNamingStrategy, getConfig, getCreateTableStatement, getDatabaseTimeZone, getDatabaseTimeZoneQueryResult, getDatabaseVersion, getDefaultDecimalPrecision, getDefaultTimestampPrecision, getDeleteStatement, getFormattedBoolean, getFormattedDate, getFormattedDateTime, getFormattedDateTimeWithNanos, getFormattedTime, getFormattedTimestamp, getFormattedTimestampWithTimeZone, getFormattedTimeWithTimeZone, getIdentifierHelper, getMaxNVarcharLengthInKey, getMaxVarbinaryLength, getQualifiedTableName, getQueryBindingWithValueCast, getSchemaType, getTableId, getTruncateStatement, getTypeName, getTypeName, getTypeName, getUpdateStatement, getVersion, isIdentifierUppercaseWhenNotQuoted, isNegativeScaleAllowed, isTimeZoneSet, readTable, registerType, resolveColumnName, resolveColumnNameFromField, resolveMissingFields, shouldBindTimeWithTimeZoneAsDatabaseTimeZone, tableExists, toIdentifier, toIdentifier
-
Constructor Details
-
SqlServerDatabaseDialect
private SqlServerDatabaseDialect(JdbcSinkConnectorConfig config, org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
getInsertStatement
Description copied from interface:DatabaseDialectConstruct aINSERT INTOstatement specific for this dialect.- Specified by:
getInsertStatementin interfaceDatabaseDialect- Overrides:
getInsertStatementin classGeneralDatabaseDialect- Parameters:
table- the current relational table model, should not benullrecord- the current sink record being processed, should not benull- Returns:
- the insert SQL statement to be executed, never
null
-
getAlterTablePrefix
Description copied from interface:DatabaseDialectGets the prefix used before adding column-clauses inALTER TABLEstatements.- Specified by:
getAlterTablePrefixin interfaceDatabaseDialect- Overrides:
getAlterTablePrefixin classGeneralDatabaseDialect- Returns:
- the alter table column-clauses prefix
-
getAlterTableSuffix
Description copied from interface:DatabaseDialectGets the suffix used after adding the column-clauses inALTER TABLEstatements.- Specified by:
getAlterTableSuffixin interfaceDatabaseDialect- Overrides:
getAlterTableSuffixin classGeneralDatabaseDialect- Returns:
- the alter table column-clauses suffix
-
wrapWithIdentityInsert
-
getDatabaseTimeZoneQuery
- Overrides:
getDatabaseTimeZoneQueryin classGeneralDatabaseDialect
-
registerTypes
protected void registerTypes()- Overrides:
registerTypesin classGeneralDatabaseDialect
-
getTimeQueryBinding
-
getMaxVarcharLengthInKey
public int getMaxVarcharLengthInKey()Description copied from interface:DatabaseDialectGets the maximum length of a VARCHAR field in a primary key column.- Specified by:
getMaxVarcharLengthInKeyin interfaceDatabaseDialect- Overrides:
getMaxVarcharLengthInKeyin classGeneralDatabaseDialect- Returns:
- maximum varchar field length when participating in the primary key
-
getMaxTimePrecision
public int getMaxTimePrecision()Description copied from interface:DatabaseDialectGets the maximum precision allowed for a dialect's time data type.- Returns:
- maximum time precision
-
getMaxTimestampPrecision
public int getMaxTimestampPrecision()Description copied from interface:DatabaseDialectGets the maximum precision allowed for a dialect's timestamp data type.- Returns:
- maximum timestamp precision
-
getUpsertStatement
Description copied from interface:DatabaseDialectConstruct aUPSERTstatement specific for this dialect.- Specified by:
getUpsertStatementin interfaceDatabaseDialect- Overrides:
getUpsertStatementin classGeneralDatabaseDialect- Parameters:
table- the current relational table model, should not benullrecord- the current sink record being processed, should not benull- Returns:
- the upsert SQL statement to be executed, never
null
-
getByteArrayFormat
Description copied from interface:DatabaseDialectReturns the default format for binding a byte array- Specified by:
getByteArrayFormatin interfaceDatabaseDialect- Overrides:
getByteArrayFormatin classGeneralDatabaseDialect- Returns:
- the format for binding a byte array
-