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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [0.8.2] - 2026-02-08

### Added
- **Advanced Saved Queries System**: Complete redesign with tag-based organization, connection context preservation, AI metadata generation, and rich metadata display.
- **Context Menu Actions**: Copy Query, Edit Query (modify title/description/tags/SQL), Open in Notebook (with context restoration), and Delete.
- **Professional Query Form**: Syntax-highlighted SQL preview, form validation, error handling, and AI-assisted metadata generation.
- **Tree View Organization**: Queries grouped by collapsible tag groups; untagged queries displayed separately.

### Improved
- **Notebook Integration**: Saved queries now open directly in `.pgsql` notebooks with full connection metadata (connectionId, databaseName, schemaName) automatically restored.
- **Query Discovery**: Rich tooltips with creation/last-used dates, database name, connection name, and usage count on tree items.

---

## [0.8.1] - 2026-02-08

### Added
Expand Down
15 changes: 15 additions & 0 deletions MARKETPLACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
| 🛡️ **Connection Safety** | Environment tagging (🔴 PROD, 🟡 STAGING, 🟢 DEV), read-only mode, query safety analyzer |
| 📊 **Live Dashboard** | Real-time metrics, active query monitoring, and performance graphs |
| 📓 **SQL Notebooks** | Interactive notebooks with rich output, AI assistance, and export options |
| 💾 **Saved Queries** | Tag-based organization, AI metadata generation, connection context restoration, edit & reuse |
| 🌳 **Database Explorer** | Browse tables, views, functions, types, extensions, roles, and FDWs |
| 🛠️ **Object Operations** | Full CRUD operations, scripts, VACUUM, ANALYZE, REINDEX |
| 📊 **Table Intelligence** | Profile, activity monitor, index usage analytics, definition viewer |
Expand Down Expand Up @@ -128,6 +129,20 @@ Navigate your database with an intuitive hierarchical tree view:

---

## 💾 Saved Queries Library

Organize, manage, and reuse your most important queries with intelligent tagging and context preservation.

### Core Capabilities
- **🏷️ Tag-Based Organization** — Group queries by purpose for instant discovery
- **🔗 Connection Context** — Queries remember their original connection, database, and schema
- **📓 One-Click Reopening** — Restore queries with full context in a new notebook
- **✏️ In-Place Editing** — Modify queries without creating duplicates
- **🤖 AI Metadata Generation** — Auto-generate titles, descriptions, and tags
- **📊 Rich Metadata Display** — See creation date, usage count, database, and connection at a glance

---

## 🤖 AI-Powered Assistance

Leverage AI to write, optimize, and debug your queries faster:
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- 🛡️ **Connection Safety** — Environment tagging (🔴 PROD, 🟡 STAGING, 🟢 DEV), read-only mode, query safety analyzer
- 📊 **Live Dashboard** — Real-time metrics & query monitoring
- 📓 **SQL Notebooks** — Interactive notebooks with AI assistance
- 💾 **Saved Queries** — Tag-based organization, connection context restoration, AI metadata generation, edit & reuse
- 🌳 **Database Explorer** — Browse tables, views, functions, types, FDWs
- 🛠️ **Object Operations** — CRUD, scripts, VACUUM, ANALYZE, REINDEX
- 📊 **Table Intelligence** — Profile, activity monitor, index usage, definition viewer
Expand Down Expand Up @@ -158,6 +159,27 @@ yape/

---

## 💾 Saved Queries Library

Organize, manage, and reuse your most important queries with intelligent tagging and context preservation.

### Features
- **🏷️ Tag-Based Organization** — Group queries by topic (e.g., "analytics", "maintenance", "daily-reports")
- **🔗 Connection Context** — Queries remember their original connection, database, and schema
- **📓 Quick Reopening** — Click "Open in Notebook" to restore the query with full context in a new notebook
- **✏️ Edit Anytime** — Modify title, description, tags, and SQL without creating duplicates
- **🤖 AI Metadata** — Auto-generate titles, descriptions, and tags using AI
- **📊 Rich Metadata Display** — Hover to see creation date, last used, database, and schema

### Usage
1. **Save Query**: Click "Save Query" CodeLens button on any SQL cell in a notebook
2. **Add Metadata**: Enter title, description, and tags (AI can help auto-generate)
3. **Organize**: Use tags to group related queries
4. **Reuse**: Click a saved query → "Open in Notebook" to restore with original context
5. **Edit**: Right-click any saved query → "Edit Query" to modify it

---

## 🤖 AI-Powered Operations

PgStudio integrates advanced AI capabilities directly into your workflow, but keeps **YOU** in control.
Expand Down
144 changes: 143 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "postgres-explorer",
"displayName": "PgStudio (PostgreSQL Explorer)",
"version": "0.8.1",
"version": "0.8.2",
"description": "PostgreSQL database explorer for VS Code with notebook support",
"publisher": "ric-v",
"private": false,
Expand Down Expand Up @@ -837,6 +837,102 @@
"title": "Switch Database",
"icon": "$(database)",
"category": "PgStudio"
},
{
"command": "postgres-explorer.switchConnectionProfile",
"title": "Switch Connection Profile",
"icon": "$(person)",
"category": "PgStudio: Profiles"
},
{
"command": "postgres-explorer.createConnectionProfile",
"title": "Create Connection Profile",
"icon": "$(add)",
"category": "PgStudio: Profiles"
},
{
"command": "postgres-explorer.deleteConnectionProfile",
"title": "Delete Connection Profile",
"icon": "$(trash)",
"category": "PgStudio: Profiles"
},
{
"command": "postgres-explorer.saveQueryToLibrary",
"title": "Save Query to Library",
"icon": "$(save)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.saveQueryToLibraryUI",
"title": "💾 Save Query (UI Form)",
"icon": "$(save)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.loadSavedQuery",
"title": "Load Saved Query",
"icon": "$(folder-opened)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.loadSavedQueryUI",
"title": "📂 Load Saved Query",
"icon": "$(folder-opened)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.viewSavedQuery",
"title": "📌 View Saved Query",
"icon": "$(preview)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.copySavedQuery",
"title": "📋 Copy Query",
"icon": "$(copy)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.editSavedQuery",
"title": "✏️ Edit Query",
"icon": "$(edit)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.openSavedQueryInNotebook",
"title": "📘 Open in Notebook",
"icon": "$(notebook)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.deleteSavedQuery",
"title": "Delete Saved Query",
"icon": "$(trash)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.searchSavedQueries",
"title": "Search Saved Queries",
"icon": "$(search)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.showQueryRecommendations",
"title": "Show Query Recommendations",
"icon": "$(lightbulb)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.exportSavedQueries",
"title": "Export Saved Queries",
"icon": "$(export)",
"category": "PgStudio: Queries"
},
{
"command": "postgres-explorer.importSavedQueries",
"title": "Import Saved Queries",
"icon": "$(import)",
"category": "PgStudio: Queries"
}
],
"submenus": [
Expand Down Expand Up @@ -891,6 +987,12 @@
"contextualTitle": "PostgreSQL Explorer",
"icon": "resources/postgres-vsc-icon.png"
},
{
"id": "postgresExplorer.savedQueries",
"name": "Saved Queries",
"contextualTitle": "PostgreSQL Explorer",
"icon": "$(save)"
},
{
"id": "postgresExplorer.chatView",
"name": "SQL Assistant",
Expand Down Expand Up @@ -1125,6 +1227,26 @@
"command": "postgres-explorer.clearHistory",
"when": "view == postgresExplorer.history",
"group": "navigation"
},
{
"command": "postgres-explorer.switchConnectionProfile",
"when": "view == postgresExplorer",
"group": "1_phase7"
},
{
"command": "postgres-explorer.createConnectionProfile",
"when": "view == postgresExplorer",
"group": "1_phase7"
},
{
"command": "postgres-explorer.showQueryRecommendations",
"when": "view == postgresExplorer",
"group": "2_phase7"
},
{
"command": "postgres-explorer.loadSavedQuery",
"when": "view == postgresExplorer",
"group": "2_phase7"
}
],
"view/item/context": [
Expand Down Expand Up @@ -1705,6 +1827,26 @@
"command": "postgres-explorer.indexOperations",
"when": "view == postgresExplorer && viewItem == index",
"group": "1_actions@0"
},
{
"command": "postgres-explorer.copySavedQuery",
"when": "view == postgresExplorer.savedQueries && viewItem == savedQuery",
"group": "1_actions@1"
},
{
"command": "postgres-explorer.editSavedQuery",
"when": "view == postgresExplorer.savedQueries && viewItem == savedQuery",
"group": "1_actions@2"
},
{
"command": "postgres-explorer.openSavedQueryInNotebook",
"when": "view == postgresExplorer.savedQueries && viewItem == savedQuery",
"group": "1_actions@3"
},
{
"command": "postgres-explorer.deleteSavedQuery",
"when": "view == postgresExplorer.savedQueries && viewItem == savedQuery",
"group": "2_delete@1"
}
],
"postgres-explorer.columnScriptsMenu": [
Expand Down
Loading
Loading