Class MySqlPreparedStatementInsert

All Implemented Interfaces:
IInsert, Cloneable

public class MySqlPreparedStatementInsert extends PreparedStatementInsert

Sample Generated SQL:
INSERT IGNORE INTO tableName (col1, col2, col3) VALUES (?, ?, ?)

  • Constructor Details

    • MySqlPreparedStatementInsert

      public MySqlPreparedStatementInsert()
  • Method Details

    • isIgnoreOnError

      public boolean isIgnoreOnError()
      Indicates if INSERT IGNORE is generated instead of a plain INSERT (default is false).
    • setIgnoreOnError

      public MySqlPreparedStatementInsert setIgnoreOnError(boolean ignoreOnError)
      Indicates if INSERT IGNORE is generated instead of a plain INSERT (default is false).
    • prepare

      public void prepare(JdbcWriter writer, Record record) throws Throwable
      Description copied from interface: IInsert
      Called once, with the first record written, to generate the SQL and create the statement(s).
      Specified by:
      prepare in interface IInsert
      Overrides:
      prepare in class PreparedStatementInsert
      Throws:
      Throwable
    • clone

      Description copied from interface: IInsert
      Returns a new, unprepared copy with the same settings; JdbcMultiWriter uses one for each connection.
      Specified by:
      clone in interface IInsert
      Overrides:
      clone in class PreparedStatementInsert