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 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

      JdbcClient.BatchEntry param(int jdbcIndex, @Nullable Object value)
      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

      JdbcClient.BatchEntry param(int jdbcIndex, @Nullable Object value, int sqlType)
      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
      sqlType - the associated SQL type (see Types)
      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 name
      value - the parameter value to bind
      Returns:
      this batch entry (for chaining)
      See Also:
    • param

      JdbcClient.BatchEntry param(String name, @Nullable Object value, int sqlType)
      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 name
      value - the parameter value to bind
      sqlType - the associated SQL type (see Types)
      Returns:
      this batch entry (for chaining)
      See Also:
    • paramSource

      JdbcClient.BatchEntry paramSource(Object namedParamObject)
      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 Map or an SqlParameterSource instance 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

      JdbcClient.BatchEntry paramSource(SqlParameterSource namedParamSource)
      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 custom SqlParameterSource instance
      Returns:
      this batch entry (for chaining)
      See Also: