Java源码示例:net.sf.jsqlparser.statement.select.Limit
示例1@VisibleForTesting
String createCountQuery(Select select, long batchSize) {
Limit limit = new Limit();
limit.setRowCount(new LongValue(batchSize));
return String.format("SELECT COUNT(*) AS C FROM ((%s)%s) Q", select, limit);
}
public Limit getLimit() {
return setOp.getLimit();
}
public void setLimit(Limit limit) {
setOp.setLimit(limit);
}