Schema
✓ functionalSuggestions grounded in the tables, columns, routines, and relationships you actually have.
Schema awareness starts with the actual shape of your database: its tables, columns, routines, and especially its keys. SQLly keeps that picture as a snapshot so suggestions stay quick and consistent, then refreshes it as the catalog changes.
What the model holds
- Tables and views, with their columns, types, and nullability
- Stored procedures and functions, with their parameters
- Declared foreign keys, fetched in bulk rather than one object at a time - which is what makes join reasoning fast enough to run while you type
- Name-inferred relationships where no formal key exists, clearly marked as inferences rather than presented as constraints
A snapshot, not a live query
Completion reads an immutable snapshot of the model, which has two consequences worth knowing. Suggestions are instant - no round trip stands between a keystroke and a menu. And they are consistent: every suggestion in one completion came from the same view of your schema, so you cannot get half an answer from before a refresh and half from after.
The snapshot is cached on disk per connection and database, so reconnecting - or relaunching - starts from a warm model instead of an empty one, and revalidates in the background.
More than one source
The same model can be built from your live database and a folder of local DDL, so completion knows about the table that exists only in your branch. When both define an object, the file wins and the database version is kept alongside it as drift you can list - see Multi-modal schema.
The pages below cover the parts you notice most while writing a query.
Auto join suggestion
An ON clause from real keys, with guesses labelled as guesses.
Auto alias suggestion
Readable, stable aliases that column completion then uses.
Improvement process
F2 when a suggestion is wrong - and your report becomes the test.
In this section
- Auto join suggestion — Start a JOIN and SQLly can offer the ON clause, favoring real foreign keys and clearly labeling its best guesses.
- Auto alias suggestion — Keep joins readable with table-name aliases that stay consistent from the first column to the last.
- Improvement process — Press F2 when completion misses the mark; your report can become the test that keeps the fix in place.