-
Notifications
You must be signed in to change notification settings - Fork 0
Assignments
Christoph Herrmann edited this page Oct 17, 2019
·
2 revisions
const user = { email: 'email', name: 'name' }
const result = await sql.query(sql`
UPDATE users SET ${sql.assignments(user)} WHERE id = 'id'
`)
// text: UPDATE users SET ("email", "name") = ($1, $2) WHERE id = 'id'
// values: ['email', 'name']
Found a bug or missing a feature? -> Create a new Issue
Found a security issue? -> Look at the Security Policy
Having questions, want to give feedback or talk to me? -> E-Mail me [email protected]