Skip to content

Commit ef99103

Browse files
committed
add snapshots
1 parent df11f0c commit ef99103

File tree

2 files changed

+113
-0
lines changed

2 files changed

+113
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
source: crates/parser/tests/statement_parser_test.rs
3+
description: "-- CREATE PUBLICATION mypublication FOR TABLE users, departments;\n-- CREATE PUBLICATION active_departments FOR TABLE departments WHERE (active IS TRUE);\nCREATE PUBLICATION alltables FOR ALL TABLES;"
4+
---
5+
Parse {
6+
cst: SourceFile@0..197
7+
SqlComment@0..65 "-- CREATE PUBLICATION ..."
8+
Newline@65..66 "\n"
9+
SqlComment@66..152 "-- CREATE PUBLICATION ..."
10+
Newline@152..153 "\n"
11+
CreatePublicationStmt@153..197
12+
Create@153..159 "CREATE"
13+
Whitespace@159..160 " "
14+
Publication@160..171 "PUBLICATION"
15+
Whitespace@171..172 " "
16+
Ident@172..181 "alltables"
17+
Whitespace@181..182 " "
18+
For@182..185 "FOR"
19+
Whitespace@185..186 " "
20+
All@186..189 "ALL"
21+
Whitespace@189..190 " "
22+
Tables@190..196 "TABLES"
23+
Ascii59@196..197 ";"
24+
,
25+
errors: [],
26+
stmts: [
27+
RawStmt {
28+
stmt: CreatePublicationStmt(
29+
CreatePublicationStmt {
30+
pubname: "alltables",
31+
options: [],
32+
pubobjects: [],
33+
for_all_tables: true,
34+
},
35+
),
36+
range: 152..196,
37+
},
38+
],
39+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
source: crates/parser/tests/statement_parser_test.rs
3+
description: "\n-- CREATE PUBLICATION insert_only FOR TABLE mydata WITH (publish = 'insert');\n-- CREATE PUBLICATION production_publication FOR TABLE users, departments, TABLES IN SCHEMA production;\nCREATE PUBLICATION sales_publication FOR TABLES IN SCHEMA marketing, sales;"
4+
---
5+
Parse {
6+
cst: SourceFile@0..258
7+
Newline@0..1 "\n"
8+
SqlComment@1..78 "-- CREATE PUBLICATION ..."
9+
Newline@78..79 "\n"
10+
SqlComment@79..182 "-- CREATE PUBLICATION ..."
11+
Newline@182..183 "\n"
12+
CreatePublicationStmt@183..258
13+
Create@183..189 "CREATE"
14+
Whitespace@189..190 " "
15+
Publication@190..201 "PUBLICATION"
16+
Whitespace@201..202 " "
17+
Ident@202..219 "sales_publication"
18+
Whitespace@219..220 " "
19+
For@220..223 "FOR"
20+
Whitespace@223..224 " "
21+
Tables@224..230 "TABLES"
22+
Whitespace@230..231 " "
23+
InP@231..233 "IN"
24+
Whitespace@233..234 " "
25+
Schema@234..240 "SCHEMA"
26+
Whitespace@240..241 " "
27+
PublicationObjSpec@241..250
28+
Ident@241..250 "marketing"
29+
Ascii44@250..251 ","
30+
Whitespace@251..252 " "
31+
PublicationObjSpec@252..257
32+
Ident@252..257 "sales"
33+
Ascii59@257..258 ";"
34+
,
35+
errors: [],
36+
stmts: [
37+
RawStmt {
38+
stmt: CreatePublicationStmt(
39+
CreatePublicationStmt {
40+
pubname: "sales_publication",
41+
options: [],
42+
pubobjects: [
43+
Node {
44+
node: Some(
45+
PublicationObjSpec(
46+
PublicationObjSpec {
47+
pubobjtype: PublicationobjTablesInSchema,
48+
name: "marketing",
49+
pubtable: None,
50+
location: 58,
51+
},
52+
),
53+
),
54+
},
55+
Node {
56+
node: Some(
57+
PublicationObjSpec(
58+
PublicationObjSpec {
59+
pubobjtype: PublicationobjTablesInSchema,
60+
name: "sales",
61+
pubtable: None,
62+
location: 69,
63+
},
64+
),
65+
),
66+
},
67+
],
68+
for_all_tables: false,
69+
},
70+
),
71+
range: 182..257,
72+
},
73+
],
74+
}

0 commit comments

Comments
 (0)