-
Notifications
You must be signed in to change notification settings - Fork 550
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 row_alias
and col_aliases
in INSERT
statement for mysql and generic dialects
#1136
Conversation
Example: INSERT INTO `table` (`date`) VALUES (2024-01-01) AS `alias` (`mek`)
Pull Request Test Coverage Report for Build 8139962636Details
💛 - Coveralls |
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.
Thank you for the contribution @emin100 . I left some comments. Let me know what you think
I apologize for the delay in reviewing |
Marking as Draft to signify this PR is no longer waiting on review. Please mark it as ready for review when it is ready for another look. |
@alamb Thanks for comments. |
as
part in insert statement for mysql and generic dialectsrow_alias
and col_aliases
in INSERT
statement for mysql and generic dialects
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.
Thank you @emin100 -- I think this is really close. There is just some strangeness with the row_name not being an Option
which I think we should sort out
- added error test
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.
Thank you @emin100 -- sorry it took a few back and forths but I think this PR looks really nice now. Thanks again
@@ -4194,6 +4207,14 @@ pub enum OnInsert { | |||
OnConflict(OnConflict), | |||
} | |||
|
|||
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] | |||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | |||
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))] |
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
Example: INSERT INTO
table
(date
) VALUES (2024-01-01) ASalias
(mek
)