graflo.db.falkordb.bulk¶
The GRAPH.BULK wire format: binary blobs of nodes of one label or edges of one type.
A blob is a header (the label or type name, a uint32 property count, then the property names, each null-terminated) followed by one entry per element. A node entry is its property values. An edge entry is its source and target node ids (uint64), then its property values. A value is a type byte followed by its payload; a null value means the property is not set.
FalkorDB numbers the nodes of a new graph in the order they are inserted. The fold's dense ids are therefore the node ids, provided every node is sent in dense-id order.
Classes¶
BulkEncodeError
¶
Functions:¶
bulk_args(*, begin, nodes=(), edges=())
¶
The arguments of one GRAPH.BULK call after the graph name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
begin
|
bool
|
The call creates the graph key; only the first call of a load. |
required |
nodes
|
Sequence[tuple[bytes, int]]
|
|
()
|
edges
|
Sequence[tuple[bytes, int]]
|
|
()
|
Source code in graflo/db/falkordb/bulk.py
edge_blob(relation, rows)
¶
Edges of one type, each (source node id, target node id, properties).
Source code in graflo/db/falkordb/bulk.py
encode_value(value)
¶
One property value: its type byte, then its payload.
Source code in graflo/db/falkordb/bulk.py
node_blob(label, docs)
¶
Nodes of one label, in the order they get their ids.