pub struct QueryConfig { /* private fields */ }Expand description
Client-side query execution policy.
Controls how this connector behaves while executing queries — for example, how long to wait for Snowflake to return a query response. These settings are enforced entirely on the client side and are never sent to Snowflake.
Implementations§
Source§impl QueryConfig
impl QueryConfig
pub fn new() -> Self
Sourcepub fn with_query_response_timeout(self, timeout: Duration) -> Self
pub fn with_query_response_timeout(self, timeout: Duration) -> Self
Sets the client-side timeout for obtaining a query response from Snowflake.
This bounds how long Session::query() /
Session::query_as() wait for Snowflake to return a query response and for this
connector to build a ResultCursor. It is not specific to async queries: it spans the
initial statement submit and, when Snowflake responds asynchronously, the subsequent result polling as a single
budget that is never reset once polling begins. Defaults to 300s.
This is a client-side timeout only. It does not cancel the query on Snowflake, so the statement may keep
running server-side after the deadline elapses. It also does not cover chunk download or row collection
performed through the returned ResultCursor.
Snowflake can block the initial submit request for up to roughly 45 seconds before responding. Until that
response arrives the connector does not know the query id, so a timeout during submit yields an error whose
Error::query_id() is None. To reliably recover the query id from a timeout error,
set this to more than 45s plus network/server buffer.
Sourcepub fn with_query_cancel_request_timeout(self, timeout: Duration) -> Self
pub fn with_query_cancel_request_timeout(self, timeout: Duration) -> Self
Sets the client-side deadline for an explicit query cancellation request. Defaults to 30s.
The deadline covers abort request transport, response body reading, and bounded transport retries. It is
independent of Self::with_query_response_timeout.
Sourcepub fn with_collect_prefetch_concurrency(
self,
concurrency: NonZeroUsize,
) -> Self
pub fn with_collect_prefetch_concurrency( self, concurrency: NonZeroUsize, ) -> Self
Sets the default number of partitions fetched concurrently during collection. Defaults to 8.
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