Advanced-mode CREATE TABLE: double shown as a separate type literal; full type list only appears after a trailing space
#5
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?
Observed
Typing
create table Orders (count(advanced mode), the hint reads:…with
doublelisted as if it were peer to the rest of the type role. After adding one more space (create table Orders (count), the full type list appears as expected.Adding the trailing space is the workaround; the column name itself isn't what's coupling the hint — any partial ident at that position produces the same text.
Why
SQL_TYPEis aChoicebetween two branches (src/dsl/grammar/sql_create_table.rs:88):The two-word alias
double precisionwas given a dedicated branch (per the comment, so the per-wordIdentvalidator never has to make sense ofdoubleon its own). The completion-probe surfaces both branches' leading tokens: the literaldoublefrom the first branch, and the type-name ident role from the second.Expected
Either:
double precisionform into the regular type list so the hint renders a single coherent "type" suggestion, orRelated to
The other two advanced-mode CREATE TABLE completion bugs (filed separately):
(continuation not being suggestedResolved in commit
6f87ad1.Added
("double", "double precision")toCOMPOSITE_CANDIDATESand extended the keyword filter to drop composite openers, so the composite phrase replaces the bare opener instead of appearing alongside it. Tab now offersdouble precisionas a single coherent candidate; baredoubleno longer appears alongsideint/text/etc. in the regular type list.The partial-typing prose case (
create table T (count, no trailing space) is subsumed by #4's IntroProse: while mid-typing the user reads "Type a column name…", then advances to the clean type list once the column name resolves.