| Load one document by id. Throws when it cannot be found. |
|
| load<Model>(id?) | Load one document by id. Returns null when it cannot be found. | |
| load<Model>Many(ids) | Batch load documents by ids. | |
| create<Model>(data) | Create a document from input data. | |
| update<Model>(id, data) | Update a document and return the updated document. | |
| remove<Model>(id) | Remove or soft-remove a document through the generated database service flow. | |
| search<Model>(text, option?) | Search documents and return docs with count. | |
| searchDocs<Model>(text, option?) | Search documents and return docs only. | |
| searchCount<Model>(text) | Count documents that match search text. | |
Load one document by id. Throws when it cannot be found.
Load one document by id. Returns null when it cannot be found.
Batch load documents by ids.
Create a document from input data.
Update a document and return the updated document.
Remove or soft-remove a document through the generated database service flow.
Search documents and return docs with count.
Search documents and return docs only.
Count documents that match search text.
| method | Description | Example |
|---|---|---|
| list<Query>(...args, option?) | List documents matching a document filter. | |
| listIds<Query>(...args, option?) | List document ids matching a document filter. | |
| find<Query>(...args, option?) | Find one matching document or return null. | |
| findId<Query>(...args, option?) | Find one matching document id or return null. | |
| pick<Query>(...args, option?) | Find one matching document. Throws when missing. | |
| pickId<Query>(...args, option?) | Find one matching document id. Throws when missing. | |
| exists<Query>(...args) | Check whether a matching document exists. | |
| count<Query>(...args) | Count matching documents. | |
| insight<Query>(...args) | Load aggregated insight for matching documents. | |
| query<Query>(...args) | Return the raw query object for a document filter. | |
List documents matching a document filter.
List document ids matching a document filter.
Runs after update. Return the document to continue.
Runs before remove.
Runs after remove. Return the document to continue.
Find one matching document or return null.
Find one matching document id or return null.
Find one matching document. Throws when missing.
Find one matching document id. Throws when missing.
Check whether a matching document exists.
Count matching documents.
Load aggregated insight for matching documents.
Return the raw query object for a document filter.