()
| 160 | |
| 161 | #[test] |
| 162 | fn test_implicit_cast_update_assignment() { |
| 163 | let conn = setup_test_db(); |
| 164 | |
| 165 | // Test: UPDATE with implicit cast in SET clause |
| 166 | let sql = "UPDATE products SET price = price * 1.1 WHERE category_id = '5'"; |
| 167 | let result = rewrite_query(&conn, sql).unwrap(); |
| 168 | |
| 169 | // Debug: print the rewritten query |
| 170 | println!("Rewritten UPDATE query: {result}"); |
| 171 | |
| 172 | // Should handle multiplication and comparison |
| 173 | assert!(result.contains("decimal_mul")); |
| 174 | assert!(result.contains("decimal_eq")); |
| 175 | } |
| 176 | |
| 177 | #[test] |
| 178 | fn test_no_implicit_cast_when_types_match() { |
nothing calls this directly
no test coverage detected