Class InsertBatchStatement<T>

java.lang.Object
io.github.torand.fastersql.statement.InsertBatchStatement<T>
Type Parameters:
T - the batch entity type.
All Implemented Interfaces:
Sql, PreparableStatement

public class InsertBatchStatement<T> extends Object implements PreparableStatement
Implements an INSERT statement for batch (multi-row) insertion.
  • Method Details

    • value

      public InsertBatchStatement<T> value(Column column, Function<? super T,Object> valueExtractor)
      Registers a column-value mapper.
      Parameters:
      column - the column.
      valueExtractor - the value extractor.
      Returns:
      the modified statement.
    • sql

      public String sql(Context context)
      Description copied from interface: Sql
      Formats object as an SQL fragment.
      Specified by:
      sql in interface Sql
      Parameters:
      context - the context (incl. dialect).
      Returns:
      the formatted SQL fragment.
    • params

      public Stream<Object> params(Context context)
      Description copied from interface: Sql
      Gets the statement parameters introduced by this fragment.
      Specified by:
      params in interface Sql
      Parameters:
      context - the context (incl. dialect).
      Returns:
      the statement parameters.
    • toString

      public String toString()
      Overrides:
      toString in class Object