Base query builder state with result panel hidden. This is useful for scenarios where the query builder is used only for query construction without execution/result display.

Hierarchy

  • QueryBuilderState
    • BaseQueryBuilderState

Accessors

  • get sourceClass(): undefined | Class

    Convenience getter that returns the class only when the source type is a Class (not a RelationType). Use this in code paths that are Class-specific (milestoning, explorer tree, graph-fetch, etc.).

    Returns undefined | Class

  • get TEMPORARY__isDnDFetchStructureToFilterSupported(): boolean

    This flag is for turning on/off DnD support from projection panel to filter panel, and will be leveraged when the concepts of workflows are introduced into query builder.

    Returns boolean

Methods

  • Builds the execution context expression (e.g. from()) for the lambda function. Subclasses can override this to customize the execution context building.

    Parameters

    • lambdaFunction: LambdaFunction

    Returns LambdaFunction

  • Builds the raw lambda intended for persistence (saving to query store). The default implementation delegates to buildQuery(). Subclasses that embed execution context inside the lambda body (e.g. DataProductQueryBuilderState) should override this to return a plain lambda without that wrapping, since the execution context is persisted separately via query.executionContext.

    Returns RawLambda

  • Gets the execution context the query builder has currently resolved to: the class being queried and the mapping/runtime it will execute against.

    This is deliberately distinct from sourceInfo, which records what the builder was opened with (the route). For a mapping-sourced query both are populated and initially identical, so a divergence means the user switched; for a data space / data product / service query only this side carries a mapping and runtime, because the entry point resolves to one.

    Degrades gracefully — whichever of class / mapping / runtime are known get reported, so events that fire while the user is still setting up (picking a class before a mapping, say) are not blank. Returns undefined only when none of the three has resolved.

    Returns undefined | QueryBuilderExecutionContextInfo

  • Aggregates extra telemetry metadata contributed by application plugins via getExtraQueryBuilderTelemetryMetadataProviders. Callers spread the result into their event payloads so telemetry helpers stay free of plugin-specific fields (e.g. agent chat trace ids).

    Returns Record<string, unknown>

  • Gets a lightweight snapshot of the current query builder authoring state (fetch structure kind, filter/parameter/constant counts, milestoning / watermark configuration, etc.) for telemetry payloads. Kept intentionally shape-only — no user values, no identifiers.

    Returns QueryBuilderQueryInfo

  • This method can be used to simplify the current query builder state to a basic one that can be used for testing or some special operations, see INTERNAL__BasicQueryBuilderState for more details

    Returns QueryBuilderState

  • Reports that a query builder was opened, from whichever surface opened it. This is the canonical "a query builder exists" signal — hosts should prefer it over their own route-specific load events, which each cover only part of the population.

    Deliberately called by the host once the builder is loaded, rather than emitted from the constructor. The constructor runs before subclass field initializers, so the execution context would be unresolved and the safeGet* wrappers would silently report an empty envelope; it would also fire for derived states such as INTERNAL__toBasicQueryBuilderState, which are built on every data preview and are not user-facing opens.

    extra carries host-specific supplementary fields (load timings, and for Legend Query creators restoredFromRecent). It is untyped to keep this package host-agnostic.

    Parameters

    Returns void

  • Process the provided query, and rebuild the query builder state.

    Parameters

    • query: RawLambda
    • Optionaloptions: {
          defaultParameterValues?: Map<string, ValueSpecification>;
          preserveParameterValues?: boolean;
          preserveResult?: boolean;
      }

    Returns void