-
Notifications
You must be signed in to change notification settings - Fork 693
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
feat: [MariaDB] Support RETURNING clause #2330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for opening this PR @devgor88 !
Please check the comments regarding the tests and please also update the existing documentation, specifically this docs file.
In that file, please add MariaDB to the "Supported on" section in the relevant <tldr>
element (line 406). Then we'd need to add a small note about the update restriction, so please also edit the following <p>
to clarify the support:
<p>Some databases allow the return of additional data every time a row is either inserted, updated, or deleted.
Please note that MariaDB only allows the return of this data for insertions and deletions.
This can be accomplished by using one of the following functions:
</p>
If you need any further clarification or help with these requested changes, don't hesitate to let me know. Thanks in advance!
exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/dml/ReturningTests.kt
Outdated
Show resolved
Hide resolved
exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/dml/ReturningTests.kt
Outdated
Show resolved
Hide resolved
Thank you for reviewing this PR. I'm glad to be a one of contributors of this great library. I've done everything you asked for. Hope I haven't broken docs file as I'm not fully understand its format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄 Thanks again @devgor88 & for your support of the library! Don't hesitate to contribute again or to open a discussion in YouTrack with any ideas about how our MariaDB support could be improved.
By the way, no worries about the docs, they're not broken. If you ever want to contribute more to the documentation in the future, the Writerside plugin could be helpful as it offers a live preview in the IDE for any changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, lgtm
Description
Summary of the change: Returning clause was implemented for MariaDB
Detailed description:
RETURNING
clause was introduced in either feat: EXPOSED-355 Support INSERT...RETURNING statement #2060 or feat: EXPOSED-357 Support DELETE...RETURNING statement #2061.updateReturning()
becauseUPDATE ... RETURNING
is not yet supported by the database (open issue MDEV-5092).Type of Change
Please mark the relevant options with an "X":
Updates/remove existing public API methods:
Affected databases:
Checklist
Related Issues