supabase-client-derive
Derive macros for supabase-client (#[derive(Table)]).
Note: This crate is part of the
supabase-client-sdkworkspace. Most users should depend onsupabase-client-sdkwith thederivefeature (enabled by default) rather than using this crate directly.
Key Features
#[derive(Table)]proc macro — implements theTabletrait for type-safe queries- Struct-level attributes:
#[table(name = "table_name")]— custom table name (defaults to struct name in snake_case)#[table(schema = "schema_name")]— custom schema
- Field-level attributes:
#[primary_key]— mark the primary key column#[primary_key(auto_generate)]— exclude from inserts (serial/identity)#[column(name = "col_name")]— custom column name#[column(skip)]— exclude from table mapping#[column(auto_generate)]— exclude from inserts
Usage
use Table;
use Deserialize;
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.