-
Notifications
You must be signed in to change notification settings - Fork 0
JDBC Query Engine
The JDBC query engine connects Queryeer to any relational database that provides a JDBC driver. It ships with built-in dialect support for SQL Server (T-SQL) and falls back to a generic SQL mode for other databases.
JDBC drivers are not bundled with Queryeer. To use a specific database:
- Obtain the JDBC driver JAR for your database (e.g.,
mssql-jdbc-*.jarfor SQL Server). - Place the JAR in the
shared/folder of your Queryeer installation. - Restart Queryeer.
The shared/ folder is loaded by a classloader that is shared across all plugins, so a driver placed there is available to the JDBC engine immediately.
Open Options → JDBC and create a new connection. The fields required are:
| Field | Description |
|---|---|
| Name | Display name shown in the engine selector |
| JDBC URL | Full JDBC connection string (see examples below) |
| Username | Database user (leave blank for Windows auth) |
| Password | Stored encrypted using Jasypt |
| Driver class | Fully-qualified JDBC driver class name |
SQL Server (password auth)
jdbc:sqlserver://myserver:1433;databaseName=mydb;encrypt=false
SQL Server (Windows integrated authentication)
jdbc:sqlserver://myserver:1433;databaseName=mydb;integratedSecurity=true
For Windows authentication, copy
mssql-jdbc_auth-<version>.x64.dlltoC:\Windows\System32.
The JDBC engine detects the connected database type and activates the appropriate dialect for syntax highlighting and code completion.
Full T-SQL support including:
- T-SQL keyword set and operators
- Built-in function completion (string, date, aggregate, system, and window functions)
- Stored procedure parameter completion after
EXEC - INSERT / UPDATE / DELETE target column completion
-
schema.tabledotted qualifier resolution - Query plan visualization — captured execution plans are parsed and displayed in the Query Plan output panel
-
Server monitoring — the
SqlServerMonitorExtensionprovides a monitoring panel for active sessions, waits, and blocking
When no specific dialect is recognized, a generic SQL mode is used with standard SQL keywords.
When connected, the JDBC engine crawls catalog metadata (schemas, tables, views, columns) to power code completion. Metadata is cached per connection session and refreshed on reconnect.
When executing a query against SQL Server with Query Plan selected as the output type, Queryeer captures the XML execution plan and renders it as a visual tree:
- Each node shows the operation type, estimated cost, and row counts
- Nodes can be expanded or collapsed
- Hovering over a node shows detailed statistics
- The raw XML plan is also accessible
The SQL Server monitoring extension (available when connected to SQL Server) adds a dedicated panel showing:
- Active sessions and queries
- Current wait statistics
- Blocking chains
- DMV-based performance data
This panel updates on a configurable interval without interfering with the main query editor.
Right-clicking a connection in the navigation tree and choosing Show Schema Diagram opens a visual graph of the database schema. The diagram is built from the connection's catalog metadata and shows:
-
Tables and views as nodes, labeled with
schema.tablenamewhere applicable -
Foreign key relationships as directed edges between tables, with edge labels showing the column mappings (e.g.,
order_id → orders.id) - Expandable node details — clicking a node reveals collapsible sections for Columns (with PK markers), Indices, and Constraints
System schemas (sys, information_schema) and cross-database foreign keys are excluded automatically. The diagram is rendered in Queryeer's graph visualization panel with standard zoom and pan controls.
Right-clicking a connection in the navigation tree and choosing Show Routine Call Graph… opens a dialog for visualizing call dependencies between stored procedures and functions.
- The left panel lists all routines in the database with checkboxes. Use the filter field to narrow the list by name.
- Select one or more routines as roots and click Build Graph.
- Queryeer fetches the routine bodies and performs a breadth-first traversal to find all transitively called routines, then renders the dependency graph on the right.
Nodes are color-coded by type:
- Blue rounded box (bold) — stored procedure
- Green rounded box (italic) — function
- Gray dashed box — routine that is called but not found in the catalog (ghost node)
- Amber border — routine discovered via pattern matching (result may be approximate)
- Double-click a node — rebuilds the graph with that routine as the new root
- Right-click a node → Open as new query — opens the routine body in a new editor tab
- Zoom and pan are available via the standard graph controls
Each open query file holds its own JDBC connection for the duration of the session. The connection is opened when the file becomes active and reused for subsequent query executions in that file. There is no shared connection pool — each file manages its own connection independently.
- Passwords are encrypted with Jasypt before being written to the configuration file.
- For SQL Server, Windows integrated authentication (
integratedSecurity=true) is recommended over password-based auth where possible.