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

Function column_out_of_range

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

Source from the content-addressed store, hash-verified

620
621 #[test]
622 fn column_out_of_range() {
623 let schema = crm_schema();
624 let decoder = TupleDecoder::new(&schema);
625 let tuple = encode_crm_row(&[
626 Value::Integer(1),
627 Value::String("x".into()),
628 Value::Null,
629 Value::Decimal(rust_decimal::Decimal::ZERO),
630 Value::Null,
631 ]);
632
633 let err = decoder.extract_value(&tuple, 99).unwrap_err();
634 assert!(matches!(
635 err,
636 StrictError::ColumnOutOfRange { index: 99, .. }
637 ));
638 }
639
640 #[test]
641 fn schema_version_read() {

Callers

nothing calls this directly

Calls 3

encode_crm_rowFunction · 0.85
extract_valueMethod · 0.80
crm_schemaFunction · 0.70

Tested by

no test coverage detected