Skip to main content
Module

x/supabase/mod.ts>PostgrestQueryBuilder#upsert

An isomorphic Javascript client for Supabase.
Go to Latest
method PostgrestQueryBuilder.prototype.upsert
Re-export
import { PostgrestQueryBuilder } from "https://deno.land/x/supabase@1.3.1/mod.ts";

Performs an UPSERT into the table.

Parameters

values: Partial<T> | Partial<T>[]

The values to insert.

optional
unnamed 1: { onConflict?: string; returning?: "minimal" | "representation"; count?:
| null
| "exact"
| "planned"
| "estimated"
; ignoreDuplicates?: boolean; }
= [UNSUPPORTED]

By specifying the on_conflict query parameter, you can make UPSERT work on a column(s) that has a UNIQUE constraint.