summaryrefslogtreecommitdiff
path: root/connectivity/source/inc
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-10-26 06:45:13 +0000
committerOcke Janssen <oj@openoffice.org>2001-10-26 06:45:13 +0000
commit35ee89f2629bc5fc238cae94054009cad890b858 (patch)
treeceb052c4883d57ce383751dff45e9c7681abb552 /connectivity/source/inc
parent4b9ab688176b1205cfcd65f46ce37ca8139066db (diff)
#93524# new class for hidding deleted rows
Diffstat (limited to 'connectivity/source/inc')
-rw-r--r--connectivity/source/inc/TResultSetHelper.hxx93
-rw-r--r--connectivity/source/inc/TSkipDeletedSet.hxx125
-rw-r--r--connectivity/source/inc/calc/CTable.hxx6
-rw-r--r--connectivity/source/inc/dbase/DTable.hxx6
-rw-r--r--connectivity/source/inc/file/FResultSet.hxx25
-rw-r--r--connectivity/source/inc/file/FTable.hxx23
-rw-r--r--connectivity/source/inc/flat/ETable.hxx6
-rw-r--r--connectivity/source/inc/mozaddressbook/MABTable.hxx6
-rw-r--r--connectivity/source/inc/odbc/OResultSet.hxx20
9 files changed, 271 insertions, 39 deletions
diff --git a/connectivity/source/inc/TResultSetHelper.hxx b/connectivity/source/inc/TResultSetHelper.hxx
new file mode 100644
index 000000000000..2dbcdc474d22
--- /dev/null
+++ b/connectivity/source/inc/TResultSetHelper.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * $RCSfile: TResultSetHelper.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef CONNECTIVITY_TRESULTSETHELPER_HXX
+#define CONNECTIVITY_TRESULTSETHELPER_HXX
+
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+
+namespace connectivity
+{
+ class SAL_NO_VTABLE IResultSetHelper
+ {
+ public:
+ enum Movement
+ {
+ NEXT = 0,
+ PRIOR,
+ FIRST,
+ LAST,
+ RELATIVE,
+ ABSOLUTE,
+ BOOKMARK
+ };
+ public:
+ virtual sal_Bool move(Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) = 0;
+ virtual sal_Int32 getDriverPos() const = 0;
+ virtual sal_Bool deletedVisible() const = 0;
+ virtual sal_Bool isRowDeleted() const = 0;
+ };
+}
+
+#endif // CONNECTIVITY_TRESULTSETHELPER_HXX
+
diff --git a/connectivity/source/inc/TSkipDeletedSet.hxx b/connectivity/source/inc/TSkipDeletedSet.hxx
new file mode 100644
index 000000000000..259cd28347d2
--- /dev/null
+++ b/connectivity/source/inc/TSkipDeletedSet.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * $RCSfile: TSkipDeletedSet.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-10-26 07:40:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef CONNECTIVITY_SKIPDELETEDSSET_HXX
+#define CONNECTIVITY_SKIPDELETEDSSET_HXX
+
+#ifndef CONNECTIVITY_TRESULTSETHELPER_HXX
+#include "TResultSetHelper.hxx"
+#endif
+
+#include <map>
+#include <vector>
+
+namespace connectivity
+{
+ /**
+ the class OSkipDeletedSet supports a general method to skip deleted rows
+ */
+ class OSkipDeletedSet
+ {
+ typedef ::std::map<sal_Int32,sal_Int32> TInt2IntMap;
+ TInt2IntMap m_aBookmarks; // map from postion to logical position
+ ::std::vector<TInt2IntMap::iterator> m_aBookmarksPositions;// vector of iterators to position map, the order is the logical position
+ IResultSetHelper* m_pHelper; // used for moving in the resultset
+
+ sal_Bool moveAbsolute(sal_Int32 _nOffset,sal_Bool _bRetrieveData);
+ public:
+ OSkipDeletedSet(IResultSetHelper* _pHelper);
+
+ /**
+ skipDeleted moves the resultset to the position defined by the parameters
+ it garantees that the row isn't deleted
+ @param
+ IResultSetHelper::Movement _eCursorPosition in which direction the resultset should be moved
+ sal_Int32 _nOffset the position relativ to the movement
+ sal_Bool _bRetrieveData is true when the current row should be filled which data
+ @return
+ true when the movement was successful otherwise false
+ */
+ sal_Bool skipDeleted(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData);
+ /**
+ clear the map and the vector used in this class
+ */
+ void clear();
+ /**
+ getMappedPosition returns the mapped position of a logical position
+ @param
+ sal_Int32 _nPos the logical position
+
+ @return the mapped position
+ */
+ sal_Int32 getMappedPosition(sal_Int32 _nPos) const;
+ /**
+ insertNewPosition adds a new position to the map
+ @param
+ sal_Int32 _nPos the logical position
+ */
+ void insertNewPosition(sal_Int32 _nPos);
+ /**
+ deletePosition deletes this position from the map and decrement all following positions
+ @param
+ sal_Int32 _nPos the logical position
+ */
+ void deletePosition(sal_Int32 _nPos);
+ };
+}
+#endif // CONNECTIVITY_SKIPDELETEDSSET_HXX
+
diff --git a/connectivity/source/inc/calc/CTable.hxx b/connectivity/source/inc/calc/CTable.hxx
index 73f5e33a6645..2a9228c9d971 100644
--- a/connectivity/source/inc/calc/CTable.hxx
+++ b/connectivity/source/inc/calc/CTable.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CTable.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: oj $ $Date: 2001-09-25 13:12:50 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -127,7 +127,7 @@ namespace connectivity
);
virtual sal_Int32 getCurrentLastPos() const;
- virtual sal_Bool seekRow(FilePosition eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
+ virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
virtual sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData);
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx
index 409d1b30e13b..1f45f7da3670 100644
--- a/connectivity/source/inc/dbase/DTable.hxx
+++ b/connectivity/source/inc/dbase/DTable.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DTable.hxx,v $
*
- * $Revision: 1.30 $
+ * $Revision: 1.31 $
*
- * last change: $Author: oj $ $Date: 2001-10-12 11:54:43 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -181,7 +181,7 @@ namespace connectivity
void construct(); // can throw any exception
virtual sal_Int32 getCurrentLastPos() const;
- virtual sal_Bool seekRow(FilePosition eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
+ virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
virtual sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData);
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx
index 625e9fd1efaa..8c5e68cc5d8d 100644
--- a/connectivity/source/inc/file/FResultSet.hxx
+++ b/connectivity/source/inc/file/FResultSet.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FResultSet.hxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: hr $ $Date: 2001-10-17 16:36:33 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,6 +119,9 @@
#ifndef CONNECTIVITY_TSORTINDEX_HXX
#include "TSortIndex.hxx"
#endif
+#ifndef CONNECTIVITY_SKIPDELETEDSSET_HXX
+#include "TSkipDeletedSet.hxx"
+#endif
namespace connectivity
{
@@ -140,6 +143,7 @@ namespace connectivity
::com::sun::star::lang::XUnoTunnel> OResultSet_BASE;
class OResultSet : public comphelper::OBaseMutex,
+ public ::connectivity::IResultSetHelper,
public OResultSet_BASE,
public ::comphelper::OPropertyContainer,
public ::comphelper::OPropertyArrayUsageHelper<OResultSet>
@@ -162,8 +166,9 @@ namespace connectivity
TIntVector::iterator m_aEvaluateIter;
- TInt2IntMap m_aBookmarks; // map from bookmarks to logical position
- ::std::vector<TInt2IntMap::iterator> m_aBookmarksPositions;// vector of iterators to bookmark map, the order is the logical position
+// TInt2IntMap m_aBookmarks; // map from bookmarks to logical position
+// ::std::vector<TInt2IntMap::iterator> m_aBookmarksPositions;// vector of iterators to bookmark map, the order is the logical position
+ OSkipDeletedSet m_aSkipDeletedSet;
::vos::ORef<OKeySet> m_pFileSet;
OKeySet::iterator m_aFileSetIter;
@@ -213,7 +218,7 @@ namespace connectivity
void construct();
sal_Bool evaluate();
- BOOL ExecuteRow(OFileTable::FilePosition eFirstCursorPosition,
+ BOOL ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition,
INT32 nOffset = 1,
BOOL bRebind = TRUE,
BOOL bEvaluate = TRUE,
@@ -222,7 +227,6 @@ namespace connectivity
OKeyValue* GetOrderbyKeyValue(OValueRow _rRow);
BOOL IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != SQL_COLUMN_NOTFOUND;}
- sal_Bool moveAbsolute(sal_Int32 _nOffset,sal_Bool _bRetrieveData);
// return true when the select statement is "select count(*) from table"
sal_Bool isCount() const;
void checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException);
@@ -235,8 +239,7 @@ namespace connectivity
using OResultSet_BASE::rBHelper;
- BOOL Move(OFileTable::FilePosition eCursorPosition, INT32 nOffset, BOOL bRetrieveData);
- BOOL SkipDeleted(OFileTable::FilePosition eCursorPosition, INT32 nOffset, BOOL bRetrieveData);
+ BOOL Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, BOOL bRetrieveData);
virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex);
// OPropertyArrayUsageHelper
@@ -371,6 +374,12 @@ namespace connectivity
sal_Bool _bSetColumnMapping,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData,
::std::vector<sal_Int32>& _rColMapping);
+
+ // IResultSetHelper
+ virtual sal_Bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData);
+ virtual sal_Int32 getDriverPos() const;
+ virtual sal_Bool deletedVisible() const;
+ virtual sal_Bool isRowDeleted() const;
};
// -------------------------------------------------------------------------
inline sal_Int32 OResultSet::mapColumn(sal_Int32 column)
diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx
index b1d624feee8e..1ad8a6185a7b 100644
--- a/connectivity/source/inc/file/FTable.hxx
+++ b/connectivity/source/inc/file/FTable.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FTable.hxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: oj $ $Date: 2001-09-25 13:12:51 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,6 +80,9 @@
#ifndef _CONNECTIVITY_FILE_VALUE_HXX_
#include "connectivity/FValue.hxx"
#endif
+#ifndef CONNECTIVITY_TRESULTSETHELPER_HXX
+#include "TResultSetHelper.hxx"
+#endif
namespace connectivity
{
@@ -94,7 +97,7 @@ namespace connectivity
OConnection* m_pConnection;
SvStream* m_pFileStream;
::vos::ORef<OSQLColumns> m_aColumns;
- sal_Int32 m_nFilePos; // aktuelle FilePosition
+ sal_Int32 m_nFilePos; // aktuelle IResultSetHelper::Movement
sal_uInt8* m_pBuffer;
sal_uInt16 m_nBufferSize; // Groesse des ReadBuffer, wenn pBuffer != NULL
sal_Bool m_bWriteable; // svstream cann't say if we are writeable
@@ -105,18 +108,6 @@ namespace connectivity
virtual void refreshColumns();
virtual void refreshKeys();
virtual void refreshIndexes();
-
- enum FilePosition
- {
- FILE_NEXT = 0,
- FILE_PRIOR,
- FILE_FIRST,
- FILE_LAST,
- FILE_RELATIVE,
- FILE_ABSOLUTE,
- FILE_BOOKMARK
- };
-
public:
OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection);
OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection,
@@ -137,7 +128,7 @@ namespace connectivity
OConnection* getConnection() const { return m_pConnection;}
virtual sal_Int32 getCurrentLastPos() const {return -1;}
- virtual sal_Bool seekRow(FilePosition eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) = 0;
+ virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) = 0;
virtual sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) = 0;
::vos::ORef<OSQLColumns> getTableColumns() const {return m_aColumns;}
diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx
index e0f976ede963..7b864aeef396 100644
--- a/connectivity/source/inc/flat/ETable.hxx
+++ b/connectivity/source/inc/flat/ETable.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ETable.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-09-25 13:12:51 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -138,7 +138,7 @@ namespace connectivity
const ::rtl::OUString& _CatalogName = ::rtl::OUString()
);
- virtual sal_Bool seekRow(FilePosition eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
+ virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
virtual sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols, sal_Bool bIsTable,sal_Bool bRetrieveData);
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/inc/mozaddressbook/MABTable.hxx b/connectivity/source/inc/mozaddressbook/MABTable.hxx
index e287afd86dfd..0a63cb962f31 100644
--- a/connectivity/source/inc/mozaddressbook/MABTable.hxx
+++ b/connectivity/source/inc/mozaddressbook/MABTable.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MABTable.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-09-25 13:12:51 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -146,7 +146,7 @@ namespace connectivity
~OMozabTable( );
virtual sal_Int32 getCurrentLastPos() const;
- virtual sal_Bool seekRow(FilePosition eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
+ virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos);
virtual sal_Bool fetchRow(connectivity::OValueRow _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData);
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/inc/odbc/OResultSet.hxx b/connectivity/source/inc/odbc/OResultSet.hxx
index 6e8b24125332..86400a32973c 100644
--- a/connectivity/source/inc/odbc/OResultSet.hxx
+++ b/connectivity/source/inc/odbc/OResultSet.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: OResultSet.hxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: hr $ $Date: 2001-10-17 13:57:34 $
+ * last change: $Author: oj $ $Date: 2001-10-26 07:41:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -113,6 +113,9 @@
#ifndef _CONNECTIVITY_FILE_VALUE_HXX_
#include "connectivity/FValue.hxx"
#endif
+#ifndef CONNECTIVITY_SKIPDELETEDSSET_HXX
+#include "TSkipDeletedSet.hxx"
+#endif
namespace connectivity
{
@@ -142,6 +145,7 @@ namespace connectivity
// typedef ::com::sun::star::uno::Sequence<TVoidPtr> TVoidVector;
class OResultSet : public comphelper::OBaseMutex,
+ public ::connectivity::IResultSetHelper,
public OResultSet_BASE,
public ::cppu::OPropertySetHelper,
public ::comphelper::OPropertyArrayUsageHelper<OResultSet>
@@ -153,11 +157,13 @@ namespace connectivity
TVoidVector m_aBindVector;
::std::vector<sal_Int32> m_aLengthVector;
::std::vector<sal_Int32> m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime
+
TDataRow m_aRow; // only used when SQLGetData can't be called in any order
ORowSetValue m_aEmptyValue; // needed for the getValue method when no prefetch is used
SQLHANDLE m_aStatementHandle;
SQLHANDLE m_aConnectionHandle;
OStatement_Base* m_pStatement;
+ OSkipDeletedSet* m_pSkipDeletedSet;
::com::sun::star::uno::WeakReferenceHelper m_aStatement;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData;
SQLUSMALLINT* m_pRowStatusArray;
@@ -172,6 +178,8 @@ namespace connectivity
sal_Bool m_bFreeHandle;
sal_Bool m_bInserting;
sal_Bool m_bFetchData; // true when SQLGetaData can be called in any order or when fetching data for m_aRow
+ sal_Bool m_bRowInserted;
+ sal_Bool m_bRowDeleted;
sal_Bool isBookmarkable() const;
sal_Int32 getResultSetConcurrency() const;
@@ -189,7 +197,7 @@ namespace connectivity
void releaseBuffer();
void updateValue(sal_Int32 columnIndex,SQLSMALLINT _nType,void* _pValue) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
const ORowSetValue& getValue(sal_Int32 _nColumnIndex,SQLSMALLINT _nType,void* _pValue,SQLINTEGER _rSize);
-
+ sal_Bool moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData);
// OPropertyArrayUsageHelper
@@ -328,6 +336,12 @@ namespace connectivity
// special methods
sal_Int32 mapColumn(sal_Int32 column);
+
+ // IResultSetHelper
+ virtual sal_Bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData);
+ virtual sal_Int32 getDriverPos() const;
+ virtual sal_Bool deletedVisible() const;
+ virtual sal_Bool isRowDeleted() const;
};
}
}