Tag: cws_src680_qiq
User: fs      
Date: 06/05/10 03:51:25

Modified:
 /dba/connectivity/source/drivers/file/
  FStatement.cxx, FResultSet.cxx

Log:
 #i51443# changed API of the OSQLParseIterator

File Changes:

Directory: /dba/connectivity/source/drivers/file/
=================================================

File [changed]: FStatement.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/file/FStatement.cxx?r1=1.38&r2=1.38.96.1
Delta lines:  +8 -10
--------------------
--- FStatement.cxx      23 Sep 2005 11:39:09 -0000      1.38
+++ FStatement.cxx      10 May 2006 10:51:22 -0000      1.38.96.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: FStatement.cxx,v $
  *
- *  $Revision: 1.38 $
+ *  $Revision: 1.38.96.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 11:39:09 $
+ *  last change: $Author: fs $ $Date: 2006/05/10 10:51:22 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -109,7 +109,7 @@
        ,m_pConnection(_pConnection)
        ,m_pParseTree(NULL)
        ,m_aParser(_pConnection->getDriver()->getFactory())
-       
,m_aSQLIterator(_pConnection->createCatalog()->getTables(),_pConnection->getMetaData(),NULL,&m_aParser)
+       ,m_aSQLIterator( _pConnection, 
_pConnection->createCatalog()->getTables(), NULL, &m_aParser )
        ,m_nMaxFieldSize(0)
        ,m_nMaxRows(0)
        ,m_nQueryTimeOut(0)
@@ -286,7 +286,6 @@
        ::osl::MutexGuard aGuard( m_aMutex );
        checkDisposed(OStatement_BASE::rBHelper.bDisposed);
         
-
        return makeAny(m_aLastWarning);
 }
 // -------------------------------------------------------------------------
@@ -295,7 +294,6 @@
        ::osl::MutexGuard aGuard( m_aMutex );
        checkDisposed(OStatement_BASE::rBHelper.bDisposed);
                
-
        m_aLastWarning = SQLWarning();
 }
 // -------------------------------------------------------------------------
@@ -500,19 +498,19 @@
             // no tables -> nothing to operate on -> error
                        throwGenericSQLException(       
::rtl::OUString::createFromAscii("The statement is invalid. It contains no 
valid table."),
                                                                                
static_cast<XWeak*>(this),
-                                                                               
makeAny(m_aSQLIterator.getWarning()));
+                                                                               
makeAny( m_aSQLIterator.getErrors() ) );
 
-        if ( xTabs.size() > 1 || 
m_aSQLIterator.getWarning().Message.getLength() )
+        if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() )
             // more than one table -> can't operate on them -> error
                        throwGenericSQLException(       
::rtl::OUString::createFromAscii("The statement is invalid. It contains more 
than one table."),
                                                                                
static_cast<XWeak*>(this),
-                                                                               
makeAny(m_aSQLIterator.getWarning()));
+                                                                               
makeAny( m_aSQLIterator.getErrors() ) );
 
                if ( (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT 
|| m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT_COUNT) && 
m_aSQLIterator.getSelectColumns()->empty() )
             // SELECT statement without columns -> error
                        throwGenericSQLException(       
::rtl::OUString::createFromAscii("The statement is invalid. It contains no 
valid column names."),
                                                                                
static_cast<XWeak*>(this),
-                                                                               
makeAny(m_aSQLIterator.getWarning()));
+                                                                               
makeAny( m_aSQLIterator.getErrors() ) );
 
         if ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_CREATE_TABLE )
             // CREATE TABLE is not supported at all

File [changed]: FResultSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/file/FResultSet.cxx?r1=1.94&r2=1.94.92.1
Delta lines:  +6 -6
-------------------
--- FResultSet.cxx      23 Sep 2005 11:38:50 -0000      1.94
+++ FResultSet.cxx      10 May 2006 10:51:22 -0000      1.94.92.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: FResultSet.cxx,v $
  *
- *  $Revision: 1.94 $
+ *  $Revision: 1.94.92.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 11:38:50 $
+ *  last change: $Author: fs $ $Date: 2006/05/10 10:51:22 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1211,12 +1211,12 @@
                if ((xTabs.begin() == xTabs.end()) || 
!xTabs.begin()->second.is())
                        throwGenericSQLException(       
::rtl::OUString::createFromAscii("The statement is invalid."),
                                                                                
static_cast<XWeak*>(this),
-                                                                               
makeAny(m_aSQLIterator.getWarning())
+                                                                               
makeAny( m_aSQLIterator.getErrors() )
                                                                        );
-               if ( xTabs.size() > 1 || 
m_aSQLIterator.getWarning().Message.getLength() )
+               if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() )
                        throwGenericSQLException(       
::rtl::OUString::createFromAscii("The statement is invalid. it contains more 
than one table."),
                                                                                
static_cast<XWeak*>(this),
-                                                                               
makeAny(m_aSQLIterator.getWarning()));
+                                                                               
makeAny( m_aSQLIterator.getErrors() ) );
 
                OSQLTable xTable = xTabs.begin()->second;
                m_xColumns = m_aSQLIterator.getSelectColumns();




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

Reply via email to