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

Function test_null_handling

tests/decimal_integration_test.rs:290–306  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

288
289#[tokio::test]
290async fn test_null_handling() {
291 let ctx = setup_test_db().await;
292
293 // Insert data with NULLs
294 ctx.execute(
295 "INSERT INTO accounts (name, balance, credit_limit) VALUES
296 ('NullTest', NULL, '1000.00')"
297 ).await.unwrap();
298
299 // Operations with NULL should handle gracefully
300 let result = ctx.query(
301 "SELECT balance + 100, credit_limit - balance FROM accounts WHERE name = 'NullTest'"
302 ).await.unwrap();
303
304 assert_eq!(result.rows.len(), 1);
305 // NULL operations should return NULL
306}
307
308#[tokio::test]
309async fn test_error_handling() {

Callers

nothing calls this directly

Calls 3

setup_test_dbFunction · 0.70
executeMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected