Skip to content

Refactor: define execute functions on per-model delegates instead of the global query struct#49

Merged
VoidClancy merged 1 commit into
masterfrom
client-refactor
Jul 18, 2026
Merged

Refactor: define execute functions on per-model delegates instead of the global query struct#49
VoidClancy merged 1 commit into
masterfrom
client-refactor

Conversation

@VoidClancy

Copy link
Copy Markdown
Owner

1- Move the model-specific CRUD exec functions from being methods on the generic *Queries struct to the ModelDelegate struct (renamed to executeCreate, executeFindMany, ...etc)

2- Fix a data-integrity bug in the bulk insert execution (executeCreateManyAndReturn) where relation loading was bound to the parent connection pool rather than the active transaction context (txQ)

3- Remove the unused client *Queries pointer from all query and create builder structs, the builders now call their execFunc closure

…the global query struct

1- Move the model-specific CRUD exec functions from being methods on the generic *Queries struct to the ModelDelegate struct (renamed to executeCreate, executeFindMany, ...etc)

2- Fix a data-integrity bug in the bulk insert execution (executeCreateManyAndReturn) where relation loading was bound to the parent connection pool rather than the active transaction context (txQ)

3- Remove the unused client *Queries pointer from all query and create builder structs, the builders now call their execFunc closure
@VoidClancy VoidClancy self-assigned this Jul 18, 2026
@VoidClancy
VoidClancy merged commit 394e598 into master Jul 18, 2026
5 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