Skip to content

Notebooks: add a "live" / run-as-you-type mode for grid (run) cells, guarding against repeated DDL/DML #575

Description

@emrberk

Charts (draw mode) already auto-refresh via useAdaptivePoll (2–60s adaptive, src/scenes/Editor/Notebook/DrawCanvas/index.tsx), but grid/run cells never poll — re-running is manual (reRunResultAt in src/scenes/Editor/Notebook/useCellExecution.ts).

Request: a smooth "run-as-you-type" / live mode for grids.

Critical safety: SELECT/DQL is safe to re-run repeatedly; DDL/DML (CREATE/INSERT/UPDATE/DELETE/DROP) must NOT auto-rerun.

Existing building block: draw mode already classifies queries via validateWithGlobals — DQL responses carry columns, write statements carry queryType, and DrawCanvas blocks drawing on write queries ("Cannot draw a write query…"). There is no shared client-side isDDL/isDML helper; classification is inline in DrawCanvas.

Ask: reuse the same validate-based classification to gate live re-runs to read-only statements. For multi-statement cells, only run live if the whole script is DQL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Severity: 1enhancementNew feature or requestnotebooksIssues relevant to the notebooks featureweb-consoleIssues relevant to "web-console" package

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions