MCPcopy Create free account
hub / github.com/erans/pgsqlite / get_table_schema

Method get_table_schema

src/optimization/mod.rs:104–113  ·  view source on GitHub ↗

Get schema for a table using lazy loading

(&self, conn: &Connection, table_name: &str)

Source from the content-addressed store, hash-verified

102
103 /// Get schema for a table using lazy loading
104 pub fn get_table_schema(&self, conn: &Connection, table_name: &str) -> Result<Option<crate::cache::schema::TableSchema>, rusqlite::Error> {
105 let result = self.lazy_schema_loader.get_schema(conn, table_name)?;
106
107 if result.is_some() {
108 let mut stats = self.optimization_stats.write().unwrap();
109 stats.schema_cache_hits += 1;
110 }
111
112 Ok(result)
113 }
114
115 /// Preload schemas for multiple tables (useful for JOIN queries)
116 pub fn preload_schemas(&self, conn: &Connection, table_names: &[String]) -> Result<(), rusqlite::Error> {

Calls 1

get_schemaMethod · 0.80