-
-
Couldn't load subscription status.
- Fork 239
support DECLARE in BEGIN...END BLOCK in TRIGGER
#2446
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
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.
LGTM! only thing i'd change is reverting/skipping TestSingleScript
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.
lgtm again! more tests and tighter organization definitely improvements
This PR allows us to use
DECLAREstatements inTRIGGERS.The analyzer rule
applyTriggerswas altered to initializeProcedureReferenceforTriggerBeginEndBlock.The important part was ensuring that all relevant nodes (
TriggerBeingEndBlock,BeginEndBlock,ProcedureParam) all had the sameProcedureReferenceand to search in all the nodes.Additionally,
nilguards are added to all receiver methods forProcedureReferenceto prevent panics.It seems like events might have this issue, but there's a banaid fix for it. Not sure if I want to touch that code.
fixes: dolthub/dolt#7720