public class MySQLDialect extends Object
Constructor and Description |
---|
MySQLDialect() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(String url)
Check if this dialect instance can handle a certain jdbc url.
|
Optional<String> |
defaultDriverName() |
String |
dialectName()
Get the name of jdbc dialect.
|
JdbcRowConverter |
getRowConverter(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.
|
int |
maxDecimalPrecision() |
int |
maxTimestampPrecision() |
int |
minDecimalPrecision() |
int |
minTimestampPrecision() |
String |
quoteIdentifier(String identifier)
Quotes the identifier.
|
List<LogicalTypeRoot> |
unsupportedTypes()
Defines the unsupported types for the dialect.
|
void |
validate(TableSchema schema)
Check if this dialect instance support a specific data type in table schema.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDeleteStatement, getInsertIntoStatement, getRowExistsStatement, getSelectFromStatement, getUpdateStatement
public boolean canHandle(String url)
JdbcDialect
url
- the jdbc url.public JdbcRowConverter getRowConverter(RowType rowType)
JdbcDialect
rowType
- the given row typepublic Optional<String> defaultDriverName()
public String quoteIdentifier(String identifier)
JdbcDialect
"
to quote.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()
JdbcDialect
public int maxDecimalPrecision()
public int minDecimalPrecision()
public int maxTimestampPrecision()
public int minTimestampPrecision()
public List<LogicalTypeRoot> unsupportedTypes()
public void validate(TableSchema schema) throws ValidationException
JdbcDialect
validate
in interface JdbcDialect
schema
- the table schema.ValidationException
- in case of the table schema contains unsupported type.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.