import { supabase } from "https://deno.land/x/live@1.25.4/deps.ts";
const { SupabaseClient } = supabase;
Supabase Client.
An isomorphic Javascript client for interacting with Postgres.
Constructors
Type Parameters
optional
Schema extends GenericSchema = Database[SchemaName] extends GenericSchema ? Database[SchemaName] : anyProperties
protected
realtime: RealtimeClientprotected
rest: PostgrestClient<Database, SchemaName>Supabase Auth allows you to create and manage user sessions for access to data that is secured by access policies.
Supabase Functions allows you to deploy and invoke edge functions.
Methods
channel(name: string, opts?: RealtimeChannelOptions): RealtimeChannel
Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
from<TableName extends string & keyof Schema["Tables"], Table extends Schema["Tables"][TableName]>(relation: TableName): PostgrestQueryBuilder<Schema, Table>
Perform a table operation.
Returns all Realtime channels.
removeAllChannels(): Promise<("ok" | "timed out" | "error")[]>
Unsubscribes and removes all Realtime channels from Realtime client.
removeChannel(channel: RealtimeChannel): Promise<"ok" | "timed out" | "error">
Unsubscribes and removes Realtime channel from Realtime client.
rpc<FunctionName extends string & keyof Schema["Functions"], Function_ extends Schema["Functions"][FunctionName]>(): PostgrestFilterBuilder<Schema, Function_["Returns"] extends any[] ? Function_["Returns"][number] extends Record<string, unknown> ? Function_["Returns"][number] : never : never, Function_["Returns"]>
fn: FunctionName,
args?: Function_["Args"],
options?: { head?: boolean; count?: "exact" | "planned" | "estimated"; },
Perform a function call.