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

Quick Search    Search Deep

org.apache.derby.impl.sql.catalog.* (32)org.apache.derby.impl.sql.compile.* (203)
org.apache.derby.impl.sql.conn.* (6)org.apache.derby.impl.sql.depend.* (4)
org.apache.derby.impl.sql.execute.* (173)org.apache.derby.impl.sql.execute.rts.* (36)

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


Package Samples:

org.apache.derby.impl.sql.catalog
org.apache.derby.impl.sql.compile
org.apache.derby.impl.sql.conn
org.apache.derby.impl.sql.depend
org.apache.derby.impl.sql.execute.rts
org.apache.derby.impl.sql.execute

Classes:

TempTableInfo: The temp tables will have following data structure TableDescriptor Declared in savepoint level Dropped in savepoint level Modified in savepoint level The actual logic LanguageConnectionContext will keep the "current savepoint level". At any point in time, this is the total number of savepoints defined for a transaction. At the start of any new transaction, the "current savepoint level" will be set to 0. Everytime a new user defined savepoint is set, store returns the total number of savepoints for the connection at that point. For eg, in a new transaction, "current savepoint level' will be 0. When ...
CoalesceFunctionNode: This node represents coalesce/value function which returns the first argument that is not null. The arguments are evaluated in the order in which they are specified, and the result of the function is the first argument that is not null. The result can be null only if all the arguments can be null. The selected argument is converted, if necessary, to the attributes of the result. SQL Reference Guide for DB2 has section titled "Rules for result data types" at the following url http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0008480.htm I have constructed ...
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 ...
StaticMethodCallNode: A StaticMethodCallNode represents a static method call from a Class (as opposed to from an Object). For a procedure the call requires that the arguments be ? parameters. The parameter is *logically* passed into the method call a number of different ways. For a application call like CALL MYPROC(?) the logically Java method call is (in psuedo Java/SQL code) (examples with CHAR(10) parameter) Fixed length IN parameters - com.acme.MyProcedureMethod(?) Variable length IN parameters - com.acme.MyProcedureMethod(CAST (? AS CHAR(10)) Fixed length INOUT parameter - String[] holder = new String[] {?}; com.acme.MyProcedureMethod(holder); ...
LikeEscapeOperatorNode: This node represents a like comparison operator (no escape) If the like pattern is a constant or a parameter then if possible the like is modified to include a >= and = prefix padded with '' to length n -- e.g. Cloudscape = 255 >= prefix backed up one characer = '' padded with '' to length n 256 >= NULL <= '?' Note that the Unicode value is '?' is defined as not a character value and can be used by a program for any purpose. We use it to set an upper bound on a character range with a less than predicate. We only need a single '?' appended because the string 'Cloudscape??' is not a valid String ...
SubqueryNode: A SubqueryNode represents a subquery. Subqueries return values to their outer queries. An quantified subquery is one that appears under a quantified operator (like IN or EXISTS) - quantified subqueries can return more than one value per invocation. An expression subquery is one that is not directly under a quantified operator - expression subqueries are allowed to return at most one value per invocation (returning no value is considered to be equivalent to returning NULL). There are a large number of subquery types. Because of the large number of types, and the large amount of shared code, we have ...
FromBaseTable: A FromBaseTable represents a table in the FROM list of a DML statement, as distinguished from a FromSubquery, which represents a subquery in the FROM list. A FromBaseTable may actually represent a view. During parsing, we can't distinguish views from base tables. During binding, when we find FromBaseTables that represent views, we replace them with FromSubqueries. By the time we get to code generation, all FromSubqueries have been eliminated, and all FromBaseTables will represent only true base tables. Positioned Update : Currently, all columns of an updatable cursor are selected to deal with a ...
GenericActivationHolder: This class holds an Activation, and passes through most of the calls to the activation. The purpose of this class is to allow a PreparedStatement to be recompiled without the caller having to detect this and get a new activation. In addition to the Activation, this class holds a reference to the PreparedStatement that created it, along with a reference to the GeneratedClass that was associated with the PreparedStatement at the time this holder was created. These references are used to validate the Activation, to ensure that an activation is used only with the PreparedStatement that created it, ...
TDCacheable: This class implements a Cacheable for a DataDictionary cache of table descriptors. It is an abstract class - there is more than one cache of table descriptors per data dictionary, and this class provides the implementation that's common to all of them. The lookup key for the cache (the "identity" of the cache item) is provided by the subclass. Another design alternative was to make the table descriptors themselves the cacheable objects. This was rejected because: we would have only one way of caching table descriptors, and we need at least two (by UUID and by name); the contents of a table descriptor ...
AggregateDefinition: An AggregateDefinition defines an aggregate. It is used by Cloudscape during query compilation to determine what Aggregator is used to aggregate a particular data type and what datatype the Aggregator will emit. A single AggregateDefinition may map to one or more Aggregators depending on the input type. For example, a user defined STDEV aggregate may use one aggregator implementation for the INTEGER type and another for a user defined type that implements a point. In this case, both the aggregators would have a single AggregateDefinition that would chose the appropriate aggregator based on the ...
SpecialFunctionNode: SpecialFunctionNode handles system SQL functions. A function value is either obtained by a method call off the LanguageConnectionContext or Activation. LanguageConnectionContext functions are state related to the connection. Activation functions are those related to the statement execution. Each SQL function takes no arguments and returns a SQLvalue. Functions supported: USER CURRENT_USER SESSION_USER SYSTEM_USER CURRENT SCHEMA CURRENT ISOLATION IDENTITY_VAL_LOCAL This node is used rather than some use of MethodCallNode for runtime performance. MethodCallNode does not provide a fast access to the ...
SYSALIASESRowFactory: Factory for creating a SYSALIASES row. Here are the directions for adding a new system supplied alias. Misc: All system supplied aliases are class aliases at this point. Additional arrays will need to be added if we supply system aliases of other types. The preloadAliasIDs array is an array of hard coded UUIDs for the system supplied aliases. The preloadAliases array is the array of aliases for the system supplied aliases. This array is in alphabetical order by package and class in Xena. Each alias is the uppercase class name of the alias. The preloadJavaClassNames array is the array of full package.class ...
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 ...
InsertNode: An InsertNode is the top node in a query tree for an insert statement. After parsing, the node contains targetTableName: the target table for the insert collist: a list of column names, if specified queryexpr: the expression being inserted, either a values clause or a select form; both of these are represented via the SelectNode, potentially with a TableOperatorNode such as UnionNode above it. After binding, the node has had the target table's descriptor located and inserted, and the queryexpr and collist have been massaged so that they are identical to the table layout. This involves adding any ...
OptimizerImpl: This will be the Level 1 Optimizer. RESOLVE - it's a level 0 optimizer right now. Current State: o No costing services o We can only cost a derived table with a join once. Optimizer uses OptimizableList to keep track of the best join order as it builds it. For each available slot in the join order, we cost all of the Optimizables from that slot til the end of the OptimizableList. Later, we will choose the best Optimizable for that slot and reorder the list accordingly. In order to do this, we probably need to move the temporary pushing and pulling of join clauses into Optimizer, since the logic ...
ActivationClassBuilder: ActivationClassBuilder provides an interface to satisfy generation's common tasks in building an activation class, as well as a repository for the JavaFactory used to generate the basic language constructs for the methods in the class. Common tasks include the setting of a static field for each expression function that gets added, the creation of the execute method that gets expanded as the query tree is walked, setting the superclass. An activation class is defined for each statement. It has the following basic layout: TBD See the document \\Jeeves\Unversioned Repository 1\Internal Technical Documents\Other\GenAndExec.doc ...
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) ...
GroupByNode: A GroupByNode represents a result set for a grouping operation on a select. Note that this includes a SELECT with aggregates and no grouping columns (in which case the select list is null) It has the same description as its input result set. For the most part, it simply delegates operations to its bottomPRSet, which is currently expected to be a ProjectRestrictResultSet generated for a SelectNode. NOTE: A GroupByNode extends FromTable since it can exist in a FromList. There is a lot of room for optimizations here: agg(distinct x) group by x => agg(x) group by x (for min and max) min()/max() use ...
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 ...
DataDictionaryImpl: This abstract class contains the common code for the "regular" and limited data dictionaries. The limited configuration puts an upper limit on the number of tables a user is allowed to create. This class provides the entire implementation of DataDictionary, and ModuleControl, except for the stop() method, which is to be provided by a non-abstract super-class. The reason for putting the stop() method in the super-class is to prevent someone from inadvertently changing this to a non-abstract class. This class is shipped with both the limited and non-limited configurations, and we don't want anyone ...
SPSNameCacheable: This class implements a Cacheable for a DataDictionary cache of sps descriptors, with the lookup key being the name/schema of the sps. Assumes client passes in a string that includes the schema name. The cache ensures that the class of the target sps is loaded if the sps is found in cache. This is ensured by calling loadGeneratedClass() on the sps when it is added to the cache. Each subsequent user of the sps cache will do its own load/unload on the class. Because the class manager/loader maintains reference counts on the classes it is handling, the user load/unload will just increment/decrement ...
ConstantNode: ConstantNode holds literal constants as well as nulls. A NULL from the parser may not yet know its type; that must be set during binding, as it is for parameters. the DataValueDescriptor methods want to throw exceptions when they are of the wrong type, but to do that they must check typeId when the value is null, rather than the instanceof check they do for returning a valid value. For code generation, we generate a static field. Then we set the field be the proper constant expression (something like getDatavalueFactory().getCharDataValue("hello", ...)) ) in the constructor of the generated method. ...
CharStream: This interface describes a character stream that maintains line and column number positions of the characters. It also has the capability to backup the stream to some extent. An implementation of this interface is used in the TokenManager implementation generated by JavaCCParser. All the methods except backup can be implemented in any fashion. backup needs to be implemented correctly for the correct operation of the lexer. Rest of the methods are all used to get information like line number, column number and the String that constitutes a token and are not used by the lexer. Hence their implementation ...
HasVariantValueNodeVisitor: Find out if we have a value node with variant type less than what the caller desires, anywhere below us. Stop traversal as soon as we find one. This is used in two places: one to check the values clause of an insert statement; i.e insert into values (?, 1, foobar()); If all the expressions in the values clause are QUERY_INVARIANT (and an exception is made for parameters) then we can cache the results in the RowResultNode. This is useful when we have a prepared insert statement which is repeatedly executed. The second place where this is used is to check if a subquery can be materialized or not ...
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 ...

Home | Contact Us | Privacy Policy | Terms of Service