ek9_query_records

Answers first: status, recordCount, recordNames - complete for the workspace or the filters given - then records[] {name, module, file, line, fields, extends, traits, isOpen}.

Category: Enquiry · Compare: Records outline panel (reuse-discovery)

When to use it

'Which records exist, and is there a data shape to reuse' is one call - no arguments, or nameFilter / fieldNameFilter / moduleFilter to narrow.

When not to use it

Details

Each record carries name, module, file (workspace-relative), line, fields[] (name+type; unresolved types render <unresolved>), extends (null unless a super declared; implicit Any filtered), traits[], isOpen. Only directly-declared fields — supers not flattened; nameFilter and fieldNameFilter are plain case-insensitive substrings, never regex. status:empty (not an error) when nothing matched or moduleFilter named non-existent modules — then meta.unmatchedFilters[] carries module:<value>.

Arguments

ArgumentTypeRequiredWhat it is
fieldNameFilterstringFilter to records declaring a field whose name matches (case-insensitive substring).
moduleFilterarray of stringRestrict to specific modules (exact names). Default: workspace-wide.
nameFilterstringCase-insensitive substring match on record names.

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it.

List all

Request

{ }

Response

{
  "meta" : {
    "serverMs" : "<timing>"
  },
  "recordCount" : 2,
  "recordNames" : [ "PostalAddress", "Amount" ],
  "records" : [ {
    "extends" : null,
    "fields" : [ {
      "name" : "line1",
      "type" : "String"
    }, {
      "name" : "city",
      "type" : "String"
    }, {
      "name" : "postCode",
      "type" : "String"
    } ],
    "file" : "shapes.ek9",
    "isOpen" : false,
    "line" : 6,
    "module" : "com.example.shapes",
    "name" : "PostalAddress",
    "traits" : [ ]
...

Cut short here: 21 more lines. The whole recorded call.