SQLite3 support use returning statement#42955
SQLite3 support use returning statement#42955OuYangJinTing wants to merge 1 commit intorails:mainfrom
Conversation
06b4fe6 to
652cac8
Compare
|
I have a look CI test and I do not found SQLite's version information. I run test is pass locally and I use 3.36.0 SQLite. |
012decc to
ce848d5
Compare
ce848d5 to
e7dea91
Compare
|
If I understand it well, CI is running in Docker image based on Debian 11 and installing Sqlite3 using system package. https://packages.debian.org/bullseye/sqlite3 Currently it is using |
Thanks for your reply. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
Reopened another closed by stale label. |
|
@OuYangJinTing Would you rebase this pull request based on the latest main branch if you are still interested in. Thanks. |
There was a problem hiding this comment.
| # defaults to true.(Only SQLite3's version >= 3.35.0) | |
| # defaults to true. (Only SQLite3 version >= 3.35.0) |
e7dea91 to
9037cc9
Compare
9037cc9 to
4749604
Compare
|
@yahonda |
|
Hey folks, I'd like to see if #49290 achieved everything we aimed for in this PR so this one could be closed. |
|
@nvasilevski: I opened #50468 to add the documentation improvements, but everything else in this PR was captured by #49290. Once #50468 is merged, this can be closed. @OuYangJinTing, I made sure to make you a co-author of the #50468 PR. Thanks for your good work here. |
Summary
SQLite(3.35.0) release information
The SQLite add support for the RETURNING clause on DELETE, INSERT, and UPDATE statements.
This PR used this feature, as follows:
ActiveRecord::InsertAllsupport use to returning of feature if your SQLite version >= 3.35.0.ActiveRecord::ConnectionAdapters::AbstractAdapter#exec_insertsupport return primary key of value directly. If you want to keep original behavior, you can setinsert_returning: falsein connection configuration of database.PS: English is not my native language; please excuse typing errors.