Expand description
Export writer for mushroomdb export.
Supports five formats:
jsonl: nodes.jsonl, edges.jsonl, rules.jsonl (always deterministic)csv: nodes.csv and relationships.csv, the filesmushroomdb import --nodes/--relationshipsreads, with typed headers (age:int); plus rules.jsonl when the store has rulescypher: graph.cypher, one statement per line, that this engine’s own query language reads backparquet: nodes.parquet, edges.parquet, rules.parquet (byte-identical output is NOT guaranteed across parquet-rs versions; use JSONL when byte-stable reproducibility is required)graphml: a single.graphmlfile (nodes + edges only; rules have no GraphML analogue) for import into generic graph viewers and analysis tools
Two runs on the same store state produce byte-identical JSONL and GraphML output (sorted by key / (edge_type, src, dst) / name — callers must pre-sort the slices).
§Float precision loss
Value::Float values that are NaN or ±Inf are not representable in JSON
or in GraphML’s numeric attribute types. They are serialised as JSON
null (JSONL) or an empty <data> element (GraphML) rather than causing
the export to fail. This is a lossy mapping; the original value is
irrecoverable from the export. Stores that need exact float fidelity
should use the binary backup command instead of export.
Structs§
- Cypher
Loss - What a Cypher export could not write, counted; the statements it did write are all valid.
- Export
Stats - What a streamed export wrote.
- Slices
- Sorted slices as a source, for callers that already hold them.
Enums§
- Export
Format - Accepted export formats.
Traits§
- Export
Source - Where an export reads the store from: node by node and edge by edge, so an
export holds one record at a time (see
mushroomdb::GraphDb::for_each_node_for_export). Nodes arrive sorted by key and edges by(edge_type, src, dst).
Functions§
- write_
csv - Write
nodes.csvandrelationships.csvtodest, plusrules.jsonlwhen there are rules. - write_
cypher - Write
graph.cyphertodest: one statement per line, no terminator, the waymushroomdb query --fileand--stdintake one. Nodes first, then manual edges. - write_
graphml - Write a single GraphML file describing
nodesandedges. - write_
jsonl - Write JSONL files to
dest: nodes.jsonl, edges.jsonl, rules.jsonl. - write_
jsonl_ single - Write one file,
<dest>/graph.jsonl: every node, then every edge, then every rule, each line an object whose"type"isnode,edgeorrule. - write_
parquet - Write parquet files to
dest: nodes.parquet, edges.parquet, rules.parquet.