Closed orekyuu closed 2 months ago
Description Currently, Doma2 does not support Bulk Insert. Currently, to achieve Bulk Insert, it is necessary to write an SQL Template like the following:
insert into users(name, age) values /*%for e : entities*/ (/*e.name*/'user', /*e.age*/20) /*%if e_has_next */ /*# "," */ /*%end */ /*%end */
Implementation ideas We would like to be able to write it as follows:
interface UserDao { @BulkInsert int bulkInsert(List<UserEntity> users); @BulkInsert BulkResult<ImmutableUserEntity> bulkInsert(List<ImmutableUserEntity> users); }
If there are no problem, I would like to try writing a Pull Request to add this feature.
Thank you for your feedback. Your pull requests are welcome.
Description Currently, Doma2 does not support Bulk Insert. Currently, to achieve Bulk Insert, it is necessary to write an SQL Template like the following:
Implementation ideas We would like to be able to write it as follows:
If there are no problem, I would like to try writing a Pull Request to add this feature.