Skip to main content

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

DataTypeDescription
Dosignal
Table Namestring
CountenumThere 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 Itemsboolean(Head) Skip returning the items, this is useful if you want to do a count query.
FilterjavascriptA javascript function allowing you to use either filters or modifiers provided by Supabase. With support for “Inputs” similar to the Function node.
SelectlistAllow selecting what fields that should be returned, also supporting joining.

Outputs

DataTypeDescription
Itemsarray
First Record Idstring
Is Emptyboolean
Countnumber
Is Loadingboolean
Is Fetchingboolean
Is Fetchedboolean
Statusstring
Is Successboolean
Is Errorboolean
Error Textstring
Is Foundboolean
Is Missingboolean
Successsignal
Failuresignal
Finallysignal