Skip to content

Feature: Multi-statement script execution with progress #40

@muk2

Description

@muk2

Summary

Add support for executing multiple SQL statements in sequence (scripts) with per-statement progress indication and individual result sets.

Motivation

Real-world database workflows often involve running multiple statements in sequence: creating tables, inserting data, running queries, and cleaning up. Currently, pgrsql splits on semicolons and executes the active block, but lacks support for running entire scripts with progress feedback.

Proposed Behavior

  • Script execution: Ctrl+Shift+Enter executes all statements in the editor sequentially
  • Progress indicator: Show which statement is currently executing (e.g., "Running statement 3 of 7...")
  • Per-statement results: Each statement gets its own result tab, navigable with Ctrl+[/]
  • Error handling: On failure, stop execution, show error with the failing statement highlighted
  • Partial results: Results from successfully executed statements before the error are preserved

Acceptance Criteria

  • Ctrl+Shift+Enter executes all statements sequentially
  • Progress indicator shows current statement / total
  • Each statement result navigable as separate tab
  • Execution stops on first error
  • Failing statement highlighted in editor
  • Previous successful results preserved on error
  • Unit tests for statement splitting logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions