mirror of
https://github.com/zenstackhq/zenstack
synced 2026-05-24 10:08:55 +00:00
Adds a new ZModel field-level `@fuzzy` attribute that opts a `String` field into fuzzy search. Without `@fuzzy`, the `fuzzy` filter operator and `_fuzzyRelevance` orderBy are unavailable both at the type level and at runtime. - Language: declare `@fuzzy` in stdlib (StringField only, @@@once) - Validator: enforce postgres-only via shared `getDataSourceProvider` helper - Schema: surface `fuzzy?: boolean` on `FieldDef`; generator emits it - ORM types: gate `fuzzy:` filter and `_fuzzyRelevance.fields` to opted-in fields - Zod factory: thread `withFuzzy` through string filter; filter `_fuzzyRelevance` enum - Runtime: throw `InvalidInputError` when fuzzy is used on non-`@fuzzy` fields - Tests: dedicated `fuzzy-search` test schema; validator coverage for postgres/sqlite/mysql/non-String Breaking: existing schemas using fuzzy search must annotate fields with `@fuzzy` to retain access. Fuzzy search shipped only one PR ago (#2573). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| attribute-application.test.ts | ||
| delegate.test.ts | ||
| expression-validation.test.ts | ||
| function-invocation.test.ts | ||
| import.test.ts | ||
| mixin.test.ts | ||
| procedure-validation.test.ts | ||
| this-resolution.test.ts | ||
| utils.ts | ||
| view.test.ts | ||