a74a2deffc
* Pre: clean up core/src/lib.rs. * Pre: use indexmap 1.0 in db and query-projector. * Change rel results to be a RelResult instance, not a Vec<Vec<TypedValue>>. This avoids memory fragmentation and improves locality by using a single heap-allocated vector for all bindings, rather than a separate heap-allocated vector for each row. We hide this abstraction behind the `RelResult` type, which tracks the stride length (width) of each row. * Don't allocate temporary vectors when projecting RelResults. |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
README.md |
This module handles the derivation from an algebrized query of two things:
- A SQL projection: a mapping from columns mentioned in the body of the query to columns in the output.
- A Datalog projection: a function that consumes rows of the appropriate shape (as defined by the SQL projection) to yield one of the four kinds of Datalog query result.
These two must naturally coordinate, and so they are both produced here.