Package org.mybatis.dynamic.sql.util
Class SqlProviderAdapter
java.lang.Object
org.mybatis.dynamic.sql.util.SqlProviderAdapter
Adapter for use with MyBatis SQL provider annotations.
- Author:
- Jeff Butler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondelete
(DeleteStatementProvider deleteStatement) generalInsert
(GeneralInsertStatementProvider insertStatement) insert
(InsertStatementProvider<?> insertStatement) insertMultiple
(MultiRowInsertStatementProvider<?> insertStatement) insertMultipleWithGeneratedKeys
(Map<String, Object> parameterMap) This adapter method is intended for use with MyBatis' @InsertProvider annotation when there are generated values expected from executing the insert statement.insertSelect
(InsertSelectStatementProvider insertStatement) select
(SelectStatementProvider selectStatement) update
(UpdateStatementProvider updateStatement)
-
Constructor Details
-
SqlProviderAdapter
public SqlProviderAdapter()
-
-
Method Details
-
delete
-
generalInsert
-
insert
-
insertMultiple
-
insertMultipleWithGeneratedKeys
This adapter method is intended for use with MyBatis' @InsertProvider annotation when there are generated values expected from executing the insert statement. The canonical method signature for using this adapter method is as follows:public interface FooMapper { @InsertProvider(type=SqlProviderAdapter.class, method="insertMultipleWithGeneratedKeys") @Options(useGeneratedKeys=true, keyProperty="records.id") int insertMultiple(String insertStatement, @Param("records") List<Foo> records) }
- Parameters:
parameterMap
- The parameter map is automatically created by MyBatis when there are multiple parameters in the insert method.- Returns:
- the SQL statement contained in the parameter map. This is assumed to be the one and only map entry of type String.
-
insertSelect
-
select
-
update
-