Expand description
Item producers, one per kind of source data.
Each emitter pushes onto an output vector; the engine decides which
emitters to call based on the detected Context.
Functions§
- after_
projection_ keywords - Keywords valid at the end of a projection item (between SELECT and FROM).
- after_
table_ keywords - Keywords expected after a finished table reference: JOIN / WHERE / GROUP BY / HAVING / ORDER BY / LIMIT / set ops.
- aliases_
in_ scope - In-scope FROM/JOIN aliases declared in the current statement. Lets
the user complete
uafter writingFROM users AS u, orders o ...without having to remember every alias. Each alias item carries the resolved table in itsdescription. Items get a high priority bump (1) by the engine so they appear right under in-scope columns. - alter_
table_ actions - Sub-actions valid after
ALTER TABLE <name>. Each item is a snippet so the user lands inside the relevant placeholder. List is curated from the PG13+ ALTER TABLE grammar – the cardinality is too high to dump every variation, so we ship the high-value ones and let users fall back to free-form typing for the rest. - column_
constraint_ keywords - Column-constraint keywords valid right after a column type inside a CREATE TABLE definition.
- column_
item - columns
- Emit each column NAME exactly once – even when the same column
(
updated_at,created_at,id) appears in many tables, the user only sees one suggestion. The detail field still names the originating table so they can tell where the type came from. - columns_
all - Catalog-wide columns when the user has no FROM yet. Dedups by column
name – a column that appears in N tables produces one item whose
detaillists every owner so the user still sees the origins. - columns_
of_ alias - Emit columns of the table resolved by
aliasinscope, if any. Returns the number of items emitted so callers can detect “no match”. - columns_
of_ table - Columns of a specific catalog table only.
- constraint_
kinds - Constraint-kind keywords that follow
CONSTRAINT <name>. - create_
table_ entry_ starters - Starter keywords that may begin an entry inside a CREATE TABLE body in lieu of a fresh column name.
- db_
functions - db_
types - User-defined functions from the catalog. Surfaced alongside the
built-ins so completion shows app code next to standard SQL.
User-defined types from the live catalog (enum / domain / composite).
Emitted after
sources::types()in CastType phase so built-in PG types still sort first. - expression_
keywords - Keywords valid inside expression position. Excludes DDL/DML statement keywords so SELECT projection doesn’t get polluted with CREATE TABLE etc.
- functions
- functions_
in_ schema - Emit every function declared in the given schema. Mirror of
tables_in_schemabut for the function namespace: invoked when the user typesschema.<cursor>and the dot handler wants to surfaceschema.fn(...)candidates alongsideschema.tableones. - grant_
object_ classes - Object-class keywords valid after
GRANT ... ON. Real catalog targets are emitted alongside by the engine. - grant_
privileges - Privilege keywords valid after
GRANT/REVOKE. Mirrors the PG GRANT grammar. ALL [PRIVILEGES] short-hand is offered first so a quick “GRANT ALL …” stays one keystroke away. - grant_
roles - Role names valid after
GRANT ... TO/REVOKE ... FROM. Pulled from the live catalog plus thePUBLICpseudo-role. Empty live catalog -> only the four built-in / convention names so the menu still surfaces something useful offline. - keywords
- new_
old_ aliases - NEW and OLD virtual row aliases for trigger function bodies.
- order_
modifiers - Sort modifiers used inside ORDER BY.
- plpgsql_
keywords - PL/pgSQL flow-control + body essentials.
- projection_
functions - Subset of
functionssafe inside a SELECT projection / expression: aggregates, common scalar helpers, conditionals, window functions. Excludes the long tail (JSON/array helpers) that would be noise. - schemas
- statement_
keywords - Keywords valid at the start of a statement.
- tables
- tables_
in_ schema - Emit tables/views belonging to the named schema. Used by dot
completion when the user types
<schema>.and we don’t have a matching alias in scope – the next valid token in that position is a relation name in that schema. Returns the number of items emitted. - types
- types_
only - All known SQL types – used inside CREATE TABLE column-type position.