/** * Based on the inClauseLimit of the DBDictionary, create the needed IN * clauses */ private void createInContains(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, List list, Column[] cols) { int inClauseLimit = ctx.store.getDBDictionary().inClauseLimit; if (inClauseLimit <= 0 || list.size() <= inClauseLimit) inContains(sel, ctx, state, buf, list, cols); else { buf.append("("); for (int low = 0, high; low < list.size(); low = high) { if (low > 0) buf.append(" OR "); high = java.lang.Math.min(low + inClauseLimit, list.size()); inContains(sel, ctx, state, buf, list.subList(low, high), cols); } buf.append(")"); } }
/** * Based on the inClauseLimit of the DBDictionary, create the needed IN * clauses */ private void createInContains(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, List list, Column[] cols) { int inClauseLimit = ctx.store.getDBDictionary().inClauseLimit; if (inClauseLimit <= 0 || list.size() <= inClauseLimit) inContains(sel, ctx, state, buf, list, cols); else { buf.append("("); for (int low = 0, high; low < list.size(); low = high) { if (low > 0) buf.append(" OR "); high = java.lang.Math.min(low + inClauseLimit, list.size()); inContains(sel, ctx, state, buf, list.subList(low, high), cols); } buf.append(")"); } }
/** * Based on the inClauseLimit of the DBDictionary, create the needed IN * clauses */ private void createInContains(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, List list, Column[] cols) { int inClauseLimit = ctx.store.getDBDictionary().inClauseLimit; if (inClauseLimit <= 0 || list.size() <= inClauseLimit) inContains(sel, ctx, state, buf, list, cols); else { buf.append("("); for (int low = 0, high; low < list.size(); low = high) { if (low > 0) buf.append(" OR "); high = java.lang.Math.min(low + inClauseLimit, list.size()); inContains(sel, ctx, state, buf, list.subList(low, high), cols); } buf.append(")"); } }
/** * Based on the inClauseLimit of the DBDictionary, create the needed IN * clauses */ private void createInContains(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, List list, Column[] cols) { int inClauseLimit = ctx.store.getDBDictionary().inClauseLimit; if (inClauseLimit <= 0 || list.size() <= inClauseLimit) inContains(sel, ctx, state, buf, list, cols); else { buf.append("("); for (int low = 0, high; low < list.size(); low = high) { if (low > 0) buf.append(" OR "); high = java.lang.Math.min(low + inClauseLimit, list.size()); inContains(sel, ctx, state, buf, list.subList(low, high), cols); } buf.append(")"); } }
/** * Based on the inClauseLimit of the DBDictionary, create the needed IN * clauses */ private void createInContains(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, List list, Column[] cols) { int inClauseLimit = ctx.store.getDBDictionary().inClauseLimit; if (inClauseLimit <= 0 || list.size() <= inClauseLimit) inContains(sel, ctx, state, buf, list, cols); else { buf.append("("); for (int low = 0, high; low < list.size(); low = high) { if (low > 0) buf.append(" OR "); high = java.lang.Math.min(low + inClauseLimit, list.size()); inContains(sel, ctx, state, buf, list.subList(low, high), cols); } buf.append(")"); } }