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

Function test_simple_queries_zero_allocation

src/query/unified_processor.rs:532–547  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

530
531 #[test]
532 fn test_simple_queries_zero_allocation() {
533 // These should all return Cow::Borrowed (no allocation)
534 let queries = [
535 "SELECT * FROM users",
536 "SELECT id, name FROM users WHERE id = $1",
537 "INSERT INTO users (name, email) VALUES ($1, $2)",
538 "UPDATE users SET name = $1 WHERE id = $2",
539 "DELETE FROM users WHERE id = $1",
540 "SELECT * FROM benchmark_table_pg WHERE int_col > %s",
541 ];
542
543 for query in &queries {
544 let result = process_query(query, &Connection::open_in_memory().unwrap(), &SchemaCache::new(300));
545 assert!(matches!(result, Ok(Cow::Borrowed(_))));
546 }
547 }
548
549 #[test]
550 fn test_simple_returning_passthrough() {

Callers

nothing calls this directly

Calls 1

process_queryFunction · 0.70

Tested by

no test coverage detected