Skip to content

Commit 8cafe51

Browse files
committed
test: add missing statement golden
1 parent b4dbe29 commit 8cafe51

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
--- create_table_anonymous_primary_key.sql
2+
CREATE TABLE PKsTable(
3+
PK1 INT64,
4+
PK2 INT64,
5+
PRIMARY KEY (PK1, PK2)
6+
)
7+
--- AST
8+
&ast.CreateTable{
9+
Rparen: 74,
10+
PrimaryKeyRparen: -1,
11+
Name: &ast.Path{
12+
Idents: []*ast.Ident{
13+
&ast.Ident{
14+
NamePos: 13,
15+
NameEnd: 21,
16+
Name: "PKsTable",
17+
},
18+
},
19+
},
20+
Columns: []*ast.ColumnDef{
21+
&ast.ColumnDef{
22+
Null: -1,
23+
Key: -1,
24+
Name: &ast.Ident{
25+
NamePos: 25,
26+
NameEnd: 28,
27+
Name: "PK1",
28+
},
29+
Type: &ast.ScalarSchemaType{
30+
NamePos: 29,
31+
Name: "INT64",
32+
},
33+
Hidden: -1,
34+
},
35+
&ast.ColumnDef{
36+
Null: -1,
37+
Key: -1,
38+
Name: &ast.Ident{
39+
NamePos: 38,
40+
NameEnd: 41,
41+
Name: "PK2",
42+
},
43+
Type: &ast.ScalarSchemaType{
44+
NamePos: 42,
45+
Name: "INT64",
46+
},
47+
Hidden: -1,
48+
},
49+
},
50+
TableConstraints: []*ast.TableConstraint{
51+
&ast.TableConstraint{
52+
ConstraintPos: -1,
53+
Constraint: &ast.TablePrimaryKey{
54+
Primary: 51,
55+
Rparen: 72,
56+
Columns: []*ast.IndexKey{
57+
&ast.IndexKey{
58+
DirPos: -1,
59+
Name: &ast.Ident{
60+
NamePos: 64,
61+
NameEnd: 67,
62+
Name: "PK1",
63+
},
64+
},
65+
&ast.IndexKey{
66+
DirPos: -1,
67+
Name: &ast.Ident{
68+
NamePos: 69,
69+
NameEnd: 72,
70+
Name: "PK2",
71+
},
72+
},
73+
},
74+
},
75+
},
76+
},
77+
}
78+
79+
--- SQL
80+
CREATE TABLE PKsTable (
81+
PK1 INT64,
82+
PK2 INT64,
83+
PRIMARY KEY (PK1, PK2)
84+
)

0 commit comments

Comments
 (0)