Expand description
A lightweight Datalog engine in Rust
The intended design is that one has static Relation
types that are sets
of tuples, and Variable
types that represent monotonically increasing
sets of tuples.
The types are mostly wrappers around Vec<Tuple>
indicating sorted-ness,
and the intent is that this code can be dropped in the middle of an otherwise
normal Rust program, run to completion, and then the results extracted as
vectors again.
Structs§
- Extend
Anti - Wraps a Relation
as a leaper. - Extend
With - Wraps a Relation
as a leaper. - Filter
Anti - Wraps a Relation
as a leaper. - Filter
With - Wraps a Relation
as a leaper. - Iteration
- An iterative context for recursive evaluation.
- Prefix
Filter - A treefrog leaper that tests each of the tuples from the main
input (the “prefix”). Use like
PrefixFilter::from(|tuple| ...)
; if the closure returns true, then the tuple is retained, else it will be ignored. This leaper can be used in isolation in which case it just acts like a filter on the input (the “proposed value” will be()
type). - Relation
- A static, ordered list of key-value pairs.
- Value
Filter - A treefrog leaper based on a predicate of prefix and value.
Use like
ValueFilter::from(|tuple, value| ...)
. The closure should return true ifvalue
ought to be retained. Thevalue
will be a value proposed elsewhere by anextend_with
leaper. - Variable
- An monotonically increasing set of
Tuple
s.
Traits§
- Join
Input - An input that can be used with
from_join
; either aVariable
or aRelation
. - Leaper
- Methods to support treefrog leapjoin.
- Leapers
- Implemented for a tuple of leapers
- Relation
Leaper - Extension method for relations.