Skip to main content

Module context

Module context 

Source
Expand description

Detect what kinds of completion items make sense at the cursor.

Token-only classifier: reads the text to the left of the cursor and recognises the high-value cases. Doesn’t depend on the parser succeeding so we keep working on half-written SQL.

Cursor positionContext
<alias>.<partial>DotOf
after FROM / JOIN / INTO / UPDATE / ALTER TABLETable
after ON / WHERE / HAVING / AND / ORPredicate (columns + funcs + keywords)
start of statementStatement (keywords-focused)
inside SELECT list (after SELECT, before FROM)Projection (columns of FROM + funcs)
anywhere elseGeneral (everything merged)

Enums§

Context

Functions§

detect