client.db. Collections must be created in the urBackend Dashboard before you can interact with them.
Methods that return documents accept a generic type parameter T (extending DocumentData) so returned documents are fully typed. Methods like delete() return status objects and do not accept T.
Row-Level Security (RLS)
If a collection has RLS enabled, you must provide the user’saccessToken to perform write operations (insert, update, patch, delete).
Example pattern:
getAll
Fetch documents from a collection with optional filtering, sorting, and pagination.params)
Example
getOne
Fetch a single document by its ID.insert
Insert a new document. If RLS is enabled, thetoken parameter is required.
update
Update an existing document by its ID. This performs a full replacement of the document fields.patch
Partially update a document. Only the fields provided indata will be modified.
