mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-04 19:09:20 -05:00
grammar: Fix parsing of exotic column data types
This fixes two issues with unusual but valid data types for columns: 1) When having a data type that consists of more than one word these wouldn't be separated anymore after parsing. This is fixed now. Example: CREATE TABLE test(a long int); would have become CREATE TABLE test(a longint); 2) Some keywords are allowed to be used as data types. Parsing these tables would have failed entire prior to this. This is fixed, too. Example: CREATE TABLE test(a no); would fail.
This commit is contained in:
@@ -348,7 +348,7 @@ name : ID | QUOTEDID | QUOTEDLITERAL | STRINGLITERAL;
|
||||
|
||||
type_name
|
||||
:
|
||||
(name)+
|
||||
(name | keywordastablename)+
|
||||
(LPAREN signednumber (COMMA signednumber)? RPAREN)?
|
||||
{#type_name = #([TYPE_NAME, "TYPE_NAME"], #type_name);}
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user