1 21 22 package org.apache.derby.iapi.sql.compile; 23 24 import org.apache.derby.iapi.services.context.Context; 25 import org.apache.derby.iapi.services.compiler.JavaFactory; 26 import org.apache.derby.iapi.services.loader.ClassFactory; 27 28 import org.apache.derby.iapi.error.StandardException; 29 30 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext; 31 32 import org.apache.derby.iapi.sql.ParameterValueSet; 33 34 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor; 35 import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor; 36 import org.apache.derby.iapi.sql.dictionary.TableDescriptor; 37 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor; 38 39 import org.apache.derby.iapi.sql.depend.Dependent; 40 import org.apache.derby.iapi.sql.depend.Provider; 41 import org.apache.derby.iapi.sql.depend.ProviderList; 42 43 import org.apache.derby.iapi.sql.compile.TypeCompilerFactory; 44 45 import org.apache.derby.iapi.types.DataTypeDescriptor; 46 47 import org.apache.derby.iapi.store.access.StoreCostController; 48 import org.apache.derby.iapi.store.access.SortCostController; 49 50 import java.util.List ; 51 import java.util.Vector ; 52 import java.sql.SQLWarning ; 53 54 67 public interface CompilerContext extends Context 68 { 69 75 79 String CONTEXT_ID = "CompilerContext"; 80 81 84 public static final int DATETIME_ILLEGAL = 0x00000001; 85 public static final int CURRENT_CONNECTION_ILLEGAL = 0x00000002; 87 public static final int FUNCTION_CALL_ILLEGAL = 0x00000004; 88 public static final int UNNAMED_PARAMETER_ILLEGAL = 0x00000008; 89 public static final int DIAGNOSTICS_ILLEGAL = 0x00000010; 90 public static final int SUBQUERY_ILLEGAL = 0x00000020; 91 public static final int USER_ILLEGAL = 0x00000040; 92 public static final int COLUMN_REFERENCE_ILLEGAL = 0x00000080; 93 public static final int IGNORE_MISSING_CLASSES = 0x00000100; 94 public static final int SCHEMA_ILLEGAL = 0x00000200; 95 public static final int INTERNAL_SQL_ILLEGAL = 0x00000400; 96 97 101 public static final int MODIFIES_SQL_DATA_PROCEDURE_ILLEGAL = 0x00000800; 102 103 104 public static final int SQL_LEGAL = (INTERNAL_SQL_ILLEGAL); 105 106 107 public static final int INTERNAL_SQL_LEGAL = 0; 108 109 public static final int CHECK_CONSTRAINT = ( 110 DATETIME_ILLEGAL | 111 UNNAMED_PARAMETER_ILLEGAL | 112 DIAGNOSTICS_ILLEGAL | 113 SUBQUERY_ILLEGAL | 114 USER_ILLEGAL | 115 SCHEMA_ILLEGAL | 116 INTERNAL_SQL_ILLEGAL 117 ); 118 119 public static final int DEFAULT_RESTRICTION = ( 120 SUBQUERY_ILLEGAL | 121 UNNAMED_PARAMETER_ILLEGAL | 122 COLUMN_REFERENCE_ILLEGAL | 123 INTERNAL_SQL_ILLEGAL 124 ); 125 126 127 133 139 140 Parser getParser(); 141 142 148 149 NodeFactory getNodeFactory(); 150 151 157 TypeCompilerFactory getTypeCompilerFactory(); 158 159 162 ClassFactory getClassFactory(); 163 164 170 171 JavaFactory getJavaFactory(); 172 173 180 181 int getNextColumnNumber(); 182 183 187 void resetContext(); 188 189 195 196 int getNextTableNumber(); 197 198 204 205 int getNumTables(); 206 207 213 214 int getNextSubqueryNumber(); 215 216 222 223 int getNumSubquerys(); 224 225 231 232 int getNextResultSetNumber(); 233 234 237 238 void resetNextResultSetNumber(); 239 240 246 247 int getNumResultSets(); 248 249 256 257 String getUniqueClassName(); 258 259 267 268 void setCurrentDependent(Dependent d); 269 270 276 277 ProviderList getCurrentAuxiliaryProviderList(); 278 279 285 286 void setCurrentAuxiliaryProviderList(ProviderList apl); 287 288 295 void createDependency(Provider p) throws StandardException; 296 297 305 public void createDependency(Dependent d, Provider p) throws StandardException; 306 307 318 int addSavedObject(Object o); 319 320 326 Object [] getSavedObjects(); 327 328 333 public void setSavedObjects(Object [] objs); 334 335 340 public void setInUse(boolean inUse); 341 342 347 public boolean getInUse(); 348 349 353 public void firstOnStack(); 354 355 358 public boolean isFirstOnStack(); 359 360 369 public void setReliability(int reliability); 370 371 377 public int getReliability(); 378 379 386 public SchemaDescriptor getCompilationSchema(); 387 388 395 public SchemaDescriptor setCompilationSchema(SchemaDescriptor newDefault); 396 397 407 public StoreCostController getStoreCostController(long conglomerateNumber) 408 throws StandardException; 409 410 415 public SortCostController getSortCostController() throws StandardException; 416 417 422 public void setParameterList(Vector parameterList); 423 424 429 public Vector getParameterList(); 430 431 434 public void setReturnParameterFlag(); 435 436 441 public boolean getReturnParameterFlag(); 442 443 449 450 public DataTypeDescriptor[] getParameterTypes(); 451 452 457 public Object getCursorInfo(); 458 459 464 public void setCursorInfo(Object cursorInfo); 465 466 471 public void setScanIsolationLevel(int isolationLevel); 472 473 478 public int getScanIsolationLevel(); 479 480 485 public void setEntryIsolationLevel(int isolationLevel); 486 487 492 public int getEntryIsolationLevel(); 493 494 499 public int getNextEquivalenceClass(); 500 501 504 public void addWarning(SQLWarning warning); 505 506 509 public SQLWarning getWarnings(); 510 511 520 public void pushCurrentPrivType( int privType); 521 522 public void popCurrentPrivType(); 523 524 529 public void addRequiredColumnPriv( ColumnDescriptor column); 530 531 536 public void addRequiredTablePriv( TableDescriptor table); 537 538 545 public void addRequiredSchemaPriv(String schema, String aid, int privType); 546 547 552 public void addRequiredRoutinePriv( AliasDescriptor routine); 553 554 557 public List getRequiredPermissionsList(); 558 } 559 | Popular Tags |