Anthony
DTDrizzle Team
•Created by Anthony on 11/12/2024 in #help
Struggling with simple subquery statement in Drizzle
Oh ur right I will copy over my example in full
5 replies
DTDrizzle Team
•Created by Anthony on 11/12/2024 in #help
Struggling with simple subquery statement in Drizzle
Hey @Angelelz , here's a minimal example:
https://drizzle.run/qdym3nmhrqi30hoy9yndsors
5 replies
DTDrizzle Team
•Created by Anthony on 10/28/2024 in #help
Race condition executing a common pattern (select or insert)
@Luxaritas I think we decided to go for an advisory lock
4 replies
DTDrizzle Team
•Created by Anthony on 10/28/2024 in #help
Race condition executing a common pattern (select or insert)
My original though was an onConflictDoUpdate, but in this case the phoneNumber field is not unique.
4 replies
DTDrizzle Team
•Created by Anthony on 10/19/2024 in #help
Struggling to build common pattern with queries -- fetching with count + offset/limit pagination
I see that it has to do with the <any, any> in but I'm not sure how to get that type dynamically.
8 replies
DTDrizzle Team
•Created by Anthony on 10/19/2024 in #help
Struggling to build common pattern with queries -- fetching with count + offset/limit pagination
@Raphaël M (@rphlmr) ⚡ hey thanks for the tip -- I'm having a problem using this with Typescript. When adding the
with:
clause to a call to findMany
it automatically updates the Return type however the FindManyQueryConfig<typeof db.query.slots>
is defined as a slot return type so the with:
clause is ignored and thus the resulting type returned from the above getUsers
function is not typed correctly.8 replies
DTDrizzle Team
•Created by Anthony on 10/19/2024 in #help
Struggling to build common pattern with queries -- fetching with count + offset/limit pagination
@Raphaël M (@rphlmr) ⚡ this is perfect, you're amazing!
8 replies
DTDrizzle Team
•Created by pato on 10/14/2024 in #help
Natively write SQL functions/triggers with Drizzle?
@pato see the Check option here if it fits your needs https://orm.drizzle.team/docs/indexes-constraints#check
9 replies
DTDrizzle Team
•Created by pato on 10/14/2024 in #help
Natively write SQL functions/triggers with Drizzle?
No, this would require a custom migration
9 replies