-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
Using the IN
keyword in a CHECK
causes parsing to fail. For example:
`col_name` varchar(5) CHECK( `col_name` = 'year' OR `col_name` = 'month' ),
Works but with an IN
statement doesn't:
`col_name` varchar(5) CHECK( `col_name` IN ('year', 'month') ),
With silent=False
we get an error like:
File ".../lib/python3.9/site-packages/simple_ddl_parser/ddl_parser.py", line 199, in p_error
raise DDLParserError(f"Unknown statement at {p}")
simple_ddl_parser.ddl_parser.DDLParserError: Unknown statement at LexToken(STRING,"'year'",1,544)
Using OR statements becomes unwieldy when there are more than a handful of options in the enum so it would be nice to support this. Thanks.
Metadata
Metadata
Assignees
Labels
No labels