Interface CommonInsertMapper<T>

Type Parameters:
T - the type of row associated with this mapper
All Superinterfaces:
CommonGeneralInsertMapper

public interface CommonInsertMapper<T> extends CommonGeneralInsertMapper
This is a general purpose mapper for executing various types of insert statements. This mapper is appropriate for insert statements that do NOT expect generated keys.
  • Method Details

    • insert

      @InsertProvider(type=SqlProviderAdapter.class, method="insert") int insert(InsertStatementProvider<T> insertStatement)
      Execute an insert statement with input fields mapped to values in a POJO.
      Parameters:
      insertStatement - the insert statement
      Returns:
      the number of rows affected
    • insertMultiple

      @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") int insertMultiple(MultiRowInsertStatementProvider<T> insertStatement)
      Execute an insert statement that inserts multiple rows. The row values are supplied by mapping to values in a List of POJOs.
      Parameters:
      insertStatement - the insert statement
      Returns:
      the number of rows affected
    • flush

      @Flush List<org.apache.ibatis.executor.BatchResult> flush()
      Flush batched insert statements and return details of the current batch. This is useful when there is no direct access to the @link(SqlSession.
      Returns:
      details about the current batch including update counts, etc.