pub struct QueryConfig {
pub retry: RetryPolicy,
pub poll: PollPolicy,
pub auto_follow: bool,
pub max_auto_rows: Option<u64>,
pub max_auto_bytes: Option<u64>,
}Expand description
Per-instance (and per-call) configuration for the enhanced query: retry, polling, and the auto-follow guards.
Obtain the instance default via Client::query_config
and clone-with-override for a per-call tweak:
// Disable auto-follow for one call — return the bounded preview unchanged.
let cfg = QueryConfig { auto_follow: false, ..client.query_config().clone() };
let preview = client
.query_with(hotdata::models::QueryRequest::new("select 1".into()), None, &cfg)
.await?;Fields§
§retry: RetryPolicy429 retry policy.
poll: PollPolicyResult polling / pagination policy.
auto_follow: boolWhen true (default), a truncated response is followed to its full row
set; when false, the bounded preview is returned unchanged.
max_auto_rows: Option<u64>Row ceiling for auto-follow; None = unbounded on the row axis.
max_auto_bytes: Option<u64>Estimated-byte ceiling for auto-follow; None = unbounded on the byte axis.
Implementations§
Source§impl QueryConfig
impl QueryConfig
Sourcepub fn with_auto_follow(self, auto_follow: bool) -> Self
pub fn with_auto_follow(self, auto_follow: bool) -> Self
Set auto_follow, returning the updated config. Pair
with Client::query_config for a per-call
tweak: client.query_config().clone().with_auto_follow(false).
Sourcepub fn with_max_auto_rows(self, max_auto_rows: Option<u64>) -> Self
pub fn with_max_auto_rows(self, max_auto_rows: Option<u64>) -> Self
Set max_auto_rows (None = unbounded), returning
the updated config.
Sourcepub fn with_max_auto_bytes(self, max_auto_bytes: Option<u64>) -> Self
pub fn with_max_auto_bytes(self, max_auto_bytes: Option<u64>) -> Self
Set max_auto_bytes (None = unbounded),
returning the updated config.
Sourcepub fn with_retry(self, retry: RetryPolicy) -> Self
pub fn with_retry(self, retry: RetryPolicy) -> Self
Set the RetryPolicy, returning the updated config.
Sourcepub fn with_poll(self, poll: PollPolicy) -> Self
pub fn with_poll(self, poll: PollPolicy) -> Self
Set the PollPolicy, returning the updated config.
Trait Implementations§
Source§impl Clone for QueryConfig
impl Clone for QueryConfig
Source§fn clone(&self) -> QueryConfig
fn clone(&self) -> QueryConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more