Database
Open a builder for a table
Open a PostgREST query builder for a single table.
Open a RequestBuilder for a table. Every read or write against public.<table> (or the schema set by schema) starts here. The call doesn't hit the wire — it just stores the table name and headers; the request fires when you chain a verb and call .execute.
Signature
supabase.from(table)supabase.from_(table)supabase.table(table)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table | String | Required | Table name (or view name). Resolved against the active schema — public by default, or whatever was set via supabase.schema(name). |
Returns
Returns
Supabase::Postgrest::RequestBuilder
A chainable builder with select, insert, update, upsert, and delete methods. Nothing is sent until .execute is called on a sub-builder.
Example — fetch rows from a table
response = supabase
.from("countries")
.select("id, name")
.execute
response.data # => [{ "id" => 1, "name" => "Algeria" }, ...]Example — from_ and table aliases
from_ and table are aliases for from — they call the same method. Use whichever reads best at the call site.
# All three calls are identical.
supabase.from("orders").select("*").execute
supabase.from_("orders").select("*").execute
supabase.table("orders").select("*").executeExample — non-public schema
from resolves the table inside the schema set on the client. Use schema to switch.
private_db = supabase.schema("billing")
private_db.from("invoices").select("*").execute