Function fetch_all

Source
pub async fn fetch_all<T>(client: &Client, params: T) -> Result<Vec<T>, Error>
where T: SqlQuery + FromRow + SqlParams + 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