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

Function test_schema

nodedb-strict/src/arrow_extract.rs:381–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

379 use crate::encode::TupleEncoder;
380
381 fn test_schema() -> StrictSchema {
382 StrictSchema::new(vec![
383 ColumnDef::required("id", ColumnType::Int64).with_primary_key(),
384 ColumnDef::required("name", ColumnType::String),
385 ColumnDef::nullable("score", ColumnType::Float64),
386 ColumnDef::nullable("active", ColumnType::Bool),
387 ])
388 .unwrap()
389 }
390
391 fn encode_rows(schema: &StrictSchema, rows: &[Vec<Value>]) -> Vec<Vec<u8>> {
392 let encoder = TupleEncoder::new(schema);

Callers 4

extract_int64_columnFunction · 0.70
extract_string_columnFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected