Skip to main content
Module

x/postgrest/mod.ts>PostgrestBuilder

Isomorphic JavaScript client for PostgREST.
Latest
class PostgrestBuilder
implements PromiseLike<PostgrestResponse<T>>
Re-export
Abstract
import { PostgrestBuilder } from "https://deno.land/x/postgrest@1.1.0/mod.ts";

Constructors

new
PostgrestBuilder(builder: PostgrestBuilder<T>)

Properties

protected
optional
body: Partial<T> | Partial<T>[]
protected
headers: { [key: string]: string; }
protected
method:
| "GET"
| "HEAD"
| "POST"
| "PATCH"
| "DELETE"
protected
optional
schema: string
protected
shouldThrowOnError: boolean
protected
optional
signal: AbortSignal
protected
url: URL

Methods

then<TResult1 = PostgrestResponse<T>, TResult2 = never>(onfulfilled?: ((value: PostgrestResponse<T>) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>

If there's an error with the query, throwOnError will reject the promise by throwing the error instead of returning it as part of a successful response.

https://github.com/supabase/supabase-js/issues/92