uqa_sql/semantics/
constraint_catalog.rs1use crate::{
9 ast::{ColumnType, ForeignKey, TableCheck},
10 SQLError,
11};
12pub trait ConstraintCatalog: super::conflict::ConflictCatalog {
13 fn try_unique_columns(&self, table: &str) -> Result<Vec<String>, String>;
14 fn try_check_constraint_definitions(&self, table: &str) -> Result<Vec<TableCheck>, String>;
15 fn try_foreign_keys(&self, table: &str) -> Result<Vec<ForeignKey>, String>;
16 fn column_type(&self, table: &str, column: &str) -> Result<Option<ColumnType>, String>;
17 fn hierarchy_scan_tables(
18 &self,
19 table: &str,
20 descendants: bool,
21 ) -> Result<Vec<String>, SQLError>;
22}