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

Method init

src/metadata/mod.rs:23–42  ·  view source on GitHub ↗

Initialize the metadata table

(conn: &Connection)

Source from the content-addressed store, hash-verified

21impl TypeMetadata {
22 /// Initialize the metadata table
23 pub fn init(conn: &Connection) -> Result<()> {
24 conn.execute(
25 "CREATE TABLE IF NOT EXISTS __pgsqlite_schema (
26 table_name TEXT NOT NULL,
27 column_name TEXT NOT NULL,
28 pg_type TEXT NOT NULL,
29 sqlite_type TEXT NOT NULL,
30 PRIMARY KEY (table_name, column_name)
31 )",
32 [],
33 )?;
34
35 // Initialize ENUM metadata tables
36 EnumMetadata::init(conn)?;
37
38 // Initialize ENUM usage tracking table
39 EnumTriggers::init_enum_usage_table(conn).ok();
40
41 Ok(())
42 }
43
44 /// Store type mappings for a table
45 pub fn store_type_mappings(

Callers 1

mainFunction · 0.45

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected