@Internal public class SqlServerDialect extends AbstractDialect
AbstractDialect.Range| Constructor and Description |
|---|
SqlServerDialect() |
| Modifier and Type | Method and Description |
|---|---|
Optional<AbstractDialect.Range> |
decimalPrecisionRange()
The maximum precision is supported by decimal.
|
Optional<String> |
defaultDriverName() |
String |
dialectName()
Get the name of jdbc dialect.
|
String |
getLimitClause(long limit)
Get limit clause to limit the number of emitted row from the jdbc source.
|
JdbcRowConverter |
getRowConverter(org.apache.flink.table.types.logical.RowType rowType)
Get converter that convert jdbc object and Flink internal object each other.
|
Optional<String> |
getUpsertStatement(String tableName,
String[] fieldNames,
String[] uniqueKeyFields)
Constructs the dialects upsert statement if supported; such as MySQL's
DUPLICATE KEY
UPDATE, or PostgreSQL's {@code ON CONFLICT... |
String |
quoteIdentifier(String identifier)
Quotes the identifier.
|
Set<org.apache.flink.table.types.logical.LogicalTypeRoot> |
supportedTypes()
Defines the set of supported types for the dialect.
|
Optional<AbstractDialect.Range> |
timestampPrecisionRange()
The maximum precision is supported by datetime2.
|
getDeleteStatement, getInsertIntoStatement, getRowExistsStatement, getSelectFromStatement, getUpdateStatement, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendDefaultUrlPropertiespublic String dialectName()
JdbcDialectpublic Optional<AbstractDialect.Range> timestampPrecisionRange()
timestampPrecisionRange in class AbstractDialectTimestampType
columns. None if timestamp type is not supported.public Optional<AbstractDialect.Range> decimalPrecisionRange()
decimalPrecisionRange in class AbstractDialectDecimalType
columns. None if decimal type is not supported.public Optional<String> defaultDriverName()
public String quoteIdentifier(String identifier)
JdbcDialectUsed to put quotes around the identifier if the column name is a reserved keyword or contains characters requiring quotes (e.g., space).
public Optional<String> getUpsertStatement(String tableName, String[] fieldNames, String[] uniqueKeyFields)
JdbcDialectDUPLICATE KEY
UPDATE, or PostgreSQL's ON CONFLICT... DO UPDATE SET... If supported, the returned
string will be used as a PreparedStatement. Fields in the statement must be
in the same order as the fieldNames parameter.
If the dialect does not support native upsert statements, the writer will fallback to
SELECT + UPDATE/INSERT which may have poor performance.
public JdbcRowConverter getRowConverter(org.apache.flink.table.types.logical.RowType rowType)
JdbcDialectrowType - the given row typepublic String getLimitClause(long limit)
JdbcDialectlimit - number of row to emit. The value of the parameter should be non-negative.public Set<org.apache.flink.table.types.logical.LogicalTypeRoot> supportedTypes()
AbstractDialectDECIMAL
or TIMESTAMP types, be sure to override AbstractDialect.decimalPrecisionRange() and AbstractDialect.timestampPrecisionRange() respectively.supportedTypes in class AbstractDialectCopyright © 2022–2024 The Apache Software Foundation. All rights reserved.