terrxo
DTDrizzle Team
•Created by terrxo on 2/10/2025 in #help
unionAll in pgView
How can I use a unionAll in a pgView? I've included an example.
https://drizzle.run/enckmzihpalip5k0a8ahp9he
1 replies
DTDrizzle Team
•Created by terrxo on 1/27/2025 in #help
Type Inference Issue: Missing | null on Relational Fields in Drizzle ORM
When querying a company and joining related customer data, the resulting inferred TypeScript type for the customer property does not allow for null even though no record may exist. Because of this, the type inference is overly strict. In many cases, customer can be null, especially with a left join or if the relation is optional.
Expected Behavior:
When using a relational query (e.g. with: { customer: { ... } }), the inferred TypeScript type should include | null (or | undefined) for the customer property if it is optional or if no matching record exists.
Actual Behavior:
The inferred type forces the customer property to always exist, which causes runtime errors in bussines code because of the types mismatch.
2 replies
DTDrizzle Team
•Created by terrxo on 12/12/2024 in #help
drizzle-typebox infers integer() as TString

6 replies