Cory
Cory
Explore posts from servers
DTDrizzle Team
Created by Cory on 10/20/2023 in #help
How to select all from a table and get the the columns names returned as they are stored?
yea I understand that. But for this particular instance I needed the original table name
6 replies
DTDrizzle Team
Created by Cory on 9/6/2023 in #help
How to updateNow for datetime?
thanks
4 replies
DTDrizzle Team
Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
this sort of works but gives me the actually execution as the type, not the result really
16 replies
DTDrizzle Team
Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
hmm
16 replies
DTDrizzle Team
Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
sure:
export const getItemOrder = db.query.item
.findFirst({
columns: {
itemOrder: true
},
where: and(eq(item.id, placeholder('id')), eq(item.orgId, placeholder('orgId')))
}).prepare();

type exampleType = ReturnType<typeof getItemOrder>;
export const getItemOrder = db.query.item
.findFirst({
columns: {
itemOrder: true
},
where: and(eq(item.id, placeholder('id')), eq(item.orgId, placeholder('orgId')))
}).prepare();

type exampleType = ReturnType<typeof getItemOrder>;
16 replies
DTDrizzle Team
Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
Giving a type error, something about not satisifying the contraint provides no match for the signature '(...args: any): any'
16 replies
DTDrizzle Team
Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
Weird for some reason trying this now, it does not work?
16 replies
DTDrizzle Team
Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
Yes thank you this is perfect!!
16 replies
DTDrizzle Team
Created by Cory on 5/25/2023 in #help
Help with this relational query?
Could you help me out with writing this with the callback? Trying to figure it out but having trouble
20 replies
DTDrizzle Team
Created by Cory on 5/25/2023 in #help
Help with this relational query?
ah yea an example of what the actual output is in mySQL (selectable via a little tab) would be cool!
20 replies
DTDrizzle Team
Created by Cory on 5/25/2023 in #help
Help with this relational query?
yea but I only want the orgs associated with the membership which is associated with the user
20 replies
DTDrizzle Team
Created by Cory on 5/25/2023 in #help
Help with this relational query?
Well that would be selecting a lot of data
20 replies
DTDrizzle Team
Created by Cory on 5/10/2023 in #help
Type error for eq()
for 'eq'
4 replies
DTDrizzle Team
Created by Cory on 5/8/2023 in #help
how to use placeholders for Prepared Insert statements?
ok thanks
4 replies
DTDrizzle Team
Created by Cory on 5/7/2023 in #help
Are default values not transferred over via drizzle-zod?
thanks
5 replies
DTDrizzle Team
Created by Cory on 5/7/2023 in #help
Are default values not transferred over via drizzle-zod?
ah okay
5 replies
DTDrizzle Team
Created by Cory on 5/1/2023 in #help
Invalid default value when using defaultNow()
So it seems like it was some sort of PlanetScale issue
20 replies