prepare() on update statement?

How can I make a prepared update statement? I'm using sqlite. 1. Do I only make the where clause prepared, or I need to make the set part as well? 2. Can a prepared statement do returning? This does not work:
const query = db
.update(chats)
.set({ modelConfig: sql.placeholder('modelConfig') })
.where(eq(chats.chatID, chatID))
.prepare()
const query = db
.update(chats)
.set({ modelConfig: sql.placeholder('modelConfig') })
.where(eq(chats.chatID, chatID))
.prepare()
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?