Expand description
Parse strategies for hybrid SQL completion.
This module provides multiple strategies for parsing incomplete SQL, trying them in order of cost until one succeeds.
Note: This module assumes ASCII SQL keywords and identifiers. Non-ASCII characters in identifiers are handled correctly, but keyword matching is ASCII-only for consistent cross-dialect behavior.
Functionsยง
- try_
complete_ statements - Strategy 3: Parse only complete statements before cursor
- try_
full_ parse - Strategy 1: Parse complete SQL as-is
- try_
truncated_ parse - Strategy 2: Truncate SQL at a safe point before cursor
- try_
with_ fixes - Strategy 4: Apply minimal fixes to make SQL parseable