Skip to content

Feat: add before/after Create hooks - #20

Merged
VoidClancy merged 1 commit into
masterfrom
hooks
Jul 6, 2026
Merged

Feat: add before/after Create hooks#20
VoidClancy merged 1 commit into
masterfrom
hooks

Conversation

@VoidClancy

Copy link
Copy Markdown
Owner

1- define before/after Create hooks (takes a pointer to {model}CreateInput to allow mutation) on the model delegate, along with the client (i knew i was right to define delegates)

2- update model_create template to execute before/after Create hooks if registered

3- define initDelegates() and copyHooksFrom() helpers to avoid duplicate delegate initialization in BeginTx() and Transaction()

4- write unit test for the hooks and verify both are working as intended

1- define before/after Create hooks (takes a pointer to {model}CreateInput to allow mutation) on the model delegate, along with the client (i knew i was right to define delegates)

2- update model_create template to execute before/after Create hooks if registered

3- define initDelegates() and copyHooksFrom() helpers to avoid duplicate delegate initialization in BeginTx() and Transaction()

4- write unit test for the hooks and verify both are working as intended
@VoidClancy VoidClancy self-assigned this Jul 6, 2026
@VoidClancy
VoidClancy merged commit f265ee1 into master Jul 6, 2026
3 checks passed
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.

1 participant