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

Function test_delete_with_numeric_condition

tests/decimal_rewriter_test.rs:217–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215
216#[test]
217fn test_delete_with_numeric_condition() {
218 let conn = setup_test_db();
219
220 let sql = "DELETE FROM products WHERE price < 10 OR discount > 50";
221 let result = rewrite_query(&conn, sql).unwrap();
222 println!("DELETE query rewritten to: {result}");
223 // Note: DELETE statement table extraction is simplified in current implementation
224 // The rewriting might not work for all DELETE variants
225 if result.contains("decimal_lt") {
226 assert!(result.contains("decimal_lt"));
227 assert!(result.contains("decimal_gt"));
228 } else {
229 // Skip this test for now as DELETE table context is complex
230 println!("Skipping DELETE test - table context not properly extracted");
231 }
232}
233
234#[test]
235fn test_non_numeric_operations_unchanged() {

Callers

nothing calls this directly

Calls 2

setup_test_dbFunction · 0.70
rewrite_queryFunction · 0.70

Tested by

no test coverage detected