public class MultiRowPreparedStatementInsert extends DataObject implements IInsert
Sample Generated SQL:
INSERT INTO tableName (col1, col2, col3) VALUES
(?, ?, ?),
(?, ?, ?),
(?, ?, ?),...
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
MultiRowPreparedStatementInsert() |
Modifier and Type | Method and Description |
---|---|
void |
addBatch() |
DataException |
addExceptionProperties(DataException exception)
Adds this object's current state to a
DataException . |
protected String |
buildSql(JdbcWriter writer,
Record record,
int rowCount) |
MultiRowPreparedStatementInsert |
clone() |
void |
close() |
void |
executeBatch() |
void |
executeUpdate() |
boolean |
isBatchSupported() |
boolean |
isDebug()
Indicates if the generated SQL should be logged (default false).
|
void |
prepare(JdbcWriter writer,
Record record) |
MultiRowPreparedStatementInsert |
setDebug(boolean debug)
Set to
true to log generated SQL (default false). |
void |
setValues(JdbcWriter writer,
Record record) |
public boolean isDebug()
IInsert
public MultiRowPreparedStatementInsert setDebug(boolean debug)
IInsert
true
to log generated SQL (default false).protected String buildSql(JdbcWriter writer, Record record, int rowCount) throws Throwable
Throwable
public void prepare(JdbcWriter writer, Record record) throws Throwable
public void setValues(JdbcWriter writer, Record record) throws Throwable
public void executeUpdate() throws Throwable
executeUpdate
in interface IInsert
Throwable
public boolean isBatchSupported()
isBatchSupported
in interface IInsert
public void addBatch() throws Throwable
public void executeBatch() throws Throwable
executeBatch
in interface IInsert
Throwable
public void close() throws Throwable
public MultiRowPreparedStatementInsert clone()
public DataException addExceptionProperties(DataException exception)
DataObject
DataException
. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties
in interface IInsert
addExceptionProperties
in class DataObject
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.