CFTPay DB Explorer
CFTPay database explorer for Cursor — connect to preset or custom MySQL servers, browse schema, and run SQL.
Features
- Per-server credentials — first connect to a preset asks for username & password once; stored in your OS keychain (VS Code SecretStorage). Later connects reuse them; Edit credentials anytime per server
- Product → stack → server navigation:
- Products: CFTPay, MicroServices, Keycloak
- Under each: Single Servers / Multi Stack Servers
- Preset servers shipped in
presets/connections.json (no credentials in the package)
- Manual connections with host, port, username, password (optional database)
- Saved connections (passwords stored in Secret Storage)
- Lazy-loaded schema tree: databases → tables → columns
- Per-server local
.cftsql files (isolated from other DB extensions)
- Table-name autocomplete in
.cftsql — as you type, suggests tables ranked exact → starts-with → contains (auto-connects to the file’s owning server; schema cached for ~5 minutes of typing, then reloads on the next keystroke)
- Stop query — while a query is running, use Stop in the results dock (or the editor title / notification Cancel) to interrupt it on the MySQL server via
KILL QUERY
- Bottom results dock — query results open in an editor group below your SQL file (Database Client style), never in the left sidebar
- Per-statement CodeLens —
▶ Run and ✨ Ask AI buttons above every statement in a .cftsql file
- Editable results grid — for simple single-table SELECTs with a primary key, double-click a cell to edit and hit Apply update to write the change back (runs in a transaction)
- Safe row deletion — select rows with checkboxes and delete them by primary key after a confirmation prompt
- Results toolbar: ↻ Run, ✨ Ask AI, ⬇ CSV, total rows, query execution time, ALL-or-column filtering, and explicit ascending/descending sort controls on every column
- MySQL dump download on every server — creates a local logical
.sql dump containing database/table/view DDL and table data, without requiring the mysqldump CLI
.cftsql runs only against the owning CFTPay connected server
- Connection pooling via
mysql2 for speed
First connect to a preset
- Open CFTPay DB → pick a Product → Single / Multi Stack → a server
- Click Connect to server
- Enter username & password for that server (asked only the first time)
- Credentials are saved in the system keychain for that server only
To change them later, expand the server and click Edit credentials (leave the password blank to keep the current one).
Preset servers
Edit presets/connections.json before packaging. Structure:
{
"products": [
{
"id": "cftpay",
"name": "CFTPay",
"stacks": [
{
"id": "single",
"name": "Single Servers",
"servers": [
{
"id": "preset-alpharqa8",
"name": "AlpharQa8",
"host": "10.129.68.115",
"port": 3306,
"database": "cft"
}
]
},
{
"id": "multi",
"name": "Multi Stack Servers",
"servers": []
}
]
}
]
}
Never put usernames or passwords in this file — presets carry only host/port; credentials are entered per server at first connect.
Install (local development)
cd "CFTPay DB"
npm install
npm run compile
Option A — Launch from Cursor
- Open this folder in Cursor
- Press F5
- Click the CFTPay DB icon in the Activity Bar
Option B — Install as VSIX
npx @vscode/vsce package --allow-missing-repository
Then in Cursor: Extensions → … → Install from VSIX…
Usage
- Open CFTPay DB from the Activity Bar
- Drill into Product → Single/Multi Stack → server → Connect
- Browse schema / run SQL as needed
Settings
| Setting |
Default |
Description |
mysqlExplorer.defaultPort |
3306 |
Default port |
mysqlExplorer.queryRowLimit |
500 |
Auto LIMIT for SELECT without LIMIT |
mysqlExplorer.connectTimeoutMs |
10000 |
Connect timeout |
Security
- No credentials are shipped inside the extension package
- Username & password per server live in VS Code / Cursor
SecretStorage (OS keychain) on your machine only
- Passwords are never written to plain settings files
- System schemas (
mysql, sys, information_schema, performance_schema) are hidden from the tree