public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { KeyExpState estate = (KeyExpState) state; _key.appendTo(sel, ctx, estate.key, sql, index); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { BinaryOpExpState bstate = (BinaryOpExpState) state; buf.append(" NULLIF("); // MySQL does not like space before bracket _val1.appendTo(sel, ctx, bstate.state1, buf, 0); buf.append(","); _val2.appendTo(sel, ctx, bstate.state2, buf, 0); buf.append(")"); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { BinaryOpExpState bstate = (BinaryOpExpState) state; buf.append(" NULLIF("); // MySQL does not like space before bracket _val1.appendTo(sel, ctx, bstate.state1, buf, 0); buf.append(","); _val2.appendTo(sel, ctx, bstate.state2, buf, 0); buf.append(")"); }
public void appendTo(SQLBuffer buf, int index) { buf.append(_pre); _val2.appendTo(_sel, _ctx, _state, buf, index); buf.append(_post); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index, String operator) { ArgsExpState astate = (ArgsExpState) state; for (int i = 0; i < _args.length; i++) { _args[i].appendTo(sel, ctx, astate.states[i], sql, index); if( operator != null ) { sql.addCastForParam(operator, _args[i]); } if (i < _args.length-1) sql.append(", "); } }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { CoalesceExpState cstate = (CoalesceExpState) state; buf.append(" COALESCE("); // MySQL does not like space before bracket for (int i = 0; i < _vals.length; i++) { if (i > 0) buf.append(","); _vals[i].appendTo(sel, ctx, cstate.states[i], buf, 0); } buf.append(")"); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf) { BinaryOpExpState bstate = (BinaryOpExpState) state; buf.append(" WHEN "); _exp.appendTo(sel, ctx, bstate.state1, buf); buf.append(" THEN "); _val.appendTo(sel, ctx, bstate.state2, buf, 0); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { DBDictionary dict = ctx.store.getDBDictionary(); String func = dict.stringLengthFunction; dict.assertSupport(func != null, "StringLengthFunction"); func = dict.getCastFunction(getValue(), func); int idx = func.indexOf("{0}"); buf.append(func.substring(0, idx)); getValue().appendTo(sel, ctx, state, buf, index); buf.append(func.substring(idx + 3)); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { GeneralCaseExpState cstate = (GeneralCaseExpState) state; buf.append(" CASE "); int i = 0; for (; i < _exp.length; i++) _exp[i].appendTo(sel, ctx, cstate.states[i], buf); buf.append(" ELSE "); _val.appendTo(sel, ctx, cstate.states[i], buf, 0); buf.append(" END "); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf) { InSubQExpState istate = (InSubQExpState) state; _sub.calculateValue(sel, ctx, istate.subqState, null, null); _val.calculateValue(sel, ctx, istate.valueState, null, null); _val.appendTo(sel, ctx, istate.valueState, buf, 0); buf.append(" IN "); _sub.appendTo(sel, ctx, istate.valueState, buf, 0); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { GeneralCaseExpState cstate = (GeneralCaseExpState) state; buf.append(" CASE "); int i = 0; for (; i < _exp.length; i++) _exp[i].appendTo(sel, ctx, cstate.states[i], buf); buf.append(" ELSE "); _val.appendTo(sel, ctx, cstate.states[i], buf, 0); buf.append(" END "); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { GeneralCaseExpState cstate = (GeneralCaseExpState) state; buf.append(" CASE "); int i = 0; for (; i < _exp.length; i++) _exp[i].appendTo(sel, ctx, cstate.states[i], buf); buf.append(" ELSE "); _val.appendTo(sel, ctx, cstate.states[i], buf, 0); buf.append(" END "); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf) { InSubQExpState istate = (InSubQExpState) state; _sub.calculateValue(sel, ctx, istate.subqState, null, null); _val.calculateValue(sel, ctx, istate.valueState, null, null); _val.appendTo(sel, ctx, istate.valueState, buf, 0); buf.append(" IN "); _sub.appendTo(sel, ctx, istate.valueState, buf, 0); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer buf, int index) { GeneralCaseExpState cstate = (GeneralCaseExpState) state; buf.append(" CASE "); int i = 0; for (; i < _exp.length; i++) _exp[i].appendTo(sel, ctx, cstate.states[i], buf); buf.append(" ELSE "); _val.appendTo(sel, ctx, cstate.states[i], buf, 0); buf.append(" END "); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { sql.append(getOperator()); sql.append("("); _val.appendTo(sel, ctx, state, sql, 0); sql.addCastForParam(getOperator(), _val); sql.append(")"); }