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.
- Built
Link - 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
ridorder.
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
sharepercent 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
sharepercent 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 wayrefused_key_mapis the counterpart ofkey_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.