public void deparseLimit(Limit limit) { // LIMIT n OFFSET skip buffer.append(" LIMIT "); if (limit.isRowCountJdbcParameter()) { buffer.append("?"); } else if (limit.getRowCount() != 0) { buffer.append(limit.getRowCount()); } else { /* from mysql docs: For compatibility with PostgreSQL, MySQL also supports the LIMIT row_count OFFSET offset syntax. To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. */ buffer.append("18446744073709551615"); } if (limit.isOffsetJdbcParameter()) { buffer.append(" OFFSET ?"); } else if (limit.getOffset() != 0) { buffer.append(" OFFSET " + limit.getOffset()); } }
if (jj_2_45(2)) { token = jj_consume_token(S_IDENTIFIER); ((JdbcNamedParameter)limit.getOffset()).setName(token.image); } else {
public void deparseLimit(Limit limit) { // LIMIT n OFFSET skip buffer.append(" LIMIT "); if (limit.isRowCountJdbcParameter()) { buffer.append("?"); } else if (limit.getRowCount() != 0) { buffer.append(limit.getRowCount()); } else { /* from mysql docs: For compatibility with PostgreSQL, MySQL also supports the LIMIT row_count OFFSET offset syntax. To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. */ buffer.append("18446744073709551615"); } if (limit.isOffsetJdbcParameter()) { buffer.append(" OFFSET ?"); } else if (limit.getOffset() != 0) { buffer.append(" OFFSET " + limit.getOffset()); } }
private void visitLimit(Limit limit) { if (limit.getOffset() != null) { if (limit.getOffset() instanceof JdbcParameter) { limit.setOffset(ImmutableExpressionsCache.internOrFixJdbcParameterExpression((JdbcParameter) limit.getOffset())); } limit.getOffset().accept(this); } if (limit.getRowCount() != null) { if (limit.getRowCount() instanceof JdbcParameter) { limit.setRowCount(ImmutableExpressionsCache.internOrFixJdbcParameterExpression((JdbcParameter) limit.getRowCount())); } limit.getRowCount().accept(this); } }
public PgLimit(Limit limit) { this.offset = limit.getOffset(); this.rowCount = limit.getRowCount(); this.rowCountJdbcParameter = limit.isRowCountJdbcParameter(); this.offsetJdbcParameter = limit.isOffsetJdbcParameter(); this.limitAll = limit.isLimitAll(); }
if (limit.isOffsetJdbcParameter()) { buffer.append("?"); } else if (limit.getOffset() != 0) { buffer.append(limit.getOffset()); buffer.append(limit.getCommentOffset() != null ? " " + limit.getCommentOffset() + ExpressionDeParser.LINE_SEPARATOR : "").append(" Offset") .append(limit.getCommentOffsetValue() != null ? " " + limit.getCommentOffsetValue() + ExpressionDeParser.LINE_SEPARATOR : "").append(" ?"); } else if (limit.getOffset() != 0) { buffer.append(limit.getCommentOffset() != null ? " " + limit.getCommentOffset() + ExpressionDeParser.LINE_SEPARATOR : "").append(" Offset ") .append(limit.getCommentOffsetValue() != null ? " " + limit.getCommentOffsetValue() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(limit.getOffset());
if (jj_2_44(2)) { token = jj_consume_token(S_IDENTIFIER); ((JdbcNamedParameter)limit.getOffset()).setName(token.image); } else {