类 RedshiftDialect
- java.lang.Object
-
- org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.redshift.RedshiftDialect
-
- 所有已实现的接口:
Serializable,JdbcDialect
public class RedshiftDialect extends Object implements JdbcDialect
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialect
JdbcDialect.AlterType
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDEFAULT_POSTGRES_FETCH_SIZEStringfieldIde-
从接口继承的字段 org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialect
log
-
-
构造器概要
构造器 构造器 说明 RedshiftDialect()RedshiftDialect(String fieldIde)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 LongapproximateRowCntStatement(Connection connection, JdbcSourceTable table)Approximate total number of entries in the lookup table.PreparedStatementcreatPreparedStatement(Connection connection, String queryTemplate, int fetchSize)Different dialects optimize their PreparedStatementStringdialectName()Get the name of jdbc dialect.JdbcDialectTypeMappergetJdbcDialectTypeMapper()get jdbc meta-information type to seatunnel data type mapper.JdbcRowConvertergetRowConverter()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'sDUPLICATE KEY UPDATE, or PostgreSQL'sON CONFLICT... DO UPDATE SET...StringhashModForField(String fieldName, int mod)StringhashModForField(String nativeType, String fieldName, int mod)org.apache.seatunnel.api.table.catalog.TablePathparse(String tablePath)StringquoteDatabaseIdentifier(String identifier)Quotes the identifier for database name or field nameStringquoteIdentifier(String identifier)Quotes the identifier for table name or field nameStringtableIdentifier(String database, String tableName)StringtableIdentifier(org.apache.seatunnel.api.table.catalog.TablePath tablePath)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialect
buildAlterTableBasicSql, buildAlterTableSql, connectionUrlParse, convertType, decorateWithColumnNameAndType, decorateWithComment, decorateWithDefaultValue, decorateWithNullable, defaultParameter, extractTableName, generateAlterTableSql, getDeleteStatement, getFieldIde, getInsertIntoStatement, getJdbcConnectionProvider, getResultSetMetaData, getRowExistsStatement, getUpdateStatement, isSpecialDefaultValue, needsQuotesWithDefaultValue, queryNextChunkMax, quotesDefaultValue, refreshTableSchemaBySchemaChangeEvent, sampleDataFromColumn
-
-
-
-
构造器详细资料
-
RedshiftDialect
public RedshiftDialect()
-
RedshiftDialect
public RedshiftDialect(String fieldIde)
-
-
方法详细资料
-
dialectName
public String dialectName()
从接口复制的说明:JdbcDialectGet the name of jdbc dialect.- 指定者:
dialectName在接口中JdbcDialect- 返回:
- the dialect name.
-
getRowConverter
public JdbcRowConverter getRowConverter()
从接口复制的说明:JdbcDialectGet converter that convert jdbc object to seatunnel internal object.- 指定者:
getRowConverter在接口中JdbcDialect- 返回:
- a row converter for the database
-
getJdbcDialectTypeMapper
public JdbcDialectTypeMapper getJdbcDialectTypeMapper()
从接口复制的说明:JdbcDialectget jdbc meta-information type to seatunnel data type mapper.- 指定者:
getJdbcDialectTypeMapper在接口中JdbcDialect- 返回:
- a type mapper for the database
-
getUpsertStatement
public Optional<String> getUpsertStatement(String database, String tableName, String[] fieldNames, String[] uniqueKeyFields)
从接口复制的说明:JdbcDialectConstructs the dialects upsert statement if supported; such as MySQL'sDUPLICATE KEY UPDATE, or PostgreSQL'sON 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 thefieldNamesparameter.If the dialect does not support native upsert statements, the writer will fallback to
SELECT ROW Exists+UPDATE/INSERTwhich may have poor performance.- 指定者:
getUpsertStatement在接口中JdbcDialect- 返回:
- the dialects
UPSERTstatement orOptional.empty().
-
creatPreparedStatement
public PreparedStatement creatPreparedStatement(Connection connection, String queryTemplate, int fetchSize) throws SQLException
从接口复制的说明:JdbcDialectDifferent dialects optimize their PreparedStatement- 指定者:
creatPreparedStatement在接口中JdbcDialect- 返回:
- The logic about optimize PreparedStatement
- 抛出:
SQLException
-
tableIdentifier
public String tableIdentifier(String database, String tableName)
- 指定者:
tableIdentifier在接口中JdbcDialect
-
tableIdentifier
public String tableIdentifier(org.apache.seatunnel.api.table.catalog.TablePath tablePath)
- 指定者:
tableIdentifier在接口中JdbcDialect
-
quoteIdentifier
public String quoteIdentifier(String identifier)
从接口复制的说明:JdbcDialectQuotes the identifier for table name or field name- 指定者:
quoteIdentifier在接口中JdbcDialect
-
quoteDatabaseIdentifier
public String quoteDatabaseIdentifier(String identifier)
从接口复制的说明:JdbcDialectQuotes the identifier for database name or field name- 指定者:
quoteDatabaseIdentifier在接口中JdbcDialect
-
parse
public org.apache.seatunnel.api.table.catalog.TablePath parse(String tablePath)
- 指定者:
parse在接口中JdbcDialect
-
hashModForField
public String hashModForField(String nativeType, String fieldName, int mod)
- 指定者:
hashModForField在接口中JdbcDialect
-
hashModForField
public String hashModForField(String fieldName, int mod)
- 指定者:
hashModForField在接口中JdbcDialect
-
approximateRowCntStatement
public Long approximateRowCntStatement(Connection connection, JdbcSourceTable table) throws SQLException
从接口复制的说明:JdbcDialectApproximate total number of entries in the lookup table.- 指定者:
approximateRowCntStatement在接口中JdbcDialect- 参数:
connection- The JDBC connection object used to connect to the database.table- table info.- 返回:
- approximate row count statement.
- 抛出:
SQLException
-
-