A select command is similar to SQL and can look like: SELECT columns FROM tab1 sh1, tab2 sh2, tab3 WHERE sh1.field == 3*sh1.field2 ... ORDERBY columns GIVING table This is described in more detail in TableGram.l.
The class TableParse only contains information about a table used in the table command. Global variables (like a list and a vector) are used in TableParse.cc to hold further information.
Global functions are used to operate on the information. The main function is the global function tableCommand. It executes the given TaQL command and returns the resulting table. This is, in fact, the only function to be used by a user.
Parse and execute the given command. It will open (and close) all tables needed. It returns the resulting table. The command type (select or update) and the selected or updated column names can be returned. Zero or more temporary tables can be used in the command using the $nnn syntax.
Copy constructor (copy semantics).
Assignment (copy semantics).
Associate the table and the shorthand.
Test if shorthand matches.
Get the shorthand.
Get table object.
Construct from a given expression and for the given order.
Get the expression node.
Get the sort order.
Is the order given?
Construct from a column name, subscripts, and expression.
Set the column name.
Get the column name.
Get the pointer to the indices.
Get the index expression node.
Get the expression node.
Destructor.
Execute the select command (select/sort/projection/giving). The setInGiving flag tells if a set in the GIVING part is allowed. The mustSelect flag tells if a SELECT command must do something. Usually that is required, but not for a SELECT in an INSERT command. The commandType (select or update) is filled in. Optionally the maximum nr of rows to be selected can be given. It will be used as the default value for the LIMIT clause. 0 = no maximum.
Execute a query in a from clause and create an appropriate value for the result.
Execute a subquery and create an appropriate node for the result.
Test if a subquery has sufficient elements. It uses default LIMIT=1, but that can be overidden in the subquery. The flag tells if NOT EXISTS or EXISTS was given.
Show the expression tree.
Set the distinct flag for column projection.
Keep the selection expression. It takes over the pointer (and clears the input pointer).
Keep the update expressions. It takes over the pointer (and clears the input pointer).
Keep the insert expressions or table selection. It takes over the pointer (and clears the input pointer).
Keep the sort expressions. It takes over the pointer (and clears the input pointer).
Evaluate and keep the limit value.
Evaluate and keep the offset value.
Add a table name to the linked list.
Find the keyword or column name and create a TableExprNode from it.
Handle a slice operator.
Handle a function.
Make a function object node for the given function name and arguments. The ignoreFuncs vector contains invalid function codes.
Find the function code belonging to a function name. Functions to be ignored can be given (as function type values).
Create a TableExprNode from a literal.
Add a column to the list of selected column names.
Handle the name given in a GIVING clause.
Handle the set given in a GIVING clause.
Get the projected column names.
Get the resulting table.
Create a new TableParseSelect-object for the given command type and put it on the stack (block)
Get and remove the last element from the "select stack". Note that this does not delete the object pointed to. It only clears the pointer and decrements the stack size.
Get current TableParseSelect object.
Clear the select stack. Normally this won't do anything, but in case of exceptions something may be left.
Do the insert step and return a selection containing the new rows.
Do the delete step.
Do the sort step.
Do the limit/offset step.
Do the 'select distinct' step.
Get the order for this key. Use the default order_p if not explicitly given with the key.
Make a set from the results of the subquery.
Evaluate a double scalar expression.
Split a name into its parts (shorthand, column and field names). True is returned when the name contained a keyword part. In that case fieldNames contains the keyword name and the possible subfields. The possible shorthand and the column name are filled in if it is a column keyword. If the name represents a column, fieldNames contains the subfields of the column (for the case where the column contains records). If the name is invalid, an exception is thrown if checkError=True. Otherwise the name is treated as a normal name without keyword.
Find a table for the given shorthand. If no shorthand is given, the first table is returned (if there). If not found, a null Table object is returned.
Find the names of all stored columns in a table.
Try to find the keyword representing a table in one of the tables in any select block (from inner to outer). If not found, an exception is thrown.
Try to find the keyword representing a table in the given table. If the columnName is empty, the keyword is a table keyword. If not found, a null Table object is returned.