cusx
cusx
DTDrizzle Team
Created by cusx on 7/12/2024 in #help
How can I get the Typescript return type of a drizzle statement?
// How can I type the return type of this function?
export function selectUserIncludingToken(userId: User["id"]): ?? {
return db
.select()
.from(eghlTokens)
.rightJoin(users, eq(eghlTokens.userId, users.email))
.where(eq(users.id, userId))
.orderBy(desc(eghlTokens.createdAt))
.limit(1);
}
// How can I type the return type of this function?
export function selectUserIncludingToken(userId: User["id"]): ?? {
return db
.select()
.from(eghlTokens)
.rightJoin(users, eq(eghlTokens.userId, users.email))
.where(eq(users.id, userId))
.orderBy(desc(eghlTokens.createdAt))
.limit(1);
}
7 replies
DTDrizzle Team
Created by cusx on 6/24/2024 in #help
Is drizzle's transaction considered interactive or non-interactive?
https://orm.drizzle.team/docs/transactions Because neon serverless does not support interactive transactions.
1 replies