LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/connectivity/source/inc/file - FResultSet.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 22 23 95.7 %
Date: 2013-07-09 Functions: 15 16 93.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _CONNECTIVITY_FILE_FRESULTSET_HXX_
      21             : #define _CONNECTIVITY_FILE_FRESULTSET_HXX_
      22             : 
      23             : #include <com/sun/star/sdbc/XResultSet.hpp>
      24             : #include <com/sun/star/sdbc/XRow.hpp>
      25             : #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
      26             : #include <com/sun/star/sdbc/XCloseable.hpp>
      27             : #include <com/sun/star/sdbc/XColumnLocate.hpp>
      28             : #include <com/sun/star/util/XCancellable.hpp>
      29             : #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
      30             : #include <com/sun/star/sdbc/XResultSetUpdate.hpp>
      31             : #include <com/sun/star/sdbc/XRowUpdate.hpp>
      32             : #include <cppuhelper/compbase12.hxx>
      33             : #include <comphelper/proparrhlp.hxx>
      34             : #include "file/FStatement.hxx"
      35             : #include "connectivity/CommonTools.hxx"
      36             : #include <comphelper/propertycontainer.hxx>
      37             : #include "file/fanalyzer.hxx"
      38             : #include "file/FTable.hxx"
      39             : #include "file/filedllapi.hxx"
      40             : #include <comphelper/broadcasthelper.hxx>
      41             : #include "connectivity/StdTypeDefs.hxx"
      42             : #include "TSortIndex.hxx"
      43             : #include "TSkipDeletedSet.hxx"
      44             : #include <com/sun/star/lang/XEventListener.hpp>
      45             : 
      46             : namespace connectivity
      47             : {
      48             :     namespace file
      49             :     {
      50             :         typedef ::cppu::WeakComponentImplHelper12<  ::com::sun::star::sdbc::XResultSet,
      51             :                                                     ::com::sun::star::sdbc::XRow,
      52             :                                                     ::com::sun::star::sdbc::XResultSetMetaDataSupplier,
      53             :                                                     ::com::sun::star::util::XCancellable,
      54             :                                                     ::com::sun::star::sdbc::XWarningsSupplier,
      55             :                                                     ::com::sun::star::sdbc::XResultSetUpdate,
      56             :                                                     ::com::sun::star::sdbc::XRowUpdate,
      57             :                                                     ::com::sun::star::sdbc::XCloseable,
      58             :                                                     ::com::sun::star::sdbc::XColumnLocate,
      59             :                                                     ::com::sun::star::lang::XServiceInfo,
      60             :                                                     ::com::sun::star::lang::XEventListener,
      61             :                                                     ::com::sun::star::lang::XUnoTunnel> OResultSet_BASE;
      62             : 
      63             :         class OOO_DLLPUBLIC_FILE OResultSet :
      64             :                             public  comphelper::OBaseMutex,
      65             :                             public  ::connectivity::IResultSetHelper,
      66             :                             public  OResultSet_BASE,
      67             :                             public  ::comphelper::OPropertyContainer,
      68             :                             public  ::comphelper::OPropertyArrayUsageHelper<OResultSet>
      69             :         {
      70             : 
      71             :         protected:
      72             :             ::std::vector<void*>                    m_aBindVector;
      73             :             ::std::vector<sal_Int32>                m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime
      74             : 
      75             :             ::std::vector<sal_Int32>                m_aOrderbyColumnNumber;
      76             :             ::std::vector<TAscendingOrder>          m_aOrderbyAscending;
      77             : 
      78             :             OValueRefRow                            m_aSelectRow;
      79             :             OValueRefRow                            m_aRow;
      80             :             OValueRefRow                            m_aEvaluateRow; // contains all values of a row
      81             :             OValueRefRow                            m_aParameterRow;
      82             :             OValueRefRow                            m_aInsertRow;   // needed for insert by cursor
      83             :             ORefAssignValues                        m_aAssignValues; // needed for insert,update and parameters
      84             :                                                                     // to compare with the restrictions
      85             :             TIntVector*                             m_pEvaluationKeySet;
      86             :             TIntVector::iterator                    m_aEvaluateIter;
      87             : 
      88             : 
      89             :             OSkipDeletedSet                         m_aSkipDeletedSet;
      90             : 
      91             :             ::rtl::Reference<OKeySet>                   m_pFileSet;
      92             :             OKeySet::Vector::iterator               m_aFileSetIter;
      93             : 
      94             : 
      95             : 
      96             :             OSortIndex*                             m_pSortIndex;
      97             :             ::rtl::Reference<connectivity::OSQLColumns> m_xColumns; // this are the select columns
      98             :             ::rtl::Reference<connectivity::OSQLColumns> m_xParamColumns;
      99             :             OFileTable*                             m_pTable;
     100             :             connectivity::OSQLParseNode*            m_pParseTree;
     101             : 
     102             :             OSQLAnalyzer*                           m_pSQLAnalyzer;
     103             :             connectivity::OSQLParseTreeIterator&    m_aSQLIterator;
     104             : 
     105             :             sal_Int32                               m_nFetchSize;
     106             :             sal_Int32                               m_nResultSetType;
     107             :             sal_Int32                               m_nFetchDirection;
     108             :             sal_Int32                               m_nResultSetConcurrency;
     109             : 
     110             :             ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>            m_xStatement;
     111             :             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData>   m_xMetaData;
     112             :             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>    m_xDBMetaData;
     113             :             ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>     m_xColNames; // table columns
     114             :             ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>    m_xColsIdx; // table columns
     115             : 
     116             : 
     117             :             OUString                         m_aTableRange;
     118             :             rtl_TextEncoding                        m_nTextEncoding;
     119             :             sal_Int32                               m_nRowPos;
     120             :             sal_Int32                               m_nFilePos;
     121             :             sal_Int32                               m_nLastVisitedPos;
     122             :             sal_Int32                               m_nRowCountResult;
     123             :             sal_Int32                               m_nColumnCount;
     124             :             sal_Bool                                m_bWasNull;
     125             :             sal_Bool                                m_bEOF;                 // after last record
     126             :             sal_Bool                                m_bLastRecord;
     127             :             sal_Bool                                m_bInserted;            // true when moveToInsertRow was called
     128             :                                                                             // set to false when cursor moved or cancel
     129             :             sal_Bool                                m_bRowUpdated;
     130             :             sal_Bool                                m_bRowInserted;
     131             :             sal_Bool                                m_bRowDeleted;
     132             :             sal_Bool                                m_bShowDeleted;
     133             :             sal_Bool                                m_bIsCount;
     134             : 
     135             :             void initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount);
     136             :             void construct();
     137             :             //sal_Bool evaluate();
     138             : 
     139             :             sal_Bool ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition,
     140             :                                 sal_Int32 nOffset = 1,
     141             :                                 sal_Bool bEvaluate = sal_True,
     142             :                                 sal_Bool bRetrieveData = sal_True);
     143             : 
     144             :             OKeyValue* GetOrderbyKeyValue(OValueRefRow& _rRow);
     145          21 :             sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != SQL_COLUMN_NOTFOUND;}
     146             : 
     147             :             // return true when the select statement is "select count(*) from table"
     148        3237 :             inline sal_Bool isCount() const { return m_bIsCount; }
     149             :             void checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException);
     150             : 
     151             :             const ORowSetValue& getValue(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException);
     152             :             void updateValue(sal_Int32 columnIndex,const ORowSetValue& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     153             :             // clear insert row
     154             :             void clearInsertRow();
     155             :             void sortRows();
     156             :         protected:
     157             : 
     158             :             using OResultSet_BASE::rBHelper;
     159             : 
     160             :             sal_Bool Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData);
     161             :             virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex);
     162             : 
     163             :             // OPropertyArrayUsageHelper
     164             :             virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
     165             :             // OPropertySetHelper
     166             :             virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
     167             : 
     168             :             virtual ~OResultSet();
     169             :         public:
     170             :             DECLARE_SERVICE_INFO();
     171             :             // a Constructor, that is needed for when Returning the Object is needed:
     172             :             OResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator);
     173             : 
     174             :             ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
     175             :             {
     176             :                 return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this);
     177             :             }
     178             : 
     179             :             // ::cppu::OComponentHelper
     180             :             virtual void SAL_CALL disposing(void);
     181             :             // XInterface
     182             :             virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
     183             :             virtual void SAL_CALL acquire() throw();
     184             :             virtual void SAL_CALL release() throw();
     185             :             //XTypeProvider
     186             :             virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
     187             :             // XPropertySet
     188             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
     189             :             // XResultSet
     190             :             virtual sal_Bool SAL_CALL next(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     191             :             virtual sal_Bool SAL_CALL isBeforeFirst(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     192             :             virtual sal_Bool SAL_CALL isAfterLast(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     193             :             virtual sal_Bool SAL_CALL isFirst(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     194             :             virtual sal_Bool SAL_CALL isLast(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     195             :             virtual void SAL_CALL beforeFirst(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     196             :             virtual void SAL_CALL afterLast(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     197             :             virtual sal_Bool SAL_CALL first(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     198             :             virtual sal_Bool SAL_CALL last(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     199             :             virtual sal_Int32 SAL_CALL getRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     200             :             virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     201             :             virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     202             :             virtual sal_Bool SAL_CALL previous(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     203             :             virtual void SAL_CALL refreshRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     204             :             virtual sal_Bool SAL_CALL rowUpdated(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     205             :             virtual sal_Bool SAL_CALL rowInserted(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     206             :             virtual sal_Bool SAL_CALL rowDeleted(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     207             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getStatement(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     208             :             // XRow
     209             :             virtual sal_Bool SAL_CALL wasNull(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     210             :             virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     211             :             virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     212             :             virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     213             :             virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     214             :             virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     215             :             virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     216             :             virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     217             :             virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     218             :             virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     219             :             virtual ::com::sun::star::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     220             :             virtual ::com::sun::star::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     221             :             virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     222             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     223             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     224             :             virtual ::com::sun::star::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     225             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     226             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     227             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     228             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     229             :             // XResultSetMetaDataSupplier
     230             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL getMetaData(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     231             :             // XCancellable
     232             :             virtual void SAL_CALL cancel(  ) throw(::com::sun::star::uno::RuntimeException);
     233             :             // XCloseable
     234             :             virtual void SAL_CALL close(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     235             :             // XWarningsSupplier
     236             :             virtual ::com::sun::star::uno::Any SAL_CALL getWarnings(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     237             :             virtual void SAL_CALL clearWarnings(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     238             :             // XResultSetUpdate
     239             :             virtual void SAL_CALL insertRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     240             :             virtual void SAL_CALL updateRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     241             :             virtual void SAL_CALL deleteRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     242             :             virtual void SAL_CALL cancelRowUpdates(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     243             :             virtual void SAL_CALL moveToInsertRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     244             :             virtual void SAL_CALL moveToCurrentRow(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     245             :             // XRowUpdate
     246             :             virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     247             :             virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     248             :             virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     249             :             virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     250             :             virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     251             :             virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     252             :             virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     253             :             virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     254             :             virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     255             :             virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     256             :             virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     257             :             virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     258             :             virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     259             :             virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     260             :             virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     261             :             virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     262             :             virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     263             :             // XColumnLocate
     264             :             virtual sal_Int32 SAL_CALL findColumn( const OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
     265             :             // com::sun::star::lang::XUnoTunnel
     266             :             virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
     267             :             static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
     268             :             //XEventlistener
     269             :             virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
     270             : 
     271             :             // special methods
     272             :             inline sal_Int32 mapColumn(sal_Int32    column);
     273             :             virtual sal_Bool OpenImpl();
     274             :             virtual void doTableSpecials(const OSQLTable& _xTable);
     275             : 
     276           0 :             inline sal_Int32 getRowCountResult() const { return m_nRowCountResult; }
     277          46 :             inline void setParameterRow(const OValueRefRow& _rParaRow)                  { m_aParameterRow = _rParaRow; }
     278          46 :             inline void setEvaluationRow(const OValueRefRow& _aRow)                     { m_aEvaluateRow = _aRow; }
     279          46 :             inline void setParameterColumns(const ::rtl::Reference<connectivity::OSQLColumns>&  _xParamColumns) { m_xParamColumns = _xParamColumns; }
     280          46 :             inline void setAssignValues(const ORefAssignValues& _aAssignValues)         { m_aAssignValues = _aAssignValues; }
     281          46 :             inline void setBindingRow(const OValueRefRow& _aRow)                        { m_aRow = _aRow; }
     282          46 :             inline void setSelectRow(const OValueRefRow& _rRow)
     283             :             {
     284          46 :                 m_aSelectRow = _rRow;
     285          46 :                 m_nColumnCount = m_aSelectRow->get().size();
     286          46 :             }
     287          46 :             inline void setColumnMapping(const ::std::vector<sal_Int32>& _aColumnMapping)   { m_aColMapping = _aColumnMapping; }
     288          46 :             inline void setSqlAnalyzer(OSQLAnalyzer* _pSQLAnalyzer)                     { m_pSQLAnalyzer = _pSQLAnalyzer; }
     289             : 
     290          46 :             inline void setOrderByColumns(const ::std::vector<sal_Int32>& _aColumnOrderBy)  { m_aOrderbyColumnNumber = _aColumnOrderBy; }
     291          46 :             inline void setOrderByAscending(const ::std::vector<TAscendingOrder>& _aOrderbyAsc)    { m_aOrderbyAscending = _aOrderbyAsc; }
     292          46 :             inline void setEvaluationKeySet(TIntVector* _pEvaluationKeySet)             { m_pEvaluationKeySet = _pEvaluationKeySet; }
     293          21 :             inline void setMetaData(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData>& _xMetaData) { m_xMetaData = _xMetaData;}
     294             : 
     295             :             // clears the resultset so it can be reused by a preparedstatement
     296             :             void clear();
     297             :             static void setBoundedColumns(const OValueRefRow& _rRow,
     298             :                                     const OValueRefRow& _rSelectRow,
     299             :                                     const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,
     300             :                                     const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xNames,
     301             :                                     sal_Bool _bSetColumnMapping,
     302             :                                     const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData,
     303             :                                     ::std::vector<sal_Int32>& _rColMapping);
     304             : 
     305             :             // IResultSetHelper
     306             :             virtual sal_Bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData);
     307             :             virtual sal_Int32 getDriverPos() const;
     308             :             virtual sal_Bool deletedVisible() const;
     309             :             virtual sal_Bool isRowDeleted() const;
     310             :         };
     311             :         // -------------------------------------------------------------------------
     312           5 :         inline sal_Int32 OResultSet::mapColumn(sal_Int32 column)
     313             :         {
     314           5 :             sal_Int32   map = column;
     315             : 
     316             :             OSL_ENSURE(column > 0, "file::OResultSet::mapColumn: invalid column index!");
     317             :             // the first column (index 0) is for convenience only. The first real select column is number 1.
     318           5 :             if ((column > 0) && (column < (sal_Int32)m_aColMapping.size()))
     319           5 :                 map = m_aColMapping[column];
     320             : 
     321           5 :             return map;
     322             :         }
     323             :     }
     324             : }
     325             : #endif // _CONNECTIVITY_FILE_ORESULTSET_HXX_
     326             : 
     327             : 
     328             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10