fasm
fasm
Explore posts from servers
DTDrizzle Team
Created by fasm on 11/2/2023 in #help
Slow queries with relationships
No description
2 replies
DTDrizzle Team
Created by fasm on 5/31/2023 in #help
update multiple rows
works perfectly, thank you!!
28 replies
DTDrizzle Team
Created by fasm on 5/31/2023 in #help
update multiple rows
amazing, thank you so much!! Let me give this a go new
28 replies
DTDrizzle Team
Created by fasm on 5/31/2023 in #help
update multiple rows
this is what I currently have..
28 replies
DTDrizzle Team
Created by fasm on 5/31/2023 in #help
update multiple rows
type NewPosition = {
id: number,
position: number
}
export const updateLinkPositions = async (newPositions: NewPosition[]) => {
const promises = newPositions.map(({ id, position }) => {
return db.update(linksTable).set({ position }).where(eq(linksTable.id, id))
})
return Promise.all(promises)
}
type NewPosition = {
id: number,
position: number
}
export const updateLinkPositions = async (newPositions: NewPosition[]) => {
const promises = newPositions.map(({ id, position }) => {
return db.update(linksTable).set({ position }).where(eq(linksTable.id, id))
})
return Promise.all(promises)
}
28 replies
DTDrizzle Team
Created by fasm on 5/31/2023 in #help
update multiple rows
thanks for getting back to me. I want do this by row ID as an identifier, not sure how to use the where statement like that.
28 replies