Share via


DefaultDataOperationOrchestrator class

RuntimeDataOperations provides a unified interface for performing data operations across different data sources.

Constructors

DefaultDataOperationOrchestrator(DataverseDataOperationExecutor, ConnectorDataOperationExecutor, RuntimeDataSourceService)

Methods

createRecordAsync<TRequest, TResponse>(string, TRequest)

Creates a new record in the specified data source.

deleteRecordAsync(string, string)

Deletes a record from the specified data source.

executeAsync<TRequest, TResponse>(IDataOperation<TRequest>)

Executes a data operation on the specified data source.

retrieveMultipleRecordsAsync<TResponse>(string, IOperationOptions)

Retrieves multiple records from the specified data source.

retrieveRecordAsync<TResponse>(string, string, IOperationOptions)

Retrieves a record from the specified data source.

updateRecordAsync<TRequest, TResponse>(string, string, TRequest)

Updates an existing record in the specified data source.

Constructor Details

DefaultDataOperationOrchestrator(DataverseDataOperationExecutor, ConnectorDataOperationExecutor, RuntimeDataSourceService)

new DefaultDataOperationOrchestrator(_dataverseOperation: DataverseDataOperationExecutor, _connectorOperation: ConnectorDataOperationExecutor, _connectionsService: RuntimeDataSourceService)

Parameters

_dataverseOperation
DataverseDataOperationExecutor
_connectorOperation
ConnectorDataOperationExecutor
_connectionsService
RuntimeDataSourceService

Method Details

createRecordAsync<TRequest, TResponse>(string, TRequest)

Creates a new record in the specified data source.

function createRecordAsync<TRequest, TResponse>(tableName: string, data: TRequest): Promise<IOperationResult<TResponse>>

Parameters

tableName

string

The name of the table.

data

TRequest

The record data to create.

Returns

Promise<IOperationResult<TResponse>>

A promise that resolves to the operation result.

deleteRecordAsync(string, string)

Deletes a record from the specified data source.

function deleteRecordAsync(tableName: string, id: string): Promise<IOperationResult<void>>

Parameters

tableName

string

The name of the table.

id

string

The ID of the record to delete.

Returns

Promise<IOperationResult<void>>

A promise that resolves to the operation result.

executeAsync<TRequest, TResponse>(IDataOperation<TRequest>)

Executes a data operation on the specified data source.

function executeAsync<TRequest, TResponse>(operation: IDataOperation<TRequest>): Promise<IOperationResult<TResponse>>

Parameters

operation

IDataOperation<TRequest>

The operation to execute

Returns

Promise<IOperationResult<TResponse>>

A promise that resolves to the operation result.

retrieveMultipleRecordsAsync<TResponse>(string, IOperationOptions)

Retrieves multiple records from the specified data source.

function retrieveMultipleRecordsAsync<TResponse>(tableName: string, options?: IOperationOptions): Promise<IOperationResult<TResponse[]>>

Parameters

tableName

string

The name of the table.

options
IOperationOptions

Optional operation options.

Returns

Promise<IOperationResult<TResponse[]>>

A promise that resolves to the operation result.

retrieveRecordAsync<TResponse>(string, string, IOperationOptions)

Retrieves a record from the specified data source.

function retrieveRecordAsync<TResponse>(tableName: string, id: string, options?: IOperationOptions): Promise<IOperationResult<TResponse>>

Parameters

tableName

string

The name of the table.

id

string

The ID of the record to retrieve.

options
IOperationOptions

Optional operation options.

Returns

Promise<IOperationResult<TResponse>>

A promise that resolves to the operation result.

updateRecordAsync<TRequest, TResponse>(string, string, TRequest)

Updates an existing record in the specified data source.

function updateRecordAsync<TRequest, TResponse>(tableName: string, id: string, data: TRequest): Promise<IOperationResult<TResponse>>

Parameters

tableName

string

The name of the table.

id

string

The ID of the record to update.

data

TRequest

The updated record data.

Returns

Promise<IOperationResult<TResponse>>

A promise that resolves to the operation result.