bump product version to 6.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / postgresql / pq_fakedupdateableresultset.hxx
blob65113344cdec7900e208fcc25c938f2fd1bd0231
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * Effective License of whole file:
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2.1, as published by the Free Software Foundation.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 * MA 02111-1307 USA
20 * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
22 * The Contents of this file are made available subject to the terms of
23 * the GNU Lesser General Public License Version 2.1
25 * Copyright: 2000 by Sun Microsystems, Inc.
27 * Contributor(s): Joerg Budischewski
29 * All parts contributed on or after August 2011:
31 * This Source Code Form is subject to the terms of the Mozilla Public
32 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
35 ************************************************************************/
37 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_FAKEDUPDATEABLERESULTSET_HXX
38 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_FAKEDUPDATEABLERESULTSET_HXX
40 #include <com/sun/star/sdbc/XResultSetUpdate.hpp>
41 #include <com/sun/star/sdbc/XRowUpdate.hpp>
43 #include "pq_resultset.hxx"
45 namespace pq_sdbc_driver
47 /** necessary to avoid crashes in OOo, when an updateable result set is requested,
48 but cannot be delivered.
50 class FakedUpdateableResultSet :
51 public ResultSet,
52 public css::sdbc::XResultSetUpdate,
53 public css::sdbc::XRowUpdate
55 OUString m_aReason;
57 public:
58 FakedUpdateableResultSet(
59 const ::rtl::Reference< comphelper::RefCountedMutex > & mutex,
60 const css::uno::Reference< css::uno::XInterface > &owner,
61 ConnectionSettings **pSettings,
62 PGresult *result,
63 const OUString &schema,
64 const OUString &table,
65 const OUString &aReason );
67 public: // XInterface
68 virtual void SAL_CALL acquire() throw() override { ResultSet::acquire(); }
69 virtual void SAL_CALL release() throw() override { ResultSet::release(); }
70 virtual css::uno::Any SAL_CALL queryInterface(
71 const css::uno::Type & reqType ) override;
73 public: // XTypeProvider
74 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
75 virtual css::uno::Sequence< sal_Int8> SAL_CALL getImplementationId() override;
77 public: // XResultSetUpdate
78 virtual void SAL_CALL insertRow( ) override;
79 virtual void SAL_CALL updateRow( ) override;
80 virtual void SAL_CALL deleteRow( ) override;
81 virtual void SAL_CALL cancelRowUpdates( ) override;
82 virtual void SAL_CALL moveToInsertRow( ) override;
83 virtual void SAL_CALL moveToCurrentRow( ) override;
85 public: // XRowUpdate
86 virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) override;
87 virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) override;
88 virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) override;
89 virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) override;
90 virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) override;
91 virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) override;
92 virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) override;
93 virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) override;
94 virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) override;
95 virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 >& x ) override;
96 virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const css::util::Date& x ) override;
97 virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const css::util::Time& x ) override;
98 virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const css::util::DateTime& x ) override;
99 virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
100 virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
101 virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const css::uno::Any& x ) override;
102 virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale ) override;
106 #endif
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */