update

abstract suspend fun update(context: QueryExecutor, entity: T): DbResult<T>(source)

Updates the given entity in the data source using the specified driver context.

This method performs an asynchronous update operation and returns the result. If the operation is successful, the result will contain the updated entity. In case of failure, the result contains the error details.

Return

A DbResult containing the updated entity of type T if the operation is successful, or an error if the operation fails.

Parameters

context

The database driver context used to execute the update operation.

entity

The entity of type T to be updated in the data source.