()
| 180 | |
| 181 | #[test] |
| 182 | fn test_insert_with_numeric_values() { |
| 183 | let conn = setup_test_db(); |
| 184 | |
| 185 | // INSERT with VALUES |
| 186 | let sql = "INSERT INTO products (name, price, discount) VALUES ('Test', 99.99, 10.5)"; |
| 187 | let result = rewrite_query(&conn, sql).unwrap(); |
| 188 | // INSERT values shouldn't be rewritten in this simple case |
| 189 | assert!(!result.contains("decimal_")); |
| 190 | |
| 191 | // INSERT with SELECT |
| 192 | let sql = "INSERT INTO products (name, price) SELECT name, price * 1.1 FROM products"; |
| 193 | let result = rewrite_query(&conn, sql).unwrap(); |
| 194 | assert!(result.contains("decimal_mul")); |
| 195 | } |
| 196 | |
| 197 | #[test] |
| 198 | fn test_update_with_numeric_operations() { |
nothing calls this directly
no test coverage detected