help: advanced-mode SQL forms collapse onto simple sibling (no distinct help content) #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The in-app
helpcommand (H3) collapses the advanced-mode SQL commandforms onto their simple-mode siblings, so
help <topic>does not showdistinct help for the SQL syntax — even though the simple-DSL and
advanced-SQL syntaxes are genuinely different.
Cause
The seven advanced-mode SQL command nodes —
SELECT,WITH,SQL_INSERT,SQL_UPDATE,SQL_DELETE,EXPLAIN_SQL(and any futureSQL form) — carry
help_id: Nonein the grammar tree. Per the comment atsrc/dsl/grammar/mod.rs:915-918, this is a deduplication mechanism forthe
helpcommand's list: they share an entry word with a simplesibling, and
note_helphas no dedup, so giving them ahelp_idwouldprint the same command twice in the
helplist.So the collapse was a deliberate list-formatting choice, not a
decision that advanced SQL forms need no distinct help content. As a side
effect,
help <sql-form>(e.g.help select) has nohelp.<id>block toresolve to.
Note: the parse-error / usage layer already distinguishes them —
ADR-0042 (H1a) §"the advanced usage block shows every form" renders each
form's usage on a parse error. So only the
helpcommand lags.Why now
Surfaced while scoping H2 /
hint(ADR-0053). H2 sidesteps this bykeying tier-3 hint content on a new dedicated
hint_id(one per commandform, simple and advanced, each syntactically correct), rather than on
help_id. That fixes the hint surface but leaves the help surfaceunchanged — hence this separate issue.
helpis shipped, ADR-backed(ADR-0021/0023/0024) territory and deserves its own decision rather than a
silent rider on the hint ADR.
Scope to decide
help select/help(advancedmode) actually produce for the SQL forms today?
helpcontent, and if so how to key it without re-introducing duplicate
entries in the
helplist (e.g. dedup by entry word + mode, or adistinct help key rendered only in advanced mode).
hint_idapproach (ADR-0053) so the twocontextual-help surfaces don't diverge.
Notes
accurate SQL-form help matters there specifically.