diff options
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetCache.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/core/api/WrappedResultSet.cxx | 20 |
4 files changed, 16 insertions, 14 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 9c7fdb4bbdd4..08c782f05656 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -358,15 +358,17 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable; ::std::vector< ::rtl::OUString> aBestRowColumnNames; + /* doesn't work with hsqldb Reference<XResultSet> xBestRes(xMeta->getBestRowIdentifier(aCatalog,sSchema,sTable,0,sal_False)); Reference<XRow> xBestRow(xBestRes,uno::UNO_QUERY); while ( xBestRes->next() ) { aBestRowColumnNames.push_back(xBestRow->getString(2)); } - + */ Sequence< ::rtl::OUString> aBestColumnNames; if ( !aBestRowColumnNames.empty() ) + { aBestColumnNames = Sequence< ::rtl::OUString>(&aBestRowColumnNames[0],aBestRowColumnNames.size()); ::dbaccess::getColumnPositions(xSup->getColumns(),aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames)); diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 23a83d3df67a..09a763d08c71 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -1303,13 +1303,14 @@ void OptimisticSet::findTableColumnsMatching_throw(const Any& i_aTable // first ask the database itself for the best columns which can be used ::std::vector< ::rtl::OUString> aBestRowColumnNames; + /* Reference<XResultSet> xBestRes(i_xMeta->getBestRowIdentifier(aCatalog,sSchema,sTable,0,sal_False)); Reference<XRow> xBestRow(xBestRes,uno::UNO_QUERY); while ( xBestRes->next() ) { aBestRowColumnNames.push_back(xBestRow->getString(2)); } - + */ Sequence< ::rtl::OUString> aBestColumnNames; if ( aBestRowColumnNames.empty() ) { diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 0bdc83c93f79..72cb67209e9f 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -167,8 +167,9 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, m_pCacheSet->construct(_xRs,i_sRowSetFilter); return; } - catch(const Exception&) + catch(const Exception& ex) { + (void)ex; } _xRs->beforeFirst(); diff --git a/dbaccess/source/core/api/WrappedResultSet.cxx b/dbaccess/source/core/api/WrappedResultSet.cxx index 074da2faf46e..606715254e17 100644 --- a/dbaccess/source/core/api/WrappedResultSet.cxx +++ b/dbaccess/source/core/api/WrappedResultSet.cxx @@ -64,43 +64,41 @@ void WrappedResultSet::construct(const Reference< XResultSet>& _xDriverSet,const Any SAL_CALL WrappedResultSet::getBookmark() throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::getBookmark" ); + if ( m_xRowLocate.is() ) + { + return m_xRowLocate->getBookmark( ); + } return makeAny(m_xDriverSet->getRow()); } // ------------------------------------------------------------------------- sal_Bool SAL_CALL WrappedResultSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveToBookmark" ); - sal_Int32 nPos = 1; - bookmark >>= nPos; - return m_xDriverSet->absolute(nPos); + return m_xRowLocate->moveToBookmark( bookmark ); } // ------------------------------------------------------------------------- sal_Bool SAL_CALL WrappedResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveRelativeToBookmark" ); - sal_Int32 nPos = 1; - bookmark >>= nPos; - return m_xDriverSet->absolute(nPos + rows); + return m_xRowLocate->moveRelativeToBookmark( bookmark,rows ); } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL WrappedResultSet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::compareBookmarks" ); - return _first != _second; + return m_xRowLocate->compareBookmarks( _first,_second ); } // ------------------------------------------------------------------------- sal_Bool SAL_CALL WrappedResultSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::hasOrderedBookmarks" ); - return sal_True; + return m_xRowLocate->hasOrderedBookmarks(); } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL WrappedResultSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::hashBookmark" ); - sal_Int32 nPos = 1; - bookmark >>= nPos; - return nPos; + return m_xRowLocate->hashBookmark(bookmark); } // ------------------------------------------------------------------------- // ::com::sun::star::sdbcx::XDeleteRows |