Field Reference

This page is the authoritative reference for every field available in the sqry query language. Fields are grouped by category. For syntax rules and operators, see Query Syntax.

Symbol Fields

Symbol fields match attributes of individual code symbols.

FieldValues / TypeDescriptionExample
kind:function, class, struct, method, interface, trait, enum, module, constant, variable, type, macro, namespaceThe syntactic kind of the symbol.kind:function
name:String (segment match) or name~=/regex/Symbol name. Bare value does a case-insensitive segment match: name:login matches login, UserLogin, MyClass.login. Use ~= for regex.name:handler, name~=/^test_/
lang:rust, python, typescript, javascript, go, java, c, cpp, csharp, kotlin, swift, scala, ruby, php, lua, r, dart, groovy, elixir, haskell, perl, sql, shell, zig, vue, svelte, html, css, terraform, puppet, pulumi, json, apex, abap, plsql, servicenow-xanadu-js, servicenow-xmlSource language of the file containing the symbol. The canonical plugin ID is what the lang: predicate matches (for example, Oracle PL/SQL is lang:plsql, Salesforce Apex is lang:apex, ServiceNow Xanadu JS is lang:servicenow-xanadu-js).lang:rust, lang:typescript
path:Glob pattern or path~=/regex/File path relative to the index root. Supports ** globbing.path:src/api/**, path:*.rs
visibility:public, privateSymbol visibility. public matches exported symbols (pub, export, public). private matches internal symbols.visibility:public
async:true, falseWhether the symbol is declared async.async:true
static:true, falseWhether the member is static (static methods, class methods, module-level statics).static:true
returns:String (type name, segment match)Return type name. Edge-backed: resolves against real TypeOf{Return} edges (not signature-text matching) for Rust, Java, Python, TypeScript, and Go.returns:Result, returns:Promise
repo:String (repository name)Restrict results to a single repository in a multi-repo workspace.repo:auth-service
text:Regex via ~=Full-text regex match against the symbol’s source body (code + comments). Not indexed — combine with at least one indexed predicate (kind:, lang:, path:) on large workspaces.text~=/TODO/
references:String (symbol name)Symbols that have cross-file references to a target identifier. Requires graph reference edges.references:connect
address_taken:true, falseC-only predicate for functions whose address is taken. Populated by the C plugin; non-C nodes evaluate false.address_taken:true
resolved_via:direct, type_match, binding_planeFilters Calls edges by how the call target was resolved. type_match and binding_plane recover indirect / function-pointer calls (for example, C function pointers).resolved_via:binding_plane
framework:String (framework name)Filters nodes by detected web framework. Fully wired in the planner and MCP; framework-route extraction is rolling out, so route coverage is expanding.framework:axum
callsite_promiscuous:true, falseC-only predicate for indirect callsites that exceeded the per-callsite fan-out cap.callsite_promiscuous:true

Relation Fields

Relation fields traverse the cross-file call graph. They require a pre-built index (sqry index .). They are not available with sqry search.

FieldValues / TypeDescriptionExample
callers:Symbol nameSymbols (functions or methods) that call the named symbol. Traverses incoming Calls edges.callers:authenticate
callees:Symbol nameSymbols called by the named symbol. Traverses outgoing Calls edges.callees:main
imports:Module or symbol nameFiles or modules that import the named symbol or module.imports:database, imports:lodash
exports:Symbol nameSymbols exported by the named module.exports:UserService
impl:Trait or interface nameStructs, classes, or types that implement the named trait or interface.impl:Serialize, impl:Iterator

Inheritance edges are stored in the graph and can be inspected with graph tools such as sqry graph edges --kind inherits. They are not exposed as an inherits: query predicate in the current sqry query or sqry plan-query grammars.

Diagnostic Fields

Diagnostic fields surface code-quality findings derived from the unified graph. They require a pre-built index.

FieldValuesDescriptionExample
unused:public, private, function, struct, allSymbols the graph reports as having no callers/references in the configured scope.unused:function
duplicates:body, signature, structDuplicate code findings — by function body, signature, or struct layout.duplicates:body
circular:calls, imports, allSymbols participating in a cycle — mutual recursion (calls), import cycles (imports), or either.circular:imports

Scope Fields

Scope fields match symbols based on their position in the containment hierarchy.

FieldValues / TypeDescriptionExample
parent:Symbol nameThe immediate parent symbol. Matches methods whose direct container is the named class or struct.parent:ApiController
scope.type:class, struct, module, trait, interface, function, and other kind: valuesThe kind of the immediately containing scope.scope.type:class
scope.name:String (segment match)The name of the immediately containing scope.scope.name:UserService
scope.ancestor:String (segment match)Any ancestor scope at any nesting depth. Matches symbols transitively nested under the named scope.scope.ancestor:Api
scope.parent:String (segment match)Alias for the immediate-parent scope name.scope.parent:UserService

Scope field examples

Find all methods inside classes:

sqry query "scope.type:class AND kind:method"

Find all symbols defined inside UserService:

sqry query "scope.name:UserService"

Find all symbols nested anywhere under Api, regardless of depth:

sqry query "scope.ancestor:Api"

Find all methods of ApiController:

sqry query "kind:method AND parent:ApiController"

Combining Fields

All fields can be combined with AND, OR, NOT, and parentheses:

# Public async functions in Rust
sqry query "lang:rust AND kind:function AND visibility:public AND async:true"

# Classes or structs anywhere in the models directory
sqry query "(kind:class OR kind:struct) AND path:src/models/**"

# Functions that call process_data but are not test functions
sqry query "callers:process_data AND NOT name~=/test/"