sqruff_lib_core/dialects/
common.rsuse smol_str::SmolStr;
use crate::parser::segments::base::ErasedSegment;
#[derive(Debug, Eq, Hash, Clone)]
#[allow(
clippy::field_reassign_with_default,
clippy::derived_hash_with_manual_eq
)]
pub struct AliasInfo {
pub ref_str: SmolStr,
pub segment: Option<ErasedSegment>,
pub aliased: bool,
pub from_expression_element: ErasedSegment,
pub alias_expression: Option<ErasedSegment>,
pub object_reference: Option<ErasedSegment>,
}
impl PartialEq for AliasInfo {
fn eq(&self, other: &Self) -> bool {
self.ref_str == other.ref_str
&& self.segment == other.segment
&& self.aliased == other.aliased
&& self.from_expression_element == other.from_expression_element
&& self.alias_expression == other.alias_expression
&& self.object_reference == other.object_reference
}
}
#[allow(dead_code)]
#[derive(Clone, Debug)]
pub struct ColumnAliasInfo {
pub alias_identifier_name: SmolStr,
pub aliased_segment: ErasedSegment,
pub column_reference_segments: Vec<ErasedSegment>,
}