@Internal public class MySqlDialect extends AbstractDialect
AbstractDialect.Range| 构造器和说明 |
|---|
MySqlDialect() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
appendDefaultUrlProperties(String url)
Appends default JDBC properties to url for current dialect.
|
Optional<AbstractDialect.Range> |
decimalPrecisionRange() |
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)
Mysql upsert query use DUPLICATE KEY UPDATE.
|
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() |
getDeleteStatement, getInsertIntoStatement, getRowExistsStatement, getSelectFromStatement, getUpdateStatement, validatepublic 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 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)
NOTE: It requires Mysql's primary key to be consistent with pkFields.
We don't use REPLACE INTO, if there are other fields, we can keep their previous values.
public String dialectName()
JdbcDialectpublic Optional<AbstractDialect.Range> decimalPrecisionRange()
decimalPrecisionRange 在类中 AbstractDialectDecimalType
columns. None if decimal type is not supported.public Optional<AbstractDialect.Range> timestampPrecisionRange()
timestampPrecisionRange 在类中 AbstractDialectTimestampType
columns. None if timestamp type is not supported.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 在类中 AbstractDialectpublic String appendDefaultUrlProperties(String url)
JdbcDialectCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.