Skip to content

Add support for "on delete cascade" column option #170

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

Merged
merged 7 commits into from
May 27, 2020

Conversation

c7hm4r
Copy link
Contributor

@c7hm4r c7hm4r commented May 26, 2020

This introduces some breaking changes.

Is it a good idea to have a lifetime parameter in Parser?

Copy link
Contributor

@nickolay nickolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I'd prefer to split c67d667 into a separate PR, so that this PR could be merged independently, and the discussion about evolving our dialect support would be more visible.

As for ON { UPDATE | DELETE } { RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT }, please see my comments inline...

(Note: ANSI SQL calls a <referential triggered action>, and here are the Postgres docs.)

@c7hm4r c7hm4r force-pushed the on_delete_option branch 3 times, most recently from 2fbdaea to 79514b7 Compare May 26, 2020 20:11
@c7hm4r
Copy link
Contributor Author

c7hm4r commented May 26, 2020

I reworked the PR. I will create a new PR for the new dialect option.

@c7hm4r c7hm4r requested a review from nickolay May 26, 2020 20:20
Copy link
Contributor

@nickolay nickolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you! I have only a few nits.

@c7hm4r c7hm4r marked this pull request as ready for review May 27, 2020 12:12
@c7hm4r c7hm4r requested a review from nickolay May 27, 2020 12:15
@nickolay nickolay merged commit 98f97d0 into apache:master May 27, 2020
Copy link
Contributor

@nickolay nickolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks again!

nickolay added a commit that referenced this pull request Aug 10, 2020
* Change `Parser { ... }` to store the dialect used:
    `Parser<'a> { ... dialect: &'a dyn Dialect }`

    Thanks to @c7hm4r for the initial version of this submitted as
    part of #170

* Introduce `dialect_of!(parser is SQLiteDialect |  GenericDialect)` helper
    to branch on the dialect's type

* Use the new functionality to make `AUTO_INCREMENT` and `AUTOINCREMENT`
  parsing dialect-dependent.


Co-authored-by: Christoph Müller <[email protected]>
Co-authored-by: Nickolay Ponomarev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants