Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit 8844885

Browse files
committed
Allow CREATE TRIGGER to omit trigger name.
Omitting the trigger name in a CREATE TRIGGER is another undocumented feature of the SQLite parser.
1 parent b451d71 commit 8844885

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/grammar.pegjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2301,8 +2301,13 @@ index_on "ON Clause"
23012301
* enforced on UPDATE, DELETE, and INSERT statements in the trigger_action.
23022302
* See {@link https://www.sqlite.org/lang_createtrigger.html}.
23032303
*/
2304+
/**
2305+
* @note
2306+
* Omitting the trigger name in a CREATE TRIGGER is another undocumented
2307+
* feature of the SQLite parser.
2308+
*/
23042309
create_trigger "CREATE TRIGGER Statement"
2305-
= s:( create_trigger_start ) ne:( create_core_ine )? n:( id_trigger ) o
2310+
= s:( create_trigger_start ) ne:( create_core_ine )? n:( id_trigger )? o
23062311
cd:( trigger_conditions ) ( ON ) o o:( id_table ) o
23072312
me:( trigger_foreach )? wh:( trigger_when )? a:( trigger_action )
23082313
{

0 commit comments

Comments
 (0)