pub struct WasmSupabaseClient { /* private fields */ }Expand description
Main Supabase client for WASM/JavaScript usage.
Implementations§
Source§impl WasmSupabaseClient
impl WasmSupabaseClient
Sourcepub fn new(url: &str, key: &str) -> Result<WasmSupabaseClient, JsValue>
pub fn new(url: &str, key: &str) -> Result<WasmSupabaseClient, JsValue>
Create a new Supabase client.
@param url - The Supabase project URL (e.g., https://your-project.supabase.co)
@param key - The Supabase anon key
Sourcepub async fn from_select(
&self,
table: &str,
columns: &str,
) -> Result<JsValue, JsValue>
pub async fn from_select( &self, table: &str, columns: &str, ) -> Result<JsValue, JsValue>
Execute a SELECT query on a table. Returns JSON results.
Sourcepub async fn from_insert(
&self,
table: &str,
data: JsValue,
) -> Result<JsValue, JsValue>
pub async fn from_insert( &self, table: &str, data: JsValue, ) -> Result<JsValue, JsValue>
Execute an INSERT query. data should be a JSON object (single row).
Sourcepub async fn from_update(
&self,
table: &str,
data: JsValue,
column: &str,
value: &str,
) -> Result<JsValue, JsValue>
pub async fn from_update( &self, table: &str, data: JsValue, column: &str, value: &str, ) -> Result<JsValue, JsValue>
Execute an UPDATE query with eq filter. data should be a JSON object.
Sourcepub async fn from_delete(
&self,
table: &str,
column: &str,
value: &str,
) -> Result<JsValue, JsValue>
pub async fn from_delete( &self, table: &str, column: &str, value: &str, ) -> Result<JsValue, JsValue>
Execute a DELETE query with eq filter.
Sourcepub fn auth(&self) -> Result<WasmAuthClient, JsValue>
pub fn auth(&self) -> Result<WasmAuthClient, JsValue>
Create an auth client.
Sourcepub fn realtime(&self) -> Result<WasmRealtimeClient, JsValue>
pub fn realtime(&self) -> Result<WasmRealtimeClient, JsValue>
Create a realtime client.
Sourcepub fn storage(&self) -> Result<WasmStorageClient, JsValue>
pub fn storage(&self) -> Result<WasmStorageClient, JsValue>
Create a storage client.
Sourcepub fn functions(&self) -> Result<WasmFunctionsClient, JsValue>
pub fn functions(&self) -> Result<WasmFunctionsClient, JsValue>
Create a functions client.
Sourcepub fn graphql(&self) -> Result<WasmGraphqlClient, JsValue>
pub fn graphql(&self) -> Result<WasmGraphqlClient, JsValue>
Create a GraphQL client.
Trait Implementations§
Source§impl From<WasmSupabaseClient> for JsValue
impl From<WasmSupabaseClient> for JsValue
Source§fn from(value: WasmSupabaseClient) -> Self
fn from(value: WasmSupabaseClient) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmSupabaseClient
impl FromWasmAbi for WasmSupabaseClient
Source§impl IntoWasmAbi for WasmSupabaseClient
impl IntoWasmAbi for WasmSupabaseClient
Source§impl RefFromWasmAbi for WasmSupabaseClient
impl RefFromWasmAbi for WasmSupabaseClient
Source§type Anchor = RcRef<WasmSupabaseClient>
type Anchor = RcRef<WasmSupabaseClient>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl TryFromJsValue for WasmSupabaseClient
impl TryFromJsValue for WasmSupabaseClient
Source§impl VectorFromWasmAbi for WasmSupabaseClient
impl VectorFromWasmAbi for WasmSupabaseClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmSupabaseClient]>
Source§impl VectorIntoWasmAbi for WasmSupabaseClient
impl VectorIntoWasmAbi for WasmSupabaseClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmSupabaseClient]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmSupabaseClient
impl WasmDescribeVector for WasmSupabaseClient
impl SupportsConstructor for WasmSupabaseClient
impl SupportsInstanceProperty for WasmSupabaseClient
impl SupportsStaticProperty for WasmSupabaseClient
Auto Trait Implementations§
impl Freeze for WasmSupabaseClient
impl !RefUnwindSafe for WasmSupabaseClient
impl Send for WasmSupabaseClient
impl Sync for WasmSupabaseClient
impl Unpin for WasmSupabaseClient
impl UnsafeUnpin for WasmSupabaseClient
impl !UnwindSafe for WasmSupabaseClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.