Skip to main content

Module sources

Module sources 

Source
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 u after writing FROM users AS u, orders o ... without having to remember every alias. Each alias item carries the resolved table in its description. 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 detail lists every owner so the user still sees the origins.
columns_of_alias
Emit columns of the table resolved by alias in scope, 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_schema but for the function namespace: invoked when the user types schema.<cursor> and the dot handler wants to surface schema.fn(...) candidates alongside schema.table ones.
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 the PUBLIC pseudo-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 functions safe 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.