vibesql_catalog/
lib.rs

1//! Catalog - Schema Metadata Storage
2//!
3//! Provides metadata structures for tables and columns along with the catalog
4//! registry that tracks table schemas.
5
6/// Default schema name for SQLite compatibility.
7/// SQLite uses "main" as the default database/schema name.
8pub const DEFAULT_SCHEMA: &str = "main";
9
10/// Temporary schema name for SQLite compatibility.
11/// SQLite stores temporary tables in a separate "temp" schema.
12/// Temp tables are not persisted and have session scope.
13pub const TEMP_SCHEMA: &str = "temp";
14
15mod advanced_objects;
16mod column;
17mod domain;
18pub mod errors;
19mod foreign_key;
20mod index;
21mod privilege;
22mod schema;
23mod store;
24mod table;
25mod trigger;
26mod type_definition;
27mod view;
28
29pub use advanced_objects::{
30    Assertion, CharacterSet, Collation, Domain, Function, FunctionBody, FunctionParam,
31    ParameterMode, Procedure, ProcedureBody, ProcedureParam, Sequence, SqlSecurity, Translation,
32    UserDefinedType,
33};
34pub use column::ColumnSchema;
35pub use domain::{DomainConstraintDef, DomainDefinition};
36pub use errors::CatalogError;
37pub use foreign_key::{ForeignKeyConstraint, ReferentialAction};
38// Re-export identifiers from vibesql-ast
39pub use index::{IndexMetadata, IndexType, IndexedColumn, SortOrder, VectorDistanceMetric};
40pub use privilege::PrivilegeGrant;
41pub use schema::Schema;
42pub use store::{Catalog, ViewDropBehavior};
43pub use table::{StorageFormat, TableSchema};
44pub use trigger::TriggerDefinition;
45pub use type_definition::{TypeAttribute, TypeDefinition, TypeDefinitionKind};
46pub use vibesql_ast::{ColumnIdentifier, Identifier, TableIdentifier};
47pub use view::ViewDefinition;
48
49#[cfg(test)]
50mod tests;