Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to Simple DB are documented in this file.

## 0.1.3 - 2026-08-08

### Added

- Persistent connection attachment for saved SQL files. A file remembers its selected Simple DB connection until the user changes it.
- A connection selector in the SQL editor toolbar and a connection-name indicator in the lower-right status bar. Unattached SQL files explicitly show `Simple DB: Select Connection`.
- Native VS Code `Go to Definition` and `Go to Declaration` integration backed by database metadata/DDL for supported objects, including Oracle packages and routines.

### Changed

- `Ctrl+Enter` is presented as **Execute Query** and executes the selection or current statement; **Execute Script** runs the entire document.
- Executing an unattached SQL file opens the connection picker once, attaches that connection to the file, and then continues the query.
- New Oracle editor sessions default to the connected user's schema, improving object navigation without extra setup.

### Removed

- Removed query History completely: Activity Bar view, commands, settings, storage service, tree provider, and QueryRunner writes.

## 0.1.2 - 2026-08-08

### Added
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Simple DB

Simple DB `0.1.2` is a Visual Studio Code extension written entirely in JavaScript for working with **SQLite, PostgreSQL, MySQL, SQL Server, and Oracle** through a single interface.
Simple DB `0.1.3` is a Visual Studio Code extension written entirely in JavaScript for working with **SQLite, PostgreSQL, MySQL, SQL Server, and Oracle** through a single interface.

The extension opens regular VS Code SQL documents. `F5` launches `src/extension.js` directly: there is no TypeScript, `tsconfig.json`, `dist` folder, or compilation step.

Expand All @@ -11,7 +11,7 @@ The extension opens regular VS Code SQL documents. `F5` launches `src/extension.
- Store passwords in `SecretStorage`, never inside profiles or the repository.
- Connect to several database engines simultaneously and disconnect them explicitly.
- Explore databases, schemas, and engine-specific objects.
- Open SQL editors linked to a connection, database, and schema.
- Attach any regular `.sql` file to a connection from the editor toolbar/status bar. Saved files remember that connection on the same VS Code installation until you change it.
- Execute the selection, the statement at the cursor, or the entire document.
- Execute arbitrary SQL: `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `MERGE`, `CREATE`, `ALTER`, `DROP`, `TRUNCATE`, and any other syntax accepted by the server.
- Generate `CREATE`, `ALTER`, and `DROP` scripts from the explorer and inspect object definitions/DDL.
Expand All @@ -20,15 +20,16 @@ The extension opens regular VS Code SQL documents. `F5` launches `src/extension.
- View results below the SQL editor in a resizable SQL Developer-style grid with row numbers, multiple result sets, types, `NULL`, affected rows, duration, and cell/row/selection copy actions.
- Preserve 64-bit integers and high-precision `NUMBER` values exactly before displaying or exporting them.
- Export already-retrieved results to CSV, JSON, or XLSX without executing the SQL again.
- Use configurable local query history with reopen, copy, and rerun actions.
- Use native **Go to Definition** / **Go to Declaration** navigation for database objects whose source or DDL is exposed by the connected engine, including routines and Oracle packages.

## Quick start

1. Open **Simple DB** in the Activity Bar and choose **Create Connection**.
2. Select the database engine and enter a connection name. SQLite uses the native file picker; network databases create a JSON profile with the correct default parameters.
3. Edit the generated JSON if needed, press `Ctrl+S`, then use **Test Connection** or **Connect** from the connection menu. Passwords stay outside JSON in VS Code `SecretStorage`.
4. Choose **New Query**, write SQL, and press `Ctrl+Enter` to execute the selection or the statement at the cursor. Use `Ctrl+Shift+Enter` to execute the entire document.
5. Results appear automatically in the resizable **Simple DB — Results** panel below the SQL editor. The same core commands are also available from the editor's **Simple DB** context submenu.
4. Open or create any `.sql` file. Click the database icon or **Simple DB: Select Connection** in the status bar and choose the connection this file should use. If you press `Ctrl+Enter` before choosing, Simple DB asks you once and attaches the selected connection automatically.
5. Press `Ctrl+Enter` (**Execute Query**) to run the selection or statement at the cursor. Use `Ctrl+Shift+Enter` (**Execute Script**) for the entire document. Saved SQL files keep their selected connection when closed and reopened.
6. Results appear automatically in the resizable **Simple DB — Results** panel below the SQL editor. `F12` / **Go to Definition** and **Go to Declaration** use the same attached connection to resolve database objects.

## Five database engines

Expand All @@ -40,7 +41,7 @@ The extension opens regular VS Code SQL documents. `F5` launches `src/extension.
| SQL Server | `mssql` | databases, schemas, tables, views, procedures/functions, indexes, triggers, sequences, types, synonyms, `GO` |
| Oracle | `oracledb` Thin | schemas, tables, views/materialized views, procedures/functions, packages, indexes, triggers, sequences, types, synonyms, PL/SQL |

Oracle uses the default `node-oracledb` Thin mode, so normal connections do not require Oracle Client to be installed. Simple DB `0.1.2` uses SQL authentication with a username and password for SQL Server.
Oracle uses the default `node-oracledb` Thin mode, so normal connections do not require Oracle Client to be installed. Simple DB `0.1.3` uses SQL authentication with a username and password for SQL Server.

## No imposed row limit by default

Expand Down Expand Up @@ -105,7 +106,6 @@ CSV export protects values that spreadsheet applications could interpret as form
- SSL/TLS, encryption, and certificate trust are explicit options where supported by the database engine.
- `simpleDb.confirmDestructiveQueries` is enabled by default.
- `simpleDb.warnUnsafeDml` is enabled by default.
- Query history can contain literals written in SQL. It can be disabled with `simpleDb.history.enabled` or cleared from the **History** view.

Example Oracle connection JSON:

Expand Down Expand Up @@ -146,10 +146,11 @@ Right-clicking inside an editor now shows a native **Simple DB** submenu with th

- Create Connection
- New Query
- Execute Selection or Current Statement
- Execute Entire Document
- Change Editor Connection
- Show History
- Select Connection for SQL File
- Execute Query
- Execute Script

VS Code's native **Go to Definition** and **Go to Declaration** actions are available in SQL editors. Simple DB resolves them against the connection attached to that file and opens the database-provided source/DDL in a read-only virtual SQL document.

### SQLite note

Expand All @@ -162,8 +163,6 @@ SQLite runs in a dedicated WebAssembly Worker so long-running queries do not blo
| `simpleDb.maxRows` | `0` | Optional limit per result set; `0` = unlimited |
| `simpleDb.resultPageSize` | `500` | Rows per temporary storage/display page |
| `simpleDb.maxCellCharacters` | `10000` | Maximum characters retained per cell in results |
| `simpleDb.history.enabled` | `true` | Store local query history |
| `simpleDb.history.maxEntries` | `500` | Maximum history entries |
| `simpleDb.confirmDestructiveQueries` | `true` | Confirm `DROP`/`TRUNCATE` |
| `simpleDb.warnUnsafeDml` | `true` | Warn about `UPDATE`/`DELETE` without `WHERE` |
| `simpleDb.csvDelimiter` | `;` | CSV export delimiter |
Expand Down Expand Up @@ -208,7 +207,7 @@ src/
managers/ # connections and editor sessions
services/ # execution and export
sql/ # dialect-aware splitter, safety rules, and DDL
storage/ # profiles, history, and paged results
storage/ # connection profiles, editor bindings, and paged results
test/ # JavaScript tests
ui/ # connection form
views/ # trees and lower result grid
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

118 changes: 23 additions & 95 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "simple-db-suzdalenko",
"displayName": "Simple DB - SQL Client for SQLite, MySQL, PostgreSQL, SQL Server & Oracle",
"description": "SQL client and database editor for SQLite, MySQL, PostgreSQL, SQL Server (MSSQL) and Oracle. Browse database objects, run queries, manage DDL and export results.",
"version": "0.1.2",
"version": "0.1.3",
"publisher": "suzdalenko-dev",
"license": "MIT",
"icon": "resources/simple-db-marketplace.png",
Expand Down Expand Up @@ -55,7 +55,6 @@
],
"activationEvents": [
"onView:simpleDb.connections",
"onView:simpleDb.history",
"onView:simpleDb.results",
"onLanguage:sql"
],
Expand Down Expand Up @@ -124,12 +123,13 @@
},
{
"command": "simpleDb.changeEditorConnection",
"title": "Change Editor Connection",
"category": "Simple DB"
"title": "Select Connection for SQL File",
"category": "Simple DB",
"icon": "$(database)"
},
{
"command": "simpleDb.executeCurrent",
"title": "Execute Selection or Current Statement",
"title": "Execute Query",
"category": "Simple DB",
"icon": "$(play)"
},
Expand All @@ -140,7 +140,7 @@
},
{
"command": "simpleDb.executeDocument",
"title": "Execute Entire Document",
"title": "Execute Script",
"category": "Simple DB",
"icon": "$(run-all)"
},
Expand All @@ -165,38 +165,6 @@
"title": "Rollback",
"category": "Simple DB"
},
{
"command": "simpleDb.showHistory",
"title": "Show History",
"category": "Simple DB",
"icon": "$(history)"
},
{
"command": "simpleDb.clearHistory",
"title": "Clear History",
"category": "Simple DB",
"icon": "$(clear-all)"
},
{
"command": "simpleDb.openHistoryEntry",
"title": "Open History Query",
"category": "Simple DB"
},
{
"command": "simpleDb.copyHistoryEntry",
"title": "Copy SQL",
"category": "Simple DB"
},
{
"command": "simpleDb.rerunHistoryEntry",
"title": "Run Again",
"category": "Simple DB"
},
{
"command": "simpleDb.deleteHistoryEntry",
"title": "Delete from History",
"category": "Simple DB"
},
{
"command": "simpleDb.selectTable",
"title": "Open SELECT *",
Expand Down Expand Up @@ -262,11 +230,6 @@
"id": "simpleDb.connections",
"name": "Connections",
"type": "tree"
},
{
"id": "simpleDb.history",
"name": "History",
"type": "tree"
}
],
"simpleDbResults": [
Expand Down Expand Up @@ -294,11 +257,6 @@
"command": "simpleDb.openConnectionsFolder",
"when": "view == simpleDb.connections",
"group": "navigation@3"
},
{
"command": "simpleDb.clearHistory",
"when": "view == simpleDb.history",
"group": "navigation@1"
}
],
"view/item/context": [
Expand Down Expand Up @@ -376,48 +334,34 @@
"command": "simpleDb.createObject",
"when": "view == simpleDb.connections && viewItem =~ /simpleDb.(database|schema|group)/",
"group": "object@1"
},
{
"command": "simpleDb.openHistoryEntry",
"when": "view == simpleDb.history && viewItem == simpleDb.historyEntry",
"group": "inline@1"
},
{
"command": "simpleDb.rerunHistoryEntry",
"when": "view == simpleDb.history && viewItem == simpleDb.historyEntry",
"group": "history@1"
},
{
"command": "simpleDb.copyHistoryEntry",
"when": "view == simpleDb.history && viewItem == simpleDb.historyEntry",
"group": "history@2"
},
{
"command": "simpleDb.deleteHistoryEntry",
"when": "view == simpleDb.history && viewItem == simpleDb.historyEntry",
"group": "history@3"
}
],
"editor/title": [
{
"command": "simpleDb.executeCurrent",
"when": "editorLangId == sql",
"command": "simpleDb.changeEditorConnection",
"when": "editorLangId == sql && resourceScheme != simple-db-definition",
"group": "navigation@1"
},
{
"command": "simpleDb.executeDocument",
"when": "editorLangId == sql",
"command": "simpleDb.executeCurrent",
"when": "editorLangId == sql && resourceScheme != simple-db-definition",
"group": "navigation@2"
},
{
"command": "simpleDb.cancelQuery",
"when": "editorLangId == sql",
"command": "simpleDb.executeDocument",
"when": "editorLangId == sql && resourceScheme != simple-db-definition",
"group": "navigation@3"
},
{
"command": "simpleDb.cancelQuery",
"when": "editorLangId == sql && resourceScheme != simple-db-definition",
"group": "navigation@4"
}
],
"editor/context": [
{
"submenu": "simpleDb.editorContextMenu",
"when": "editorLangId == sql && resourceScheme != simple-db-definition",
"group": "simpleDb@1"
}
],
Expand All @@ -431,23 +375,19 @@
"group": "1_connection@2"
},
{
"command": "simpleDb.executeCurrent",
"command": "simpleDb.changeEditorConnection",
"when": "editorLangId == sql",
"group": "2_query@1"
},
{
"command": "simpleDb.executeDocument",
"command": "simpleDb.executeCurrent",
"when": "editorLangId == sql",
"group": "2_query@2"
},
{
"command": "simpleDb.changeEditorConnection",
"command": "simpleDb.executeDocument",
"when": "editorLangId == sql",
"group": "2_query@3"
},
{
"command": "simpleDb.showHistory",
"group": "3_history@1"
}
]
},
Expand All @@ -456,13 +396,13 @@
"command": "simpleDb.executeCurrent",
"key": "ctrl+enter",
"mac": "cmd+enter",
"when": "editorTextFocus && editorLangId == sql"
"when": "editorTextFocus && editorLangId == sql && resourceScheme != simple-db-definition"
},
{
"command": "simpleDb.executeDocument",
"key": "ctrl+shift+enter",
"mac": "cmd+shift+enter",
"when": "editorTextFocus && editorLangId == sql"
"when": "editorTextFocus && editorLangId == sql && resourceScheme != simple-db-definition"
}
],
"configuration": {
Expand All @@ -489,18 +429,6 @@
"maximum": 1000000,
"description": "Maximum number of characters retained per cell in the result view."
},
"simpleDb.history.enabled": {
"type": "boolean",
"default": true,
"description": "Store local query history."
},
"simpleDb.history.maxEntries": {
"type": "integer",
"default": 500,
"minimum": 0,
"maximum": 5000,
"description": "Maximum number of queries retained in history."
},
"simpleDb.confirmDestructiveQueries": {
"type": "boolean",
"default": true,
Expand Down
Loading
Loading