New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support insert multiple rows and write-back id #547

Merged
merged 1 commit into from Jan 16, 2016

Conversation

Projects
None yet
3 participants
@abel533
Contributor

abel533 commented Jan 3, 2016

Support insert multiple rows and write-back id.

Multirow inserts

A SQL feature (since SQL-92) is the use of row value constructors to insert multiple rows at a time in a single SQL statement:

INSERT INTO tablename (column-a, [column-b, ...])
VALUES ('value-1a', ['value-1b', ...]),
('value-2a', ['value-2b', ...]),
...
This feature is supported by DB2, SQL Server (since version 10.0 - i.e. 2008), PostgreSQL (since version 8.2), MySQL, sqlite (since version 3.7.11) and H2.

More about insert see here:

http://en.wikipedia.org/wiki/Insert_(SQL)
More details of this pull request see here: #350

@abel533

This comment has been minimized.

Contributor

abel533 commented Jan 16, 2016

@emacarron Do you have some time to look at this pr?

@emacarron emacarron merged commit f09e268 into mybatis:master Jan 16, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@emacarron

This comment has been minimized.

Member

emacarron commented Jan 16, 2016

Hi @abel533 I have just reviewed the contribution, converted it to postresql and meged it into master.

Thank you very much for you work!

@harawata

This comment has been minimized.

Member

harawata commented Feb 10, 2016

Thanks guys!

By the way, is anyone working on the documentation of this feature?
If not, I will add a brief note and an example.

@emacarron emacarron added this to the 3.3.1 milestone Feb 10, 2016

@emacarron emacarron self-assigned this Feb 10, 2016

emacarron added a commit that referenced this pull request Feb 10, 2016

harawata added a commit to harawata/mybatis-3 that referenced this pull request Oct 12, 2017

Improving mybatis#547 . As long as the list/collection/array is the s…
…ole parameter, its name does not matter anymore.

harawata added a commit to harawata/mybatis-3 that referenced this pull request Oct 12, 2017

Improving mybatis#547 . As long as the list/collection/array is the s…
…ole parameter, its name does not matter anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment