pub struct SupabaseConfig {
pub supabase_url: String,
pub supabase_key: String,
pub schema: String,
}Expand description
Configuration for connecting to a Supabase instance.
By default, uses the PostgREST REST API (no database connection needed).
Enable the direct-sql feature and call .database_url() to use direct SQL via sqlx.
Fields§
§supabase_url: StringSupabase project URL (e.g. “http://localhost:64321”)
supabase_key: StringSupabase API key (anon or service_role)
schema: StringDefault schema (defaults to “public”)
Implementations§
Source§impl SupabaseConfig
impl SupabaseConfig
Sourcepub fn new(
supabase_url: impl Into<String>,
supabase_key: impl Into<String>,
) -> SupabaseConfig
pub fn new( supabase_url: impl Into<String>, supabase_key: impl Into<String>, ) -> SupabaseConfig
Create a new REST-first config with Supabase URL and API key.
This is the primary constructor. No database connection is needed.
Sourcepub fn schema(self, schema: impl Into<String>) -> SupabaseConfig
pub fn schema(self, schema: impl Into<String>) -> SupabaseConfig
Set the default schema.
Trait Implementations§
Source§impl Clone for SupabaseConfig
impl Clone for SupabaseConfig
Source§fn clone(&self) -> SupabaseConfig
fn clone(&self) -> SupabaseConfig
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 moreAuto Trait Implementations§
impl Freeze for SupabaseConfig
impl RefUnwindSafe for SupabaseConfig
impl Send for SupabaseConfig
impl Sync for SupabaseConfig
impl Unpin for SupabaseConfig
impl UnwindSafe for SupabaseConfig
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