The JSON query options ({"inputs": [...], "asOf": T, "since": T}) live in
mentat_transaction::options, shared with the DuckDB backend; re-exported
here as mentat::options_from_json.
Represents an in-progress, not yet committed, set of changes to the store.
Call commit to commit your changes, or rollback to discard them.
A transaction is held open until you do so.
Your changes will be implicitly dropped along with this struct.
A keyword is a symbol, optionally with a namespace, that prints with a leading colon.
This concept is imported from Clojure, as it features in EDN and the query
syntax that we use.
An entid that’s either already in the store, or newly allocated to a tempid.
TODO: we’d like to link this in some way to the lifetime of a particular PartitionMap.
Define the inputs to a query. This is in two parts: a set of values known now, and a set of
types known now.
The separate map of types is to allow queries to be algebrized without full knowledge of
the bindings that will be used at execution time.
When built correctly, types is guaranteed to contain the types of values – use
QueryInputs::new or QueryInputs::with_values to construct an instance.
A pull expression expands a binding into a structure. The returned structure
associates attributes named in the input or retrieved from the store with values.
This association is a StructuredMap.
The attribute of each Mentat assertion has a :db/valueType constraining the value to a
particular set. Mentat recognizes the following :db/valueType values.
Take an EDN query string, a reference to an open SQLite connection, a Mentat schema, and an
optional collection of input bindings (which should be keyed by "?varname"), and execute the
query immediately, blocking the current thread.
Returns a structure that corresponds to the kind of input query, populated with TypedValue
instances.
The caller is responsible for ensuring that the SQLite connection has an open transaction if
isolation is required.