Class BatchBuilder
java.lang.Object
me.hsgamer.hscore.database.client.sql.BatchBuilder
- All Implemented Interfaces:
AutoCloseable
The batch builder for continuous updating
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
BatchBuilder
Create a new batch builder- Parameters:
connection
- the connection
-
-
Method Details
-
addBatch
Add a statement as batch- Parameters:
statement
- the statementvalues
- the values for the designated parameters
-
execute
Execute the batches- Throws:
SQLException
- if there is an SQL error
-
executeSafe
public void executeSafe()Execute the batches but ignores exceptions -
clear
public void clear()Clear the batches -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-