LibreOffice Module connectivity (master) 1
pq_fakedupdateableresultset.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * Effective License of whole file:
5 *
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.
9 *
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.
14 *
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
19 *
20 * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
21 *
22 * The Contents of this file are made available subject to the terms of
23 * the GNU Lesser General Public License Version 2.1
24 *
25 * Copyright: 2000 by Sun Microsystems, Inc.
26 *
27 * Contributor(s): Joerg Budischewski
28 *
29 * All parts contributed on or after August 2011:
30 *
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/.
34 *
35 ************************************************************************/
36
37#pragma once
38
39#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
40#include <com/sun/star/sdbc/XRowUpdate.hpp>
41
42#include "pq_resultset.hxx"
43
44namespace pq_sdbc_driver
45{
50 public ResultSet,
51 public css::sdbc::XResultSetUpdate,
52 public css::sdbc::XRowUpdate
53{
54 OUString m_aReason;
55
56public:
58 const ::rtl::Reference< comphelper::RefCountedMutex > & mutex,
59 const css::uno::Reference< css::uno::XInterface > &owner,
60 ConnectionSettings **pSettings,
61 PGresult *result,
62 const OUString &schema,
63 const OUString &table,
64 OUString aReason );
65
66public: // XInterface
67 virtual void SAL_CALL acquire() noexcept override { ResultSet::acquire(); }
68 virtual void SAL_CALL release() noexcept override { ResultSet::release(); }
69 virtual css::uno::Any SAL_CALL queryInterface(
70 const css::uno::Type & reqType ) override;
71
72public: // XTypeProvider
73 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
74 virtual css::uno::Sequence< sal_Int8> SAL_CALL getImplementationId() override;
75
76public: // XResultSetUpdate
77 virtual void SAL_CALL insertRow( ) override;
78 virtual void SAL_CALL updateRow( ) override;
79 virtual void SAL_CALL deleteRow( ) override;
80 virtual void SAL_CALL cancelRowUpdates( ) override;
81 virtual void SAL_CALL moveToInsertRow( ) override;
82 virtual void SAL_CALL moveToCurrentRow( ) override;
83
84public: // XRowUpdate
85 virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) override;
86 virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) override;
87 virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) override;
88 virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) override;
89 virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) override;
90 virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) override;
91 virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) override;
92 virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) override;
93 virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) override;
94 virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 >& x ) override;
95 virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const css::util::Date& x ) override;
96 virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const css::util::Time& x ) override;
97 virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const css::util::DateTime& x ) override;
98 virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
99 virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
100 virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const css::uno::Any& x ) override;
101 virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale ) override;
102
103};
104}
105
106/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL release() noexcept override
necessary to avoid crashes in OOo, when an updateable result set is requested, but cannot be delivere...
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &reqType) override
FakedUpdateableResultSet(const ::rtl::Reference< comphelper::RefCountedMutex > &mutex, const css::uno::Reference< css::uno::XInterface > &owner, ConnectionSettings **pSettings, PGresult *result, const OUString &schema, const OUString &table, OUString aReason)
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
sal_Int32 scale
Definition: pq_statics.cxx:62
unsigned char sal_Bool
signed char sal_Int8