volcanicislander
volcanicislander
Explore posts from servers
DTDrizzle Team
Created by Aguilar on 5/19/2024 in #help
drizzle config is weird
Cloudflare D1 is a SQLite database, not postgres.
5 replies
DTDrizzle Team
Created by Liam on 7/8/2023 in #help
Drizzle-zod Include Relations
I am interested in accomplishing this as well
10 replies
DTDrizzle Team
Created by volcanicislander on 10/4/2023 in #help
Inferred Types not picking up Relations
In case anyone stumbles upon this in the future, I defined my own types by embedding the inferred select types and use them when appropriate i.e. when typing the props to a component. Hope this helps!
9 replies
DTDrizzle Team
Created by volcanicislander on 10/4/2023 in #help
Inferred Types not picking up Relations
I'm just wondering if there is an auto-magic way to have the relations in the type definition. If not, I can manually define the type by omitting the foreign key and replacing it with the relation as key and inferred select-type as value.
9 replies
DTDrizzle Team
Created by volcanicislander on 10/4/2023 in #help
Inferred Types not picking up Relations
I see that the type from the query is indeed correct, however when I pass it to a component I have to provide a type in the component definition and assumed I could pass the inferred type which doesn't know about the query/relations. Is there a way to generate a proper "relationed" type to pass to components?
9 replies
DTDrizzle Team
Created by volcanicislander on 10/4/2023 in #help
Inferred Types not picking up Relations
I will change their name and try that, thank you. The docs here https://orm.drizzle.team/docs/rqb#include-relations state "For any nested with queries Drizzle will infer types using Core Type API". I read that as the inferred type will properly include the relations?
9 replies
DTDrizzle Team
Created by rogueturnip on 10/3/2023 in #help
one-to-many
And try to add a relation name (the same) on both sides as well. Like many(images, { relationName: "resources.image" }) or something like that
6 replies