use super::thread_scope::StatementThreadScope;
#[derive(Clone)]
pub struct StatementThreadContext {
pub temporal_input: uqa_sql::expr::TemporalInputContext,
pub cancellation: Option<uqa_core::CancellationToken>,
}
impl StatementThreadContext {
#[must_use]
pub fn current() -> Self {
Self {
temporal_input: uqa_sql::expr::TemporalInputContext::current(),
cancellation: uqa_sql::expr::statement_cancellation(),
}
}
#[must_use]
pub fn enter(&self) -> StatementThreadScope {
StatementThreadScope::enter(self)
}
}