pub async fn tx_select_all<'a, T, R, F>(
transaction: Transaction<'a>,
entity: T,
to_model: F,
) -> Result<(Transaction<'a>, Vec<R>), Error>
Expand description
§tx_select_all
Retrieves multiple records using a custom transformation function within a transaction.
§Parameters
transaction
: Active transaction objectentity
: Query parameters (must implement SqlQuery and SqlParams traits)to_model
: Function to transform each row into the desired type
§Return Value
Result<(Transaction<'_>, Vec<R>), Error>
: On success, returns the transaction and the transformed records