pub mod analyzer;
pub mod completion;
pub mod error;
pub mod extractors;
pub mod generated;
pub mod linter;
pub mod parser;
#[cfg(feature = "templating")]
pub mod templater;
pub mod types;

// Re-export main types and functions
pub use analyzer::{analyze, split_statements};
pub use completion::{completion_context, completion_items};
pub use error::ParseError;
pub use extractors::extract_tables;
pub use linter::config::LintConfig;
pub use parser::{parse_sql, parse_sql_with_dialect};

// Re-export types explicitly
pub use types::{
    // Issue codes
    issue_codes,
    // Request types
    AggregationInfo,
    AnalysisOptions,
    AnalyzeRequest,
    // Response types
    AnalyzeResult,
    CanonicalName,
    CaseSensitivity,
    ColumnSchema,
    CompletionClause,
    CompletionContext,
    CompletionItem,
    CompletionItemCategory,
    CompletionItemKind,
    CompletionItemsResult,
    CompletionRequest,
    ConstraintType,
    Dialect,
    Edge,
    EdgeType,
    FileSource,
    FilterClauseType,
    FilterPredicate,
    ForeignKeyRef,
    Issue,
    IssueAutofix,
    IssueAutofixApplicability,
    IssueCount,
    IssuePatchEdit,
    JoinType,
    // Legacy
    LineageResult,
    Node,
    NodeType,
    ResolutionSource,
    ResolvedColumnSchema,
    ResolvedSchemaMetadata,
    ResolvedSchemaTable,
    SchemaMetadata,
    SchemaNamespaceHint,
    SchemaOrigin,
    SchemaTable,
    Severity,
    Span,
    StatementMeta,
    StatementSplitRequest,
    StatementSplitResult,
    Summary,
    TableConstraintInfo,
};

// Re-export template types when the templating feature is enabled
#[cfg(feature = "templating")]
pub use templater::{TemplateConfig, TemplateError, TemplateMode};

// Test utilities and helper exposure (must be at end of file)
#[cfg(test)]
pub mod test_utils;

#[cfg(test)]
pub mod analyzer_helpers {
    pub use crate::analyzer::helpers;
}
