Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub mod metadata_read;
pub mod plugin;
pub mod plugin_manifest;
pub mod query_result_normalization;
pub mod result_column_lineage;
mod runtime_contract;
pub mod rustls_provider;
pub mod schema_preferences;
Expand Down Expand Up @@ -53,6 +54,7 @@ pub use metadata_cache::*;
pub use plugin::*;
pub use plugin_manifest::*;
pub use query_result_normalization::*;
pub use result_column_lineage::*;
pub use rustls_provider::*;
pub use schema_preferences::*;
pub use sql_format::*;
Expand Down
7 changes: 7 additions & 0 deletions crates/db/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::plugin_manifest::{
DatabaseCapabilities, DatabaseUiCapabilities, DatabaseUiManifest, FormSelectOption,
ReferenceDataKind,
};
use crate::result_column_lineage::ResultColumnLineage;
use crate::streaming_parser::StreamingSqlParser;
use crate::types::*;
use anyhow::{Error, Result, anyhow, bail};
Expand Down Expand Up @@ -634,6 +635,12 @@ pub trait DatabasePlugin: Send + Sync {
}
}

/// Analyze result-column lineage so callers can enrich column comments
/// after executing a SELECT query.
fn analyze_result_column_lineage(&self, sql: &str) -> Option<ResultColumnLineage> {
crate::result_column_lineage::analyze_sql_lineage(self.sql_dialect().as_ref(), sql)
}

/// Check if a SELECT query might be editable.
///
/// This compatibility wrapper intentionally exposes only the old
Expand Down
Loading
Loading