1 21 22 package org.apache.derby.impl.sql.compile; 23 24 import org.apache.derby.iapi.services.compiler.MethodBuilder; 25 26 import org.apache.derby.iapi.error.StandardException; 27 28 import org.apache.derby.iapi.sql.compile.Optimizable; 29 30 import org.apache.derby.iapi.store.access.TransactionController; 31 32 import org.apache.derby.iapi.types.DataValueDescriptor; 33 34 import org.apache.derby.impl.sql.compile.ExpressionClassBuilder; 35 36 41 public interface RelationalOperator 42 { 43 public final int EQUALS_RELOP = 1; 44 public final int NOT_EQUALS_RELOP = 2; 45 public final int GREATER_THAN_RELOP = 3; 46 public final int GREATER_EQUALS_RELOP = 4; 47 public final int LESS_THAN_RELOP = 5; 48 public final int LESS_EQUALS_RELOP = 6; 49 public final int IS_NULL_RELOP = 7; 50 public final int IS_NOT_NULL_RELOP = 8; 51 52 69 ColumnReference getColumnOperand(Optimizable optTable, int columnPosition); 70 71 76 ColumnReference getColumnOperand(Optimizable optTable); 77 78 94 ValueNode getOperand(ColumnReference cRef, int refSetSize, 95 boolean otherSide); 96 97 112 ValueNode getExpressionOperand(int tableNumber, 113 int columnPosition, 114 FromTable ft); 115 116 129 void generateExpressionOperand(Optimizable optTable, 130 int columnPosition, 131 ExpressionClassBuilder acb, 132 MethodBuilder mb) 133 throws StandardException; 134 135 147 boolean selfComparison(ColumnReference cr) 148 throws StandardException; 149 150 160 boolean usefulStartKey(Optimizable optTable); 161 162 172 boolean usefulStopKey(Optimizable optTable); 173 174 186 int getStartOperator(Optimizable optTable); 187 188 200 int getStopOperator(Optimizable optTable); 201 202 212 void generateAbsoluteColumnId(MethodBuilder mb, 213 Optimizable optTable); 214 215 225 void generateRelativeColumnId(MethodBuilder mb, 226 Optimizable optTable); 227 228 237 void generateOperator(MethodBuilder mb, 238 Optimizable optTable); 239 240 251 void generateQualMethod(ExpressionClassBuilder acb, 252 MethodBuilder mb, 253 Optimizable optTable) 254 throws StandardException; 255 256 263 void generateOrderedNulls(MethodBuilder mb); 264 265 274 void generateNegate(MethodBuilder mb, 275 Optimizable optTable); 276 277 278 boolean orderedNulls(); 279 280 318 boolean isQualifier(Optimizable optTable, boolean forPush) 319 throws StandardException; 320 321 326 public int getOperator(); 327 328 337 public int getOrderableVariantType(Optimizable optTable) 338 throws StandardException; 339 340 344 public boolean compareWithKnownConstant(Optimizable optTable, boolean considerParameters); 345 346 352 public DataValueDescriptor getCompareValue(Optimizable optTable) 353 throws StandardException; 354 355 359 public boolean equalsComparisonWithConstantExpression(Optimizable optTable); 360 361 372 public RelationalOperator getTransitiveSearchClause(ColumnReference otherCR) 373 throws StandardException; 374 } 375 | Popular Tags |