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()); } }
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()); } }
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.isRowCountJdbcParameter()) { buffer.append("?"); } else if (limit.getRowCount() != 0) { if (limit.isRowCountJdbcParameter()) { buffer.append("?"); } else {