Skip to content

feat: ExceptionStatement raises custom SQL errors #829

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gronke
Copy link

@gronke gronke commented Oct 15, 2024

PR Info

Allows defining SQL errors, for instance in an IfElseStatement #828 inside a TriggerStatement #824 that rejects an update on certain conditions.

New Features

  • ExceptionStatement raises custom SQL errors

Breaking Changes

  • Add SimpleExpr:: Exception variant to public enum

Copy link
Contributor

@Expurple Expurple left a comment

Choose a reason for hiding this comment

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

Haven't reviewed the rest yet. Consider running cargo semver-checks to find and document the breaking changes.

Disclaimer: I'm not a maintainer

@@ -35,6 +35,7 @@ pub enum SimpleExpr {
AsEnum(DynIden, Box<SimpleExpr>),
Case(Box<CaseStatement>),
Constant(Value),
Exception(ExceptionStatement),
Copy link
Contributor

@Expurple Expurple May 16, 2025

Choose a reason for hiding this comment

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

You should mention that this is a breaking change (adding a new variant to a public enum not marked as #[non_exhaustive]).

Perhaps, we should add #[non_exhaustive] in the next major version. That's also a breaking change. But after that, changes like yours can me merged anytime with no problems

This was referenced May 16, 2025
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