pub struct QueryLog<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> QueryLog<'a>
impl<'a> QueryLog<'a>
Sourcepub fn sql<'v>(
config: &QueryLogConfig,
system: &'static str,
sql: &'a str,
params: impl IntoIterator<Item = &'v Value>,
) -> Self
pub fn sql<'v>( config: &QueryLogConfig, system: &'static str, sql: &'a str, params: impl IntoIterator<Item = &'v Value>, ) -> Self
Starts measuring a SQL statement execution.
Sourcepub fn operation(
config: &QueryLogConfig,
system: &'static str,
operation: &'a str,
collection: Option<&'a str>,
) -> Self
pub fn operation( config: &QueryLogConfig, system: &'static str, operation: &'a str, collection: Option<&'a str>, ) -> Self
Starts measuring a key-value operation execution.
Sourcepub fn rows(&mut self, rows: u64)
pub fn rows(&mut self, rows: u64)
Records the number of rows returned, for drivers that know it before
handing back a stream. Row counts for count-style responses are read
from the ExecResponse in finish automatically.
Sourcepub fn finish(self, result: &Result<ExecResponse>)
pub fn finish(self, result: &Result<ExecResponse>)
Emits the toasty::query event describing result.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QueryLog<'a>
impl<'a> RefUnwindSafe for QueryLog<'a>
impl<'a> Send for QueryLog<'a>
impl<'a> Sync for QueryLog<'a>
impl<'a> Unpin for QueryLog<'a>
impl<'a> UnsafeUnpin for QueryLog<'a>
impl<'a> UnwindSafe for QueryLog<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more