delete

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

Deletes the given entity from the data source using the specified driver context.

This method performs an asynchronous delete operation and returns the result. If the operation is successful, the result will contain a successful unit value. In case of failure, the result contains the error details.

Return

A DbResult containing a Unit value if the operation is successful, or an error if the operation fails.

Parameters

context

The database driver context used to execute the delete operation.

entity

The entity of type T to be deleted from the data source.