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

Function test_implicit_cast_function_argument

tests/implicit_cast_test.rs:118–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116
117#[test]
118fn test_implicit_cast_function_argument() {
119 let conn = setup_test_db();
120
121 // Test: ROUND(integer_column) should cast to decimal
122 let sql = "SELECT ROUND(quantity) FROM products";
123 let result = rewrite_query(&conn, sql).unwrap();
124
125 // Debug: print the rewritten query
126 println!("Rewritten query: {result}");
127
128 // Should wrap integer column in decimal_from_text
129 assert!(result.contains("decimal_round"));
130 assert!(result.contains("decimal_from_text"));
131}
132
133#[test]
134fn test_implicit_cast_in_where_clause() {

Callers

nothing calls this directly

Calls 2

setup_test_dbFunction · 0.70
rewrite_queryFunction · 0.70

Tested by

no test coverage detected