Skip to content

module

supabase

Supabase: tables through PostgREST, RPC, email/password auth and public storage URLs. The anon key is meant for browsers; row-level security decides what it can see.

let db = Supabase::new(env!("SUPABASE_URL"), env!("SUPABASE_ANON_KEY"));
let req = db.from("products").select("id,name,price").eq("active", "true").order("price", true).limit(20).get();
let rows = weft::web::fetch(req).await?.json().map(|j| to_value(&j))?;

Structs

  • Query

    A PostgREST query: filters, ordering and paging, then [Query::get], [Query::insert], [Query::update], [Query::upsert] or [Query::delete].

  • Session

    A signed-in session.

  • Supabase

    A Supabase project: its tables (through PostgREST), RPC, auth and storage.

Functions

total_count

pub fn total_count(res: &Response) -> Option<usize>

The total from a count() query's Content-Range (0-9/42 → 42).