Documentation
¶
Overview ¶
Package query is the design query surface (WS3-029): Datalog over the design's fact base, so an engineer runs ad-hoc queries ("search your whole design as relations, including datasheets") and every answer carries the provenance of the facts that produced it. Rules and search share one vocabulary, since a rule asserts a property over these relations and a search is an arbitrary query over the same ones.
The engine itself lives in github.com/panyam/jaala/datalog (agni issue 731), which knows nothing about circuits. This package is agni's adapter over it:
- a Source projecting a check.Model through a facts.Registry, so every relation the fact layer registers is queryable (source.go);
- agni's own uses of queries: RuleFromQuery, the wire form, the catalog, and the teaching examples.
Every name a query calls (relations, predicates, modules) is registered in the fact layer's vocabulary (facts.Registry.Vocabulary), so this package adds no names of its own. The circuit walks net.reaches and net.route live with the relations, in stdlib/relations.
The types are aliases for the engine's, so a Query built here is the engine's Query and nothing converts at the boundary.
The package stays WASM-clean (the engine imports only the standard library, and this adapter only check, facts and the generated IR), so the whole chain read → Model → facts → query runs client-side in the browser.
Index ¶
- Constants
- Variables
- func Bind(vals map[string]Value) datalog.Option
- func BudgetOf(ctx context.Context) int64
- func Display(v Value) string
- func EvalOptions(ctx context.Context) []datalog.Option
- func Explain(r *ExplainReport) datalog.Option
- func FindingQueryProto(fq FindingQuery) *checkspb.QueryRule
- func FormatBindings(vals map[string]Value) []string
- func ModuleMembers(text string) ([]string, error)
- func MustRuleFromQuery(fq FindingQuery) *check.Rule
- func NarrowBudget(ctx context.Context, work int64) context.Context
- func NonInjectiveRules(q Query) []string
- func QueryProto(q Query) *checkspb.DatalogQuery
- func Reads(q Query) []string
- func ReadsFrom(reg *facts.Registry, q Query) []string
- func RuleFromQuery(fq FindingQuery) (*check.Rule, error)
- func Total(n *int) datalog.Option
- func Validate(q Query, reg *facts.Registry) error
- func ValidateRelations(q Query) error
- func ValidateRelationsFrom(reg *facts.Registry, q Query) error
- func WithBudget(ctx context.Context, work int64) context.Context
- type Aggregate
- type Atom
- type Base
- type Body
- type BodyAggregate
- type BudgetExceeded
- type ColumnKind
- type Compare
- type ContextVar
- type Domain
- type EntityQuery
- type Entry
- type Evaluator
- type ExampleQuery
- type ExplainReport
- type Expr
- type FindingQuery
- type Literal
- type Naive
- type NamedQuery
- type Order
- type Query
- type QuerySet
- type RelationInfo
- type Row
- type Rule
- type SearchQuery
- type SemiNaive
- type Table
- type Term
- type TupleVar
- type Value
- type Var
Constants ¶
const ( KindNetlist = facts.KindNetlist KindBoard = facts.KindBoard KindDatasheet = facts.KindDatasheet KindPredicate = facts.KindPredicate KindDerived = facts.KindDerived KindExtension = facts.KindExtension )
Relation kinds and their display order, re-exported so a caller rendering this engine's catalog need not import the fact layer for the grouping labels alone.
Variables ¶
var CompileGlob = stdlib.CompileGlob
CompileGlob compiles a shell-style glob the way the str.glob predicate does, for a Go caller that must match the same pattern the same way.
var CompilePattern = stdlib.CompilePattern
CompilePattern compiles a regular expression the way the str.match predicate does.
var KindOrder = facts.KindOrder
KindOrder is the display order of the kind groups, most-common first.
Functions ¶
func Bind ¶ added in v0.2.2
Bind gives goal variables values from the caller, so a query asked about one net or part is the same text every time and carries the value as data. A bound variable answers exactly as the same constant written into the goal. Names may carry their leading `?` or not. The engine refuses a name the goal does not use when the query is evaluated, so a misspelled binding fails rather than leaving the variable free.
func Display ¶ added in v0.2.2
Display is a value as a person reads it in an answer: a cell, a csv field, a rule's message.
A length is published in metres (see stdlib/relations), so a 0.08 mm track is the value 8e-05 with base unit m, and a threshold written `0.1mm`, which the engine folds to metres, compares against it correctly. A board is drawn in millimetres, so Display shows a length in millimetres again, and the cell's number is then the one the board's own tools print. Every other value is shown as the engine holds it (agni issue 1035).
Twelve significant digits drop the noise of scaling by 1000, so 0.1524 mm reads 0.1524 and not 0.15240000000000004.
func EvalOptions ¶ added in v0.2.2
EvalOptions are the engine options the context asks for: its budget, when it carries one. Every evaluation agni runs for a caller passes them, so a budget set once on the context reaches each.
func Explain ¶ added in v0.2.2
func Explain(r *ExplainReport) datalog.Option
Explain asks an evaluation to fill r with its plan. It costs time in proportion to the rules and literals a query runs, not its tuples, so `agni query --explain` and a timed request can afford it.
func FindingQueryProto ¶
func FindingQueryProto(fq FindingQuery) *checkspb.QueryRule
FindingQueryProto encodes the row-to-finding mapping that turns a datalog program into a rule.
func FormatBindings ¶ added in v0.2.2
FormatBindings renders bound values as a query would spell them, `?n = "GND"` or `?v = 3.3`, sorted by name, so a rendered view states the values beside its query.
func ModuleMembers ¶ added in v0.2.2
ModuleMembers reports the public members a Datalog module's text defines, by bare name, so a host can check a module's paths against a vocabulary before composing it. An error is a module that does not parse, or that the language refuses on its own terms.
func MustRuleFromQuery ¶ added in v0.2.0
func MustRuleFromQuery(fq FindingQuery) *check.Rule
MustRuleFromQuery is RuleFromQuery for a query that ships as CODE, panicking if it does not compile.
A built-in rule or a compiled profile carries a query this repo's tests run, so one that does not validate is a programmer error. A package-level `var r = RuleFromQuery(q)` has nowhere to return an error to, so it panics at init rather than dropping the error. profiles.Compile panics on a malformed profile for the same reason.
func NarrowBudget ¶ added in v0.2.2
NarrowBudget returns ctx with its budget lowered to work when work is smaller, or set to work when ctx carries none. It never raises a budget, which is what lets a request ask for less than a deployment allows and never more. Zero or less leaves ctx as it is.
func NonInjectiveRules ¶
NonInjectiveRules reports rules whose body lets two variables in the same position of the same relation bind the same value with nothing separating them. See the engine's documentation.
func QueryProto ¶
func QueryProto(q Query) *checkspb.DatalogQuery
QueryProto encodes a datalog program as its wire form.
func Reads ¶
Reads returns the fact-base relations a query references, sorted and deduped. A query-backed rule declares these as the facts it reads, and check.Available gates on them for params and board.
func ReadsFrom ¶ added in v0.2.0
ReadsFrom is Reads over an explicit relation vocabulary, for a caller composing its own.
func RuleFromQuery ¶
func RuleFromQuery(fq FindingQuery) (*check.Rule, error)
RuleFromQuery compiles a FindingQuery into a check.Rule whose Eval runs the query over a design and maps each answer row to a Finding. The Finding's Prov is resolved from the Model by subject, so a query-backed finding stays as locatable as a hand-written one.
IT VALIDATES THE QUERY AND REPORTS WHY IT CANNOT RUN, so a misspelled relation is an error at construction rather than an empty answer that reads as a CLEAN PASS (agni issue 540).
Use it where the query came from a person (a review manifest, a wire RuleDef, an overlay). For a query written into this repo as code, use MustRuleFromQuery.
func Total ¶ added in v0.2.2
Total asks an evaluation to set *n to how many rows its answer has before any offset and limit, so a caller showing the first rows can say how many it left out (agni issue 896). A limit with no order by then solves the whole goal, since counting needs every row, though it still keeps only the rows it returns.
func Validate ¶ added in v0.2.0
Validate reports why a query cannot run, reading only the query and the relation vocabulary it would run against. No design, no rows.
Without it a rule compiled from a query fails only when it runs, where the failure is swallowed into a clean pass (agni issue 540). A registry with no relation installed still validates everything that needs no vocabulary, because stdlib/profiles compiles its built-in profiles in an init() that runs before any relation catalog has registered.
func ValidateRelations ¶
ValidateRelations reports the first relation the program names that is neither a catalog relation (a fact relation or a computed built-in) nor defined by one of the program's own rules. It is the static half of the checks the evaluator makes, hoisted so a definition read from a document fails when it is READ rather than running to a silent empty answer.
It cannot see relations a not-yet-imported source registers, so it is applied where a program arrives from outside (decoding a definition), not to programs this build constructs.
func ValidateRelationsFrom ¶ added in v0.2.0
ValidateRelationsFrom is ValidateRelations over an explicit relation vocabulary.
func WithBudget ¶ added in v0.2.2
WithBudget returns ctx carrying a work budget for every query evaluated under it (agni issue 792): a served query's own, and each query a check or review's query-backed rules evaluate. Work is what Base.Work counts, candidate comparisons plus each row a generator emits. Zero or less carries no budget, so an unbudgeted context stays unbudgeted.
A budget applies per evaluation, so each query in a set, and each rule in a run, has the whole of it rather than sharing one.
Types ¶
type Aggregate ¶
The query IR. See the engine's documentation for each; they are aliases, not copies.
type Base ¶
Base is a design's queryable fact base. Build one with NewBase.
func NewBase ¶
NewBase projects a Model into its fact base over the process-default relation vocabulary. Use NewBaseFrom to supply one explicitly.
A binary that installs no relation catalog gets an EMPTY base, which looks like a query that matched nothing. Registry.Installed separates the two.
func NewBaseFrom ¶ added in v0.2.0
NewBaseFrom projects a Model into its fact base over the given relation vocabulary and indexes it for querying. The registry is captured, so what this base can answer is fixed at construction.
func NewSpecLibBase ¶
func NewSpecLibBase(fs param.FactSource) *Base
NewSpecLibBase builds a fact base over a whole seeded datasheet corpus with NO design (WS10-010). The datasheet relations (`param.max`, `part.audience`) project over every PartSpec the FactSource yields, so `agni query --speclib` searches the spec library rather than one design's parts. Model-dependent relations and predicates (net.*, component.*, net.reaches) yield nothing.
func NewSpecLibBaseFrom ¶ added in v0.2.0
func NewSpecLibBaseFrom(reg *facts.Registry, fs param.FactSource) *Base
NewSpecLibBaseFrom is NewSpecLibBase over an explicit relation vocabulary.
type BodyAggregate ¶ added in v0.2.2
type BodyAggregate = datalog.BodyAggregate
BodyAggregate is an aggregate bound inside a clause: `?c = count(?n) : { pin(?r, ?n, _) }`.
type BudgetExceeded ¶ added in v0.2.2
type BudgetExceeded = datalog.BudgetExceeded
BudgetExceeded is the error an evaluation stops with once its work passes its budget. A host tells it apart from a query that is wrong with errors.As, since running out of budget says the question was too expensive here, not that it was badly asked.
type ColumnKind ¶ added in v0.2.2
type ColumnKind = datalog.ColumnKind
ColumnKind says what one answer column denotes. See the engine's documentation.
func ColumnKinds ¶ added in v0.2.2
func ColumnKinds(q Query) ([]ColumnKind, error)
ColumnKinds reports what each answer column of q denotes over the process-default vocabulary, read from the signatures its relations and predicates declare and inferred through the query's rules.
func ColumnKindsFrom ¶ added in v0.2.2
func ColumnKindsFrom(reg *facts.Registry, q Query) ([]ColumnKind, error)
ColumnKindsFrom is ColumnKinds over an explicit relation vocabulary.
type ContextVar ¶ added in v0.2.0
type ContextVar struct {
Var string // projected variable name, no leading "?"
Kind string // check.KindNet | check.KindComponent | check.KindPin | check.KindBus
Role string // the part it plays in the message ("terminal", "rail", "source")
}
ContextVar binds one projected datalog variable to a context entity on every finding a rule emits.
Kind is the entity's subject kind, which is NOT inferable from the variable, because the same projected column could be a net name or a ref des depending on the relation it came from. A wrong Kind produces a chip that highlights nothing, so it is required rather than defaulted.
func ContextVarsFromProto ¶ added in v0.2.0
func ContextVarsFromProto(ps []*checkspb.ContextVar) []ContextVar
ContextVarsFromProto decodes a rule's context-variable bindings, preserving order.
type Domain ¶ added in v0.2.0
type Domain struct {
// Query is the compiled domain program. It shares the finding query's rule set by convention
// rather than by construction, since a scope goal usually needs one rule of its own (the finding
// goal's body with the failing condition dropped).
Query Query
// Witness is the template for a passing verdict's statement, interpolated from the domain row the
// same way Message is from a finding row. REQUIRED when Domain is set.
//
// It may assert the positive condition ("{n} reaches an ESD clamp") even though the domain goal
// does not prove it, because a subject in the domain and not in the failures is one the finding
// goal declined to report, which for these rules is the good case.
Witness string
// Evidence, when set, names the entities a PASSING subject's proof rests on, through the rule's
// own ContextVars. Its rows are matched to passing subjects by the subject tuple.
//
// It is a third goal rather than a widening of the domain, because the domain is the CONSIDERED
// SET, passing and failing alike, and a failing subject has no proof to bind. So one query cannot
// both enumerate the failures and bind the evidence (agni issue 662). The Go-walk requirements get
// the same thing from check.PullUpVerdict, which returns its hops as entities.
//
// Optional. A passing subject with no evidence row keeps an empty context, since some requirements
// prove a negative and have nothing to point at.
Evidence *Query
}
Domain is a rule's considered set, expressed as a goal over the same datalog program as the rule. Its rows must project SubjectVar, PinVar and every TupleVar, so a domain row and a finding row key the same way and the passing subjects are the difference between them.
type EntityQuery ¶ added in v0.2.0
type EntityQuery struct {
Kind string // "pin" | "component" | "net" | "bus", matching a picked selection's kind
Label string // the question as the Ask row words it, unique within its kind
Query string
Binds []string
Teaches string // the concept this preset introduces, shown the way an example's is
}
EntityQuery is one question about one entity kind. The caller BINDS the variables Binds names from the selection (agni issue 793) rather than splicing values into the text, so the query is the same for every selection and a designator holding a quote is asked about exactly. Each name is also the selection field that fills it: ref, pin, net, or bus.
Binds is explicit rather than every field a selection carries, because one preset's input is another's output. The pin preset answers ?net and the net preset is asked about one.
func EntityQueries ¶ added in v0.2.0
func EntityQueries() []EntityQuery
EntityQueries returns the questions for every entity kind a viewer can select, grouped by kind. The first question of a kind is its default, the one a viewer asks when it offers only one.
type Entry ¶ added in v0.2.2
Entry is what sits at one path of the vocabulary: a module and its members, or a member with its signature, kind, doc and, for a derived relation, its definition. See ns.Entry.
type Evaluator ¶
Evaluator answers a Query over a Base.
Default is the evaluator every agni surface answers with: the engine's semi-naive fixpoint, which plans each rule body, inlines single-rule relations, and derives a relation called with a bound argument only for the values the query demands. It answers as Naive does (the engine tests the two against each other); what differs is cost, and that a body's written order no longer decides it, so a rule opening with an unbound walk is reordered rather than walking from every net (WS3-114).
Citations can differ from Naive's on a recursive relation reachable two ways, since the rounds run in a different order; rows never do.
type ExampleQuery ¶
type ExampleQuery struct {
Label string // plain-language intent, shown on the chip ("Parts on a rail above 3V")
Query string // the datalog text the chip fills and runs
Teaches string // the one concept this rung introduces ("join", "filter", ...)
}
ExampleQuery is one runnable teaching query (WS14-002): a plain-language intent, the datalog text that answers it, and the one concept it introduces. It is the shared catalog behind BOTH the web panel's click-to-run examples and the CLI's `agni query --examples`, so the two surfaces cannot drift.
func Examples ¶
func Examples() []ExampleQuery
Examples returns the shared teaching-query catalog (WS14-002), in concept-ladder order. The web panel and the CLI both read this one source.
type ExplainReport ¶ added in v0.2.2
ExplainReport is what an evaluation asked to explain itself fills: the plan each rule body ran in, where its work went, and how each relation was read (jaala's Explain, panyam/jaala#147).
type Expr ¶ added in v0.2.2
Expr is arithmetic or a function call, legal as a comparison's operand: `?w = ?v * ?i`.
type FindingQuery ¶
type FindingQuery struct {
Rule check.Rule
Query Query
// Vocabulary is what the query's names resolve against: the shipped relations and library, plus
// whatever library the run carries, a project's lib/ or modules sent with the request (agni issues
// 779, 788). The rule validates, declares what it reads, and evaluates against it. Nil is the
// process default, which is right for a query written into this repo.
Vocabulary *facts.Registry
Kind string // check.KindNet | check.KindComponent | check.KindPin
SubjectVar string // projected variable name (no leading ?) bound to Finding.Subject
PinVar string // projected variable name bound to Finding.Pin (KindPin only; "" otherwise)
Message string // template; each {var} is replaced by that variable's bound value in the row
// ParamSymbol, when set on a component-subject datasheet rule, names the datasheet symbol the rule
// checks (e.g. "IOUT"). RuleFromQuery then resolves that parameter's citation from the subject's
// seeded spec and attaches it to Finding.DatasheetProv, so a datalog-authored datasheet finding
// carries the same doc/page/section/confidence a built-in datasheet rule does. Empty = no citation.
ParamSymbol string
// ContextVars are further projected variables to carry as each finding's CONTEXT entities, the
// entities the message names but is not about (agni issue 349). Empty for a rule whose message
// names only its subject, which is most of them.
//
// A SLICE rather than a map keyed by role, because order is significant (chips render in the order
// the message names them) and two entities may share a role ("A and B both strap to address N").
// See docsite/content/build/check-rule.md#if-the-sentence-names-two-entities-carry-both.
ContextVars []ContextVar
// TupleVars are further projected variables that join SubjectVar to form the VERDICT's subject
// tuple, in the rule's own order. Empty for the ordinary one-subject case.
//
// Not ContextVars, because a context entity is something the message NAMES and a tuple element is
// part of what the verdict IS, and so of its id. A rule reporting one row per (host, required
// signal) needs the signal here, or every row for one host answers to one name. Finding.Subject
// stays singular either way
// (docsite/content/build/check-rule.md#a-tuple-in-the-verdict-one-entity-in-the-finding).
TupleVars []TupleVar
// Domain, when set, declares the rule's CONSIDERED SET as a second goal beside the finding goal.
// Its rows are every subject the rule examined, where the finding goal's rows are the subset that
// came out wrong (agni issue 424). Unset keeps the failures-only shape, which under-reports the rule
// and never overstates it.
//
// DECLARED RATHER THAN DERIVED. For the ESD and pull-up requirements the domain is the finding
// goal's body minus its negated literal, but signal-dangling ends in a comparison, so deriving its
// domain would report the failures AS the considered set, the false coverage claim
// StatesConsideredSet exists to prevent.
Domain *Domain
}
FindingQuery declares a datalog-backed check rule (WS3-038), a datalog program whose every answer row becomes a check.Finding. It is how a datalog query becomes a catalog rule with a severity, a subject and a doc, rather than only an ad-hoc search.
Rule carries the rule's identity and metadata (Name, Severity, Summary, Tags, Detail, Reads); RuleFromQuery fills its Eval. Query is the COMPILED datalog program (WS3-043), produced by the caller with MustParse for a hand-authored string or Build for a generated AST. The goal MUST project SubjectVar (and PinVar when Kind is KindPin). Message is a template whose {var} placeholders are filled from each answer row. If Rule.Reads is empty it is derived from the query (the EDB relations it reads), so check.Available gates it correctly.
type Literal ¶
The query IR. See the engine's documentation for each; they are aliases, not copies.
type Naive ¶
Naive is the engine's reference evaluator: rule bodies run in written order and derived relations are computed in full. Tests compare against it; agni answers with Default.
type NamedQuery ¶ added in v0.2.2
type NamedQuery struct {
Name string `yaml:"name"`
Query string `yaml:"query"`
Description string `yaml:"description"`
// Bind gives this query's goal variables values (agni issue 793), as RunQueryRequest's bindings
// do. YAML types each value, so `3.3` binds a number and `"3"` or `GND` binds text.
Bind map[string]Value `yaml:"-"`
}
A NamedQuery is one entry of a QuerySet. Name identifies it in the answer and must be unique in its set; Description is carried into the rendered report for the reader.
func (*NamedQuery) UnmarshalYAML ¶ added in v0.2.2
func (q *NamedQuery) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML reads a query's `bind:` map into typed values. A list or a map is refused, since a bound variable holds one scalar as a constant in the goal does.
A key it does not know is refused with its line, as ParseQuerySet refuses one at the top. A custom decoder does not inherit the decoder's KnownFields, so a misspelled `descripton:` used to drop the description with no error.
type Query ¶
The query IR. See the engine's documentation for each; they are aliases, not copies.
func Build ¶
Build assembles a Query from its rules, the goal literals to solve, and the projected answer terms.
func MustParse ¶
MustParse parses a query string and panics on error, for hand-authored rules constructed at package init, where a malformed built-in query is a programming error surfaced at startup.
func QueryFromProto ¶
func QueryFromProto(p *checkspb.DatalogQuery) (Query, error)
QueryFromProto decodes a datalog program and rejects one that names a relation this build does not know, suggesting the closest catalog name when the miss looks like a typo. The check is static (no design is loaded), so it catches an author's mistake at read time rather than presenting an empty answer as a clean result.
type QuerySet ¶ added in v0.2.2
type QuerySet struct {
Title string `yaml:"title"`
Preamble string `yaml:"preamble"`
Queries []NamedQuery `yaml:"queries"`
}
A QuerySet is a named list of queries answered over one read of a design (agni issue 729), so an audit workbook is versioned together, shares derived relations, and costs one read of the design instead of one per question.
Preamble holds rules every query may use, the derived relations the set shares. It holds rules only; each query brings its own goal.
func ParseQuerySet ¶ added in v0.2.2
ParseQuerySet reads a query set from YAML and validates it. An unknown key is an error, because a misspelled `preamble` would otherwise drop the shared rules silently and every query using them would fail for a reason nowhere in its own text.
func (QuerySet) Compile ¶ added in v0.2.2
Compile returns the i'th query with the preamble's rules in front of it, ready to evaluate.
func (QuerySet) Validate ¶ added in v0.2.2
Validate reports what makes a set unusable as a whole: no queries, a query with no name or no text, a repeated name, or a preamble that is not rules alone. It does NOT compile the queries, so one bad query is reported against its name when the set runs while the rest still answer.
type RelationInfo ¶
type RelationInfo = facts.RelationInfo
RelationInfo describes one queryable relation or predicate for discovery surfaces. It is an alias for the fact layer's type, because a picker showing relations and predicates in one list must not have to reconcile two shapes for the same row.
func Catalog ¶
func Catalog() []RelationInfo
Catalog returns this engine's discoverable construct set: every fact-base relation, every derived relation a library module defines, and every predicate in the fact layer's vocabulary, the engine's own string tests included. The result is sorted by kind (KindOrder) then name, so a caller renders a stable grouped list without re-sorting.
func CatalogFrom ¶ added in v0.2.0
func CatalogFrom(reg *facts.Registry) []RelationInfo
CatalogFrom is Catalog over an explicit relation vocabulary.
type SearchQuery ¶ added in v0.2.0
type SearchQuery struct {
Query string
// Bind names the variable the caller binds, without its `?`.
Bind string
// Pattern is the value bound to Bind, with {term} standing for the escaped text. It holds the
// (?i) here rather than in each client, so the search is case-insensitive wherever it runs.
Pattern string
Teaches string
}
SearchQuery is the find-by-name template, with Teaches carrying the concept a search leaves behind the way an example's does.
func Search ¶ added in v0.2.0
func Search() SearchQuery
Search returns the find-by-name template. It is one template rather than one per kind, since the answer names each hit's kind in its own column, so a search for "CAN" shows the net, the connector and the bus label together.
type Table ¶ added in v0.2.2
Table is an answer as columns and rows of values (Evaluator.EvalTable).
type TupleVar ¶ added in v0.2.0
type TupleVar struct {
Var string // projected variable name, no leading "?"
Kind string // check.KindNet | check.KindComponent | check.KindSignal | ...
}
TupleVar binds one projected datalog variable to an element of the verdict's subject tuple. Kind is required for the reason it is on ContextVar, since a datalog variable is a bare string binding and nothing about the column says whether it holds a net name, a ref des or a required-signal role.
type Value ¶
The query IR. See the engine's documentation for each; they are aliases, not copies.
func ParseBinding ¶ added in v0.2.2
ParseBinding reads one `name=value` pair, the form `agni query --bind` takes. The value is read as the query language reads a constant: a quoted value is text, one that parses as a number is a number, and any other bare word is text, so `--bind n=GND` needs no quotes. In a position the schema types, the engine then reads the value as that type either way (panyam/jaala#65), so the quoting matters only for a variable nothing types, where `--bind 'n="3"'` binds the text.