Adds columns computed by expressions (spec §7.14, PLAN §11.7), each a lambda of one row that may use the input's columns and the columns listed before it. The engine types them, against the cube's model; until it has, for this input and these expressions, the node waits (ERR_TYPING). Every input column and row stays, in the input's order.

Hierarchy (View Summary)

Constructors

Properties

id: string

Unique within the query and shown to users, e.g. filter101

key: number

Assigned at construction from a monotonic sequence: the node's identity for change detection

rest: JsonObject

The keys of the node's saved JSON that this version does not know, kept so a re-save writes them back (PLAN §10.3); edits keep them too

Accessors

  • get acceptsNewInputs(): boolean

    Whether edits may change which nodes feed this one. Not for a node whose port semantics are unknown, such as an Unknown node.

    Returns boolean

  • get consumesInputOrder(): boolean

    Whether the node takes rows by their order, as a Limit does: the emitter then writes its input's order as a sort just before it (PLAN §11.4)

    Returns boolean

  • get portLabels(): readonly string[]

    Labels for the input ports, shown on the edges that feed them

    Returns readonly string[]

  • get ports(): readonly string[]

    The named input slots, in order: none for a source, one for a unary transform, two for a binary one

    Returns readonly string[]

Methods

  • Each column's first problem that needs no engine, by index, undefined for a column without one: a name, valid, no input column's and no earlier column's (compared as databases that ignore case compare them), and an expression, a lambda of one row, with no backslash in a startsWith, endsWith or contains literal (as a Filter by Expression's, PLAN §11.14). The editor checks these before it asks the engine to type the columns.

    Parameters

    Returns (undefined | string)[]

  • Each column's problem with the type the engine gave it, by index: a primitive or an enumeration, never a type Cube doesn't know, such as Any

    Parameters

    Returns (undefined | string)[]

  • Whether the node has none of the settings it needs yet, e.g. a Join with no key pair: the canvas shows it as not set, not by its description

    Returns boolean

  • The input's columns, then one per new column, in listed order, typed as the engine typed it and nullable: an expression over an empty value is empty in SQL, though the engine types it never empty after toOne() (PLAN §11.7); undefined when invalid

    Parameters

    • inputSchemas: readonly Schema[]

    Returns undefined | Schema

  • Checks, in order: there are columns; then each column, every one reported, stopping at its first problem: a name, valid, no input column's and no earlier column's (compared as databases that ignore case compare them), and an expression, a lambda of one row. Then the typing: pending until the engine has typed these columns for this input (ERR_TYPING), the engine's problem when it couldn't, then each type a primitive or an enumeration.

    Parameters

    • inputSchemas: readonly Schema[]
    • Optionalerrors: string[]

    Returns boolean

  • The node to keep once its two inputs swap ports: by default this node. A node whose settings name its inputs by side, such as a Join's key columns, returns a new node (same id) with those settings swapped too.

    Returns QueryNode