casacore
|
Class containing two lists of TableParsePair objects. More...
#include <TableParseTableList.h>
Public Member Functions | |
Bool | empty () const |
Is the FROM table list empty? | |
const std::vector< TableParsePair > & | fromTables () const |
Get the FROM tables. | |
std::vector< TableParsePair > & | fromTablesNC () |
TableExprInfo | first () const |
Return the first FROM table (which is usually the table to operate on). | |
const Table & | firstTable () const |
Return the first FROM table (which is usually the table to operate on). | |
Table | addTable (Int tabnr, const String &name, const Table &ttab, const String &shorthand, Bool addToFromList, const std::vector< const Table * > &tempTables, const std::vector< TableParseQuery * > &stack, Int joinsIndex=-1) |
Add a table to the list of tables with the given shorthand name. | |
void | replaceTable (const Table &table) |
Replace the first Table object in the FROM list with the given one. | |
TableParsePair | findTable (const String &shorthand, Bool doWith) const |
Try to find the Table for the given shorthand in the table list. | |
TableRecord & | findKeyword (const String &name, String &keyName, Bool update=True) |
Find the keyword given in the name parameter which is split into its shorthand, column and/or keyword parts. | |
Static Public Member Functions | |
static TableParsePair | findTable (const String &shorthand, Bool doWith, const std::vector< TableParseQuery * > &stack) |
Find a table for the given shorthand. | |
Private Attributes | |
std::vector< TableParsePair > | itsFromTables |
std::vector< TableParsePair > | itsWithTables |
Class containing two lists of TableParsePair objects.
Internal
This class is used by TableParse to hold two lists of TableParsePair objects. One list is for the tables given in the WITH clause, the other list is for the other tables given in e.g. FROM or UPDATE. It has functions to operate on the lists, usually by means of the shorthand name.
Definition at line 129 of file TableParseTableList.h.
Table casacore::TableParseTableList::addTable | ( | Int | tabnr, |
const String & | name, | ||
const Table & | ttab, | ||
const String & | shorthand, | ||
Bool | addToFromList, | ||
const std::vector< const Table * > & | tempTables, | ||
const std::vector< TableParseQuery * > & | stack, | ||
Int | joinsIndex = -1 |
||
) |
Add a table to the list of tables with the given shorthand name.
The table can be given in a few ways:
- As a sequence number to be taken from tempTables.
- As a string giving the table name path.
- As a subtable name (starting with ::) which will be looked up in the stack of query objects.
- As a temporary table (from a nested query) given in ttab.
- As the shorthand name of another table which will be looked up in the stack of query objects.
|
inline |
Is the FROM table list empty?
Definition at line 133 of file TableParseTableList.h.
References itsFromTables.
TableRecord & casacore::TableParseTableList::findKeyword | ( | const String & | name, |
String & | keyName, | ||
Bool | update = True |
||
) |
Find the keyword given in the name
parameter which is split into its shorthand, column and/or keyword parts.
It fills parameter keyName
with the last keyword part and returns the TableRecord containing that keyword. It is a helper function for handleSetKey, etc. If update=True, rwKeywordSet() is used to ensure the table is updated. An exception is thrown in case a name is not found.
TableParsePair casacore::TableParseTableList::findTable | ( | const String & | shorthand, |
Bool | doWith | ||
) | const |
Try to find the Table for the given shorthand in the table list.
|
static |
Find a table for the given shorthand.
Optionally the WITH tables are searched as well. If no shorthand is given, the first FROM table is returned (if there). If not found, a TableParsePair with a null Table object is returned.
|
inline |
Return the first FROM table (which is usually the table to operate on).
Definition at line 143 of file TableParseTableList.h.
References itsFromTables.
|
inline |
Return the first FROM table (which is usually the table to operate on).
Definition at line 147 of file TableParseTableList.h.
References itsFromTables.
|
inline |
Get the FROM tables.
Definition at line 137 of file TableParseTableList.h.
References itsFromTables.
|
inline |
Definition at line 139 of file TableParseTableList.h.
References itsFromTables.
void casacore::TableParseTableList::replaceTable | ( | const Table & | table | ) |
Replace the first Table object in the FROM list with the given one.
|
private |
Definition at line 193 of file TableParseTableList.h.
Referenced by empty(), first(), firstTable(), fromTables(), and fromTablesNC().
|
private |
Definition at line 194 of file TableParseTableList.h.