athena_rs 3.26.1

Hyper performant polyglot Database driver
Documentation
//! Observed-table contract types for `/debug/schema`.
//!
//! This module owns the relation/column diagnostics payload contract and
//! relation-keyed map alias used during observed-schema evaluation.

use serde::Serialize;
use std::collections::BTreeMap;

/// Observed table (plus discovered columns) for logging-client schema diagnostics.
#[derive(Debug, Clone, Serialize)]
pub struct LoggingSchemaObservedTable {
    /// Schema name.
    pub table_schema: String,
    /// Table name.
    pub table_name: String,
    /// Relation type (`BASE TABLE` / `VIEW`).
    pub relation_type: String,
    /// Discovered column names.
    pub columns: Vec<String>,
}

/// Relation-keyed map of observed logging tables.
pub(super) type ObservedTablesMap = BTreeMap<String, LoggingSchemaObservedTable>;