Skip to content

Commit b55ca05

Browse files
committed
Documentation for new mapper
1 parent 7d3e833 commit b55ca05

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ The pull request for this change is ([#550](https://github.com/mybatis/mybatis-d
4343
please test to make sure it is supported in your database. ([#544](https://github.com/mybatis/mybatis-dynamic-sql/pull/544))
4444
2. Deprecated Kotlin DSL functions have been removed, as well as deprecated support for "EmptyListCallback" in the "in"
4545
conditions. ([#548](https://github.com/mybatis/mybatis-dynamic-sql/pull/548))
46+
3. Refactored the common insert mapper support for MyBatis3 by adding a CommonGeneralInsertMapper that can be used
47+
without a class that matches the table row. It includes methods for general insert and insert select.
4648

4749

4850

src/site/markdown/docs/mybatis3.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ JDBC template.
2323
These mappers provide utility functions that execute simple queries. They can be used as-as, or can be extended. They
2424
provide methods as follows:
2525

26-
| Mapper | Methods(s) |
27-
|---|---|
28-
| `org.mybatis.dynamic.sql.util.mybatis3.CommonCountMapper` | `long count(SelectStatementProvider)` |
29-
| `org.mybatis.dynamic.sql.util.mybatis3.CommonDeleteMapper` | `int delete(DeleteStatementProvider)`
30-
| `org.mybatis.dynamic.sql.util.mybatis3.CommonInsertMapper<T>` | `int insert(InsertStatementProvider<T>)`<br/>`int generalInsert(GeneralInsertStatementProvider)`<br/>`int insertSelect(InsertSelectStatementProvider)`<br/>`int insertMultiple(MultiRowInsertStatementProvider<T>)` |
31-
| `org.mybatis.dynamic.sql.util.mybatis3.CommonUpdateMapper` | `int update(UpdateStatementProvider)` |
32-
33-
These mappers, as well as the common selectmapper, can be used to create a general purpose CRUD mapper as follows:
26+
| Mapper | Methods(s) |
27+
|--------------------------------------------------------------------------------------------------------|---|
28+
| `org.mybatis.dynamic.sql.util.mybatis3.CommonCountMapper` | `long count(SelectStatementProvider)` |
29+
| `org.mybatis.dynamic.sql.util.mybatis3.CommonDeleteMapper` | `int delete(DeleteStatementProvider)`
30+
| `org.mybatis.dynamic.sql.util.mybatis3.CommonInsertMapper<T>`<br/>(extends `CommonGeneralInsertMapper`) | `int insert(InsertStatementProvider<T>)`<br/>`int insertMultiple(MultiRowInsertStatementProvider<T>)` |
31+
| `org.mybatis.dynamic.sql.util.mybatis3.CommonGeneralInsertMapper` | `int generalInsert(GeneralInsertStatementProvider)`<br/>`int insertSelect(InsertSelectStatementProvider)` |
32+
| `org.mybatis.dynamic.sql.util.mybatis3.CommonUpdateMapper` | `int update(UpdateStatementProvider)` |
33+
34+
These mappers, as well as the `CommonSelectMapper`, can be used to create a general purpose CRUD mapper as follows:
3435

3536
```java
3637
import org.apache.ibatis.annotations.Mapper;

0 commit comments

Comments
 (0)