Supabase.Storage.SearchOptions (supabase_storage v0.1.0)
Represents the search options for querying objects within Supabase Storage.
This module encapsulates various options that aid in fetching and sorting storage objects. These options include specifying the limit on the number of results, an offset for pagination, and a sorting directive.
Structure
A SearchOptions
consists of the following attributes:
limit
: Specifies the maximum number of results to return. Default is100
.offset
: Specifies the number of results to skip before starting to fetch the result set. Useful for implementing pagination. Default is0
.sort_by
: A map that provides a sorting directive. It defines which column should be used for sorting and the order (ascending or descending). Default is%{column: "name", order: "asc"}
.
Functions
parse!/1
: Accepts a map of attributes and constructs a structuredSearchOptions
.
Examples
Parsing search options
search_attrs = %{
limit: 50,
offset: 10,
sort_by: %{column: "created_at", order: "desc"}
}
Supabase.Storage.SearchOptions.parse!(search_attrs)
Summary
Types
Functions
Link to this function