Tag: cws_src680_qiq User: fs Date: 06/05/16 13:08:16 Modified: /dba/connectivity/inc/connectivity/ sqliterator.hxx
Log: #i51143# minor refactoring File Changes: Directory: /dba/connectivity/inc/connectivity/ ============================================== File [changed]: sqliterator.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/sqliterator.hxx?r1=1.20.78.1&r2=1.20.78.2 Delta lines: +25 -7 -------------------- --- sqliterator.hxx 10 May 2006 10:16:51 -0000 1.20.78.1 +++ sqliterator.hxx 16 May 2006 20:08:14 -0000 1.20.78.2 @@ -4,9 +4,9 @@ * * $RCSfile: sqliterator.hxx,v $ * - * $Revision: 1.20.78.1 $ + * $Revision: 1.20.78.2 $ * - * last change: $Author: fs $ $Date: 2006/05/10 10:16:51 $ + * last change: $Author: fs $ $Date: 2006/05/16 20:08:14 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -93,7 +93,7 @@ private: ::com::sun::star::sdbc::SQLException m_aErrors; // conatins the error while iterating through the statement const OSQLParseNode* m_pParseTree; // aktueller ParseTree - const OSQLParser* m_pParser; // if set used for general error messages from the context + const OSQLParser& m_rParser; // if set used for general error messages from the context OSQLStatementType m_eStatementType; // Art des Statements ::vos::ORef<OSQLColumns> m_aSelectColumns; // alle Spalten aus dem Select-Clause ::vos::ORef<OSQLColumns> m_aParameters; // all parameters @@ -103,7 +103,7 @@ ::std::auto_ptr< OSQLParseTreeIteratorImpl > m_pImpl; - void traverseParameter(OSQLParseNode* _pParseNode,OSQLParseNode* _pColumnRef,const ::rtl::OUString& _aColumnName,const ::rtl::OUString& _aTableRange); + void traverseParameter(OSQLParseNode* _pParseNode,OSQLParseNode* _pColumnRef,const ::rtl::OUString& _aColumnName,const ::rtl::OUString& _aTableRange, const ::rtl::OUString& _rColumnAlias); // F"ugt eine Tabelle in die Map ein void traverseOneTableName( OSQLTables& _rTables,const OSQLParseNode * pTableName, const ::rtl::OUString & rTableRange ); void traverseORCriteria(OSQLParseNode * pSearchCondition); @@ -165,8 +165,8 @@ OSQLParseTreeIterator( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxTables, - const OSQLParseNode* pRoot, - const OSQLParser* _pParser ); + const OSQLParser& _rParser, + const OSQLParseNode* pRoot = NULL ); ~OSQLParseTreeIterator(); inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) @@ -183,7 +183,7 @@ // Der zu analysierende/zu traversierende Parse Tree: // bei "Ubergabe von NULL wird der aktuelle Parsetree gel"oscht und der Fehlerstatus gecleared void setParseTree(const OSQLParseNode * pNewParseTree); - void setParser(const OSQLParser* _pParser) { m_pParser = _pParser; } +// void setParser(const OSQLParser* _pParser) { m_pParser = _pParser; } const OSQLParseNode * getParseTree() const { return m_pParseTree; }; // Teilbaueme bei einem select statement @@ -235,6 +235,24 @@ void getColumnRange( const OSQLParseNode* _pColumnRef, ::rtl::OUString &_rColumnName, ::rtl::OUString& _rTableRange) const; + + /** retrieves a column's name, table range, and alias + + @param _pColumnRef + The column_ref parse node. + @param _out_rColumnName + The column name to be set. + @param _out_rTableRange + The table range to be set. + @param _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 getColumnRange( const OSQLParseNode* _pColumnRef, + ::rtl::OUString& _out_rColumnName, + ::rtl::OUString& _out_rTableRange, + ::rtl::OUString& _out_rColumnAliasIfPresent + ) const; /** return the alias name of a column @param _pDerivedColumn --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
