Skip to contents

Connection

Connect and manage Supabase connections

Unified API

Auto-dispatches to DBI or REST based on available credentials

sb_connect()
Connect to Supabase
sb_disconnect()
Disconnect from Supabase
sb_status()
Get connection status

DBI Backend

Direct PostgreSQL connection via DBI

sb_db_connect()
Connect to Supabase
sb_db_disconnect()
Disconnect from Supabase
sb_db_status()
Check DBI backend status
sb_db_creds()
Read Supabase credentials from environment variables

REST API Backend

Supabase REST API via PostgREST

sb_api_connect()
Connect to Supabase via REST API
sb_api_disconnect()
Disconnect from Supabase API
sb_api_status()
Check API backend status

Read Operations

Query and read data from tables

Unified API

sb_read()
Read table data
sb_query()
Query a table
sb_tables()
List tables
sb_schema()
Get table schema
sb_table_exists()
Check if table exists

DBI Backend

sb_db_read()
Read table data
sb_db_query()
Query a table
sb_db_tables()
List tables in schema
sb_db_schema()
Get table schema
sb_db_table_exists()
Check if table exists

REST API Backend

sb_api_read()
Read table data via API
sb_api_query()
Query a table via API
sb_api_tables()
List tables via API
sb_api_schema()
Get table schema via API
sb_api_table_exists()
Check if a table exists via API

Write Operations

Insert, update, delete, and upsert data

Unified API

sb_insert()
Insert rows into a table
sb_update()
Update rows in a table
sb_delete()
Delete rows from a table
sb_upsert()
Upsert rows into a table
sb_truncate()
Truncate a table

DBI Backend

sb_db_insert()
Insert rows into a table
sb_db_update()
Update rows in a table
sb_db_delete()
Delete rows from a table
sb_db_upsert()
Upsert rows into a table
sb_db_truncate()
Truncate a table

REST API Backend

sb_api_insert()
Insert rows into a table via API
sb_api_update()
Update rows in a table via API
sb_api_delete()
Delete rows from a table via API
sb_api_upsert()
Upsert rows into a table via API
sb_api_truncate()
Truncate a table via API