@PublicEvolving public abstract class AbstractDialect extends Object implements JdbcDialect
JdbcDialects that implements basic data type validation and
the construction of basic INSERT, UPDATE, DELETE, and SELECT
statements.
Implementors should be careful to check the default SQL statements are performant for their specific dialect and override them if necessary.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
AbstractDialect.Range
A range from [min,max] where min <= max.
|
| 构造器和说明 |
|---|
AbstractDialect() |
| 限定符和类型 | 方法和说明 |
|---|---|
Optional<AbstractDialect.Range> |
decimalPrecisionRange() |
String |
getDeleteStatement(String tableName,
String[] conditionFields)
A simple single row
DELETE statement. |
String |
getInsertIntoStatement(String tableName,
String[] fieldNames)
A simple
INSERT INTO statement. |
String |
getRowExistsStatement(String tableName,
String[] conditionFields)
A simple
SELECT statement that checks for the existence of a single row. |
String |
getSelectFromStatement(String tableName,
String[] selectFields,
String[] conditionFields)
A simple
SELECT statement. |
String |
getUpdateStatement(String tableName,
String[] fieldNames,
String[] conditionFields)
A simple single row
UPDATE statement. |
abstract Set<org.apache.flink.table.types.logical.LogicalTypeRoot> |
supportedTypes()
Defines the set of supported types for the dialect.
|
Optional<AbstractDialect.Range> |
timestampPrecisionRange() |
void |
validate(org.apache.flink.table.types.logical.RowType rowType)
Check if this dialect instance support a specific data type in table schema.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendDefaultUrlProperties, defaultDriverName, dialectName, getLimitClause, getRowConverter, getUpsertStatement, quoteIdentifierpublic void validate(org.apache.flink.table.types.logical.RowType rowType)
throws org.apache.flink.table.api.ValidationException
JdbcDialectvalidate 在接口中 JdbcDialectrowType - the physical table datatype of a row in the database table.org.apache.flink.table.api.ValidationException - in case of the table schema contains unsupported type.public String getInsertIntoStatement(String tableName, String[] fieldNames)
INSERT INTO statement.
INSERT INTO table_name (column_name [, ...])
VALUES (value [, ...])
getInsertIntoStatement 在接口中 JdbcDialectINSERT INTO statement.public String getUpdateStatement(String tableName, String[] fieldNames, String[] conditionFields)
UPDATE statement.
UPDATE table_name
SET col = val [, ...]
WHERE cond [AND ...]
getUpdateStatement 在接口中 JdbcDialectpublic String getDeleteStatement(String tableName, String[] conditionFields)
DELETE statement.
DELETE FROM table_name
WHERE cond [AND ...]
getDeleteStatement 在接口中 JdbcDialectpublic String getSelectFromStatement(String tableName, String[] selectFields, String[] conditionFields)
SELECT statement.
SELECT expression [, ...]
FROM table_name
WHERE cond [AND ...]
getSelectFromStatement 在接口中 JdbcDialectpublic String getRowExistsStatement(String tableName, String[] conditionFields)
SELECT statement that checks for the existence of a single row.
SELECT 1
FROM table_name
WHERE cond [AND ...]
getRowExistsStatement 在接口中 JdbcDialectpublic Optional<AbstractDialect.Range> timestampPrecisionRange()
TimestampType
columns. None if timestamp type is not supported.public Optional<AbstractDialect.Range> decimalPrecisionRange()
DecimalType
columns. None if decimal type is not supported.public abstract Set<org.apache.flink.table.types.logical.LogicalTypeRoot> supportedTypes()
DECIMAL
or TIMESTAMP types, be sure to override decimalPrecisionRange() and timestampPrecisionRange() respectively.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.