Skip to content

About

Inline Ghost Text SQL completion for DBeaver: history replay, learned values, column details, foreign key JOINs. Local only.

Topics

Resources

Contributing

Stars

9 stars

Watchers

1 watching

Forks

Latest commit

 

History

404 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Ghost Text for DBeaver

Local SQL completion from your database metadata and query history.

Latest stable release DBeaver CE 26.2 GitHub stars Plug-in downloads from GitHub Releases

Install · Watch the demos · Keyboard shortcuts · Roadmap · Documentation

The likely rest of your statement appears as grey text at the caret, built from the active connection's metadata, the SQL dialect and queries you have run before. Press Tab to take it all, → to take one token, or keep typing. Everything runs locally; there is no language model and no network service.

Note

3.2.5 is the stable release. It runs exactly one completion provider (SQL Ghost Text or DBeaver's own), adds a first-run welcome, a portable offline ZIP and recovery after a lost connection. The owner authorized its publication after the functional, regression and offline installation checks passed. Performance on enterprise-scale catalogs and slow servers is still being measured and is not claimed; see Quality. The persistent metadata index is experimental and off by default. Back up DBeaver before installing, as for any plug-in.

Install

In DBeaver: Help → Install New Software…, paste the update site into Work with and press Enter:

https://01zhas.github.io/dbeaver-sql-autocomplete/update/stable/

Select SQL Ghost Text for DBeaver, click Next and Finish, confirm the prompt about unsigned content (tick it and Trust Selected), and restart DBeaver. Later releases install from Help → Installation Information → Installed Software → Update…. An existing 2.0 installation or 3.0 beta is updated in place and keeps its learned history and preferences. Pre-releases are published on …/update/beta/.

Offline or for rollback, download the portable offline ZIP sql-ghost-text-3.2.5-portable.zip from the 3.2.5 release and add it with Add → Archive; it needs no network access. The P2 ZIP there is the same repository. Upgrading from 2.0, verification, rollback and uninstall: INSTALL.md.

See it work

History replay · Complete a previously run statement, then choose a learned value.

DBeaver SQL editor: while typing SELECT c.FirstName, c.LastName the rest of a statement run before appears in grey; it is accepted and the learned value 'Canada' is offered after the equals sign

What's new in 3.2

  • One completion provider at a time: SQL Ghost Text or DBeaver's own SQL Assist, chosen on first start or in Preferences; switching back restores DBeaver exactly as it was.
  • Context: virtual foreign keys for JOINs, temporary tables of the session, schema-qualified column paths and large schema catalogs.
  • Portable offline ZIP in every release, and live lookups that recover after a lost connection.
  • Experimental, off by default: a persistent per-connection index of table names you used (PostgreSQL).

What's new in 3.0

  • Automatic adaptive dropdown after alias. or table., filtered as you type.
  • Quick Documentation (F2) and a five-row example preview (Shift+Tab) for the selected column.
  • Learned literal values: values you compared a column with before are offered again, stored locally.
  • Standalone Parameter Info above function calls.
  • Longer, verified history replay through GROUP BY, ORDER BY, HAVING, window clauses and set operations; every replayed alias and column is checked against the current query. When statements you ran continue differently from the same point and none holds a clear majority of your recent use, the replay stops there instead of guessing.
  • Foreign key JOIN predicates in the suggestion list, whatever the SELECT list contains.

Full list: CHANGELOG · release notes.

Features

Ghost Text, one token at a time

Tab accepts the whole suggestion; → accepts the next SQL token (keyword, identifier, operator). Nothing changes until you accept, and suggested SQL is never executed.

Typing SEL shows ECT in grey; Right Arrow accepts SELECT, then *, FROM, Customer, c and WHERE one token at a time

Columns, details and example rows

After alias. a compact list opens by itself with column types. F2 shows the column's metadata; Shift+Tab loads up to five example values from the database, only when you ask.

Typing a. after WHERE opens a list with Title, AlbumId and ArtistId; F2 and Shift+Tab show the Title column's type and five example titles

Learned values

After column = the values you used for that column in executed queries are offered: one as Ghost Text, several in the list. When exactly one value was learned for a comparison, a remembered statement also continues past it (turn this off in Preferences → SQL Ghost Text).

A value is learned from its first execution. Nothing is offered while block selection (column editing) or several carets are active, while DBeaver's own completion list is open, or when value learning is off. Values are not learned from statements longer than 8,192 characters or from statements that mention passwords, secrets, tokens or keys.

After c.Country = a list offers 'Canada' and 'Brazil'; Enter inserts 'Canada'

Foreign key JOINs

After JOIN … ON, open the suggestion list (⌘⌥G on macOS, Ctrl+Alt+G elsewhere): predicates from the database's foreign keys come first. When exactly one foreign key links the joined table to a table already in the statement and history has no other continuation, it also appears as Ghost Text; several keys (two roles, self-joins) are offered only in the list.

After JOIN Artist r ON the suggestion list shows a.ArtistId = r.ArtistId labeled Foreign key first; Enter inserts it

Parameter Info

The signature of the function you are typing appears above the call, with the return type and the number of overloads (click ‹ › to switch).

Typing substr( shows a popup with the substr signature and an overload counter 1/2 above the line

Also: context-aware completion by clause and scope (CTEs, subqueries, set operations), alias learning per connection and schema, and history kept per connection, catalog and schema.

Keyboard

Shortcut Context Action
Tab Ghost Text Accept the whole suggestion
→ Ghost Text Accept the next SQL token
Esc Ghost Text or list Dismiss
↑ / ↓ List Move selection
Enter / Tab List Insert selection
F2 List Show or hide details
Shift+Tab List, column selected Load example values (otherwise DBeaver's own Shift+Tab)
⌘⌥G · Ctrl+Alt+G Editor Open the suggestion list (macOS · Windows/Linux)

Change the shortcut under Preferences → General → Keys → Show SQL Ghost Text Suggestions. Automatic suggestions, learning and example values are configured in Preferences → SQL Ghost Text.

Compatibility

Component Compatibility
DBeaver Community Edition 26.2 (tested on 26.2.5)
Java 21, bundled with DBeaver
Databases Any JDBC connection DBeaver supports; dialect knowledge for SQLite, PostgreSQL, MySQL and StarRocks. Real JDBC tests: SQLite
Platforms macOS arm64 tested. Windows and Linux not yet verified for 3.0

Quality

Measured headless on the 3.0.0 prediction pipeline:

Check Result
Golden scenarios 380 in 20 categories: 220/221 required suggestions, 0 incorrect offers, 82/82 required abstentions, 0 invented names
Property and stateful tests about 12,500 generated variants; 160 typing and learning sequences with restarts
Semantic mutations 49 of 54 killed, 3 equivalent, 2 need a Linux editor environment
3.0 vs 2.0, same workload correct suggestions +70% cold, +28% warm

Not done for 3.0.0, and not claimed:

  • installed latency against native completion (headless engine P95 is 4.82 ms);
  • memory and the long soak test;
  • an independent sealed holdout;
  • real JDBC on PostgreSQL, MySQL and StarRocks;
  • Windows and Linux;
  • five independent users and an independent audit.

The length criterion of gate 10 is not met (gap closure 0.083 by default, 0.135 with experimental multiline, against 0.25). Details: release notes and the acceptance matrix.

3.2.5 performance status. Installed four-arm measurements (native DBeaver, 3.1.1, 3.2.5 with and without the experimental index) on PostgreSQL and StarRocks with injected network and metadata delays are in progress (#87). Until they finish, no latency or request-reduction advantage on large or slow catalogs is claimed.

Privacy

Prediction, learning and storage run inside DBeaver. Learned history and values stay in your DBeaver workspace and can contain SQL and literal values from queries you executed. Values from statements that mention passwords, secrets, tokens or keys, and from user and grant commands, are not learned. Example rows are read from the active database only when you press Shift+Tab. Turn learning off or clear learned values in Preferences → SQL Ghost Text; clear a connection's history with Clear SQL Ghost Text History for Current Connection.

Development Roadmap

Latest stable release · 3.2.5

Milestone Issue progress
3.0.1 — Reliability & Bug Fixes Closed issue percentage
3.1.0 — Prediction Engine Improvements Closed issue percentage
3.1.1 — Identifier Discovery Hotfix Closed issue percentage
3.2.0 — Context Intelligence Closed issue percentage
3.2.5 — Exclusive Completion, Onboarding & Portable Distribution Closed issue percentage
Persistent Metadata Index — Experimental Closed issue percentage
3.3.0 — Multiline Ghost Text & SQL Snippets Closed issue percentage
3.4.0 — Selective Column Lists Closed issue percentage
3.5.0 — JOIN USING Completion Closed issue percentage
4.0.0 — Compound Query Assistance Closed issue percentage
Continuous QA — Quality & Infrastructure Closed issue percentage

Percentages track closed issues in GitHub Milestones. Release readiness also depends on the applicable acceptance checks. See the public roadmap for goals, dependencies and experimental features.

Documentation

Download History

Plug-in downloads Stable Pre-release Last update

Plug-in package downloads from GitHub Releases over time, stable and pre-release
Downloads by release Plug-in package downloads per GitHub release, stable and pre-release

Source: the public GitHub Releases API download counters, snapshotted daily into stats/ on GitHub Pages by download_stats.py. Only plug-in packages count (P2 ZIP, portable offline ZIP, the discontinued portable archives); checksum files and documents do not. A download is not an installation, and installs from the update site are not counted. History starts with the first snapshot on 2026-12-05; earlier days are not reconstructed. The plug-in itself sends nothing.

Star History

GitHub stars over time for SQL Ghost Text

About

Inline Ghost Text SQL completion for DBeaver: history replay, learned values, column details, foreign key JOINs. Local only.

Topics

Resources

Contributing

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages