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

Method build_table_schema

src/cache/schema.rs:81–101  ·  view source on GitHub ↗

Build TableSchema from raw column data

(columns: Vec<(String, String, String, i32)>)

Source from the content-addressed store, hash-verified

79
80 /// Build TableSchema from raw column data
81 pub fn build_table_schema(columns: Vec<(String, String, String, i32)>) -> TableSchema {
82 let mut column_infos = Vec::new();
83 let mut column_map = HashMap::new();
84
85 for (name, pg_type, sqlite_type, pg_oid) in columns {
86 let info = ColumnInfo {
87 name: name.clone(),
88 pg_type,
89 pg_oid,
90 sqlite_type,
91 };
92
93 column_map.insert(name.to_lowercase(), info.clone());
94 column_infos.push(info);
95 }
96
97 TableSchema {
98 columns: column_infos,
99 column_map,
100 }
101 }
102
103 /// Check if a table has decimal columns (optimized with bloom filter)
104 pub fn has_decimal_columns(&self, table_name: &str) -> bool {

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected