Keeps the rows of its input from position start up to, but not including, position stop, counting from 0: the range [start, stop) (D5). The columns stay as they are.

Hierarchy (View Summary)

Constructors

  • start and stop have no defaults on purpose: an explicit undefined stays cleared, so the user sees the message rather than silently getting the default (spec §7.9). A new node gets DEFAULT_START and DEFAULT_STOP from its definition's create.

    Parameters

    • id: string
    • start: undefined | number
    • stop: undefined | number
    • Optionalrest: JsonObject

    Returns Slice

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

start: undefined | number

The first row kept, from 0; undefined once the user clears it, which is invalid

stop: undefined | number

The first row not kept; undefined once the user clears it, which is invalid

DEFAULT_START: 10

The range of a new Slice

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

    It takes rows by its input's order, so the emitter sorts its input first

    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

  • The description without the values users typed, which may be sensitive, for logs and telemetry. By default the description, which has none.

    Returns 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

  • Each bound must be a whole number of at least 0, checked apart so both can be reported; then the start must come before the stop. The engine would plan a negative fetch otherwise.

    Parameters

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

    Returns boolean

  • A new slice with the same id, and this range

    Parameters

    • start: undefined | number
    • stop: undefined | number

    Returns Slice

  • 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