At select (and any other sql_expr_ident slot — WHERE, projections, HAVING, etc.) Tab cycles through schema columns plus a handful of expression keywords (null, distinct, not, true, false, exists, case, …). It does not offer common SQL function names.
After the function-call validator fix landed, the user can type sum/avg/etc. without false flagging, but they have to know the function names already. Pedagogically this is the next step: surface them as candidates so the user can discover them.
Scope to settle
Which functions? Aggregates (sum/avg/count/min/max) are the obvious first set. Likely also common scalars (length, upper, lower, coalesce, abs, round, trim, substr). A curated pedagogical set, not "every SQLite built-in".
Display kind? A new CandidateKind::Function could give them a distinct colour in the panel (same machinery the keyword/identifier kinds already use).
Prefix matching? Same prefix-match rule as keywords.
Trigger context? Only at sql_expr_ident positions (the walker tags this via the expected set already used in candidates_at_cursor_in_mode).
Related
Surfaced during the /runda round on the function-call validation fix.
Pairs naturally with the parallel ticket on "restore typing-time column-typo hint via known-function list" — both want the same curated list.
At `select ` (and any other `sql_expr_ident` slot — WHERE, projections, HAVING, etc.) Tab cycles through schema columns plus a handful of expression keywords (`null`, `distinct`, `not`, `true`, `false`, `exists`, `case`, …). It does **not** offer common SQL function names.
After the function-call validator fix landed, the user can type `sum`/`avg`/etc. without false flagging, but they have to know the function names already. Pedagogically this is the next step: surface them as candidates so the user can discover them.
### Scope to settle
- **Which functions?** Aggregates (sum/avg/count/min/max) are the obvious first set. Likely also common scalars (length, upper, lower, coalesce, abs, round, trim, substr). A curated pedagogical set, not "every SQLite built-in".
- **Display kind?** A new `CandidateKind::Function` could give them a distinct colour in the panel (same machinery the keyword/identifier kinds already use).
- **Prefix matching?** Same prefix-match rule as keywords.
- **Trigger context?** Only at `sql_expr_ident` positions (the walker tags this via the expected set already used in `candidates_at_cursor_in_mode`).
### Related
- Surfaced during the /runda round on the function-call validation fix.
- Pairs naturally with the parallel ticket on "restore typing-time column-typo hint via known-function list" — both want the same curated list.
Resolved by ADR-0022 Amendment 6 (commit 6d8c9ee): a curated KNOWN_SQL_FUNCTIONS list (src/dsl/sql_functions.rs) offers common SQL function names as Tab candidates (CandidateKind::Function, new tok_function colour) at expression positions. See docs/handoff/20260602-handoff-53.md.
Resolved by ADR-0022 Amendment 6 (commit 6d8c9ee): a curated KNOWN_SQL_FUNCTIONS list (src/dsl/sql_functions.rs) offers common SQL function names as Tab candidates (CandidateKind::Function, new tok_function colour) at expression positions. See docs/handoff/20260602-handoff-53.md.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
At
select(and any othersql_expr_identslot — WHERE, projections, HAVING, etc.) Tab cycles through schema columns plus a handful of expression keywords (null,distinct,not,true,false,exists,case, …). It does not offer common SQL function names.After the function-call validator fix landed, the user can type
sum/avg/etc. without false flagging, but they have to know the function names already. Pedagogically this is the next step: surface them as candidates so the user can discover them.Scope to settle
CandidateKind::Functioncould give them a distinct colour in the panel (same machinery the keyword/identifier kinds already use).sql_expr_identpositions (the walker tags this via the expected set already used incandidates_at_cursor_in_mode).Related
Resolved by ADR-0022 Amendment 6 (commit
6d8c9ee): a curated KNOWN_SQL_FUNCTIONS list (src/dsl/sql_functions.rs) offers common SQL function names as Tab candidates (CandidateKind::Function, new tok_function colour) at expression positions. See docs/handoff/20260602-handoff-53.md.