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

Function test_schema_loading

src/optimization/mod.rs:373–387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

371
372 #[test]
373 fn test_schema_loading() {
374 let manager = OptimizationManager::new(true);
375 let conn = Connection::open_in_memory().unwrap();
376
377 // Create a test table
378 conn.execute("CREATE TABLE test_table (id INTEGER, name TEXT)", []).unwrap();
379
380 // Load schema
381 let schema = manager.get_table_schema(&conn, "test_table").unwrap().unwrap();
382 assert_eq!(schema.columns.len(), 2);
383
384 // Check that cache hit is recorded
385 let stats = manager.get_stats();
386 assert_eq!(stats.schema_cache_hits, 1);
387 }
388
389 #[test]
390 fn test_effectiveness_metrics() {

Callers

nothing calls this directly

Calls 3

executeMethod · 0.45
get_table_schemaMethod · 0.45
get_statsMethod · 0.45

Tested by

no test coverage detected