Package railo.runtime.sql.exp.op

Examples of railo.runtime.sql.exp.op.Operation1


 
  private Expression notOp(ParserString raw) throws SQLParserException {
    // NOT
    if (raw.forwardIfCurrentAndNoWordNumberAfter("not")) {
      raw.removeSpace();
      return new Operation1(decsionOp(raw),Operation.OPERATION1_NOT);
    }
    return decsionOp(raw);
  }
View Full Code Here


      // IS [NOT] NULL
      else if (raw.isCurrent("is ")) {
        int start=raw.getPos();
        if (raw.forwardIfCurrentAndNoWordNumberAfter("is null")) {
          raw.removeSpace();
          return new Operation1(expr, Operation.OPERATION1_IS_NULL);
             
        }
        else if (raw.forwardIfCurrentAndNoWordNumberAfter("is not null")) {
          raw.removeSpace();
          return new Operation1(expr, Operation.OPERATION1_IS_NOT_NULL);
             
        }
        else {
          raw.setPos(start);
          raw.removeSpace();
View Full Code Here

 
  private Expression negateMinusOp(ParserString raw) throws SQLParserException {
    // And Operation
    if (raw.forwardIfCurrent('-')) {
      raw.removeSpace();
      return new Operation1(clip(raw),Operation.OPERATION1_MINUS);
    }
    else if (raw.forwardIfCurrent('+')) {
      raw.removeSpace();
      return new Operation1(clip(raw),Operation.OPERATION1_PLUS);
    }
    return clip(raw);
  }
View Full Code Here

       
       
    }

    if(operation instanceof Operation1) {
      Operation1 op1=(Operation1) operation;
      int o = op1.getOperator();
     
      if(o==Operation.OPERATION1_IS_NULL)  {
        Object value = executeExp( pc,sql,qr,op1.getExp(),row,null);
        return Caster.toBoolean(value==null);
      }
      if(o==Operation.OPERATION1_IS_NOT_NULL) {
        Object value = executeExp( pc,sql,qr,op1.getExp(),row,null);
        return Caster.toBoolean(value!=null);
      }
     
      Object value = executeExp( pc,sql,qr,op1.getExp(),row);
     
      if(o==Operation.OPERATION1_MINUS)   return Caster.toDouble(-Caster.toDoubleValue(value));
      if(o==Operation.OPERATION1_PLUS)   return Caster.toDouble(value);
      if(o==Operation.OPERATION1_NOT)   return Caster.toBoolean(!Caster.toBooleanValue(value));
     
View Full Code Here

TOP

Related Classes of railo.runtime.sql.exp.op.Operation1

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.