mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved h2 support. for issue #2555
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user