Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.sql.execute.rts.* (36)

org.apache.derby.impl.sql.execute: Javadoc index of package org.apache.derby.impl.sql.execute.


Package Samples:

org.apache.derby.impl.sql.execute.rts

Classes:

SortResultSet: Takes a source result set, sends it to the sorter, and returns the results. If distinct is true, removes all but one copy of duplicate rows using DistinctAggregator, which really doesn't aggregate anything at all -- the sorter assumes that the presence of an aggregator means that it should return a single row for each set with identical ordering columns. If aggregate is true, then it feeds any number of aggregates to the sorter. Each aggregate is an instance of GenericAggregator which knows which Aggregator to call to perform the aggregation. Brief background on the sorter and aggregates: the sorter ...
GenericResultSetFactory: ResultSetFactory provides a wrapper around all of the result sets used in this execution implementation. This removes the need of generated classes to do a new and of the generator to know about all of the result sets. Both simply know about this interface to getting them. In terms of modularizing, we can create just an interface to this class and invoke the interface. Different implementations would get the same information provided but could potentially massage/ignore it in different ways to satisfy their implementations. The practicality of this is to be seen. The cost of this type of factory ...
AutoincrementCounter: AutoincrementCounter is a not so general counter for the specific purposes of autoincrement columns. It can be thought of as an in-memory autoincrement column. The counting or incrementing is done in fashion identical to the AUTOINCREMENTVALUE in SYSCOLUMNS. To create a counter, the user must call the constructor with a start value, increment and optionally a final value. In addition the caller must specify the schema name, table name and column name uniquely identifying the counter. When a counter is created it is in an invalid state-- to initialize it, the user must call either update or reset(false) ...
BulkTableScanResultSet: Read a base table or index in bulk. Most of the work for this method is inherited from TableScanResultSet. This class overrides getNextRowCore (and extends re/openCore) to use a row array and fetch rows from the Store in bulk (using fetchNextGroup). Since it retrieves rows in bulk, locking is not as is usual -- locks may have already been released on rows as they are returned to the user. Hence, this ResultSet is not suitable for a query running Isolation Level 1, cursor stability. Note that this code is only accessable from an optimizer override. If it makes sense to have the optimizer select ...
RIBulkChecker: Do a merge run comparing all the foreign keys from the foreign key conglomerate against the referenced keys from the primary key conglomerate. The scanControllers are passed in by the caller (caller controls locking on said conglomerates). The comparision is done via a merge. Consequently, it is imperative that the scans are on keyed conglomerates (indexes) and that the referencedKeyScan is a unique scan. Performance is no worse than N + M where N is foreign key rows and M is primary key rows. Bulk fetch is used to further speed performance. The fetch size is LanguageProperties.BULK_FETCH_DEFA ...
NoPutResultSetImpl: Abstract ResultSet with built in Activation support for operations that return rows but do not allow the caller to put data on output pipes. This implementation of ResultSet is meant to be overridden by subtypes in the execution engine. Its primary users will be DML operations that do not put data on output pipes, but simply return it due to being result sets themselves. This abstract class does not define the entire ResultSet interface, but leaves the 'get' half of the interface for subtypes to implement. It is package-visible only, with its methods being public for exposure by its subtypes.
NoRowsResultSetImpl: This implementation of ResultSet is meant to be overridden by subtypes in the execution engine. Its primary users will be DDL, which only need to define a constructor to create the DDL object being defined. All other ResultSet operations will be handled by this superclass -- i.e., nothing is allowed to be done to a DDL Result Set, since it has no rows to provide. This abstract class does not define the entire ResultSet interface, but leaves the 'get' half of the interface for subtypes to implement. It is package-visible only, with its methods being public for exposure by its subtypes.
DeleteCascadeResultSet: Delete the rows from the specified base table and executes delete/update on dependent tables depending on the referential actions specified. Note:(beetle:5197) Dependent Resultsets of DeleteCascade Resultset can in any one of the multiple resultsets generated for the same table because of multiple foreign key relationship to the same table. At the bind time , dependents are binded only once per table. We can not depend on mainNodeTable Flag to fire actions on dependents, it should be done based on whether the resultset has dependent resultsets or not.
AvgAggregator: Aggregator for AVG(). Extends the SumAggregator and implements a count. Result is then sum()/count(). To handle overflow we catch the exception for value out of range, then we swap the holder for the current sum to one that can handle a larger range. Eventually a sum may end up in a SQLDecimal which can handle an infinite range. Once this type promotion has happened, it will not revert back to the original type, even if the sum would fit in a lesser type.
InternalTriggerExecutionContext: There is one of these beasts per INSERT/DELETE/UPDATE statement. It fulfills the contract for the externally visible trigger execution context and it validates that a statement that is about to be executed doesn't violate the restrictions placed upon what can be executed from a trigger. Note that it is crucial that cleanup() is called once the DML has completed, cleanup() makes sure that users can't do something invalid on a tec reference that they were holding from when the trigger fired.
BasicNoPutResultSetImpl: Abstract ResultSet for for operations that return rows but do not allow the caller to put data on output pipes. This basic implementation does not include support for an Activiation. See NoPutResultSetImpl.java for an implementaion with support for an activiation. This abstract class does not define the entire ResultSet interface, but leaves the 'get' half of the interface for subtypes to implement. It is package-visible only, with its methods being public for exposure by its subtypes.
CurrentDatetime: CurrentDatetime provides execution support for ensuring that the current datetime is evaluated only once for a statement. The same value is returned for every CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP in the statement. This is expected to be used by an activation and its result set, and so 'forget' must be called whenever you want to reuse the CurrentDatetime object for additional executions of the statement.
GenericConstantActionFactory: Factory for creating ConstantActions. Implemetation note: For most operations, the ResultSetFactory determines if the operation is allowed in a readonly/target database. Because we perform JAR add/drop/replace with a utility rather than using normal language processing we never get a result set for these operations. For this reason, the ConstantActionFactory rather than the ResultSetFactory checks if the these operations are allowed.
DependentResultSet: DependentResultSet should be used by only ON DELETE CASCADE/ON DELETE SET NULL ref actions implementation to gather the rows from the dependent tables. Idea is to scan the foreign key index for the rows in the source table matelized temporary result set. Scanning of foreign key index gives us the rows that needs to be deleted on dependent tables. Using the row location we got from the index , base row is fetched.
DistinctGroupedAggregateResultSet: This ResultSet evaluates grouped aggregates when there is 1 or more distinct aggregate. It will scan the entire source result set and calculate the grouped aggregates when scanning the source during the first call to next(). RESOLVE - This subclass is essentially empty. Someday we will need to write additional code for distinct grouped aggregates, especially when we support multiple distinct aggregates.
HashScanResultSet: Takes a conglomerate and a table filter builds a hash table on the specified column of the conglomerate on the 1st open. Look up into the hash table is done on the hash key column. The hash table consists of either DataValueDescriptor[]s or Vectors of DataValueDescriptor[]. The store builds the hash table. When a collision occurs, the store builds a Vector with the colliding DataValueDescriptor[]s.
RealResultSetStatisticsFactory: ResultSetStatisticsFactory provides a wrapper around all of objects associated with run time statistics. This implementation of the protocol is for returning the "real" run time statistics. We have modularized this so that we could have an implementation that just returns null for each of the objects should we decided to provide a configuration without the run time statistics feature.
AggregatorInfo: This is a simple class used to store the run time information needed to invoke an aggregator. This class is serializable because it is stored with the plan. It is serializable rather than externalizable because it isn't particularly complicated and presumbably we don't need version control on plans.
SetConstraintsConstantAction: This class describes actions that are performed for a set constraint at Execution time. Note that the dependency action we send is SET_CONSTRAINTS rather than ALTER_TABLE. We do this because we want to distinguish SET_CONSTRAINTS from ALTER_TABLE for error messages.
RowResultSet: Takes a constant row value and returns it as a result set. This class actually probably never underlies a select statement, but in case it might and because it has the same behavior as the ones that do, we have it implement CursorResultSet and give reasonable answers.
GenericExecutionFactory: This Factory is for creating the execution items needed by a connection for a given database. Once created for the connection, they should be pushed onto the execution context so that they can be found again by subsequent actions during the session.
CardinalityCounter: This is a decorator (in Design Patterns Terminology) class to enhance the functionality of a RowLocationRetRowSource. It assumes that the rows are coming in sorted order from the row source and it simply keeps track of the cardinality of all the leading columns.
ReferencedKeyRIChecker: A Referential Integrity checker for a change to a referenced key (primary or unique). Makes sure that all the referenced key row is not referenced by any of its foreign keys. see ForeignKeyRIChecker for the code that validates changes to foreign keys.
TemporaryRowHolderImpl: This is a class that is used to temporarily (non-persistently) hold rows that are used in language execution. It will store them in an array, or a temporary conglomerate, depending on the number of rows. It is used for deferred DML processing.
DistinctScalarAggregateResultSet: This ResultSet evaluates scalar aggregates where 1 (or more, in the future) of the aggregates are distinct. It will scan the entire source result set and calculate the scalar aggregates when scanning the source during the first call to next().

Home | Contact Us | Privacy Policy | Terms of Service