uqa_storage_sqlite/
catalog.rs1use rusqlite::{params, OptionalExtension};
17
18use crate::connection::{ManagedConnection, Result, SQLiteError};
19use uqa_storage::backend::{StorageBackendError, StorageBackendResult};
20use uqa_storage::catalog::{
21 CatalogFacade, CatalogIndexRow, ColumnStatsInput, ColumnStatsRow, EdgeRow, ForeignTableRow,
22 GraphSnapshot, RelationIdentity, RelationKind, SchemaRow, SequenceOptions,
23 SequenceReservationResult, SequenceRow, TableAclEntry, TableSchema, VectorFieldSchema, ViewRow,
24};
25
26use super::catalog_lifecycle::{
27 columns_json_references, delete_table_rows_if_exists, drop_fts_aux_tables_for_field,
28 drop_fts_aux_tables_for_table, quote_sql_identifier, rename_btree_field_rows_or_keep_existing,
29 rename_field_rows_or_keep_existing, rename_fts_aux_tables_for_field, renamed_columns_json,
30 table_exists, update_btree_table_name_rows_if_exists, update_table_name_rows_if_exists,
31};
32
33pub const CURRENT_SCHEMA_VERSION: u32 = 48;
35
36const LEGACY_VIEWS_METADATA_KEY: &str = "sql_views_json";
37const LEGACY_SEQUENCES_METADATA_KEY: &str = "sql_sequences_json";
38
39pub struct Catalog {
40 conn: ManagedConnection,
41}
42
43mod analyzers;
44mod cache_revisions;
45mod facade;
46mod foreign_indexes;
47mod graph;
48mod graph_access;
49mod migration;
50mod models_scoring;
51mod path_index_data;
52mod schema_tables;
53mod sequences_views;
54mod stats;
55
56use migration::{decode_catalog_id, encode_catalog_id, migration_relation};
57
58#[cfg(test)]
59mod tests;