forked from DerekStride/tree-sitter-sql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
comment_stat.txt
172 lines (141 loc) · 4.65 KB
/
comment_stat.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
================================================================================
Comment on table
================================================================================
COMMENT ON TABLE my_schema.my_table IS "this table is a test";
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(keyword_table)
(object_reference
schema: (identifier)
name: (identifier))
(keyword_is)
(literal))))
================================================================================
Comment on column is null
================================================================================
COMMENT ON COLUMN my_schema.my_table.my_column IS NULL;
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(keyword_column)
(object_reference
(object_reference
(identifier)
(identifier))
(identifier))
(keyword_is)
(keyword_null))))
================================================================================
Comment on cast
================================================================================
COMMENT ON CAST (varchar AS text) IS "convert varchar to text";
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(cast
(keyword_cast)
(field
(identifier))
(keyword_as)
(keyword_text))
(keyword_is)
(literal))))
================================================================================
Comment on materialized view
================================================================================
COMMENT ON MATERIALIZED VIEW matview IS "this view is materialized";
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(keyword_materialized)
(keyword_view)
(object_reference
(identifier))
(keyword_is)
(literal))))
================================================================================
Comment on trigger
================================================================================
COMMENT ON TRIGGER on_insert ON users IS "new user has been added";
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(keyword_trigger)
(identifier)
(keyword_on)
(object_reference
name: (identifier))
(keyword_is)
(literal))))
================================================================================
Comment on function
================================================================================
COMMENT ON FUNCTION schema_test.do_somthing(arg1 text) IS 'Do something';
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(keyword_function)
(object_reference
(identifier)
(identifier))
(function_arguments
(function_argument
(identifier)
(keyword_text)))
(keyword_is)
(literal))))
================================================================================
Comment on extension
================================================================================
COMMENT ON EXTENSION ext_test IS 'A testing extension';
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(keyword_extension)
(object_reference
(identifier))
(keyword_is)
(literal))))
================================================================================
Comment on function with arg mode
================================================================================
COMMENT ON FUNCTION schema_test.do_somthing(OUT arg1 text) IS 'Do something';
--------------------------------------------------------------------------------
(program
(statement
(comment_statement
(keyword_comment)
(keyword_on)
(keyword_function)
(object_reference
(identifier)
(identifier))
(function_arguments
(function_argument
(keyword_out)
(identifier)
(keyword_text)))
(keyword_is)
(literal))))