Interface JdbcClient.BatchEntry
- Enclosing interface:
JdbcClient
public static interface JdbcClient.BatchEntry
A specification for binding the parameters of a single batch entry,
as provided to
JdbcClient.BatchSpec.entry(Consumer).
Parameters are bound in the same fashion as for a single JdbcClient.StatementSpec,
either as JDBC-style positional parameters or as Spring-style named parameters
(but not both).
- Since:
- 7.1
- Author:
- Juergen Hoeller, Sam Brannen, Jiri Krokviak, Yanming Zhou
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionBind a positional JDBC statement parameter for "?" placeholder resolution by explicit JDBC statement parameter index.Bind a positional JDBC statement parameter for "?" placeholder resolution by explicit JDBC statement parameter index.Bind a positional JDBC statement parameter for "?" placeholder resolution by implicit order of parameter value registration.Bind a named statement parameter for ":x" placeholder resolution, with each "x" name matching a ":x" placeholder in the SQL statement.Bind a named statement parameter for ":x" placeholder resolution, with each "x" name matching a ":x" placeholder in the SQL statement.paramSource(Object namedParamObject) Bind named statement parameters for ":x" placeholder resolution.paramSource(SqlParameterSource namedParamSource) Bind named statement parameters for ":x" placeholder resolution.
-
Method Details
-
param
Bind a positional JDBC statement parameter for "?" placeholder resolution by implicit order of parameter value registration.This is primarily intended for statements with a single parameter or very few parameters, registering each parameter value in the order of the parameter's occurrence in the SQL statement.
- Parameters:
value- the parameter value to bind- Returns:
- this batch entry (for chaining)
- See Also:
-
param
Bind a positional JDBC statement parameter for "?" placeholder resolution by explicit JDBC statement parameter index.- Parameters:
jdbcIndex- the JDBC-style index (starting with 1)value- the parameter value to bind- Returns:
- this batch entry (for chaining)
- See Also:
-
param
Bind a positional JDBC statement parameter for "?" placeholder resolution by explicit JDBC statement parameter index.- Parameters:
jdbcIndex- the JDBC-style index (starting with 1)value- the parameter value to bindsqlType- the associated SQL type (seeTypes)- Returns:
- this batch entry (for chaining)
- See Also:
-
param
Bind a named statement parameter for ":x" placeholder resolution, with each "x" name matching a ":x" placeholder in the SQL statement.- Parameters:
name- the parameter namevalue- the parameter value to bind- Returns:
- this batch entry (for chaining)
- See Also:
-
param
Bind a named statement parameter for ":x" placeholder resolution, with each "x" name matching a ":x" placeholder in the SQL statement.- Parameters:
name- the parameter namevalue- the parameter value to bindsqlType- the associated SQL type (seeTypes)- Returns:
- this batch entry (for chaining)
- See Also:
-
paramSource
Bind named statement parameters for ":x" placeholder resolution.The given parameter object will define all named parameters for this entry, based on its JavaBean properties, record components, or raw fields. A
Mapor anSqlParameterSourceinstance can be provided as a complete parameter source as well.- Parameters:
namedParamObject- a custom parameter object- Returns:
- this batch entry (for chaining)
- See Also:
-
paramSource
Bind named statement parameters for ":x" placeholder resolution.The given parameter source will define all named parameters for this entry, possibly associating specific SQL types with each value.
- Parameters:
namedParamSource- a customSqlParameterSourceinstance- Returns:
- this batch entry (for chaining)
- See Also:
-