assertDoesNotThrow(()->{
try {
PGSQLStatementParser parser = new PGSQLStatementParser("select tenant_id from operations where (operation = 'NEW' or operation = 'DELETE') offset ?");
SQLStatement statement = parser.parseStatement();
statement.toLowerCaseString();
} catch (Exception e) {
throw e;
}
});
select tenant_id from operations where (operation = 'NEW' or operation = 'DELETE') offset ? 是一个合理的postgresql sql, 但是PGSQLStatementParser 之后会抛异常
7.6. LIMIT and OFFSET
LIMIT and OFFSET allow you to retrieve just a portion of the rows that are generated by the rest of the query:
SELECT select_list
FROM table_expression
[ ORDER BY ... ]
[ LIMIT { number | ALL } ] [ OFFSET number ]
1条答案
按热度按时间bxpogfeg1#
对于offset ? limit ?也会有问题。