2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2013-11-05 02:18:53 +01:00
|
|
|
#ifndef INCLUDED_DBACCESS_SOURCE_CORE_API_KEYSET_HXX
|
|
|
|
#define INCLUDED_DBACCESS_SOURCE_CORE_API_KEYSET_HXX
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
#include "CacheSet.hxx"
|
|
|
|
|
2001-01-22 06:38:24 +00:00
|
|
|
#include <cppuhelper/implbase1.hxx>
|
2010-07-08 12:21:55 +02:00
|
|
|
#include <memory>
|
2001-01-22 06:38:24 +00:00
|
|
|
#include <map>
|
2013-02-27 06:53:34 +01:00
|
|
|
#include <vector>
|
2005-09-23 11:02:30 +00:00
|
|
|
|
2001-01-22 06:38:24 +00:00
|
|
|
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
2004-10-22 07:54:17 +00:00
|
|
|
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
|
2010-07-08 12:21:55 +02:00
|
|
|
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
|
2001-02-01 13:23:57 +00:00
|
|
|
#include <comphelper/stl_types.hxx>
|
2001-01-22 06:38:24 +00:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
namespace dbaccess
|
|
|
|
{
|
2006-07-10 14:02:57 +00:00
|
|
|
struct SelectColumnDescription
|
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sRealName; // may be empty
|
|
|
|
OUString sTableName; // may be empty
|
|
|
|
OUString sDefaultValue;
|
2006-07-10 14:02:57 +00:00
|
|
|
sal_Int32 nPosition;
|
|
|
|
sal_Int32 nType;
|
2008-01-30 07:28:50 +00:00
|
|
|
sal_Int32 nScale;
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bNullable;
|
2008-01-30 07:28:50 +00:00
|
|
|
|
2006-07-10 14:02:57 +00:00
|
|
|
SelectColumnDescription()
|
|
|
|
:nPosition( 0 )
|
|
|
|
,nType( 0 )
|
2008-01-30 07:28:50 +00:00
|
|
|
,nScale( 0 )
|
2014-04-17 11:16:55 +02:00
|
|
|
,bNullable(false)
|
2006-07-10 14:02:57 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-04-17 11:16:55 +02:00
|
|
|
SelectColumnDescription( sal_Int32 _nPosition, sal_Int32 _nType, sal_Int32 _nScale,bool _bNullable, const OUString& _rDefaultValue )
|
2010-02-15 09:53:53 +01:00
|
|
|
:sDefaultValue( _rDefaultValue )
|
|
|
|
,nPosition( _nPosition )
|
2006-07-10 14:02:57 +00:00
|
|
|
,nType( _nType )
|
2008-01-30 07:28:50 +00:00
|
|
|
,nScale( _nScale )
|
2009-04-23 10:42:05 +00:00
|
|
|
,bNullable(_bNullable)
|
2006-07-10 14:02:57 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
2013-04-07 12:06:47 +02:00
|
|
|
typedef ::std::map< OUString, SelectColumnDescription, ::comphelper::UStringMixLess > SelectColumnsMetaData;
|
2001-02-01 13:23:57 +00:00
|
|
|
|
|
|
|
// the elements of _rxQueryColumns must have the properties PROPERTY_REALNAME and PROPERTY_TABLENAME
|
2015-08-03 09:14:58 +02:00
|
|
|
void getColumnPositions(const css::uno::Reference< css::container::XNameAccess >& _rxQueryColumns,
|
|
|
|
const css::uno::Sequence< OUString >& _rColumnNames,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& _rsUpdateTableName,
|
2010-02-15 09:53:53 +01:00
|
|
|
SelectColumnsMetaData& o_rColumnNames /* out */,
|
|
|
|
bool i_bAppendTableName = false);
|
2001-02-01 13:23:57 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
typedef ::std::pair<ORowSetRow,::std::pair<sal_Int32,css::uno::Reference< css::sdbc::XRow> > > OKeySetValue;
|
2001-02-01 13:23:57 +00:00
|
|
|
typedef ::std::map<sal_Int32,OKeySetValue > OKeySetMatrix;
|
2015-08-05 10:48:40 +02:00
|
|
|
typedef ::std::map<sal_Int32, rtl::Reference<ORowSetValueVector> > OUpdatedParameter;
|
2001-01-24 08:52:19 +00:00
|
|
|
// is used when the source supports keys
|
|
|
|
class OKeySet : public OCacheSet
|
2001-01-22 06:38:24 +00:00
|
|
|
{
|
2010-07-08 12:21:55 +02:00
|
|
|
protected:
|
2001-12-05 13:56:24 +00:00
|
|
|
OKeySetMatrix m_aKeyMap;
|
|
|
|
OKeySetMatrix::iterator m_aKeyIter;
|
2001-01-22 06:38:24 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
::std::vector< OUString > m_aAutoColumns; // contains all columns which are autoincrement ones
|
2001-12-05 13:56:24 +00:00
|
|
|
|
2010-01-19 09:16:12 +00:00
|
|
|
OUpdatedParameter m_aUpdatedParameter; // contains all parameter which have been updated and are needed for refetching
|
2015-08-05 10:48:40 +02:00
|
|
|
rtl::Reference<ORowSetValueVector> m_aParameterValueForCache;
|
2015-08-03 09:14:58 +02:00
|
|
|
::std::unique_ptr<SelectColumnsMetaData> m_pKeyColumnNames; // contains all key column names
|
|
|
|
::std::unique_ptr<SelectColumnsMetaData> m_pColumnNames; // contains all column names
|
|
|
|
::std::unique_ptr<SelectColumnsMetaData> m_pParameterNames; // contains all parameter names
|
|
|
|
::std::unique_ptr<SelectColumnsMetaData> m_pForeignColumnNames; // contains all column names of the rest
|
2001-12-05 13:56:24 +00:00
|
|
|
connectivity::OSQLTable m_xTable; // reference to our table
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::container::XIndexAccess> m_xTableKeys;
|
2013-02-27 06:53:34 +01:00
|
|
|
// we need a different SQL (statement) for each different combination
|
|
|
|
// of NULLness of key & foreign columns;
|
|
|
|
// each subclause is either "colName = ?" or "colName IS NULL"
|
|
|
|
// (we avoid the standard "colName IS NOT DISTINCT FROM ?" because it is not widely supported)
|
|
|
|
typedef ::std::vector< bool > FilterColumnsNULL_t;
|
|
|
|
typedef ::std::map< FilterColumnsNULL_t,
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::sdbc::XPreparedStatement > >
|
2013-02-27 06:53:34 +01:00
|
|
|
vStatements_t;
|
|
|
|
vStatements_t m_vStatements;
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::sdbc::XPreparedStatement> m_xStatement;
|
|
|
|
css::uno::Reference< css::sdbc::XResultSet> m_xSet;
|
|
|
|
css::uno::Reference< css::sdbc::XRow> m_xRow;
|
|
|
|
css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer > m_xComposer;
|
|
|
|
const OUString m_sUpdateTableName;
|
|
|
|
::std::vector< OUString > m_aFilterColumns;
|
2011-01-06 12:32:17 +01:00
|
|
|
sal_Int32& m_rRowCount;
|
2001-01-22 06:38:24 +00:00
|
|
|
|
2014-04-17 11:16:55 +02:00
|
|
|
bool m_bRowCountFinal;
|
2001-01-22 06:38:24 +00:00
|
|
|
|
2006-05-04 07:36:03 +00:00
|
|
|
/** copies the values from the insert row into the key row
|
|
|
|
*
|
|
|
|
* \param _rInsertRow the row which was inserted
|
|
|
|
* \param _rKeyRow The current key row of the row set.
|
2010-01-19 09:16:12 +00:00
|
|
|
+ \param i_nBookmark The bookmark is used to update the parameter
|
2006-05-04 07:36:03 +00:00
|
|
|
*/
|
2010-01-19 09:16:12 +00:00
|
|
|
void copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sal_Int32 i_nBookmark);
|
2006-05-04 07:36:03 +00:00
|
|
|
|
2015-08-03 09:14:58 +02:00
|
|
|
css::uno::Reference< css::container::XNameAccess > getKeyColumns() const;
|
i#102625 avoid fetching same row twice in different queries
We do a "SELECT * FROM table" just to fetch the primary key columns;
so reuse the same XResultSet to fetch all columns.
Else, we immediately issue a "SELECT * FROM table WHERE
primary_key=current_value" to read the other columns, which is
wasteful and particularly silly.
Commit 1ae17f5b03cc14844fb600ca3573a96deb37ab3b already tried
to do that, but was essentially reverted piecewise because
it caused fdo#47520, fdo#48345, fdo#50372.
Commit c08067d6da94743d53217cbc26cffae00a22dc3a thought it did that,
but actually reverted commit 1ae17f5b03cc14844fb600ca3573a96deb37ab3b.
This implementation fetches the whole current row and caches it in memory;
only one row is cached: when the current row changes, the cache contains
the new current row.
This could be problematic (wrt to memory consumption) if the current
row is big (e.g. with BLOBs) and nobody is interested in the data
anyway (as would often be the case with BLOBs). Note that because of
our "SELECT *", the driver most probably has it in memory already
anyway, so we don't make the situation that much worse.
This could be incrementally improved with a heuristic of not
preemptively caching binary data (and also not LONGVARCHAR / TEXT /
MEMO / ...); a getFOO on these columns would issue a specific "SELECT
column FROM table WHERE primary_key=current_value" each time.
The *real* complete fix to all these issues would be to not do "SELECT
*" at all. Use "SELECT pkey_col1, pkey_col2, ..." when we are only
interested in the key columns. As to data, somehow figure out which
columns were ar interested in and "SELECT" only these (and maybe only
those with "small datatype"?). Interesting columns could be determined
by our caller (creator) as an argument to our constructor, or some
heuristic (no binary data, no "big" unbound data).
Also be extra smart and use *(m_aKeyIter) when getFOO is called
on a column included in it (and don't include it in any subsequent
SELECT).
However, there are several pitfalls.
One is buggy drivers that give use column names of columns that we
cannot fetch :-| Using "SELECT *" works around that because the driver
there *obviously* gives us only fetchable columns in the result.
Another one is the very restrictive nature of some database access
technologies. Take for example ODBC:
- Data can be fetched only *once* (with the SQLGetData interface;
bound columns offer a way around that, but that's viable only for
constant-length data, not variable-length data).
This could be addressed by an intelligent & lazy cache.
- Data must be fetched in increasing order of column number
(again, this is about SQLGetData).
This is a harder issue. The current solution has the nice advantage
of completely isolating the rest of LibO from these restrictions.
I don't currently see how to cleanly avoid (potentially
unnecessarily) caching column 4 if we are asked for column 3 then
column 5, just in case we are asked for column 4 later on, unless
we issue a specific "SELECT column4" later. But the latter would be
quite expensive in terms of app-to-database roudtripe times :-( and
thus creates another performance issue.
Change-Id: I999b3f8f0b8a215acb390ffefc839235346e8353
2012-06-04 17:54:30 +02:00
|
|
|
// returns true if it did any work
|
|
|
|
bool fillAllRows();
|
2014-04-17 11:16:55 +02:00
|
|
|
bool fetchRow();
|
i#102625 avoid fetching same row twice in different queries
We do a "SELECT * FROM table" just to fetch the primary key columns;
so reuse the same XResultSet to fetch all columns.
Else, we immediately issue a "SELECT * FROM table WHERE
primary_key=current_value" to read the other columns, which is
wasteful and particularly silly.
Commit 1ae17f5b03cc14844fb600ca3573a96deb37ab3b already tried
to do that, but was essentially reverted piecewise because
it caused fdo#47520, fdo#48345, fdo#50372.
Commit c08067d6da94743d53217cbc26cffae00a22dc3a thought it did that,
but actually reverted commit 1ae17f5b03cc14844fb600ca3573a96deb37ab3b.
This implementation fetches the whole current row and caches it in memory;
only one row is cached: when the current row changes, the cache contains
the new current row.
This could be problematic (wrt to memory consumption) if the current
row is big (e.g. with BLOBs) and nobody is interested in the data
anyway (as would often be the case with BLOBs). Note that because of
our "SELECT *", the driver most probably has it in memory already
anyway, so we don't make the situation that much worse.
This could be incrementally improved with a heuristic of not
preemptively caching binary data (and also not LONGVARCHAR / TEXT /
MEMO / ...); a getFOO on these columns would issue a specific "SELECT
column FROM table WHERE primary_key=current_value" each time.
The *real* complete fix to all these issues would be to not do "SELECT
*" at all. Use "SELECT pkey_col1, pkey_col2, ..." when we are only
interested in the key columns. As to data, somehow figure out which
columns were ar interested in and "SELECT" only these (and maybe only
those with "small datatype"?). Interesting columns could be determined
by our caller (creator) as an argument to our constructor, or some
heuristic (no binary data, no "big" unbound data).
Also be extra smart and use *(m_aKeyIter) when getFOO is called
on a column included in it (and don't include it in any subsequent
SELECT).
However, there are several pitfalls.
One is buggy drivers that give use column names of columns that we
cannot fetch :-| Using "SELECT *" works around that because the driver
there *obviously* gives us only fetchable columns in the result.
Another one is the very restrictive nature of some database access
technologies. Take for example ODBC:
- Data can be fetched only *once* (with the SQLGetData interface;
bound columns offer a way around that, but that's viable only for
constant-length data, not variable-length data).
This could be addressed by an intelligent & lazy cache.
- Data must be fetched in increasing order of column number
(again, this is about SQLGetData).
This is a harder issue. The current solution has the nice advantage
of completely isolating the rest of LibO from these restrictions.
I don't currently see how to cleanly avoid (potentially
unnecessarily) caching column 4 if we are asked for column 3 then
column 5, just in case we are asked for column 4 later on, unless
we issue a specific "SELECT column4" later. But the latter would be
quite expensive in terms of app-to-database roudtripe times :-( and
thus creates another performance issue.
Change-Id: I999b3f8f0b8a215acb390ffefc839235346e8353
2012-06-04 17:54:30 +02:00
|
|
|
void invalidateRow();
|
2010-01-20 14:49:00 +01:00
|
|
|
|
2015-04-24 15:29:31 +02:00
|
|
|
static void impl_convertValue_throw(const ORowSetRow& _rInsertRow,const SelectColumnDescription& i_aMetaData);
|
2010-07-08 12:21:55 +02:00
|
|
|
void initColumns();
|
2015-08-03 09:14:58 +02:00
|
|
|
void findTableColumnsMatching_throw( const css::uno::Any& i_aTable,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rUpdateTableName,
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::sdbc::XDatabaseMetaData>& i_xMeta,
|
|
|
|
const css::uno::Reference< css::container::XNameAccess>& i_xQueryColumns,
|
2014-09-24 18:50:37 +02:00
|
|
|
::std::unique_ptr<SelectColumnsMetaData>& o_pKeyColumnNames);
|
2013-02-27 06:53:34 +01:00
|
|
|
void ensureStatement( );
|
|
|
|
virtual void makeNewStatement( );
|
2015-04-24 15:29:31 +02:00
|
|
|
static void setOneKeyColumnParameter( sal_Int32 &nPos,
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::sdbc::XParameters > &_xParameter,
|
2012-01-18 12:30:36 +01:00
|
|
|
const connectivity::ORowSetValue &_rValue,
|
|
|
|
sal_Int32 _nType,
|
2015-04-24 15:29:31 +02:00
|
|
|
sal_Int32 _nScale );
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringBuffer createKeyFilter( );
|
2015-08-03 09:14:58 +02:00
|
|
|
bool doTryRefetch_throw() throw(css::sdbc::SQLException, css::uno::RuntimeException);;
|
2010-07-08 12:21:55 +02:00
|
|
|
void tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch);
|
2013-12-20 11:25:37 +01:00
|
|
|
void executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const OUString& i_sSQL,const OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions = ::std::vector<sal_Int32>());
|
2013-04-07 12:06:47 +02:00
|
|
|
void executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQL,const OUString& i_sTableName = OUString(),bool bRefetch = false);
|
2015-08-03 09:14:58 +02:00
|
|
|
void executeStatement(OUStringBuffer& io_aFilter, css::uno::Reference< css::sdb::XSingleSelectQueryComposer>& io_xAnalyzer);
|
2010-07-08 12:21:55 +02:00
|
|
|
|
2004-03-02 11:41:25 +00:00
|
|
|
virtual ~OKeySet();
|
2000-09-18 23:16:46 +00:00
|
|
|
public:
|
2001-10-30 13:22:10 +00:00
|
|
|
OKeySet(const connectivity::OSQLTable& _xTable,
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::container::XIndexAccess>& _xTableKeys,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& _rUpdateTableName,
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
|
2010-11-24 14:23:06 +01:00
|
|
|
const ORowSetValueVector& _aParameterValueForCache,
|
2011-01-06 12:32:17 +01:00
|
|
|
sal_Int32 i_nMaxRows,
|
|
|
|
sal_Int32& o_nRowCount);
|
2004-03-02 11:41:25 +00:00
|
|
|
|
2001-07-19 08:29:22 +00:00
|
|
|
// late ctor which can throw exceptions
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void construct(const css::uno::Reference< css::sdbc::XResultSet>& _xDriverSet,const OUString& i_sRowSetFilter) override;
|
|
|
|
virtual void reset(const css::uno::Reference< css::sdbc::XResultSet>& _xDriverSet) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdbc::XRow
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual sal_Bool SAL_CALL wasNull( ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess >& typeMap ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool SAL_CALL rowUpdated( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL rowInserted( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL rowDeleted( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::sdbc::XResultSet
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool SAL_CALL next( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL isBeforeFirst( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL isAfterLast( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual void SAL_CALL beforeFirst( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual void SAL_CALL afterLast( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL first( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL last( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual sal_Int32 SAL_CALL getRow( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL absolute( sal_Int32 row ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual bool SAL_CALL previous( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
void SAL_CALL ensureRowForData( ) throw(css::sdbc::SQLException, css::uno::RuntimeException);
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL refreshRow( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
// css::sdbcx::XRowLocate
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual css::uno::Any SAL_CALL getBookmark() throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool SAL_CALL moveToBookmark( const css::uno::Any& bookmark ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual sal_Int32 SAL_CALL compareBookmarks( const css::uno::Any& first, const css::uno::Any& second ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool SAL_CALL hasOrderedBookmarks( ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual sal_Int32 SAL_CALL hashBookmark( const css::uno::Any& bookmark ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
2015-08-03 09:14:58 +02:00
|
|
|
|
|
|
|
// css::sdbc::XResultSetUpdate
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL updateRow(const ORowSetRow& _rInsertRow,const ORowSetRow& _rOriginalRow,const connectivity::OSQLTable& _xTable ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual void SAL_CALL deleteRow(const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(css::sdbc::SQLException, css::uno::RuntimeException) override;
|
|
|
|
virtual void SAL_CALL insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
|
2010-12-02 13:16:48 +01:00
|
|
|
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool previous_checked( bool i_bFetchRow ) override;
|
|
|
|
virtual bool absolute_checked( sal_Int32 row,bool i_bFetchRow ) override;
|
|
|
|
virtual bool last_checked( bool i_bFetchRow) override;
|
2000-09-18 23:16:46 +00:00
|
|
|
};
|
|
|
|
}
|
2013-11-05 02:18:53 +01:00
|
|
|
#endif // INCLUDED_DBACCESS_SOURCE_CORE_API_KEYSET_HXX
|
2010-10-27 12:33:13 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|