Skip to content

feat: implement runtime code generation and refine zmodel schema#4

Merged
ymc9 merged 15 commits into
devfrom
feat/code-gen
Oct 13, 2022
Merged

feat: implement runtime code generation and refine zmodel schema#4
ymc9 merged 15 commits into
devfrom
feat/code-gen

Conversation

@ymc9
Copy link
Copy Markdown
Member

@ymc9 ymc9 commented Oct 13, 2022

No description provided.

@ymc9 ymc9 merged commit b8dbed4 into dev Oct 13, 2022
@ymc9 ymc9 deleted the feat/code-gen branch October 25, 2022 13:48
ymc9 added a commit that referenced this pull request Feb 10, 2026
docloulou added a commit to docloulou/zenstack that referenced this pull request May 2, 2026
…s at type level

Follow the existing `ProviderSupportsDistinct` pattern (review feedback zenstackhq#4):
- Add `ProviderSupportsFuzzy<Schema>` mirroring `ProviderSupportsDistinct`.
- Extract the fuzzy payload into a reusable `FuzzyFilterPayload` type.
- Gate `_fuzzyRelevance` in `SortAndTakeArgs.orderBy` so it is only typed
  when provider is postgresql.
- Gate `fuzzy` on `StringFilter` via a non-invasive `AddFuzzyIfPostgres`
  wrapper applied in `FieldFilter` (which already has `Schema` in scope).
  The wrapper returns `Base` unchanged for non-postgres to preserve
  nullability (intersecting with `{}` would strip null/undefined).
- Update the e2e fuzzy test suite to override the static sqlite provider
  type: the test only runs on postgres at runtime but typechecks against
  the basic schema's compile-time provider.
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