DataManager
Provides data management capabilities for local and remote data sources. Supports CRUD operations, query execution, and data transformation through adaptors. Commonly used with components that require structured data handling, such as grids, lists, and more.
Methods
The following table outlines the methods for the DataManager:
| Name | Parameters | Returns | Description |
|---|---|---|---|
| executeLocal | query? : Query | Object[] | Executes the specified query against the local data source. If no query is provided, the default query is used. Throws an error if neither is available. Params: |
| executeQuery | query : Query | Functiondone? : Functionfail? : Functionalways? : Function | Promise<Response> | Executes the specified query against either a local or remote data source.
The operation is asynchronous and returns a Params: |
| insert | - | Object | Promise<Object> | Inserts a new record into the specified table or data source.
If |
| remove | - | Object | Promise<Object> | Removes a record from the data source using the specified key field and value.
If the data source is remote, the removal is performed via a fetch request.
If |
| saveChanges | - | Promise<Object> | Object | Saves multiple changes—such as additions, updates, and deletions—to the specified data source.
When the data source is remote, all changes are submitted in a single request.
If |
| update | - | Object | Promise<Object> | Updates an existing record in the specified data source.
If |