Prepared Update statements

Is it possible to use preparad statements for updating data? I was able to use prepared statements with .select(), .findFirst(), or .findMany(), but I am having trouble with .update().

If possible, what would the syntax be? I am trying to update a verificationToken, and I would need two placeholders there. Tried something like this, but It's wrong:

export const psUpdateEmailVerificationToken = db.update(users).set({
  emailVerificationToken: sql.placeholder("emailVerificationToken"),
}).where({
  (users, {eq}) => eq(users.id, sql.placeholder("id"))
}).prepare("psUpdateEmailVerificationToken")


Is this even possible? I am using Drizzle with Postrgres at Neon.
Was this page helpful?