-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
+190
−6
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@emacarron Do you have some time to look at this pr? |
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
added a commit
that referenced
this pull request
Jan 17, 2016
Thanks guys! By the way, is anyone working on the documentation of this feature? |
emacarron
added a commit
that referenced
this pull request
Feb 10, 2016
harawata
added a commit
that referenced
this pull request
Feb 16, 2016
harawata
added a commit
to harawata/mybatis-3
that referenced
this pull request
Oct 12, 2017
…ole parameter, its name does not matter anymore.
harawata
added a commit
to harawata/mybatis-3
that referenced
this pull request
Oct 12, 2017
…ole parameter, its name does not matter anymore.
Support for Oracle? |
@bambooj Oracle's multi row insert is |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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