public class BatchStatement
extends java.lang.Object
Constructor and Description |
---|
BatchStatement(java.sql.PreparedStatement ps) |
BatchStatement(java.sql.PreparedStatement ps,
int batchSize)
If batch limit is 0, won't use batching.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
execute()
Calls addBatch() if using batching, execute() otherwise.
|
void |
finish()
Executes the remaining batch.
|
int |
getCount() |
java.sql.PreparedStatement |
getStatement() |
public BatchStatement(java.sql.PreparedStatement ps)
public BatchStatement(java.sql.PreparedStatement ps, int batchSize)
public int getCount()
public void execute() throws java.sql.SQLException
java.sql.SQLException
public void finish() throws java.sql.SQLException
java.sql.SQLException
public java.sql.PreparedStatement getStatement()
public void close()