Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • JdbcDynamicTableSinkV2


    Code Block
    languagejava
    titleJdbcDynamicTableSinkV2
    linenumberstrue
    collapsetrue
    /** A {@link DynamicTableSink} for JDBC. */
    @Internal
    public class JdbcDynamicTableSinkV2 implements DynamicTableSink {
    	// old code placeholder...
    
        @Override
        public SinkRuntimeProvider getSinkRuntimeProvider(Context context) {
            // ...
            return SinkV2Provider.of(
                    new JdbcSink<>(..., jdbcOptions.getParallelism());
        }
    }


Enhance Catalog

Support customized jdbc calalogs and  connection

...

Code Block
languagejava
titleAbstractJdbcCatalog
collapsetrue
// Introduce context & config fields
public abstract class AbstractJdbcCatalog extends org.apache.flink.table.catalog.AbtrastCatalog {

    // old fields lines placeholder.......
    
    // Introduced new fileds.
    protected final Context context;
    protected final ReadableConfig config;
    
    public AbstractJdbcCatalog(Context context, ReadableConfig config) {
        //....
    }
    
    // Introduced new methods.
    public Context getContext();
    public ReadableConfig getConfig();
    public Connection getConnection();
    
    // the old code lines placeholder...
}

...