Optional type map of table names to row types.
Optional type map of table names to row types.
Start a query on a table. Returns a chainable DirectQueryBuilder.
Table name in the public schema.
Execute raw SQL with positional bind parameters.
SQL query with $1, $2 placeholders.
Optionalparams: any[]Values for bind parameters.
Optionaloptions: { limit?: number }Optional limit for SELECT queries (default: 1000).
Direct database access module — bypasses endpoints/workflows. Requires
serviceRoleKey(admin-level access).WARNING: This is for server-side use only (scripts, migrations, seeds, backend). NEVER expose the serviceRoleKey in browser/client-side code. For end-user data access, use
client.db.from()(which goes through endpoints with proper auth).Example