Selects all records in a table, or a specific record, from the database.
Arguments
| Argument | Description |
|---|---|
resource
| The table name or a record ID to select. |
Example usage
Example usage: Retrieve unique id of a record
Restrict records with .range()
When selecting all records in a table (not a single record id), you can restrict results to a record-id range by chaining .range(...). The argument implements Into<RecordIdKeyRange>: strings and tuples such as "a"..="z" or (Bound::Included(x), Bound::Excluded(y)) express inclusive or exclusive bounds on the table’s record keys.
Translated query
This function will run the following query in the database:
See also
Live queries (
select().live()); alternativelyquery()withLIVE SELECTand.stream()