jakeleventhal
jakeleventhal
Explore posts from servers
TTCTheo's Typesafe Cult
Created by jakeleventhal on 1/6/2024 in #questions
How to increment in drizzle?
logins: integer('logins').default(1).notNull(),
logins: integer('logins').default(1).notNull(),
await db
.update(users)
.set({ logins: sql`${users.logins} + 1` })
.where(eq(users.id, user.id));
await db
.update(users)
.set({ logins: sql`${users.logins} + 1` })
.where(eq(users.id, user.id));
ERROR: invalid input syntax for type integer: "[object Object]"
CONTEXT: unnamed portal parameter $1 = '...'
STATEMENT: update "User" set "logins" = $1 where "User"."id" = $2
ERROR: invalid input syntax for type integer: "[object Object]"
CONTEXT: unnamed portal parameter $1 = '...'
STATEMENT: update "User" set "logins" = $1 where "User"."id" = $2
This doesn't seem to work for me
2 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 1/5/2024 in #questions
How does prisma handle interactive neon transactions
Does anyone know how tf prisma is dealing with interactive transactions under the hood for neon serverless? they explicitly don't allow you to do interactive transactions (per-neon), yet prisma just acts like nothing is wrong in drizzle, if you try to do this you get a runtime error saying neon doesnt support transactions
Error: No transactions support in neon-http driver
1 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 12/15/2023 in #questions
Is it possible to discard the cache for a single vercel serverless function
Surely there is a way to discard the serverless function cache for a single function right?
9 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 12/15/2023 in #questions
Need help determining connection pooling issues
No description
1 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 8/12/2023 in #questions
Anyone know how to check non-blocking migrations?
I'm trying to use drizzle and looking for a way of basically saying, can i directly push this schema change without issues. essentially a dry-run push
6 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 7/24/2023 in #questions
Keeping vercel API routes synchronized
has anyone using vercel serverless functions figured out a good way to somehow keep axios/fetch calls to those endpoints in sync with the file paths? routes for the functions are based on filepath, so pages/api/my-route.ts resolves to URL/api/my-route
8 replies
TTCTheo's Typesafe Cult
Created by jakeleventhal on 6/7/2023 in #questions
Has anyone had any luck migrating prisma -> drizzle?
Migrating from Prisma to Drizzle is a massive project. There are no migration guides. Is there a great way to migrate query-by-query? Has anybody done this and had any luck? Piecemeal migrations seem like the only practical way to do this
2 replies