GatorCSE
GatorCSE
DTDrizzle Team
Created by prop on 11/9/2023 in #help
Access values in "where" query
can we use prepared statements in batches? I'm trying with:
db.batch([
myPrepared.returning({}),
db.select().from(myTable),
]);
db.batch([
myPrepared.returning({}),
db.select().from(myTable),
]);
but getting `Property 'returning' does not exist on type 'PreparedQuery<...' errors
73 replies
DTDrizzle Team
Created by prop on 11/9/2023 in #help
Access values in "where" query
does (sqlite) drizzle have a built in way to atomic increment a field during an update? I'm doing this:
db.update(table)
.set({ numField: sql`${table.numField} + 1` })
.where(gt(table.numField, 0))
db.update(table)
.set({ numField: sql`${table.numField} + 1` })
.where(gt(table.numField, 0))
but wondering if there was a built in function
73 replies