SupabaseClient
Supabase Client.
An isomorphic Javascript client for interacting with Postgres.
§Type Parameters
§Constructors
Create a new client for use in the browser.
The unique Supabase URL which is supplied when you create a new project in your project dashboard.
The unique Supabase Key which is supplied when you create a new project in your project dashboard.
You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.
Set to "true" if you want to automatically refresh the token before expiring.
Set to "true" if you want to automatically save the user session into local storage.
Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
Options passed along to realtime-js constructor.
A custom fetch implementation.
Any additional headers to send with each network request.
§Properties
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.
Supabase Storage allows you to manage user-generated content, such as photos or videos.
§Methods
Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
- The name of the Realtime channel.
- The options to pass to the Realtime channel.
Returns all Realtime channels.
Unsubscribes and removes all Realtime channels from Realtime client.
Unsubscribes and removes Realtime channel from Realtime client.
- The name of the Realtime channel.
Perform a function call.
- The function name to call
- The arguments to pass to the function call
- Named parameters
- When set to
true
,data
will not be returned. Useful if you only need the count.
- When set to
true
, the function will be called with read-only access mode.
- Count algorithm to use to count rows returned by the function. Only applicable for set-returning functions.
"exact"
: Exact but slow count algorithm. Performs a COUNT(*)
under the
hood.
"planned"
: Approximated but fast count algorithm. Uses the Postgres
statistics under the hood.
"estimated"
: Uses exact count for low numbers and planned count for high
numbers.
Select a schema to query or perform an function (rpc) call.
The schema needs to be on the list of exposed schemas inside Supabase.
- The schema to query