ek9_query_pipeline

Answers first: status, stageCount, then stages[] in order {operator, kind, consumes, produces}, sourceType, resultType and summary.transformations.

Category: Enquiry

When to use it

'What does each stage of this stream pipeline consume and produce' is one call with symbol:'Type.method' (its first pipeline) or file+line on any line of it.

When not to use it

Details

stages[] is ordered, each carrying operator, kind, context, consumes, produces (consumes omitted on source stages). kind enum: source (cat/for), filter (filter/reject/uniq), map (map/flatten/group/join/split), limit (head/tail/skipping), sort, tee, async, call, reduce, terminal (collect/`>`/`>>`), with kind-specific arg fields predicate/function/limit/collector (limit numeric for a plain int literal, else raw text). Flat sourceType/resultType and nested summary{stageCount, sourceType, terminalType, transformations[]} give the whole-pipeline type-evolution story. Where pipelines nest, the innermost chain spanning the line wins; a body holding several pipelines needs file+line for any but the first.

Arguments

ArgumentTypeRequiredWhat it is
filestringThe EK9 source file - OPTIONAL when symbol is a construct name; required to anchor on a member or a use site.
lineinteger1-based line the pipeline spans - any line of the chain; OMIT it and pass symbol:'Type.method' for the first pipeline in that body, or use ek9_read_file(lineNumbers:true) rather than counting.
symbolstringThe method or function whose body holds the pipeline - 'Type.method' or a function name - no file or line needed; the FIRST pipeline in that body is decomposed.

Recorded calls

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

Pipeline shape

Request

{
  "file" : "Hello.ek9",
  "line" : 6
}

Response

{
  "meta" : {
    "serverMs" : "<timing>"
  },
  "nextStep" : "anchor on a line of the cat | ... | collect chain, or pass symbol:'Type.method' for the first pipeline in that body",
  "note" : "No stream pipeline found at line 6",
  "status" : "not-found"
}

See also