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

Function test_exists_subquery

tests/subquery_cte_test.rs:306–322  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304
305#[test]
306fn test_exists_subquery() {
307 let conn = setup_test_db();
308
309 let sql = "SELECT name
310 FROM customers c
311 WHERE EXISTS (
312 SELECT 1
313 FROM orders o
314 WHERE o.customer_id = c.id
315 AND o.total > 1000
316 )";
317 let result = rewrite_query(&conn, sql).unwrap();
318
319 println!("EXISTS subquery rewritten to: {result}");
320 assert!(result.contains("EXISTS"));
321 assert!(result.contains("decimal_gt"));
322}
323
324#[test]
325fn test_in_subquery() {

Callers

nothing calls this directly

Calls 2

setup_test_dbFunction · 0.70
rewrite_queryFunction · 0.70

Tested by

no test coverage detected