Skip to main content
Module

x/postgrest/mod.ts>PostgrestClient

Isomorphic JavaScript client for PostgREST.
Latest
class PostgrestClient
import { PostgrestClient } from "https://deno.land/x/postgrest@1.1.0/mod.ts";

Constructors

new
PostgrestClient(url: string, unnamed 1?: { headers?: { [key: string]: string; }; schema?: string; })

Creates a PostgREST client.

Properties

headers: { [key: string]: string; }
optional
schema: string
url: string

Methods

auth(token: string): this

Authenticates the request with JWT.

from<T = any>(table: string): PostgrestQueryBuilder<T>

Perform a table operation.

rpc<T = any>(
fn: string,
params?: object,
unnamed 2?: { head?: boolean; count?:
| null
| "exact"
| "planned"
| "estimated"
; }
,
): PostgrestFilterBuilder<T>

Perform a function call.