Function tx_get

Source
pub async fn tx_get<T>(
    transaction: Transaction<'_>,
    params: T,
) -> Result<(Transaction<'_>, T), Error>
where T: SqlQuery<T> + FromRow + SqlParams + Send + Sync + 'static,
👎Deprecated since 0.2.0: Renamed to tx_fetch. Please use tx_fetch function instead.
Expand description

Retrieves a single record within a transaction.

§Deprecated

This function has been renamed to tx_fetch. Please use tx_fetch instead.

§Arguments

  • transaction - An active transaction
  • params - Data object containing query parameters (must implement SqlQuery, FromRow, and SqlParams traits)

§Return Value

  • Result<(Transaction<'_>, T), Error> - On success, returns the transaction and the record