Function fetch_all

Source
pub async fn fetch_all<P, R>(
    client: &Client,
    params: P,
) -> Result<Vec<R>, Error>
where P: SqlQuery<R> + SqlParams + Send + Sync + 'static, R: FromRow + Send + Sync + 'static,
Expand description

§fetch_all

Retrieves multiple records from the database.

§Parameters

  • client: Database connection object
  • params: Query parameter object (must implement SqlQuery, FromRow, and SqlParams traits)

§Return Value

  • Result<Vec<T>, Error>: On success, returns the list of found records; on failure, returns Error