The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Package dqlhint turns a DQL error reported by the Grail query API into
repair hints: a caret-marked snippet of the offending query text, and — for
a small table of known authoring traps — a corrected query.
The rules are deliberately conservative. Each one fires only when the error
type, its arguments, the reported position, and the query text all agree on
the same mistake; anything less produces no hint. An agent that receives a
wrong "fix" loses more turns than one that receives none.
Snippet renders the query line holding the start of span with a caret line
underneath marking the span. A span that continues on later lines is marked
to the end of its first line. It returns "" when span does not point into
query.
Suggest returns the repair suggestions for a query error, most specific
first. Rewrites are rendered as a runnable `dtctl query '…'` command preceded
by the reason, so the caller learns the rule and not just the fix.
type Error struct {
// Type is the Grail error type, e.g. PARSE_ERROR. Type string// Arguments are the error message's format arguments, e.g. the offending// token or parameter name.
Arguments []string// Query is the query as the backend parsed it; Span indexes into it. Query string Span *Span}
Error is the part of a Grail query error the rules read.
type Span struct {
StartLine, StartColumn int EndLine, EndColumn int}
Span is the offending part of a query: 1-based line and column, measured in
characters, with the end inclusive. A zero EndLine means the end is unknown
and the span covers a single character.