Skip to content

Make filter.custom generic over the model - #20

Merged
evoactivity merged 1 commit into
mainfrom
feat/generic-custom-filter
Aug 17, 2026
Merged

Make filter.custom generic over the model#20
evoactivity merged 1 commit into
mainfrom
feat/generic-custom-filter

Conversation

@evoactivity

Copy link
Copy Markdown
Owner

Statics cannot reference class type parameters, so FilterHandler stays wide and handlers naming relations needed a cast per declaration site. custom<Model> moves that single cast inside the package; declaration sites get the concrete builder with typed relation names. Runtime untouched, non-breaking, the type parameter defaults to LucidModel.

The test is a compile-time proof: a typed handler assigns a relation name where the wide builder types it as never. 177 unit + 62 functional passing, lint and typecheck clean.

Statics cannot reference class type parameters, so the stored
FilterHandler stays wide and every handler naming a relation needed a
cast at the declaration site. custom<Model> moves that cast inside
the package: the declaration site gets the concrete query builder,
relation names included, and the runtime is untouched.
@evoactivity evoactivity added the enhancement New feature or request label Aug 17, 2026
@evoactivity
evoactivity merged commit 5d63395 into main Aug 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant