ConnectorDataOperationExecutor class
ConnectorDataOperation provides functionality for performing CRUD operations against connector data sources using the Runtime Data Client.
Methods
| create |
Creates a new record in the specified table |
| delete |
Deletes a record from the specified table |
| execute |
Executes a custom operation on the data source |
| retrieve |
Retrieves multiple records from the specified table |
| retrieve |
Retrieves a single record from the specified table |
| update |
Updates an existing record in the specified table |
Constructor Details
ConnectorDataOperationExecutor(IRuntimeClientProvider, RuntimeDataSourceService)
new ConnectorDataOperationExecutor(clientProvider: IRuntimeClientProvider, connectionsService: RuntimeDataSourceService)
Parameters
- clientProvider
- IRuntimeClientProvider
- connectionsService
- RuntimeDataSourceService
Method Details
createRecordAsync<TRequest, TResponse>(string, TRequest)
Creates a new record in the specified table
function createRecordAsync<TRequest, TResponse>(tableName: string, data: TRequest): Promise<IOperationResult<TResponse>>
Parameters
- tableName
-
string
- data
-
TRequest
Returns
Promise<IOperationResult<TResponse>>
deleteRecordAsync(string, string)
Deletes a record from the specified table
function deleteRecordAsync(tableName: string, id: string): Promise<IOperationResult<void>>
Parameters
- tableName
-
string
- id
-
string
Returns
Promise<IOperationResult<void>>
executeAsync<TRequest, TResponse>(IDataOperation<TRequest>)
Executes a custom operation on the data source
function executeAsync<TRequest, TResponse>(operation: IDataOperation<TRequest>): Promise<IOperationResult<TResponse>>
Parameters
- operation
-
IDataOperation<TRequest>
Returns
Promise<IOperationResult<TResponse>>
retrieveMultipleRecordsAsync<TResponse>(string, IOperationOptions)
Retrieves multiple records from the specified table
function retrieveMultipleRecordsAsync<TResponse>(tableName: string, options?: IOperationOptions): Promise<IOperationResult<TResponse[]>>
Parameters
- tableName
-
string
- options
- IOperationOptions
Returns
Promise<IOperationResult<TResponse[]>>
retrieveRecordAsync<TResponse>(string, string, IOperationOptions)
Retrieves a single record from the specified table
function retrieveRecordAsync<TResponse>(tableName: string, id: string, options?: IOperationOptions): Promise<IOperationResult<TResponse>>
Parameters
- tableName
-
string
- id
-
string
- options
- IOperationOptions
Returns
Promise<IOperationResult<TResponse>>
updateRecordAsync<TRequest, TResponse>(string, string, TRequest)
Updates an existing record in the specified table
function updateRecordAsync<TRequest, TResponse>(tableName: string, id: string, data: TRequest): Promise<IOperationResult<TResponse>>
Parameters
- tableName
-
string
- id
-
string
- data
-
TRequest
Returns
Promise<IOperationResult<TResponse>>