/// Retrieves an user from the database by its id
/// (id in the Player struct and database).
///
/// Returns None if there is no such player in the database.
/// Returns the Player if it is in the database.
Retrieves an user from the database by its id
(id in the Player struct and database).

Returns None if there is no such player in the database.
Returns the Player if it is in the database.
Retrieves an user from the database by its id ( id in the Player struct and database ) . Returns None if there is no such player in the database . Returns the Player if it is in the database .
pub async fn query_player_by_id(connection: &PgPool, id: i32) -> Option<Player> {
    sqlx::query_as::<_, Player>("SELECT * FROM players WHERE id = $1;")
        .bind(id)
        .fetch_optional(connection)
        .await
        .unwrap_or(None)
}
pub async fn query_player_by_id ( connection : & PgPool , id : i32 ) -> Option < Player > { sqlx :: query_as :: < _ , Player > ( " " ) . bind ( id ) . fetch_optional ( connection ) . await . unwrap_or ( None ) }
Retrieves an user from the database by its id
(id in the Player struct and database).
Retrieves an user from the database by its id ( id in the Player struct and database ) .
connection
&PgPool
id
i32