Skip to main content

QueryResult

Trait QueryResult 

Source
pub trait QueryResult {
    // Required method
    fn rows_affected(&self) -> u64;
}
Expand description

Extracts the affected row count from a backend query result.

sqlx’s Database::QueryResult associated type exposes rows_affected() as an inherent method on each concrete backend type. This trait provides a single generic bound so the blanket Connection impl can call it without knowing the concrete type.

Required Methods§

Source

fn rows_affected(&self) -> u64

Returns the number of rows affected by the executed statement.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl QueryResult for MySqlQueryResult

Source§

impl QueryResult for PgQueryResult

Source§

impl QueryResult for SqliteQueryResult

Implementors§