LibreOffice Module connectivity (master) 1
|
#include <sqliterator.hxx>
Public Member Functions | |
OSQLParseTreeIterator (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, const css::uno::Reference< css::container::XNameAccess > &_rxTables, const OSQLParser &_rParser) | |
~OSQLParseTreeIterator () | |
void | dispose () |
bool | isCaseSensitive () const |
void | setParseTree (const OSQLParseNode *pNewParseTree) |
const OSQLParseNode * | getParseTree () const |
const OSQLParseNode * | getWhereTree () const |
const OSQLParseNode * | getOrderTree () const |
const OSQLParseNode * | getGroupByTree () const |
const OSQLParseNode * | getHavingTree () const |
const OSQLParseNode * | getSimpleWhereTree () const |
const OSQLParseNode * | getSimpleOrderTree () const |
const OSQLParseNode * | getSimpleGroupByTree () const |
const OSQLParseNode * | getSimpleHavingTree () const |
const css::sdbc::SQLException & | getErrors () const |
returns the errors which occurred during parsing. More... | |
bool | hasErrors () const |
OSQLStatementType | getStatementType () const |
void | traverseAll () |
traverses the complete statement tree, and fills all our data with the information obatined during traversal. More... | |
const OSQLTables & | getTables () const |
const ::rtl::Reference< OSQLColumns > & | getSelectColumns () const |
const ::rtl::Reference< OSQLColumns > & | getGroupColumns () const |
const ::rtl::Reference< OSQLColumns > & | getOrderColumns () const |
const ::rtl::Reference< OSQLColumns > & | getParameters () const |
void | getColumnRange (const OSQLParseNode *_pColumnRef, OUString &_rColumnName, OUString &_rTableRange) const |
return the columname and the table range More... | |
void | getColumnRange (const OSQLParseNode *_pColumnRef, OUString &_out_rColumnName, OUString &_out_rTableRange, OUString &_out_rColumnAliasIfPresent) const |
retrieves a column's name, table range, and alias More... | |
sal_Int32 | getFunctionReturnType (const OSQLParseNode *_pNode) |
::std::vector< TNodePair > & | getJoinConditions () const |
Static Public Member Functions | |
static OUString | getColumnAlias (const OSQLParseNode *_pDerivedColumn) |
return the alias name of a column More... | |
static void | getColumnRange (const OSQLParseNode *_pColumnRef, const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, OUString &_rColumnName, OUString &_rTableRange) |
return the columname and the table range More... | |
static bool | isTableNode (const OSQLParseNode *_pTableNode) |
Private Member Functions | |
void | traverseParameter (const OSQLParseNode *_pParseNode, const OSQLParseNode *_pColumnRef, const OUString &_aColumnName, OUString &_aTableRange, const OUString &_rColumnAlias) |
void | traverseOneTableName (OSQLTables &_rTables, const OSQLParseNode *pTableName, const OUString &rTableRange) |
void | traverseSearchCondition (OSQLParseNode const *pSearchCondition) |
void | traverseOnePredicate (OSQLParseNode const *pColumnRef, OUString &aValue, OSQLParseNode const *pParameter) |
void | traverseByColumnNames (const OSQLParseNode *pSelectNode, bool _bOrder) |
void | traverseParameters (const OSQLParseNode *pSelectNode) |
const OSQLParseNode * | getTableNode (OSQLTables &_rTables, const OSQLParseNode *pTableRef, OUString &aTableRange) |
void | getQualified_join (OSQLTables &_rTables, const OSQLParseNode *pTableRef, OUString &aTableRange) |
void | getSelect_statement (OSQLTables &_rTables, const OSQLParseNode *pSelect) |
std::vector< OUString > | getSelectColumnNames () const |
OUString | getUniqueColumnName (const std::vector< OUString > &rColumnNames, const OUString &rColumnName) const |
css::uno::Reference< css::beans::XPropertySet > | findColumn (const OUString &rColumnName, OUString &rTableRange, bool _bLookInSubTables) |
finds a column with a given name, belonging to a given table More... | |
css::uno::Reference< css::beans::XPropertySet > | findSelectColumn (std::u16string_view rColumnName) |
finds a column with a given name among the select columns More... | |
void | setSelectColumnName (const OUString &rColumnName, const OUString &rColumnAlias, const OUString &rTableRange, bool bFkt=false, sal_Int32 _nType=css::sdbc::DataType::VARCHAR, bool bAggFkt=false) |
void | appendColumns (const OUString &_rTableAlias, const OSQLTable &_rTable) |
OSQLParseTreeIterator (const OSQLParseTreeIterator &rIter)=delete | |
bool | traverseTableNames (OSQLTables &_rTables) |
traverses the list of table names, and fills _rTables More... | |
bool | traverseSelectColumnNames (const OSQLParseNode *pSelectNode) |
traverses columns in a SELECT statement More... | |
void | traverseCreateColumns (const OSQLParseNode *pSelectNode) |
traverses columns in a CREATE TABLE statement More... | |
bool | traverseOrderByColumnNames (const OSQLParseNode *pSelectNode) |
bool | traverseGroupByColumnNames (const OSQLParseNode *pSelectNode) |
bool | traverseSelectionCriteria (const OSQLParseNode *pSelectNode) |
OSQLParseTreeIterator (const OSQLParseTreeIterator &_rParentIterator, const OSQLParser &_rParser, const OSQLParseNode *pRoot) | |
constructs a new iterator, which inherits some of the settings from a parent iterator More... | |
OSQLTable | impl_createTableObject (const OUString &rTableName, const OUString &rCatalogName, const OUString &rSchemaName) |
creates a table object and inserts it into our tables collection More... | |
OSQLTable | impl_locateRecordSource (const OUString &_rComposedName) |
locates a record source (a table or query) with the given name More... | |
void | impl_traverse (TraversalParts _nIncludeMask) |
implementation for both traverseAll and traverseSome More... | |
void | impl_getQueryParameterColumns (const OSQLTable &_rQuery) |
retrieves the parameter columns of the given query More... | |
void | setOrderByColumnName (const OUString &rColumnName, OUString &rTableRange, bool bAscending) |
void | setGroupByColumnName (const OUString &rColumnName, OUString &rTableRange) |
void | impl_appendError (IParseContext::ErrorCode _eError, const OUString *_pReplaceToken1=nullptr, const OUString *_pReplaceToken2=nullptr) |
appends an SQLException corresponding to the given error code to our error collection More... | |
void | impl_appendError (const css::sdbc::SQLException &_rError) |
appends an SQLException corresponding to the given error code to our error collection More... | |
void | impl_fillJoinConditions (const OSQLParseNode *i_pJoinCondition) |
Static Private Member Functions | |
static css::uno::Reference< css::beans::XPropertySet > | findColumn (const OSQLTables &_rTables, const OUString &rColumnName, OUString &rTableRange) |
finds the column with a given name, belonging to a given table, in a given tables collection More... | |
Private Attributes | |
std::optional< css::sdbc::SQLException > | m_xErrors |
const OSQLParseNode * | m_pParseTree |
const OSQLParser & | m_rParser |
OSQLStatementType | m_eStatementType |
::rtl::Reference< OSQLColumns > | m_aSelectColumns |
::rtl::Reference< OSQLColumns > | m_aParameters |
::rtl::Reference< OSQLColumns > | m_aGroupColumns |
::rtl::Reference< OSQLColumns > | m_aOrderColumns |
::rtl::Reference< OSQLColumns > | m_aCreateColumns |
::std::unique_ptr< OSQLParseTreeIteratorImpl > | m_pImpl |
Definition at line 79 of file sqliterator.hxx.
|
privatedelete |
connectivity::OSQLParseTreeIterator::OSQLParseTreeIterator | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConnection, |
const css::uno::Reference< css::container::XNameAccess > & | _rxTables, | ||
const OSQLParser & | _rParser | ||
) |
References dispose().
OSQLParseTreeIterator::~OSQLParseTreeIterator | ( | ) |
Definition at line 161 of file sqliterator.cxx.
References dispose().
|
private |
constructs a new iterator, which inherits some of the settings from a parent iterator
Definition at line 152 of file sqliterator.cxx.
References m_pImpl, m_pImpl, m_rParser, m_xConnection, and setParseTree().
|
private |
Definition at line 1527 of file sqliterator.cxx.
References aColNames, aName, getBOOL(), getINT32(), dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), getSelectColumnNames(), getString(), getUniqueColumnName(), impl_appendError(), connectivity::IParseContext::InvalidColumn, isCaseSensitive(), m_aSelectColumns, PROPERTY_ID_CATALOGNAME, PROPERTY_ID_DEFAULTVALUE, PROPERTY_ID_DESCRIPTION, PROPERTY_ID_ISAUTOINCREMENT, PROPERTY_ID_ISCURRENCY, PROPERTY_ID_ISNULLABLE, PROPERTY_ID_PRECISION, PROPERTY_ID_SCALE, PROPERTY_ID_SCHEMANAME, PROPERTY_ID_TABLENAME, PROPERTY_ID_TYPE, PROPERTY_ID_TYPENAME, and xColumn.
Referenced by setSelectColumnName().
void OSQLParseTreeIterator::dispose | ( | void | ) |
Definition at line 179 of file sqliterator.cxx.
References m_aCreateColumns, m_aGroupColumns, m_aOrderColumns, m_aParameters, m_aSelectColumns, and m_pImpl.
Referenced by connectivity::file::OStatement_BASE2::disposing(), impl_getQueryParameterColumns(), and ~OSQLParseTreeIterator().
|
staticprivate |
finds the column with a given name, belonging to a given table, in a given tables collection
_rTables | the tables collection to look in |
rColumnName | the column name to look for |
rTableRange | the table alias name; if empty, look in all tables |
Definition at line 1969 of file sqliterator.cxx.
References dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), getString(), PROPERTY_ID_TABLENAME, table, and xColumn.
Referenced by findColumn(), getFunctionReturnType(), setGroupByColumnName(), setOrderByColumnName(), and traverseParameter().
|
private |
finds a column with a given name, belonging to a given table
rColumnName | the column name to look for |
rTableRange | the table alias name; if empty, look in all tables |
_bLookInSubTables | <TRUE> if and only if not only our direct tables, but also our sub tables (from sub selects) should be searched |
Definition at line 1960 of file sqliterator.cxx.
References findColumn(), m_pImpl, and xColumn.
|
private |
finds a column with a given name among the select columns
rColumnName | the column name to look for |
Definition at line 1939 of file sqliterator.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, connectivity::OMetaConnection::getPropMap(), m_aSelectColumns, PROPERTY_ID_NAME, sName, and xColumn.
Referenced by setOrderByColumnName().
|
static |
return the alias name of a column
_pDerivedColumn | The parse node where SQL_ISRULE(_pDerivedColumn,derived_column) must be true |
Definition at line 692 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), connectivity::OSQLParseNode::getTokenValue(), connectivity::OSQLParseNode::isRule(), and SQL_ISRULE.
Referenced by traverseSelectColumnNames().
|
static |
return the columname and the table range
_pColumnRef | The column ref parse node. |
_xMetaData | The database meta data. |
_rColumnName | The column name to be set. |
_rTableRange | The table range to be set. |
void connectivity::OSQLParseTreeIterator::getColumnRange | ( | const OSQLParseNode * | _pColumnRef, |
OUString & | _out_rColumnName, | ||
OUString & | _out_rTableRange, | ||
OUString & | _out_rColumnAliasIfPresent | ||
) | const |
retrieves a column's name, table range, and alias
_pColumnRef | The column_ref parse node. |
_out_rColumnName | The column name to be set. |
_out_rTableRange | The table range to be set. |
_out_rColumnAliasIfPresent | If the column specified by _pColumnRef is part of the select columns, and contains a column alias there, this alias is returned here. |
void OSQLParseTreeIterator::getColumnRange | ( | const OSQLParseNode * | _pColumnRef, |
OUString & | _rColumnName, | ||
OUString & | _rTableRange | ||
) | const |
return the columname and the table range
_pColumnRef | The column ref parse node. |
_rColumnName | The column name to be set. |
_rTableRange | The table range to be set. |
Definition at line 757 of file sqliterator.cxx.
References m_pImpl.
Referenced by connectivity::macab::MacabCommonStatement::analyseWhereClause(), connectivity::file::OPreparedStatement::describeColumn(), getFunctionReturnType(), traverseByColumnNames(), traverseOnePredicate(), traverseParameters(), and traverseSelectColumnNames().
|
inline |
returns the errors which occurred during parsing.
The returned object contains a chain (via SQLException::NextException) of SQLExceptions.
Definition at line 186 of file sqliterator.hxx.
sal_Int32 OSQLParseTreeIterator::getFunctionReturnType | ( | const OSQLParseNode * | _pNode | ) |
Definition at line 2037 of file sqliterator.cxx.
References findColumn(), connectivity::OSQLParseNode::getChild(), getColumnRange(), connectivity::OSQLParser::getContext(), getFunctionReturnType(), connectivity::OSQLParser::getFunctionReturnType(), connectivity::OMetaConnection::getPropMap(), connectivity::OSQLParseNode::getTokenID(), m_pImpl, m_rParser, MAX, MIN, nType, connectivity::OSQLParseNode::parseNodeToStr(), PROPERTY_ID_TYPE, SQL_ISRULE, SQL_ISTOKEN, STRING, and xColumn.
Referenced by getFunctionReturnType(), and traverseSelectColumnNames().
const OSQLParseNode * OSQLParseTreeIterator::getGroupByTree | ( | ) | const |
Definition at line 1865 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getStatementType(), m_pParseTree, connectivity::Select, SQL_ISRULE, and TABLE_EXPRESSION_CHILD_COUNT.
Referenced by getSimpleGroupByTree().
|
inline |
Definition at line 204 of file sqliterator.hxx.
const OSQLParseNode * OSQLParseTreeIterator::getHavingTree | ( | ) | const |
Definition at line 1886 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getStatementType(), m_pParseTree, connectivity::Select, SQL_ISRULE, and TABLE_EXPRESSION_CHILD_COUNT.
Referenced by getSimpleHavingTree().
std::vector< TNodePair > & OSQLParseTreeIterator::getJoinConditions | ( | ) | const |
Definition at line 492 of file sqliterator.cxx.
References m_pImpl.
|
inline |
Definition at line 205 of file sqliterator.hxx.
const OSQLParseNode * OSQLParseTreeIterator::getOrderTree | ( | ) | const |
Definition at line 1827 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getStatementType(), m_pParseTree, ORDER_BY_CHILD_POS, connectivity::Select, SQL_ISRULE, and TABLE_EXPRESSION_CHILD_COUNT.
Referenced by connectivity::file::OStatement_Base::analyzeSQL(), getSimpleOrderTree(), connectivity::evoab::OCommonStatement::parseSql(), and connectivity::macab::MacabCommonStatement::sortRecords().
|
inline |
Definition at line 206 of file sqliterator.hxx.
Referenced by connectivity::file::OPreparedStatement::construct(), and impl_getQueryParameterColumns().
|
inline |
Definition at line 169 of file sqliterator.hxx.
Referenced by connectivity::file::OStatement_Base::construct(), and connectivity::evoab::OCommonStatement::getTableName().
|
private |
Definition at line 497 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getTableNode(), connectivity::OSQLParseNode::getTokenID(), i, impl_fillJoinConditions(), isTableNode(), m_pImpl, nPos, SQL_ISRULE, and traverseOneTableName().
Referenced by getSelect_statement(), and getTableNode().
|
private |
Definition at line 603 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getQualified_join(), getSelect_statement(), getTableNode(), connectivity::OSQLParseNode::getTableRange(), i, isTableNode(), SQL_ISPUNCTUATION, SQL_ISRULE, and traverseOneTableName().
Referenced by getSelect_statement(), getTableNode(), and traverseTableNames().
|
private |
Definition at line 1724 of file sqliterator.cxx.
References col, dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), getString(), isCaseSensitive(), m_aSelectColumns, and PROPERTY_ID_NAME.
Referenced by appendColumns(), setSelectColumnName(), and traverseParameter().
|
inline |
Definition at line 203 of file sqliterator.hxx.
Referenced by connectivity::file::OStatement_Base::construct(), connectivity::file::OStatement_Base::createColumnMapping(), connectivity::file::OPreparedStatement::getMetaData(), connectivity::evoab::OCommonStatement::impl_getEBookQuery_throw(), connectivity::file::OResultSet::OpenImpl(), connectivity::macab::MacabCommonStatement::setMacabFields(), and connectivity::file::OStatement_Base::setOrderbyColumn().
const OSQLParseNode * OSQLParseTreeIterator::getSimpleGroupByTree | ( | ) | const |
Definition at line 1926 of file sqliterator.cxx.
References connectivity::OSQLParseNode::getChild(), and getGroupByTree().
const OSQLParseNode * OSQLParseTreeIterator::getSimpleHavingTree | ( | ) | const |
Definition at line 1932 of file sqliterator.cxx.
References connectivity::OSQLParseNode::getChild(), and getHavingTree().
const OSQLParseNode * OSQLParseTreeIterator::getSimpleOrderTree | ( | ) | const |
Definition at line 1920 of file sqliterator.cxx.
References connectivity::OSQLParseNode::getChild(), and getOrderTree().
const OSQLParseNode * OSQLParseTreeIterator::getSimpleWhereTree | ( | ) | const |
Definition at line 1914 of file sqliterator.cxx.
References connectivity::OSQLParseNode::getChild(), and getWhereTree().
|
inline |
Definition at line 190 of file sqliterator.hxx.
Referenced by connectivity::file::OStatement_Base::construct(), connectivity::file::OPreparedStatement::construct(), connectivity::file::OPreparedStatement::execute(), connectivity::file::OStatement::execute(), connectivity::macab::MacabCommonStatement::executeQuery(), connectivity::file::OResultSet::ExecuteRow(), getGroupByTree(), getHavingTree(), getOrderTree(), connectivity::evoab::OCommonStatement::getTableName(), getWhereTree(), connectivity::file::OResultSet::Move(), and connectivity::file::OResultSet::OpenImpl().
|
private |
Definition at line 539 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getQualified_join(), getSelect_statement(), connectivity::OSQLParseNode::getTableRange(), connectivity::OSQLParseNode::isToken(), m_pImpl, SAL_WARN, and SQL_ISRULE.
Referenced by getQualified_join(), and getSelect_statement().
const OSQLTables & OSQLParseTreeIterator::getTables | ( | ) | const |
Definition at line 167 of file sqliterator.cxx.
References m_pImpl.
Referenced by connectivity::file::OStatement_Base::construct(), connectivity::file::OPreparedStatement::describeParameter(), connectivity::file::OPreparedStatement::getMetaData(), connectivity::file::OResultSet::getMetaData(), connectivity::macab::MacabCommonStatement::getTableName(), and connectivity::file::OResultSet::OpenImpl().
|
private |
Definition at line 1737 of file sqliterator.cxx.
References i, and isCaseSensitive().
Referenced by appendColumns(), setSelectColumnName(), and traverseParameter().
const OSQLParseNode * OSQLParseTreeIterator::getWhereTree | ( | ) | const |
Definition at line 1798 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getStatementType(), m_pParseTree, connectivity::Select, SQL_ISRULE, and TABLE_EXPRESSION_CHILD_COUNT.
Referenced by getSimpleWhereTree(), connectivity::evoab::OCommonStatement::parseSql(), and connectivity::macab::MacabCommonStatement::selectRecords().
|
inline |
Definition at line 187 of file sqliterator.hxx.
Referenced by connectivity::file::OStatement_Base::construct(), connectivity::macab::MacabCommonStatement::getTableName(), connectivity::file::OResultSet::OpenImpl(), traverseGroupByColumnNames(), traverseOrderByColumnNames(), traverseSelectColumnNames(), traverseSelectionCriteria(), and traverseTableNames().
|
private |
appends an SQLException corresponding to the given error code to our error collection
|
private |
appends an SQLException corresponding to the given error code to our error collection
_eError | the code of the error which occurred |
_pReplaceToken1 | if not <NULL>, the first occurrence of '#' in the error message will be replaced with the given token |
_pReplaceToken2 | if not <NULL>, and if _rReplaceToken1 is not <NULL>, the second occurrence of '#' in the error message will be replaced with _rReplaceToken2 |
Referenced by appendColumns(), impl_locateRecordSource(), traverseCreateColumns(), and traverseSelectColumnNames().
|
private |
creates a table object and inserts it into our tables collection
only used when we're iterating through a CREATE TABLE statement
Definition at line 1507 of file sqliterator.cxx.
References connectivity::CreateTable, and m_eStatementType.
Referenced by impl_locateRecordSource().
|
private |
Definition at line 461 of file sqliterator.cxx.
References AND, connectivity::OSQLParseNode::count(), connectivity::Equal, connectivity::OSQLParseNode::getChild(), connectivity::OSQLParseNode::getNodeType(), impl_fillJoinConditions(), m_pImpl, SQL_ISPUNCTUATION, SQL_ISRULE, SQL_ISRULEOR2, and SQL_ISTOKEN.
Referenced by getQualified_join(), impl_fillJoinConditions(), and traverseSearchCondition().
|
private |
retrieves the parameter columns of the given query
Definition at line 305 of file sqliterator.cxx.
References DBG_UNHANDLED_EXCEPTION, dispose(), Exception, dbtools::OPropertyMap::getNameByIndex(), getParameters(), connectivity::OMetaConnection::getPropMap(), impl_traverse(), m_aParameters, m_pImpl, m_rParser, connectivity::Parameters, PROPERTY_ID_COMMAND, PROPERTY_ID_ESCAPEPROCESSING, and connectivity::SelectColumns.
Referenced by impl_locateRecordSource().
|
private |
locates a record source (a table or query) with the given name
Definition at line 351 of file sqliterator.cxx.
References connectivity::CreateTable, Exception, connectivity::OSQLParser::getErrorHelper(), connectivity::SQLError::getSQLException(), impl_appendError(), impl_createTableObject(), impl_getQueryParameterColumns(), connectivity::IParseContext::InvalidQueryExist, connectivity::IParseContext::InvalidTableExist, connectivity::IParseContext::InvalidTableNosuch, connectivity::IParseContext::InvalidTableOrQuery, m_eStatementType, m_pImpl, m_rParser, dbtools::qualifiedNameComponents(), SAL_WARN, sCatalog, sComposedName, sName, and sSchema.
Referenced by traverseOneTableName().
|
private |
implementation for both traverseAll and traverseSome
Definition at line 1465 of file sqliterator.cxx.
References connectivity::CreateTable, connectivity::OSQLParseNode::getChild(), connectivity::Insert, m_eStatementType, m_pImpl, m_pParseTree, m_xErrors, connectivity::Select, traverseCreateColumns(), traverseGroupByColumnNames(), traverseOrderByColumnNames(), traverseParameters(), traverseSelectColumnNames(), traverseSelectionCriteria(), and traverseTableNames().
Referenced by impl_getQueryParameterColumns(), and traverseAll().
bool OSQLParseTreeIterator::isCaseSensitive | ( | ) | const |
Definition at line 173 of file sqliterator.cxx.
References m_pImpl.
Referenced by connectivity::file::OPreparedStatement::AddParameter(), appendColumns(), getSelectColumnNames(), getUniqueColumnName(), setGroupByColumnName(), setOrderByColumnName(), setSelectColumnName(), traverseCreateColumns(), and traverseParameter().
|
static |
Definition at line 1907 of file sqliterator.cxx.
References SQL_ISRULE.
Referenced by getQualified_join(), getSelect_statement(), and connectivity::evoab::OCommonStatement::getTableName().
|
private |
Definition at line 1776 of file sqliterator.cxx.
References findColumn(), isCaseSensitive(), m_aGroupColumns, m_aSelectColumns, o3tl::make_unsigned(), nId, and xColumn.
Referenced by traverseByColumnNames().
|
private |
Definition at line 1753 of file sqliterator.cxx.
References findColumn(), findSelectColumn(), isCaseSensitive(), m_aOrderColumns, m_aSelectColumns, o3tl::make_unsigned(), nId, and xColumn.
Referenced by traverseByColumnNames().
void OSQLParseTreeIterator::setParseTree | ( | const OSQLParseNode * | pNewParseTree | ) |
Definition at line 192 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::CreateTable, connectivity::Delete, connectivity::OSQLParseNode::getChild(), connectivity::Insert, m_aCreateColumns, m_aGroupColumns, m_aOrderColumns, m_aParameters, m_aSelectColumns, m_eStatementType, m_pImpl, m_pParseTree, m_xErrors, connectivity::OdbcCall, connectivity::Select, SQL_ISRULE, connectivity::Unknown, and connectivity::Update.
Referenced by connectivity::file::OStatement_Base::construct(), connectivity::macab::MacabCommonStatement::executeQuery(), OSQLParseTreeIterator(), and connectivity::evoab::OCommonStatement::parseSql().
|
private |
Definition at line 1575 of file sqliterator.cxx.
References appendColumns(), getSelectColumnNames(), getUniqueColumnName(), isCaseSensitive(), m_aSelectColumns, m_pImpl, SAL_WARN, table, and xColumn.
Referenced by traverseSelectColumnNames().
void OSQLParseTreeIterator::traverseAll | ( | ) |
traverses the complete statement tree, and fills all our data with the information obatined during traversal.
Implemented by calling the single traverse* methods in the proper order (depending on the statement type).
Definition at line 1459 of file sqliterator.cxx.
References connectivity::All, and impl_traverse().
Referenced by connectivity::file::OStatement_Base::construct(), connectivity::macab::MacabCommonStatement::executeQuery(), and connectivity::evoab::OCommonStatement::parseSql().
|
private |
Definition at line 943 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::DESC, connectivity::OSQLParseNode::getChild(), getColumnRange(), connectivity::OSQLParseNode::getParent(), i, m_eStatementType, m_pImpl, nCount, nPos, ORDER_BY_CHILD_POS, connectivity::OSQLParseNode::parseNodeToStr(), connectivity::Select, setGroupByColumnName(), setOrderByColumnName(), SQL_ISRULE, SQL_ISTOKEN, TABLE_EXPRESSION_CHILD_COUNT, and traverseByColumnNames().
Referenced by traverseByColumnNames(), traverseGroupByColumnNames(), and traverseOrderByColumnNames().
|
private |
traverses columns in a CREATE TABLE statement
Definition at line 783 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::CreateTable, connectivity::IParseContext::General, connectivity::OSQLParseNode::getChild(), connectivity::OSQLParseNode::getNodeType(), connectivity::OSQLParseNode::getTokenID(), connectivity::OSQLParseNode::getTokenValue(), i, impl_appendError(), isCaseSensitive(), connectivity::Keyword, m_aCreateColumns, m_eStatementType, m_pImpl, nType, and SQL_ISRULE.
Referenced by impl_traverse().
|
private |
Definition at line 1027 of file sqliterator.cxx.
References hasErrors(), and traverseByColumnNames().
Referenced by impl_traverse().
|
private |
Definition at line 1433 of file sqliterator.cxx.
References aName, getColumnRange(), SQL_ISRULE, and traverseSearchCondition().
Referenced by traverseSearchCondition().
|
private |
Definition at line 428 of file sqliterator.cxx.
References Any, dbtools::composeTableName(), connectivity::OSQLParseNode::getTableComponents(), impl_locateRecordSource(), m_pImpl, and connectivity::TableNames.
Referenced by getQualified_join(), getSelect_statement(), and traverseTableNames().
|
private |
Definition at line 937 of file sqliterator.cxx.
References hasErrors(), and traverseByColumnNames().
Referenced by impl_traverse().
|
private |
Definition at line 1293 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), findColumn(), connectivity::OSQLParseNode::getChild(), connectivity::OSQLParser::getFunctionParameterType(), connectivity::OSQLParseNode::getParent(), getSelectColumnNames(), connectivity::OSQLParseNode::getTokenID(), connectivity::OSQLParseNode::getTokenValue(), getUniqueColumnName(), i, isCaseSensitive(), m_aParameters, m_aSelectColumns, m_pImpl, nCount, nType, connectivity::Parameters, connectivity::OSQLParseNode::parseNodeToStr(), SAL_WARN, SQL_ISPUNCTUATION, SQL_ISRULE, and xColumn.
Referenced by traverseParameters().
|
private |
Definition at line 1053 of file sqliterator.cxx.
References connectivity::CommaListRule, connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), getColumnRange(), connectivity::OSQLParseNode::getNodeType(), connectivity::OSQLParseNode::getParent(), i, m_pImpl, nCount, nPos, connectivity::OSQLParseNode::parseNodeToStr(), SQL_ISRULE, traverseParameter(), and traverseParameters().
Referenced by impl_traverse(), and traverseParameters().
|
private |
Definition at line 1168 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), connectivity::OSQLParseNode::getTokenValue(), i, impl_fillJoinConditions(), IS, connectivity::OSQLParseNode::isToken(), m_pImpl, nCount, OR, connectivity::OSQLParseNode::parseNodeToStr(), SQL_ISPUNCTUATION, SQL_ISRULE, SQL_ISTOKEN, traverseOnePredicate(), traverseSearchCondition(), traverseSelectionCriteria(), and traverseTableNames().
Referenced by traverseOnePredicate(), traverseSearchCondition(), traverseSelectColumnNames(), and traverseSelectionCriteria().
|
private |
traverses columns in a SELECT statement
Definition at line 835 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::IParseContext::General, connectivity::OSQLParseNode::getChild(), getColumnAlias(), getColumnRange(), getFunctionReturnType(), connectivity::OSQLParseNode::getKnownRuleID(), hasErrors(), i, impl_appendError(), connectivity::OSQLParseNode::isRule(), m_eStatementType, m_pImpl, nType, connectivity::OSQLParseNode::parseNodeToStr(), connectivity::Select, connectivity::SelectColumns, setSelectColumnName(), SQL_ISPUNCTUATION, SQL_ISRULE, connectivity::OSQLParseNode::subquery, traverseSearchCondition(), and traverseSelectColumnNames().
Referenced by impl_traverse(), and traverseSelectColumnNames().
|
private |
Definition at line 1106 of file sqliterator.cxx.
References connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), hasErrors(), m_eStatementType, SAL_WARN, connectivity::Select, SQL_ISRULE, TABLE_EXPRESSION_CHILD_COUNT, traverseSearchCondition(), and traverseSelectionCriteria().
Referenced by impl_traverse(), traverseSearchCondition(), and traverseSelectionCriteria().
|
private |
traverses the list of table names, and fills _rTables
Definition at line 658 of file sqliterator.cxx.
References connectivity::CreateTable, connectivity::Delete, connectivity::OSQLParseNode::getChild(), getSelect_statement(), hasErrors(), connectivity::Insert, m_eStatementType, m_pParseTree, connectivity::Select, traverseOneTableName(), and connectivity::Update.
Referenced by impl_traverse(), and traverseSearchCondition().
|
private |
Definition at line 90 of file sqliterator.hxx.
Referenced by dispose(), setParseTree(), and traverseCreateColumns().
|
private |
Definition at line 88 of file sqliterator.hxx.
Referenced by dispose(), setGroupByColumnName(), and setParseTree().
|
private |
Definition at line 89 of file sqliterator.hxx.
Referenced by dispose(), setOrderByColumnName(), and setParseTree().
|
private |
Definition at line 87 of file sqliterator.hxx.
Referenced by dispose(), impl_getQueryParameterColumns(), setParseTree(), and traverseParameter().
|
private |
Definition at line 86 of file sqliterator.hxx.
Referenced by appendColumns(), dispose(), findSelectColumn(), getSelectColumnNames(), setGroupByColumnName(), setOrderByColumnName(), setParseTree(), setSelectColumnName(), and traverseParameter().
|
private |
Definition at line 85 of file sqliterator.hxx.
Referenced by impl_createTableObject(), impl_locateRecordSource(), impl_traverse(), setParseTree(), traverseByColumnNames(), traverseCreateColumns(), traverseSelectColumnNames(), traverseSelectionCriteria(), and traverseTableNames().
|
private |
Definition at line 92 of file sqliterator.hxx.
Referenced by dispose(), findColumn(), getColumnRange(), getFunctionReturnType(), getJoinConditions(), getQualified_join(), getTableNode(), getTables(), impl_fillJoinConditions(), impl_getQueryParameterColumns(), impl_locateRecordSource(), impl_traverse(), isCaseSensitive(), OSQLParseTreeIterator(), setParseTree(), setSelectColumnName(), traverseByColumnNames(), traverseCreateColumns(), traverseOneTableName(), traverseParameter(), traverseParameters(), traverseSearchCondition(), and traverseSelectColumnNames().
|
private |
Definition at line 83 of file sqliterator.hxx.
Referenced by getGroupByTree(), getHavingTree(), getOrderTree(), getWhereTree(), impl_traverse(), setParseTree(), and traverseTableNames().
|
private |
Definition at line 84 of file sqliterator.hxx.
Referenced by getFunctionReturnType(), impl_getQueryParameterColumns(), and impl_locateRecordSource().
|
private |
Definition at line 82 of file sqliterator.hxx.
Referenced by impl_traverse(), and setParseTree().