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

Quick Search    Search Deep

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


Package Samples:

org.apache.derby.impl.sql.compile

Classes:

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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
SelectNode: A SelectNode represents the result set for any of the basic DML operations: SELECT, INSERT, UPDATE, and DELETE. (A RowResultSetNode will be used for an INSERT with a VALUES clause.) For INSERT - SELECT, any of the fields in a SelectNode can be used (the SelectNode represents the SELECT statement in the INSERT - SELECT). For UPDATE and DELETE, there will be one table in the fromList, and the groupByList fields will be null. For both INSERT and UPDATE, the resultColumns in the selectList will contain the names of the columns being inserted into or updated.
DMLStatementNode: A DMLStatementNode represents any type of DML statement: a cursor declaration, an INSERT statement, and UPDATE statement, or a DELETE statement. All DML statements have result sets, but they do different things with them. A SELECT statement sends its result set to the client, an INSERT statement inserts its result set into a table, a DELETE statement deletes from a table the rows corresponding to the rows in its result set, and an UPDATE statement updates the rows in a base table corresponding to the rows in its result set.
CurrentOfNode: The CurrentOf operator is used by positioned DELETE and UPDATE to get the current row and location for the target cursor. The bind() operations for positioned DELETE and UPDATE add a column to the select list under the statement for the row location accessible from this node. This node is placed in the from clause of the select generated for the delete or update operation. It acts much like a FromBaseTable, using the information about the target table of the cursor to provide information.
VerifyAggregateExpressionsVisitor: If a RCL (SELECT list) contains an aggregate, then we must verify that the RCL (SELECT list) is valid. For ungrouped queries, the RCL must be composed entirely of valid aggregate expressions - in this case, no column references outside of an aggregate. For grouped aggregates, the RCL must be composed of grouping columns or valid aggregate expressions - in this case, the only column references allowed outside of an aggregate are grouping columns.
VirtualColumnNode: A VirtualColumnNode represents a virtual column reference to a column in a row returned by an underlying ResultSetNode. The underlying column could be in a base table, view (which could expand into a complex expression), subquery in the FROM clause, temp table, expression result, etc. By the time we get to code generation, all VirtualColumnNodes should stand only for references to columns in a base table within a FromBaseTable.
CallStatementNode: An CallStatementNode represents a CALL statement. It is the top node of the query tree for that statement. There are 2 flavors, class and object, of call statements. A class call statement is a static method call off of a class expression (class classnameandpath), while an object call statement is a method call off of an object expression. The return value, if any, from the underlying method call is ignored.
UserTypeConstantNode: User type constants. These are created by built-in types that use user types as their implementation. This could also potentially be used by an optimizer that wanted to store plans for frequently-used parameter values. This is also used to represent nulls in user types, which occurs when NULL is inserted into or supplied as the update value for a usertype column.
QuantifiedUnaryOperatorNode: A QuantifiedUnaryOperatorNode represents a unary quantified predicate that is used with a subquery, such as EXISTS and NOT EXISTS. Quantified predicates all return Boolean values. All quantified operators will be removed from the tree by the time we get to code generation - they will be replaced by other constructs that can be compiled. For example, an EXISTS node may be converted to a type of join.
QuantifiedBinaryOperatorNode: A QuantifiedBinaryOperatorNode represents a binary quantified predicate that is used with a subquery, such as IN, NOT IN, < ALL, etc. Quantified predicates all return Boolean values. All quantified operators will be removed from the tree by the time we get to code generation - they will be replaced by other constructs that can be compiled. For example, an IN node may be converted to a type of join.
BaseColumnNode: A BaseColumnNode represents a column in a base table. The parser generates a BaseColumnNode for each column reference. A column refercence could be a column in a base table, a column in a view (which could expand into a complex expression), or a column in a subquery in the FROM clause. By the time we get to code generation, all BaseColumnNodes should stand only for columns in base tables.

Home | Contact Us | Privacy Policy | Terms of Service