Skip to content

Commit 70095a1

Browse files
committed
parse drop domain
1 parent 3ea10d0 commit 70095a1

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/pegjs/oracle.pegjs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,33 @@ start
145145

146146
stmt
147147
= create_table_stmt
148-
/ create_domain_stmt
149148
/ drop_table_stmt
150149
/ alter_table_stmt
150+
/ create_domain_stmt
151+
/ drop_domain_stmt
152+
153+
drop_domain_stmt
154+
= operation:KW_DROP _
155+
usecase:KW_USECASE? _
156+
object:KW_DOMAIN _
157+
if_exists:if_exists? _
158+
name:schema_object _
159+
force:(f:KW_FORCE _ preserve:KW_PRESERVE? {return { force: f, preserve };})? _
160+
SEMI_COLON {
161+
return {
162+
operation,
163+
usecase,
164+
object,
165+
if_exists,
166+
name,
167+
force,
168+
};
169+
}
170+
171+
if_exists
172+
= KW_IF _ KW_EXISTS {
173+
return 'if exists';
174+
}
151175

152176
create_domain_stmt
153177
= create_single_column_domain

0 commit comments

Comments
 (0)