1 package com.daffodilwoods.daffodildb.server.sql99.expression.booleanvalueexpression.predicates; 2 3 import com.daffodilwoods.daffodildb.server.sql99.common.*; 4 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator.*; 5 import com.daffodilwoods.daffodildb.server.sql99.dql.plan.condition.*; 6 import com.daffodilwoods.daffodildb.server.sql99.dql.queryexpression.queryspecification.*; 7 import com.daffodilwoods.daffodildb.server.sql99.dql.tableexpression.fromclause.*; 8 import com.daffodilwoods.daffodildb.server.sql99.expression.booleanvalueexpression.*; 9 import com.daffodilwoods.daffodildb.server.sql99.expression.rowvalueexpression.*; 10 import com.daffodilwoods.daffodildb.server.sql99.token.*; 11 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 12 import com.daffodilwoods.database.resource.*; 13 import com.daffodilwoods.database.utility.*; 14 15 public class existspredicate extends PredicateAbstract implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter, predicate, IntegerPool, ExecutionPlanConstants { 16 public tablesubquery _tablesubquery0; 17 public SNONRESERVEDWORD136444255 _SNONRESERVEDWORD1364442551; 18 private Boolean subQueryFlag; 19 20 public double getCost(long rowCount, boolean index) throws DException { 21 return rowCount; 22 } 23 24 public _QualifiedBVE getQualifiedBVE(TableDetails[] tableDetails) throws DException { 25 return new QualifiedBVE(null, BVEPlanMerger.getBooleanFactor(this)); 26 } 27 28 public int canUseForSeek() throws DException { 29 return TypeConstants.NOSEEK; 30 } 31 32 public int getPredicateType() throws DException { 33 return OperatorConstants.EXISTS; 34 } 35 36 public void setColumnPredicates(_AllColumnPredicates allColumnPredicates) throws DException { 37 allColumnPredicates.addToNonIndex(new booleanfactor(new booleantest(this))); 38 } 39 40 public int getConditionType() throws DException { 41 return PREDICATE; 42 } 43 44 public _BVEPlan getExecutionPlan() throws DException { 45 return new BVEAllTablePlan(null, null, BVEPlanMerger.getBooleanFactor(this)); 46 } 47 48 private queryspecification querySpecification; 49 50 public Object run(Object object) throws com.daffodilwoods.database.resource.DException { 51 _Iterator iterator = (_Iterator) _tablesubquery0.run(object); 52 return iterator.first() ? IntegerPool.Integer0 : IntegerPool.Integer1; 53 } 54 55 public ParameterInfo[] getParameterInfo() throws DException { 56 ParameterInfo [] p0= _tablesubquery0.getParameterInfo()[0].getParameterInfoArray(); 57 return p0==null ? new ParameterInfo[0]:p0; } 59 60 public AbstractRowValueExpression[] getChilds() { 61 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] { (AbstractRowValueExpression) (_tablesubquery0)}; 62 return childs; 63 } 64 65 public void setDefaultValues(_VariableValueOperations variableValueOperation) throws DException { 66 } 67 68 public String toString() { 69 StringBuffer sb = new StringBuffer (); 70 sb.append(" "); 71 sb.append(_SNONRESERVEDWORD1364442551); 72 sb.append(" "); 73 sb.append(_tablesubquery0); 74 return sb.toString(); 75 } 76 77 public com.daffodilwoods.daffodildb.server.sql99.utils._Reference[] checkSemantic(com.daffodilwoods.daffodildb.server.serversystem._ServerSession parent) throws DException { 78 return _tablesubquery0.checkSemantic(parent); 79 } 80 81 public Object clone() throws CloneNotSupportedException { 82 existspredicate tempClass = new existspredicate(); 83 tempClass._tablesubquery0 = (tablesubquery) _tablesubquery0.clone(); 84 tempClass._SNONRESERVEDWORD1364442551 = (SNONRESERVEDWORD136444255) _SNONRESERVEDWORD1364442551.clone(); 85 try { 86 tempClass.getColumnDetails(); 87 } catch (DException ex) { 88 throw new RuntimeException (ex.getMessage()); 89 } 90 return tempClass; 91 } 92 93 } 94 | Popular Tags |