Skip to main content

Module graph

Module graph 

Source
Expand description

Building a table’s graph sections from the table’s own columns.

This is where the two halves meet. rudb-graph at rank 5 knows what a key map is and knows nothing about a file; the rest of this crate knows how to put an opaque payload in a file and nothing about what one means. Neither of them can build a key map for a real table, because doing that means reading a column back, so it happens here, in the crate that is allowed to see both.

Everything here obeys spec/graph/03-the-file-format.md section 3.1. A column that cannot be mapped is a column with no key map, not an error at open; a section that is stale, torn, or of a form this build does not know is a section that is not there. That is why key_map answers with an Option and not a Result: there is no failure it could report that is not answered by running the query the way it ran before the section existed.

Structs§

Built
What building one key map cost and what it bought.
BuiltLink
What building one forward link cost and what it bought.
Edge
One relationship, with both sides resolved to a table and a column of it.
KeyColumn
One column of a committed table, scanned in rid order.

Constants§

BUDGET_FLOOR
The size below which a table’s graph sections always fit, whatever the share works out to.
BUDGET_SHARE
The share of a table’s stored column bytes its graph sections are allowed to cost together.

Functions§

build_key_map
Builds the key map for one column of a committed table.
build_key_maps
Builds a key map for each of these columns and attaches them all in one commit.
build_key_maps_within
The same, against a budget of share percent of the table’s stored column bytes.
build_links
Builds a forward link for each relationship and attaches each child table’s in one commit.
build_links_within
The same, against a budget of share percent of each child table’s stored column bytes.
key_map
The key map this table carries for a column, when it carries one this build can use.
refused_key_map
What a key map over this column would have cost, when a build measured one and did not keep it.
refused_link
What a forward link for this column would have cost, when a build measured one and did not keep it. The counterpart of stored_link, the way refused_key_map is the counterpart of key_map.
stored_degrees
What the build measured of a relationship’s shape, when the child table carries it.
stored_link
The forward link this child table carries for a column, when it carries one this build can use and the parent it was built against is still the parent being asked about.