pub struct SupabaseClient { /* private fields */ }Expand description
The main client for interacting with Supabase.
By default, uses the PostgREST REST API. Enable the direct-sql feature
and call with_database() to also get a direct PostgreSQL connection pool.
Implementations§
Source§impl SupabaseClient
impl SupabaseClient
Sourcepub fn new(config: SupabaseConfig) -> Result<SupabaseClient, SupabaseError>
pub fn new(config: SupabaseConfig) -> Result<SupabaseClient, SupabaseError>
Create a new REST-only client (no database connection needed).
This is the primary constructor. Queries go through PostgREST.
Sourcepub fn supabase_url(&self) -> &str
pub fn supabase_url(&self) -> &str
Get the Supabase project URL.
Sourcepub fn config(&self) -> &SupabaseConfig
pub fn config(&self) -> &SupabaseConfig
Get the full config.
Trait Implementations§
Source§impl Clone for SupabaseClient
impl Clone for SupabaseClient
Source§fn clone(&self) -> SupabaseClient
fn clone(&self) -> SupabaseClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SupabaseClient
impl Debug for SupabaseClient
Source§impl SupabaseClientQueryExt for SupabaseClient
impl SupabaseClientQueryExt for SupabaseClient
Source§fn from(&self, table: &str) -> QueryBuilder
fn from(&self, table: &str) -> QueryBuilder
Start a dynamic (string-based) query on a table.
Source§fn from_typed<T>(&self) -> TypedQueryBuilder<T>where
T: Table,
fn from_typed<T>(&self) -> TypedQueryBuilder<T>where
T: Table,
Start a typed query on a table using the Table trait.
Source§fn rpc(&self, function: &str, args: Value) -> Result<RpcBuilder, SupabaseError>
fn rpc(&self, function: &str, args: Value) -> Result<RpcBuilder, SupabaseError>
Call a stored procedure/function with dynamic return.
Source§fn rpc_typed<T>(
&self,
function: &str,
args: Value,
) -> Result<TypedRpcBuilder<T>, SupabaseError>where
T: DeserializeOwned + Send,
fn rpc_typed<T>(
&self,
function: &str,
args: Value,
) -> Result<TypedRpcBuilder<T>, SupabaseError>where
T: DeserializeOwned + Send,
Call a stored procedure/function with typed return.
Auto Trait Implementations§
impl Freeze for SupabaseClient
impl !RefUnwindSafe for SupabaseClient
impl Send for SupabaseClient
impl Sync for SupabaseClient
impl Unpin for SupabaseClient
impl !UnwindSafe for SupabaseClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more