Tag: cws_src680_qiq
User: fs      
Date: 2006/06/30 07:55:27

Modified:
   dba/connectivity/inc/connectivity/sqliterator.hxx

Log:
 corected parameter in sub query parsing

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.5&r2=1.20.78.6
Delta lines:  +57 -8
--------------------
--- sqliterator.hxx     28 Jun 2006 08:40:40 -0000      1.20.78.5
+++ sqliterator.hxx     30 Jun 2006 14:55:25 -0000      1.20.78.6
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sqliterator.hxx,v $
  *
- *  $Revision: 1.20.78.5 $
+ *  $Revision: 1.20.78.6 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/28 08:40:40 $
+ *  last change: $Author: fs $ $Date: 2006/06/30 14:55:25 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -212,6 +212,29 @@
         */
         void traverseAll();
 
+        enum TraversalParts
+        {
+            Parameters      = 0x0001,
+            TableNames      = 0x0002,
+            SelectColumns   = 0x0006,   // note that this includes TableNames. 
No SelectColumns without TableNames
+
+            // Those are not implemented currently
+            // GroupColumns    = 0x0008,
+            // OrderColumns    = 0x0010,
+            // SelectColumns   = 0x0020,
+            // CreateColumns   = 0x0040,
+
+            All             = 0xFFFF
+        };
+        /** traverses selected parts of the statement tree, and fills our data 
with
+            the information obtained during traversal
+
+            @param _nIncludeMask
+                set of TraversalParts bits, specifying which information is to 
be collected.
+                Note TraversalParts is currently not 
+        */
+        void traverseSome( sal_uInt32 _nIncludeMask );
+
                // Die TableRangeMap enth"alt alle Tabellen unter dem 
zugeh"origen Rangenamen der zuerst gefunden wird
                const OSQLTables& getTables() const;
 
@@ -284,19 +307,26 @@
     private:
         /** traverses the list of table names, and filles _rTables
         */
-               void traverseTableNames( OSQLTables& _rTables );
+               bool traverseTableNames( OSQLTables& _rTables );
 
         /// traverses columns in a SELECT statement
-               void traverseSelectColumnNames(const OSQLParseNode* 
pSelectNode);
+               bool traverseSelectColumnNames(const OSQLParseNode* 
pSelectNode);
         /// traverses columns in a CREATE TABLE statement
                void traverseCreateColumns(const OSQLParseNode* pSelectNode);
 
-               void traverseOrderByColumnNames(const OSQLParseNode* 
pSelectNode);
-               void traverseGroupByColumnNames(const OSQLParseNode* 
pSelectNode);
+               bool traverseOrderByColumnNames(const OSQLParseNode* 
pSelectNode);
+               bool traverseGroupByColumnNames(const OSQLParseNode* 
pSelectNode);
 
-               void traverseSelectionCriteria(const OSQLParseNode* 
pSelectNode);
+               bool traverseSelectionCriteria(const OSQLParseNode* 
pSelectNode);
 
     private:
+        /** constructs a new iterator, which inherits some of the settings 
from a parent iterator
+        */
+               OSQLParseTreeIterator(
+            const OSQLParseTreeIterator& _rParentIterator,
+            const OSQLParser& _rParser,
+            const OSQLParseNode* pRoot );
+
         /** creates a table object and inserts it into our tables collection
 
             only used when we're iterating through a CREATE TABLE statement
@@ -310,6 +340,14 @@
             const ::rtl::OUString& _rComposedName
         );
 
+        /** implementation for both traverseAll and traverseSome
+        */
+        void    impl_traverse( sal_uInt32 _nIncludeMask );
+
+        /** retrieves the parameter columns of the given query
+        */
+        void    impl_getQueryParameterColumns( const OSQLTable& _rQuery );
+
         void setOrderByColumnName(const ::rtl::OUString & rColumnName, const 
::rtl::OUString & rTableRange, sal_Bool bAscending);
                void setGroupByColumnName(const ::rtl::OUString & rColumnName, 
const ::rtl::OUString & rTableRange);
 
@@ -327,6 +365,17 @@
         */
         void impl_appendError( IParseContext::ErrorCode _eError,
             const ::rtl::OUString* _pReplaceToken1 = NULL, const 
::rtl::OUString* _pReplaceToken2 = NULL );
+
+        /** appends an SQLException corresponding to the given error code to 
our error collection
+        */
+        void impl_appendError( const ::com::sun::star::sdbc::SQLException& 
_rError );
+
+        /** resets our errors
+        */
+        inline void impl_resetErrors()
+        {
+            m_aErrors = ::com::sun::star::sdbc::SQLException();
+        }
        };
 }
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to