Crates.io | supabase_rs |
lib.rs | supabase_rs |
version | 0.4.0 |
source | src |
created_at | 2024-01-26 03:44:39.856833 |
updated_at | 2024-09-26 06:29:45.855989 |
description | Lightweight Rust client for Supabase REST and GraphQL |
homepage | |
repository | https://github.com/floris-xlx/supabase_rs |
max_upload_size | |
id | 1115184 |
size | 118,728 |
supabase_rs
is an extremely light weight Supabase SDK for interacting with it's database.
I'm actively covering the entire Supabase API including Auth, Realtime, Storage etc
nightly
: Enables the GraphQL
module to interact without REST.storage
: Enables the Storage
module to interact with Supabase Storage.rustls
: Forces the client into using rustls
over OpenSSL
.If you want to use GraphQL early you can enable the nightly
flag, this is NOT production ready obviously.
Nightly WILL send a warning message, to disable the nightly
warning message
disable it in your .env
as such:
SUPABASE_RS_NO_NIGHTLY_MSG=true
Note GraphQL and REST can be used together as the Client is shared from wherever it was authenticated initially.
select()
Query validation
Calling a Query
Calling a mutating Query
Response parsing
// coming soon //
// coming soon //
This is an unofficial Rust SDK for Supabase, since there is no official SDK for Rust yet.
Insert
: Add new rows to a table.Insert if unique
: Add a new row only if it does not violate a UNIQUE constraint.Update
: Modify existing rows in a table based on a unique identifier.Select
: Insert a new row into a table if it does not exist, or update it if it does.Select with count
: Select rows from a table and count the number of rows that match the filter criteria.Select with filter
: Select rows from a table based on a filter criteria.Select with filter and count
: Select rows from a table based on a filter criteria and count the number of rows that match the filter criteria.Delete
: Delete a row from a table based on a unique identifier.Query request
: Runs a GraphQL query to supabase
storage
: Enables the Storage
module to interact with Supabase Storage.[dependencies]
supabase_rs = "0.3.7"
// With the [storage] feature
supabase_rs = { version = "0.3.7", features = ["storage"] }
//!
First make sure you have initialized the Supabase Client Initalizing the SupabaseClient //!
The Supabase Client is initialized with the Supabase URL and the Supabase Key.
Which are environment variables that can be set in a .env
file under the following names or any other
SUPABASE_URL=
SUPABASE_KEY=
Examples will be present in the docs