PSParseTreeDecorator Class Reference

A utility class for manipulating an existing parse tree. More...

List of all members.

Public Member Functions

void InsertFilterOnAllTables (PSNonTerminalParseNode *in_filter)
 Inserts the given filter condition on all tables in the parse tree.
void InsertFilterOnOneTable (PSNonTerminalParseNode *in_filter, const simba_wstring &in_tabName, const simba_wstring &in_catName=L"", const simba_wstring &in_schName=L"")
 Inserts the given filter condition on the given table in the parse tree.
 PSParseTreeDecorator (PSRootParseNode *in_rootNode)
 Constructor.
 ~PSParseTreeDecorator ()
 Destructor.

Detailed Description

A utility class for manipulating an existing parse tree.

To be used in concert with PSParseTreeFactory, which builds the parse tree structures used for manipulation.


Constructor & Destructor Documentation

PSParseTreeDecorator ( PSRootParseNode in_rootNode  ) 

Constructor.

Parameters:
in_rootNode The root node of the parse tree. (NOT OWN)

Destructor.


Member Function Documentation

void InsertFilterOnAllTables ( PSNonTerminalParseNode in_filter  ) 

Inserts the given filter condition on all tables in the parse tree.

The given filter may be a compound filter. However, each individual filter _MUST_ have the following form: ColumnRef filterType Value _OR_ ColumnRef filterType

Examples: C1 > 0 C1 IS NULL C2 = 10 C1 IS NOT NULL C3 != 'Simba'

If a table in the parse tree has an alias, the given filter will be modified such that the table name for the ColumnRef is the alias.

NOTE: The given filter will be cloned when it is inserted into the parse tree. The original in_filter will be cleaned up by this function.

NOTE: This function is ONLY for SELECT statements (PS_NT_SELECT_STATEMENT or PS_NT_TOP_LEVEL_SELECT_STATEMENT).

Parameters:
in_filter The filter condition which to insert on each table in the parse tree. (OWN)
void InsertFilterOnOneTable ( PSNonTerminalParseNode in_filter,
const simba_wstring in_tabName,
const simba_wstring in_catName = L"",
const simba_wstring in_schName = L"" 
)

Inserts the given filter condition on the given table in the parse tree.

The given filter may be a compound filter. However, each individual filter _MUST_ have the following form: ColumnRef filterType Value _OR_ ColumnRef filterType

Examples: C1 > 0 C1 IS NULL C2 = 10 C1 IS NOT NULL C3 != 'Simba'

If the given in_tabName has an alias in the parse tree, the given filter will be modified such that the table name for the ColumnRef is the alias.

NOTE: The given filter will be cloned when it is inserted into the parse tree. The original in_filter will be cleaned up by this function.

Parameters:
in_filter The filter condition which to insert on the given table. (OWN)
in_tabName This is the name of the table to which to apply the filter. This is _NOT_ the alias for the table to which to apply the filter.
in_catName The catalog name of the given table.
in_schName The schema name of the given table.

The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:18 2017 for SimbaEngine 10.1.3.1011 by simba