Skip to content

Do not parse trigger bodies in LoadOnly context#3368

Merged
angelamayxie merged 17 commits intomainfrom
angela/triggers
Jan 8, 2026
Merged

Do not parse trigger bodies in LoadOnly context#3368
angelamayxie merged 17 commits intomainfrom
angela/triggers

Conversation

@angelamayxie
Copy link
Copy Markdown
Contributor

@angelamayxie angelamayxie commented Jan 8, 2026

fixes dolthub/dolt#10287
fixes dolthub/dolt#10288

This PR adds a LoadOnly flag to a trigger context so that the body of a CreateTrigger statement is not unnecessarily parsed. This avoids parsing the trigger body every time an insert, update, or delete is called and only parses it when the trigger is actually relevant to the event. This also avoids parsing the trigger body when show trigger is called.

This PR also rearranges some things in buildCreateTrigger to be more performant.

@angelamayxie angelamayxie marked this pull request as ready for review January 8, 2026 19:49
@angelamayxie angelamayxie requested a review from zachmu January 8, 2026 19:49
Copy link
Copy Markdown
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM, nice work

@angelamayxie angelamayxie merged commit 6366850 into main Jan 8, 2026
8 checks passed
@angelamayxie angelamayxie deleted the angela/triggers branch January 8, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants