Skip to content

Commit

Permalink
[#7518] [#8397] Parser doesn't recognise BOOL data type
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Mar 7, 2019
1 parent fe5342f commit ed7733e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 5 additions & 9 deletions jOOQ-manual/src/main/resources/org/jooq/web/grammar-3.12.txt
Expand Up @@ -971,17 +971,15 @@ dataType =
| 'BINARY' [ '(' unsignedInteger ')' ]
| 'BIT' [ '(' unsignedInteger ')' ]
| 'BLOB' [ '(' unsignedInteger ')' ]
| 'BOOLEAN'
| 'CHAR' [ '(' unsignedInteger ')' [ 'BYTE' | 'CHAR' ] ] [ 'COLLATE' collationName ]
| 'CHARACTER' [ '(' unsignedInteger ')' [ 'BYTE' | 'CHAR' ] ] [ 'COLLATE' collationName ]
| ( 'BOOL' | 'BOOLEAN' )
| ( 'CHAR' | 'CHARACTER' ) [ '(' unsignedInteger ')' [ 'BYTE' | 'CHAR' ] ] [ 'COLLATE' collationName ]
| 'CLOB' [ '(' unsignedInteger ')' ] [ 'COLLATE' collationName ]
| 'DATE'
| 'DECIMAL' [ '(' ( '*' | unsignedInteger ) [ ',' signedInteger ] ')' ]
| 'DOUBLE' [ 'PRECISION' ] [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
| 'ENUM' '(' stringLiteral [ ',' stringLiteral ] ')' [ 'COLLATE' collationName ]
| 'FLOAT' [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
| 'INT' [ '(' unsignedInteger ')' ] [ 'UNSIGNED' ]
| 'INTEGER' [ '(' unsignedInteger ')' ] [ 'UNSIGNED' ]
| ( 'INT' | 'INTEGER' ) [ '(' unsignedInteger ')' ] [ 'UNSIGNED' ]
| 'LONGBLOB'
| 'LONGTEXT' [ 'COLLATE' collationName ]
| 'LONG NVARCHAR' [ '(' unsignedInteger ')' ] [ 'COLLATE' collationName ]
Expand All @@ -992,8 +990,7 @@ dataType =
| 'MEDIUMTEXT' [ 'COLLATE' collationName ]
| 'NCHAR' [ '(' unsignedInteger ')' ] [ 'COLLATE' collationName ]
| 'NCLOB' [ 'COLLATE' collationName ]
| 'NUMBER' [ '(' ( '*' | unsignedInteger ) [ ',' signedInteger ] ')' ]
| 'NUMERIC' [ '(' ( '*' | unsignedInteger ) [ ',' signedInteger ] ')' ]
| ( 'NUMBER' | 'NUMERIC' ) [ '(' ( '*' | unsignedInteger ) [ ',' signedInteger ] ')' ]
| 'NVARCHAR' [ '(' unsignedInteger ')' ] [ 'COLLATE' collationName ]
| 'OTHER'
| 'REAL' [ '(' unsignedInteger [ ',' unsignedInteger ] ')' ]
Expand All @@ -1011,9 +1008,8 @@ dataType =
| 'TINYINT' [ '(' unsignedInteger ')' ] [ 'UNSIGNED' ]
| 'TINYTEXT' [ 'COLLATE' collationName ]
| 'UUID'
| 'VARCHAR' [ '(' unsignedInteger [ 'BYTE' | 'CHAR' ] ')' ] [ 'COLLATE' collationName ]
| ( 'VARCHAR' | 'CHARACTER VARYING' ) [ '(' unsignedInteger [ 'BYTE' | 'CHAR' ] ')' ] [ 'COLLATE' collationName ]
| 'VARCHAR2' [ '(' unsignedInteger ')' [ 'BYTE' | 'CHAR' ] ] [ 'COLLATE' collationName ]
| 'CHARACTER VARYING' [ '(' unsignedInteger ')' [ 'BYTE' | 'CHAR' ] ] [ 'COLLATE' collationName ]
| 'VARBINARY' [ '(' unsignedInteger ')' ]
) [ arraySuffix ]
;
Expand Down
3 changes: 2 additions & 1 deletion jOOQ/src/main/java/org/jooq/impl/ParserImpl.java
Expand Up @@ -8493,7 +8493,8 @@ else if (parseKeywordOrIdentifierIf(ctx, "BIT"))
return parseDataTypeLength(ctx, SQLDataType.BIT);
else if (parseKeywordOrIdentifierIf(ctx, "BLOB"))
return parseDataTypeLength(ctx, SQLDataType.BLOB);
else if (parseKeywordOrIdentifierIf(ctx, "BOOLEAN"))
else if (parseKeywordOrIdentifierIf(ctx, "BOOLEAN") ||
parseKeywordOrIdentifierIf(ctx, "BOOL"))
return SQLDataType.BOOLEAN;
else if (parseKeywordOrIdentifierIf(ctx, "BYTEA"))
return SQLDataType.BLOB;
Expand Down

0 comments on commit ed7733e

Please sign in to comment.