jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/JdbcRecordReaderWriterFactory.java
public static JdbcRecordWriter createJdbcRecordWriter(
      String connectionString,
      HikariDataSource dataSource,
      String schema,
      String tableName,
      List<JdbcFieldColumnParamMapping> customMappings,
      boolean rollbackOnError,
      boolean useMultiRowOp,
      int maxPrepStmtParameters,
      int defaultOpCode,
      UnsupportedOperationAction unsupportedAction,
      DuplicateKeyAction duplicateKeyAction,
      JdbcRecordReader recordReader,
      boolean caseSensitive,
      List<String> customDataSqlStateCodes
  ) throws StageException {
    if (defaultOpCode == OperationType.LOAD_CODE) {
      return new JdbcLoadRecordWriter(
          connectionString,
          dataSource,
          schema,
          tableName,
          customMappings,
          duplicateKeyAction,
          recordReader,
          caseSensitive,
          customDataSqlStateCodes
      );
    } else {
      return createJdbcRecordWriter(
          connectionString,
          dataSource,
          schema,
          tableName,
          customMappings,
          null,
          rollbackOnError,
          useMultiRowOp,
          maxPrepStmtParameters,
          defaultOpCode,
          unsupportedAction,
          recordReader,
          caseSensitive,
          customDataSqlStateCodes
      );
    }
  }
public static JdbcRecordWriter createJdbcRecordWriter(
      String connectionString,
      HikariDataSource dataSource,
      String schema,
      String tableName,
      List<JdbcFieldColumnParamMapping> customMappings,
      boolean rollbackOnError,
      boolean useMultiRowOp,
      int maxPrepStmtParameters,
      int defaultOpCode,
      UnsupportedOperationAction unsupportedAction,
      DuplicateKeyAction duplicateKeyAction,
      JdbcRecordReader recordReader,
      boolean caseSensitive,
      List<String> customDataSqlStateCodes
  ) throws StageException {
    if (defaultOpCode == OperationType.LOAD_CODE) {
      return new JdbcLoadRecordWriter(
          connectionString,
          dataSource,
          schema,
          tableName,
          customMappings,
          duplicateKeyAction,
          recordReader,
          caseSensitive,
          customDataSqlStateCodes
      );
    } else {
      return createJdbcRecordWriter(
          connectionString,
          dataSource,
          schema,
          tableName,
          customMappings,
          null,
          rollbackOnError,
          useMultiRowOp,
          maxPrepStmtParameters,
          defaultOpCode,
          unsupportedAction,
          recordReader,
          caseSensitive,
          customDataSqlStateCodes
      );
    }
  }
public static JdbcRecordWriter createJdbcRecordWriter ( String connectionString , HikariDataSource dataSource , String schema , String tableName , List < JdbcFieldColumnParamMapping > customMappings , boolean rollbackOnError , boolean useMultiRowOp , int maxPrepStmtParameters , int defaultOpCode , UnsupportedOperationAction unsupportedAction , DuplicateKeyAction duplicateKeyAction , JdbcRecordReader recordReader , boolean caseSensitive , List < String > customDataSqlStateCodes ) throws StageException { if ( defaultOpCode == OperationType . LOAD_CODE ) { return new JdbcLoadRecordWriter ( connectionString , dataSource , schema , tableName , customMappings , duplicateKeyAction , recordReader , caseSensitive , customDataSqlStateCodes ) ; } else { return createJdbcRecordWriter ( connectionString , dataSource , schema , tableName , customMappings , null , rollbackOnError , useMultiRowOp , maxPrepStmtParameters , defaultOpCode , unsupportedAction , recordReader , caseSensitive , customDataSqlStateCodes ) ; } }
Called by JdbcTarget
Called by JdbcTarget