-
-
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', 'jane@example.com')`
);
// (b): Object-based syntax
const result = await client.database('public').table('users').upsert(
{ name: 'Jane', email: 'jane@example.com' }
);
See also ➞
Magic Paths