use of lucee.runtime.sql.exp.op.Operation2 in project Lucee by lucee.
the class SelectParser method expoOp.
private Expression expoOp(ParserString raw) throws SQLParserException {
Expression exp = negateMinusOp(raw);
// Modulus Operation
while (raw.forwardIfCurrent('^')) {
raw.removeSpace();
exp = new Operation2(exp, negateMinusOp(raw), Operation.OPERATION2_EXP);
}
return exp;
}
use of lucee.runtime.sql.exp.op.Operation2 in project Lucee by lucee.
the class SelectParser method xorOp.
private Expression xorOp(ParserString raw) throws SQLParserException {
Expression expr = orOp(raw);
while (raw.forwardIfCurrentAndNoWordNumberAfter("xor")) {
raw.removeSpace();
expr = new Operation2(expr, orOp(raw), Operation.OPERATION2_XOR);
}
return expr;
}
use of lucee.runtime.sql.exp.op.Operation2 in project Lucee by lucee.
the class SelectParser method plusMinusOp.
private Expression plusMinusOp(ParserString raw) throws SQLParserException {
Expression expr = modOp(raw);
while (!raw.isLast()) {
// Plus Operation
if (raw.forwardIfCurrent('+')) {
raw.removeSpace();
expr = new Operation2(expr, modOp(raw), Operation.OPERATION2_PLUS);
} else // Minus Operation
if (raw.forwardIfCurrent('-')) {
raw.removeSpace();
expr = new Operation2(expr, modOp(raw), Operation.OPERATION2_MINUS);
} else
break;
}
return expr;
}
use of lucee.runtime.sql.exp.op.Operation2 in project Lucee by lucee.
the class SelectParser method divMultiOp.
private Expression divMultiOp(ParserString raw) throws SQLParserException {
Expression expr = expoOp(raw);
while (!raw.isLast()) {
// Multiply Operation
if (raw.forwardIfCurrent('*')) {
raw.removeSpace();
expr = new Operation2(expr, expoOp(raw), Operation.OPERATION2_MULTIPLY);
} else // Divide Operation
if (raw.forwardIfCurrent('/')) {
raw.removeSpace();
expr = new Operation2(expr, expoOp(raw), Operation.OPERATION2_DIVIDE);
} else {
break;
}
}
return expr;
}
Aggregations