Methods
(async, static) getOneRecord(model, id, filteropt, optionsopt) → {Promise.<Object>}
Get a single record from the database based on the provided model, ID, filter, and options.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
model | external:DoboModel | The model to query | ||
id | string | | The ID of the record to retrieve | ||
filter | external:TFilter | <optional> | {} | The filter criteria for the query |
options | external:TOptions | <optional> | {} | Additional options for the query |
- Source
The retrieved record
- Type:
- Promise.<Object>
(async, static) prepCrud(optionsopt) → {Object}
Prepare CRUD operation parameters.
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | Options for preparing CRUD operation Properties
|
- Source
Prepared CRUD parameters
- Type:
- Object
(async, static) processHandler(optsopt)
Process a database operation with error suppression and transaction handling.
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | Object | <optional> | {} | Options for processing the handler Properties
|
- Source
Type Definitions
TActions
Type of actions that can be performed on records in the database.
- Object
| Name | Type | Default | Description |
|---|---|---|---|
0 | number | 'countRecord' | Count the number of records |
1 | number | 'createAggregate' | Create an aggregate record |
2 | number | 'createHistogram' | Create a histogram record |
3 | number | 'createRecord' | Create a new record |
4 | number | 'findAllRecord' | Find all records |
5 | number | 'findOneRecord' | Find one record |
6 | number | 'findRecord' | Find records |
7 | number | 'getRecord' | Get a record |
8 | number | 'removeRecord' | Remove a record |
9 | number | 'updateRecord' | Update a record |
- Source