supabase
@noy-db/to-supabase·pnpm add @noy-db/to-supabasePostgres + Storage combo, built onto-postgres.
| Shape | record |
| Atomic CAS | ✓ |
| Locality | cloud |
| Speed | medium |
| Persistence | durable |
What it does
A thin factory over @noy-db/to-postgres for the Postgres
connection you already have (pg.Pool, Supabase's serverless driver, …), with
optional blob routing via Supabase Storage.
Notes
casAtomic: true— delegates CAS toto-postgres(UPDATE … WHERE v = ? RETURNING id).- Record shape, one row per record — inherits the full
to-postgresfeature set. - Factory:
toSupabase(options: SupabaseStoreOptions).
Store-locator descriptor
See store-locator descriptors for the general model.
kind: 'supabase', class: 'cloud'. address is { projectRef?, schema?, table? }: table maps to tableName; projectRef and schema are
identity-only, not consumed by the factory — the connection already carries
them. projectRef is the stable identifier (a full URL is derivable from
it). options is { autoMigrate? }. binding.client is required (a
PostgresClient) — this store has no client library of its own; resolve()
without it throws.
import { supabaseStoreDescriptor, registerSupabaseStore } from '@noy-db/to-supabase'
const descriptor = supabaseStoreDescriptor({ projectRef: 'abcxyz', schema: 'public' })
See also
- to-* family
- postgres — the store this wraps