pub struct Query { /* private fields */ }Expand description
Query structure for building and executing queries
Implementations§
Source§impl Query
impl Query
Sourcepub fn with_query_id(self, query_id: impl Into<String>) -> Self
pub fn with_query_id(self, query_id: impl Into<String>) -> Self
Set the query ID
Sourcepub fn with_setting(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_setting( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Set a query setting with value (no flags)
Sourcepub fn with_setting_flags(
self,
key: impl Into<String>,
value: impl Into<String>,
flags: u64,
) -> Self
pub fn with_setting_flags( self, key: impl Into<String>, value: impl Into<String>, flags: u64, ) -> Self
Set a query setting with value and flags
Sourcepub fn with_important_setting(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_important_setting( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Set an important query setting
Sourcepub fn with_parameter(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_parameter( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Set a query parameter
Sourcepub fn with_tracing_context(self, context: TracingContext) -> Self
pub fn with_tracing_context(self, context: TracingContext) -> Self
Set OpenTelemetry tracing context
Sourcepub fn tracing_context(&self) -> Option<&TracingContext>
pub fn tracing_context(&self) -> Option<&TracingContext>
Get the tracing context
Sourcepub fn settings(&self) -> &QuerySettings
pub fn settings(&self) -> &QuerySettings
Get the settings
Sourcepub fn parameters(&self) -> &HashMap<String, String>
pub fn parameters(&self) -> &HashMap<String, String>
Get the parameters
Sourcepub fn on_progress<F>(self, callback: F) -> Self
pub fn on_progress<F>(self, callback: F) -> Self
Set progress callback
Sourcepub fn on_profile<F>(self, callback: F) -> Self
pub fn on_profile<F>(self, callback: F) -> Self
Set profile callback
Sourcepub fn on_profile_events<F>(self, callback: F) -> Self
pub fn on_profile_events<F>(self, callback: F) -> Self
Set profile events callback
Sourcepub fn on_server_log<F>(self, callback: F) -> Self
pub fn on_server_log<F>(self, callback: F) -> Self
Set server log callback
Sourcepub fn on_exception<F>(self, callback: F) -> Self
pub fn on_exception<F>(self, callback: F) -> Self
Set exception callback
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Query
impl !RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl !UnwindSafe for Query
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