[jOOQ/jOOQ#9719] Support MySQL's single argument ISNULL() in parser

This commit is contained in:
Knut Wannheden 2020-01-09 12:39:19 +01:00
parent aa35783e55
commit 2778b20375
2 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#Database Configuration
db.driver=oracle.jdbc.OracleDriver
db.url=jdbc:oracle:thin:@localhost:1521:ORCLCDB
db.url=jdbc:oracle:thin:@localhost:1521:xe
db.username=SP
db.password=SP

View File

@ -8152,11 +8152,10 @@ final class ParserImpl implements Parser {
if (parseFunctionNameIf(ctx, "ISNULL")) {
parse(ctx, '(');
Field<?> f1 = parseField(ctx);
parse(ctx, ',');
Field<?> f2 = parseField(ctx);
Field<?> f2 = parseIf(ctx, ',') ? parseField(ctx) : null;
parse(ctx, ')');
return isnull(f1, f2);
return f2 != null ? isnull(f1, f2) : field(f1.isNull());
}
return null;