pub struct SqlQueryLogBuilder { /* private fields */ }Expand description
Builder for creating SQL query logs.
Implementations§
Source§impl SqlQueryLogBuilder
impl SqlQueryLogBuilder
Sourcepub fn new(query_id: &str, sql: &str, param_count: usize) -> Self
pub fn new(query_id: &str, sql: &str, param_count: usize) -> Self
Create new SQL query log builder.
§Arguments
query_id- Unique identifier for the GraphQL querysql- The SQL statement (will be truncated if > 2000 chars)param_count- Number of bound parameters
Sourcepub fn with_slow_threshold(self, threshold_us: u64) -> Self
pub fn with_slow_threshold(self, threshold_us: u64) -> Self
Set slow query threshold in microseconds.
Sourcepub fn finish_success(self, rows_affected: Option<usize>) -> SqlQueryLog
pub fn finish_success(self, rows_affected: Option<usize>) -> SqlQueryLog
Finish logging and create log entry (successful execution).
Sourcepub fn finish_error(self, error: &str) -> SqlQueryLog
pub fn finish_error(self, error: &str) -> SqlQueryLog
Finish logging and create log entry (failed execution).
Auto Trait Implementations§
impl Freeze for SqlQueryLogBuilder
impl RefUnwindSafe for SqlQueryLogBuilder
impl Send for SqlQueryLogBuilder
impl Sync for SqlQueryLogBuilder
impl Unpin for SqlQueryLogBuilder
impl UnsafeUnpin for SqlQueryLogBuilder
impl UnwindSafe for SqlQueryLogBuilder
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