类 OceanBaseMysqlDialect

    • 字段详细资料

      • fieldIde

        public String fieldIde
    • 构造器详细资料

      • OceanBaseMysqlDialect

        public OceanBaseMysqlDialect()
      • OceanBaseMysqlDialect

        public OceanBaseMysqlDialect​(String fieldIde)
    • 方法详细资料

      • getUpsertStatement

        public Optional<String> getUpsertStatement​(String database,
                                                   String tableName,
                                                   String[] fieldNames,
                                                   String[] uniqueKeyFields)
        从接口复制的说明: JdbcDialect
        Constructs the dialects upsert statement if supported; such as MySQL's DUPLICATE 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 在接口中 JdbcDialect
        返回:
        the dialects UPSERT statement or Optional.empty().
      • extractTableName

        public String extractTableName​(org.apache.seatunnel.api.table.catalog.TablePath tablePath)
        指定者:
        extractTableName 在接口中 JdbcDialect
      • parse

        public org.apache.seatunnel.api.table.catalog.TablePath parse​(String tablePath)
        指定者:
        parse 在接口中 JdbcDialect
      • sampleDataFromColumn

        public Object[] sampleDataFromColumn​(Connection connection,
                                             JdbcSourceTable table,
                                             String columnName,
                                             int samplingRate,
                                             int fetchSize)
                                      throws Exception
        从接口复制的说明: JdbcDialect
        Performs a sampling operation on the specified column of a table in a JDBC-connected database.
        指定者:
        sampleDataFromColumn 在接口中 JdbcDialect
        参数:
        connection - The JDBC connection object used to connect to the database.
        table - The table in which the column resides.
        columnName - The name of the column to be sampled.
        samplingRate - samplingRate The inverse of the fraction of the data to be sampled from the column. For example, a value of 1000 would mean 1/1000 of the data will be sampled.
        返回:
        Returns a List of sampled data from the specified column.
        抛出:
        SQLException - If an SQL error occurs during the sampling operation.
        Exception
      • refreshTableSchemaBySchemaChangeEvent

        public void refreshTableSchemaBySchemaChangeEvent​(String sourceDialectName,
                                                          org.apache.seatunnel.api.table.event.AlterTableColumnEvent event,
                                                          JdbcConnectionProvider refreshTableSchemaConnectionProvider,
                                                          org.apache.seatunnel.api.table.catalog.TablePath sinkTablePath)
        从接口复制的说明: JdbcDialect
        Refresh physical table schema by schema change event
        指定者:
        refreshTableSchemaBySchemaChangeEvent 在接口中 JdbcDialect
        参数:
        sourceDialectName - source dialect name
        event - schema change event
        refreshTableSchemaConnectionProvider - jdbc connection provider
        sinkTablePath - sink table path
      • decorateWithComment

        public String decorateWithComment​(String basicSql,
                                          org.apache.seatunnel.api.table.converter.BasicTypeDefine typeBasicTypeDefine)
        从接口复制的说明: JdbcDialect
        decorate with comment
        指定者:
        decorateWithComment 在接口中 JdbcDialect
        参数:
        basicSql - alter table sql for sink table
        typeBasicTypeDefine - type basic type define of new column
        返回:
        alter table sql with comment for sink table
      • needsQuotesWithDefaultValue

        public boolean needsQuotesWithDefaultValue​(String sqlType)
        从接口复制的说明: JdbcDialect
        whether quotes with default value
        指定者:
        needsQuotesWithDefaultValue 在接口中 JdbcDialect
        参数:
        sqlType - sql type of column
        返回:
        whether needs quotes with the type
      • isSpecialDefaultValue

        public boolean isSpecialDefaultValue​(Object defaultValue)
        从接口复制的说明: JdbcDialect
        whether is special default value e.g. current_timestamp
        指定者:
        isSpecialDefaultValue 在接口中 JdbcDialect
        参数:
        defaultValue - default value of column
        返回:
        whether is special default value e.g current_timestamp