Class SqlBuilder.CallableSqlBuilder.CallableBatch
java.lang.Object
org.tamilnadujug.SqlBuilder.CallableSqlBuilder.CallableBatch
- Enclosing class:
SqlBuilder.CallableSqlBuilder
JDBC Batch Builder.
-
Method Summary
Modifier and TypeMethodDescriptionaddBatch()Adds JDBC Batch Builder.callableParam(T value) Adds a parameter to the SQL query.int[]executeBatch(DataSource dataSource) executes the Batch.param(byte[] value) Adds a byte array parameter to the SQL query.Adds a Boolean parameter to the SQL query.Adds a Double parameter to the SQL query.Adds a Float parameter to the SQL query.Adds an Integer parameter to the SQL query.Adds a Long parameter to the SQL query.Adds an Object parameter to the SQL query.Adds an Object parameter to the SQL query with targetSqlType.Adds a Short parameter to the SQL query.Adds a parameter to the SQL query.param(BigDecimal value) Adds a BigDecimal parameter to the SQL query.Adds a Date parameter to the SQL query.Adds a Time parameter to the SQL query.Adds a Timestamp parameter to the SQL query.Adds a parameter with a specific SQL type and type name as `NULL` to the SQL query.
-
Method Details
-
addBatch
Adds JDBC Batch Builder.- Returns:
- batch
- Throws:
SQLException
-
executeBatch
executes the Batch.- Parameters:
dataSource-- Returns:
- an array of update counts
- Throws:
SQLException
-
paramNull
- Returns:
- callableBatch
-
paramNull
Adds a parameter with a specific SQL type and type name as `NULL` to the SQL query. This method is used when the SQL parameter should be set to `NULL`for types that require a type name in addition to the SQL type, such as SQL `STRUCT` or `ARRAY`.- Parameters:
sqlType- the SQL type of the parameter, as defined inTypestypeName- the type name of the parameter, used for SQL types that require specific type information- Returns:
- the current SqlBuilder instance, for method chaining
-
callableParam
Adds a parameter to the SQL query. The method allows chaining and is used to bind values to placeholders in the SQL query.- Type Parameters:
T-- Parameters:
value- the value of the parameter to be added- Returns:
- the current SqlBuilder instance, for method chaining
-
param
Adds a Short parameter to the SQL query.- Parameters:
value- the Short value to be added- Returns:
- the current SqlBuilder instance, for method chaining
-
param
Adds a parameter to the SQL query. The method allows chaining and is used to bind values to placeholders in the SQL query.- Parameters:
value- the value of the parameter to be added- Returns:
- the current SqlBuilder instance, for method chaining
-
param
Adds an Integer parameter to the SQL query.- Parameters:
value- the Integer value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a Double parameter to the SQL query.- Parameters:
value- the Double value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a Boolean parameter to the SQL query.- Parameters:
value- the Boolean value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a Long parameter to the SQL query.- Parameters:
value- the Long value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a Date parameter to the SQL query.- Parameters:
value- the Date value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a Float parameter to the SQL query.- Parameters:
value- the Float value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a byte array parameter to the SQL query.- Parameters:
value- the byte array to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a BigDecimal parameter to the SQL query.- Parameters:
value- the BigDecimal value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a Time parameter to the SQL query.- Parameters:
value- the Time value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds a Timestamp parameter to the SQL query.- Parameters:
value- the Timestamp value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds an Object parameter to the SQL query.- Parameters:
value- the Object value to be added- Returns:
- the current CallableBatch instance for chaining
-
param
Adds an Object parameter to the SQL query with targetSqlType.- Parameters:
value- the Object value to be addedtargetSqlType- the targeted SqlType.- Returns:
- the current SqlBuilder instance, for method chaining
-