Grammar: with-pk column specs use name(type), matching add column
`create table … with pk` parsed column types as `name:type`,
while `add column` uses `name(type)`. Unify on the parens
form so column-type syntax is consistent across the DSL:
create table T with pk id(serial), name(text)
Only `COL_SPEC` changes (`:` → `( … )`); `build_create_table`
reads columns by role, so it is unaffected. The `:` that
separates table from column in `add column` / `drop column`
is unchanged. Sweeps the test suite, the typing-surface
matrix (two `after_colon` cells renamed to `after_paren`,
4 snapshots regenerated), the friendly catalog's usage
templates, ADR-0009's example, and requirements.md.
1039 passing / 0 failing / 1 ignored; clippy clean.
This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
||||
---
|
||||
source: tests/typing_surface/create_table.rs
|
||||
description: "input=\"create table Customers with pk Code:\" cursor=36"
|
||||
description: "input=\"create table Customers with pk Code(\" cursor=36"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "create table Customers with pk Code:",
|
||||
input: "create table Customers with pk Code(",
|
||||
cursor: 36,
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
+1
-1
@@ -9,7 +9,7 @@ Assessment {
|
||||
state: IncompleteAtEof,
|
||||
hint: Some(
|
||||
Prose(
|
||||
"Next: `:`",
|
||||
"Next: `(`",
|
||||
),
|
||||
),
|
||||
completion: None,
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
---
|
||||
source: tests/typing_surface/create_table.rs
|
||||
description: "input=\"create table Memberships with pk UserId:int, GroupId:int\" cursor=56"
|
||||
description: "input=\"create table Memberships with pk UserId(int), GroupId(int)\" cursor=58"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "create table Memberships with pk UserId:int, GroupId:int",
|
||||
cursor: 56,
|
||||
input: "create table Memberships with pk UserId(int), GroupId(int)",
|
||||
cursor: 58,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Prose(
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
---
|
||||
source: tests/typing_surface/create_table.rs
|
||||
description: "input=\"create table Customers with pk Code:text\" cursor=40"
|
||||
description: "input=\"create table Customers with pk Code(text)\" cursor=41"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "create table Customers with pk Code:text",
|
||||
cursor: 40,
|
||||
input: "create table Customers with pk Code(text)",
|
||||
cursor: 41,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Prose(
|
||||
|
||||
Reference in New Issue
Block a user