-
-
Notifications
You must be signed in to change notification settings - Fork 2
UPSERT
Oxford Harrison edited this page Nov 15, 2024
·
10 revisions
The UPSERT statement.
See APIS ➞
client.query(),table.upsert()
// (a): SQL syntax
const result = await client.query(
`UPSERT INTO public.users
(name, email)
VALUES ('Jane', '[email protected]')`
);// (b): Object-based syntax
const result = await client.database('public').table('users').upsert(
{ name: 'Jane', email: '[email protected]' }
);See also ➞
Magic Paths