/** * Applies the paging. * * @param selectToPage the contents of the enclosed block, not null * @param fragments the SQL fragments for context, not null * @param params the SQL arguments, not null */ String applyPaging(String selectToPage, SqlFragments fragments, SqlParams params) { int offset = extractVariableOrLiteral(params, _offsetVariable); int fetchLimit = extractVariableOrLiteral(params, _fetchVariable); return fragments.getConfig().addPaging(selectToPage, offset, fetchLimit == Integer.MAX_VALUE ? 0 : fetchLimit); }