Skip to content

sidequery/sidequery-vscode

Repository files navigation

Sidequery for VSCode

Transform SQL files into interactive notebooks powered by DuckDB.

Overview

Sidequery for VSCode is a VSCode extension that turns .sql files into executable notebooks. Write queries in cells separated by semicolons, execute them individually or all at once, and see results in formatted tables. For example:

-- Create table
CREATE TABLE sales (id INT, product VARCHAR, amount DECIMAL);

-- Insert data  
INSERT INTO sales VALUES (1, 'Laptop', 999.99), (2, 'Mouse', 29.99);

-- Analyze
SELECT product, SUM(amount) as total FROM sales GROUP BY product;

Installation

From VSCode Marketplace

  1. Open VSCode
  2. Go to Extensions (⇧⌘X / Ctrl+Shift+X)
  3. Search for "SideQuery"
  4. Click Install

From Source

# Clone the repository
git clone https://github.com/yourusername/sidequery-vscode.git
cd sidequery-vscode

# Install dependencies
bun install

# Compile the extension
bun run compile
bun run compile:renderer

# Open in VSCode
code .

Press F5 to run the extension in a new VSCode window.

Usage

  1. Open any .sql file - It automatically opens as a SQL notebook
  2. Execute queries - Click play button or press Shift+Enter
  3. View results - Tables appear below each cell

Keyboard Shortcuts

  • Run Cell: Shift+Enter
  • Run All Cells: Ctrl+Shift+Enter (Cmd+Shift+Enter on Mac)
  • Add Cell Below: Ctrl+Enter (Cmd+Enter on Mac)
  • Delete Cell: Ctrl+Shift+D (Cmd+Shift+D on Mac)

For detailed usage examples and tips, see the Usage Guide.

Limitations

Sidequery for VSCode is very much a work in progress. Today, only DuckDB connections are supported.

Roadmap

  • More connection types
  • Centralization of secrets
  • Visualizations
  • Deployment

Development

Prerequisites

Setup

# Install dependencies
bun install

# Run tests
bun test

# Watch mode for development
bun run watch

Testing

# Run all tests
npm test

# Run specific test suites
npm run test:duckdb   # DuckDB executor tests
npm run test:arrow    # Arrow reader tests

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Troubleshooting

Common Issues

DuckDB not found

Extension not activating

  • Check that you're opening a .sql file
  • Look for errors in Help → Toggle Developer Tools

Query execution fails

  • Check SQL syntax (DuckDB documentation)
  • Ensure previous DDL statements succeeded
  • Check for file permissions on temporary directory

License

GPL v3 License - see LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published