improved h2 support. for issue #2555

This commit is contained in:
wenshao
2018-05-07 21:16:36 +08:00
parent 802ada35dd
commit a2dd353b0d
2 changed files with 85 additions and 0 deletions
@@ -274,6 +274,22 @@ public class SQLSelectParser extends SQLParser {
parseFetchClause(queryBlock);
if (lexer.token() == Token.FOR) {
lexer.nextToken();
accept(Token.UPDATE);
queryBlock.setForUpdate(true);
if (lexer.identifierEquals(FnvHash.Constants.NO_WAIT) || lexer.identifierEquals(FnvHash.Constants.NOWAIT)) {
lexer.nextToken();
queryBlock.setNoWait(true);
} else if (lexer.identifierEquals(FnvHash.Constants.WAIT)) {
lexer.nextToken();
SQLExpr waitTime = this.exprParser.primary();
queryBlock.setWaitTime(waitTime);
}
}
return queryRest(queryBlock, acceptUnion);
}