Web Dev Cody
Explore posts from serversDTDrizzle Team
•Created by Web Dev Cody on 6/24/2024 in #help
invalid code in docs
I’m trying to run code similar to this from the drizzle docs but typescript does t even think “where” is a proper attritbute inside the with. Is this actually implemented?
await db.query.posts.findMany({
where: (posts, { eq }) => (eq(posts.id, 1)),
with: {
comments: {
where: (comments, { lt }) => lt(comments.createdAt, new Date()),
},
},
});
1 replies
DTDrizzle Team
•Created by Web Dev Cody on 5/10/2024 in #help
Drizzle kit time differences compared to sql query
3 replies
DTDrizzle Team
•Created by Web Dev Cody on 5/8/2024 in #help
Having to restart Next.js server after migration
Does anyone know why I often need to hard restart my next.js server after I run a drizzle db push? Is there a way to get next to automatically know I've changed the schema without hard resetting?
5 replies
DTDrizzle Team
•Created by Web Dev Cody on 11/21/2023 in #help
A way to use the update function with existing value in row?
How do I do the following SQL
UPDATE counts SET count = count + 1 WHERE id = 1
but with drizzle orm, such as
await db.update(counts).set({
count: current_count + 1,
});
is that even possible or is raw sql my only option?3 replies