📄 resultsetfactory.java
字号:
/* Derby - Class org.apache.derby.iapi.sql.execute.ResultSetFactory Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */package org.apache.derby.iapi.sql.execute;import org.apache.derby.iapi.error.StandardException;import org.apache.derby.iapi.sql.ResultDescription;import org.apache.derby.iapi.sql.ResultSet;import org.apache.derby.iapi.sql.Activation;import org.apache.derby.iapi.services.loader.GeneratedMethod;import org.apache.derby.iapi.store.access.Qualifier;/** * ResultSetFactory provides a wrapper around all of * the result sets needed in an execution implementation. * <p> * For the activations to avoid searching for this module * in their execute methods, the base activation supertype * should implement a method that does the lookup and salts * away this factory for the activation to use as it needs it. * * @author ames */public interface ResultSetFactory { /** Module name for the monitor's module locating system. */ String MODULE = "org.apache.derby.iapi.sql.execute.ResultSetFactory"; // // DDL operations // /** Generic DDL result set creation. @param activation the activation for this result set @return ResultSet A wrapper result set to run the Execution-time logic. @exception StandardException thrown when unable to create the result set */ ResultSet getDDLResultSet(Activation activation) throws StandardException; // // MISC operations // /** Generic Misc result set creation. @param activation the activation for this result set @return ResultSet A wrapper result set to run the Execution-time logic. @exception StandardException thrown when unable to create the result set */ ResultSet getMiscResultSet(Activation activation) throws StandardException; // // Transaction operations // /** @param activation the activation for this result set @return ResultSet A wrapper result set to run the Execution-time logic. @exception StandardException thrown when unable to create the result set */ ResultSet getSetTransactionResultSet(Activation activation) throws StandardException; // // DML statement operations // /** An insert result set simply reports that it completed, and the number of rows inserted. It does not return rows. The insert has been completed once the insert result set is available. @param source the result set from which to take rows to be inserted into the target table. @param checkGM The code to enforce the check constraints, if any @param activation the activation for this result set, @return the insert operation as a result set. @exception StandardException thrown when unable to perform the insert */ ResultSet getInsertResultSet(NoPutResultSet source, GeneratedMethod checkGM, Activation activation) throws StandardException; /** An insert VTI result set simply reports that it completed, and the number of rows inserted. It does not return rows. The insert has been completed once the insert result set is available. @param source the result set from which to take rows to be inserted into the target table. @param vtiRS The code to instantiate the VTI, if necessary @param activation the activation for this result set, @return the insert VTI operation as a result set. @exception StandardException thrown when unable to perform the insert */ ResultSet getInsertVTIResultSet(NoPutResultSet source, NoPutResultSet vtiRS, Activation activation) throws StandardException; /** A delete VTI result set simply reports that it completed, and the number of rows deleted. It does not return rows. The delete has been completed once the delete result set is available. @param source the result set from which to take rows to be inserted into the target table. @param activation the activation for this result set, @return the delete VTI operation as a result set. @exception StandardException thrown when unable to perform the insert */ ResultSet getDeleteVTIResultSet(NoPutResultSet source, Activation activation) throws StandardException; /** A delete result set simply reports that it completed, and the number of rows deleted. It does not return rows. The delete has been completed once the delete result set is available. @param source the result set from which to take rows to be deleted from the target table. This result set must contain one column which provides RowLocations that are valid in the target table. @param activation the activation for this result set @return the delete operation as a result set. @exception StandardException thrown when unable to perform the delete */ ResultSet getDeleteResultSet(NoPutResultSet source, Activation activation) throws StandardException; /** A delete Cascade result set simply reports that it completed, and the number of rows deleted. It does not return rows. The delete has been completed once the delete result set is available. @param source the result set from which to take rows to be deleted from the target table. @param activation the activation for this result set @param constantActionItem a constant action saved object reference @param dependentResultSets an array of DeleteCascade Resultsets for the current table referential action dependents tables. @param resultSetId an Id which is used to store the refence to the temporary result set created of the materilized rows.Dependent table resultsets uses the same id to access their parent temporary result sets. @return the delete operation as a delete cascade result set. @exception StandardException thrown when unable to perform the delete */ ResultSet getDeleteCascadeResultSet(NoPutResultSet source, Activation activation, int constantActionItem, ResultSet[] dependentResultSets, String resultSetId) throws StandardException; /** An update result set simply reports that it completed, and the number of rows updated. It does not return rows. The update has been completed once the update result set is available. @param source the result set from which to take rows to be updated in the target table. This result set must contain a column which provides RowLocations that are valid in the target table, and new values to be placed in those rows. @param checkGM The code to enforce the check constraints, if any @param activation the activation for this result set @return the update operation as a result set. @exception StandardException thrown when unable to perform the update */ ResultSet getUpdateResultSet(NoPutResultSet source, GeneratedMethod checkGM, Activation activation) throws StandardException; /** * @param source the result set from which to take rows to be * updated in the target table. * @param vtiRS the updateable result set for the VTI * @param activation the activation for this result set * @return the update operation as a result set. * @exception StandardException thrown on error */ public ResultSet getUpdateVTIResultSet(NoPutResultSet source, Activation activation) throws StandardException; /** An update result set simply reports that it completed, and the number of rows updated. It does not return rows. The update has been completed once the update result set is available. @param source the result set from which to take rows to be updated in the target table. This result set must contain a column which provides RowLocations that are valid in the target table, and new values to be placed in those rows. @param checkGM The code to enforce the check constraints, if any @param activation the activation for this result set @param constantActionItem a constant action saved object reference @param rsdItem result Description, saved object id. @return the update operation as a result set. @exception StandardException thrown when unable to perform the update */ ResultSet getDeleteCascadeUpdateResultSet(NoPutResultSet source, GeneratedMethod checkGM, Activation activation, int constantActionItem, int rsdItem) throws StandardException; /** A call statement result set simply reports that it completed. It does not return rows. @param methodCall a reference to a method in the activation for the method call @param activation the activation for this result set @return the call statement operation as a result set. @exception StandardException thrown when unable to perform the call statement */ ResultSet getCallStatementResultSet(GeneratedMethod methodCall, Activation activation) throws StandardException; // // Query expression operations // /** A project restrict result set iterates over its source, evaluating a restriction and when it is satisfied, constructing a row to return in its result set based on its projection. The rows can be constructed as they are requested from the result set. @param source the result set from which to take rows to be filtered by this operation. @param activation the activation for this result set, against whcih the restriction and projection are performed and to which current rows must be assigned for the projection and restriction to be performed. @param restriction a reference to a method in the activation that is applied to the activation's "current row" field to determine whether the restriction is satisfied or not. The signature of this method is <verbatim> Boolean restriction() throws StandardException; </verbatim> @param projection a reference to a method in the activation that is applied to the activation's "current row" field to project out the expected result row. The signature of this method is <verbatim> ExecRow projection() throws StandardException; </verbatim> @param resultSetNumber The resultSetNumber for the ResultSet @param constantRestriction a reference to a method in the activation that represents a constant expression (eg where 1 = 2). The signature of this method is <verbatim> Boolean restriction() throws StandardException; </verbatim> @param mapArrayItem Item # for mapping of source to target columns @param reuseResult Whether or not to reuse the result row. @param doesProjection Whether or not this PRN does a projection @param optimizerEstimatedRowCount Estimated total # of rows by optimizer @param optimizerEstimatedCost Estimated total cost by optimizer @param closeCleanup any cleanup the activation needs to do on close.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -