public class PreparedStatementInsert extends DataObject implements IInsert
Sample Generated SQL:
INSERT INTO tableName (col1, col2, col3) VALUES (?, ?, ?)
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
PreparedStatementInsert() |
Modifier and Type | Method and Description |
---|---|
void |
addBatch() |
DataException |
addExceptionProperties(DataException exception)
Adds this object's current state to a
DataException . |
PreparedStatementInsert |
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) |
PreparedStatementInsert |
setDebug(boolean debug)
Set to
true to log generated SQL (default false). |
protected PreparedStatementInsert |
setInsertStatement(PreparedStatement insertStatement) |
void |
setValues(JdbcWriter writer,
Record record) |
public boolean isDebug()
IInsert
public PreparedStatementInsert setDebug(boolean debug)
IInsert
true
to log generated SQL (default false).protected PreparedStatementInsert setInsertStatement(PreparedStatement insertStatement)
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 PreparedStatementInsert 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.