Query Records
The Query Records node retrieves data from your Supabase table or views. You can use it to fetch a list of records or perform a count query, depending on your needs.
This is based on the Supabase Client SDK - Fetch data.
Using Filters
The filter is following the Supabase query structure, giving you access to all the Supabase features. https://supabase.com/docs/reference/javascript/using-filters
Apply simple filter
return query.eq("name", "violin");
Conditional Chaining
if (Inputs.filterByName) {
query = query.eq("name", Inputs.filterByName);
}
if (Inputs.filterPopLow) {
query = query.gte("population", Inputs.filterPopLow);
}
if (Inputs.filterPopHigh) {
query = query.lt("population", Inputs.filterPopHigh);
}
return query;
Filter by values within a JSON column
return query.eq("address->postcode", 90210);
Filter referenced tables
return query.eq("instruments.name", "flute");
Using modifiers
https://supabase.com/docs/reference/javascript/using-modifiers
Order the results
return query.order("id", { ascending: false });
Limit the number of rows returned
return query.limit(1);
Inputs
| Data | Type | Description |
|---|---|---|
| Do | signal | |
| Table Name | string | |
| Count | enum | There are a few ways to get the count from Supabase on the filter, which is useful if you are using “limit” in the filter. |
| Skip Items | boolean | (Head) Skip returning the items, this is useful if you want to do a count query. |
| Filter | javascript | A javascript function allowing you to use either filters or modifiers provided by Supabase. With support for “Inputs” similar to the Function node. |
| Select | list | Allow selecting what fields that should be returned, also supporting joining. |
Outputs
| Data | Type | Description |
|---|---|---|
| Items | array | |
| First Record Id | string | |
| Is Empty | boolean | |
| Count | number | |
| Is Loading | boolean | |
| Is Fetching | boolean | |
| Is Fetched | boolean | |
| Status | string | |
| Is Success | boolean | |
| Is Error | boolean | |
| Error Text | string | |
| Is Found | boolean | |
| Is Missing | boolean | |
| Success | signal | |
| Failure | signal | |
| Finally | signal |