Skip to main content

uqa_sql/catalog/
session.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7use std::sync::Arc;
8
9/// A cursor's declaration metadata, independent of its executable and retained rows.
10#[derive(Clone)]
11pub struct CursorMetadata {
12    pub name: String,
13    pub source_sql: Option<Arc<str>>,
14    pub is_holdable: bool,
15    pub is_binary: bool,
16    pub is_scrollable: bool,
17    pub created_at_micros: i64,
18}
19
20/// Session catalog data without executable plans or planner ownership.
21pub struct PreparedStatementMetadata {
22    pub name: String,
23    pub parameter_types: Vec<Option<crate::ColumnType>>,
24    pub result_types: Option<Vec<Option<crate::ColumnType>>>,
25    pub source_sql: Option<Arc<str>>,
26    pub prepared_at_micros: i64,
27    pub from_sql: bool,
28    pub generic_plans: i64,
29    pub custom_plans: i64,
30}