MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / null_bitmap_check

Function null_bitmap_check

nodedb-strict/src/decode.rs:602–619  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

600
601 #[test]
602 fn null_bitmap_check() {
603 let schema = crm_schema();
604 let decoder = TupleDecoder::new(&schema);
605
606 let tuple = encode_crm_row(&[
607 Value::Integer(1),
608 Value::String("x".into()),
609 Value::Null,
610 Value::Decimal(rust_decimal::Decimal::ZERO),
611 Value::Null,
612 ]);
613
614 assert!(!decoder.is_null(&tuple, 0).unwrap()); // id
615 assert!(!decoder.is_null(&tuple, 1).unwrap()); // name
616 assert!(decoder.is_null(&tuple, 2).unwrap()); // email
617 assert!(!decoder.is_null(&tuple, 3).unwrap()); // balance
618 assert!(decoder.is_null(&tuple, 4).unwrap()); // active
619 }
620
621 #[test]
622 fn column_out_of_range() {

Callers

nothing calls this directly

Calls 2

encode_crm_rowFunction · 0.85
crm_schemaFunction · 0.70

Tested by

no test coverage detected