The Output tab of the Query All Records function
The Output tab controls how the data is returned from the Query All Records function.
Customize Customize the fields included in the response of the function. By default all fields shown will be included. However, choose the customize response button to pick and choose which fields you'd like included. This is useful when you don't need all the fields but only a select few.
Addon Addons are a unique and powerful feature of Xano that are similar to Graph QL. They allow you to decorate the data of your primary table with data from other database tables. Addons are covered in detail later in this section.
Type Return type allows you to specify how you want to return the data from the query.
- List - This is by default. List returns a list of records matching any filters you may or may not include in your function. A list signifies an array, so keep this in mind if you need to do additional manipulation the returned data. You typically need to iterate (Loop) over an array/list to manipulate it.
- Exists - This returns a true or false there is an existence of records matching any filters included or not.
- Count - Count will return a count of the matching records.
- Single - Returns a single record. Get Record can be used as a shortcut for this. However, this return type is useful if you need to look something up based on multiple fields, use a join, sort, or any additional customization available on the Query All Records function.
- Aggregate - Allows you to aggregate the data from the Query All Records function. You have access to Group By, Aggregated By, Aggregator (how the data is being aggregated), and Sorted By.
- Stream - Stream is a special return type used for For Each Loops. Stream retrieves database records in a memory-friendly way so that the For Each Loop can iterate through all of the records without the need for paging.
Sorting Sorting allows you to sort the results of the function in ascending, descending, or random order.
Paging Enable paging to page the results, especially of large datasets where you don't need to query all the included records. You can also take advantage of paging to limit the results of a query. When paging is enabled you can select how many records per page, which page number, and optionally include page metadata and total item count.
Distinct Distinct records can be manipulated based on the requirements for your query. By default automatic detection is enabled - meaning it will automatically detect whether you want distinct records or not based on your query's settings. However, you can choose to override this and either enable or disable distinct records.