public class PostgresDialect extends Object implements JdbcDialect
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_POSTGRES_FETCH_SIZE |
String |
fieldIde |
log| 构造器和说明 |
|---|
PostgresDialect() |
PostgresDialect(String fieldIde) |
| 限定符和类型 | 方法和说明 |
|---|---|
Long |
approximateRowCntStatement(Connection connection,
JdbcSourceTable table)
Approximate total number of entries in the lookup table.
|
PreparedStatement |
creatPreparedStatement(Connection connection,
String queryTemplate,
int fetchSize)
Different dialects optimize their PreparedStatement
|
String |
dialectName()
Get the name of jdbc dialect.
|
JdbcDialectTypeMapper |
getJdbcDialectTypeMapper()
get jdbc meta-information type to seatunnel data type mapper.
|
JdbcRowConverter |
getRowConverter()
Get converter that convert jdbc object to seatunnel internal object.
|
Optional<String> |
getUpsertStatement(String database,
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 |
hashModForField(String fieldName,
int mod) |
TablePath |
parse(String tablePath) |
String |
quoteDatabaseIdentifier(String identifier)
Quotes the identifier for database name or field name
|
String |
quoteIdentifier(String identifier)
Quotes the identifier for table name or field name
|
String |
tableIdentifier(String database,
String tableName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectionUrlParse, defaultParameter, extractTableName, getDeleteStatement, getFieldIde, getInsertIntoStatement, getJdbcConnectionProvider, getResultSetMetaData, getRowExistsStatement, getUpdateStatement, queryNextChunkMax, sampleDataFromColumn, tableIdentifierpublic static final int DEFAULT_POSTGRES_FETCH_SIZE
public String fieldIde
public PostgresDialect()
public PostgresDialect(String fieldIde)
public String dialectName()
JdbcDialectdialectName 在接口中 JdbcDialectpublic JdbcRowConverter getRowConverter()
JdbcDialectgetRowConverter 在接口中 JdbcDialectpublic JdbcDialectTypeMapper getJdbcDialectTypeMapper()
JdbcDialectgetJdbcDialectTypeMapper 在接口中 JdbcDialectpublic String hashModForField(String fieldName, int mod)
hashModForField 在接口中 JdbcDialectpublic Optional<String> getUpsertStatement(String database, 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 ROW Exists + UPDATE/INSERT which may have poor performance.
getUpsertStatement 在接口中 JdbcDialectUPSERT statement or Optional.empty().public PreparedStatement creatPreparedStatement(Connection connection, String queryTemplate, int fetchSize) throws SQLException
JdbcDialectcreatPreparedStatement 在接口中 JdbcDialectSQLExceptionpublic String tableIdentifier(String database, String tableName)
tableIdentifier 在接口中 JdbcDialectpublic String quoteIdentifier(String identifier)
JdbcDialectquoteIdentifier 在接口中 JdbcDialectpublic String quoteDatabaseIdentifier(String identifier)
JdbcDialectquoteDatabaseIdentifier 在接口中 JdbcDialectpublic TablePath parse(String tablePath)
parse 在接口中 JdbcDialectpublic Long approximateRowCntStatement(Connection connection, JdbcSourceTable table) throws SQLException
JdbcDialectapproximateRowCntStatement 在接口中 JdbcDialectconnection - The JDBC connection object used to connect to the database.table - table info.SQLExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.