LibreOffice Module connectivity (master) 1
pq_fakedupdateableresultset.cxx
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
38#include <com/sun/star/sdbc/SQLException.hpp>
41#include <utility>
42
43
45using com::sun::star::uno::Any;
46using com::sun::star::uno::Type;
47
48using com::sun::star::sdbc::SQLException;
49using com::sun::star::sdbc::XResultSetUpdate;
50using com::sun::star::sdbc::XRowUpdate;
51
52namespace pq_sdbc_driver
53{
54
56 const ::rtl::Reference< comphelper::RefCountedMutex > & mutex,
57 const css::uno::Reference< css::uno::XInterface > &owner,
58 ConnectionSettings **pSettings,
59 PGresult *result,
60 const OUString &schema,
61 const OUString &table,
62 OUString aReason )
63 : ResultSet( mutex, owner, pSettings, result, schema, table ),
64 m_aReason(std::move( aReason ))
65{}
66
67
69 const css::uno::Type & reqType )
70{
71 Any ret = ResultSet::queryInterface( reqType );
72 if( ! ret.hasValue() )
73 ret = ::cppu::queryInterface(
74 reqType,
75 static_cast< XResultSetUpdate * > ( this ),
76 static_cast< XRowUpdate * > ( this ) );
77 return ret;
78}
79
80
81css::uno::Sequence< css::uno::Type > FakedUpdateableResultSet::getTypes()
82{
83 static cppu::OTypeCollection s_collection(
87
88 return s_collection.getTypes();
89
90}
91
92css::uno::Sequence< sal_Int8> FakedUpdateableResultSet::getImplementationId()
93{
94 return css::uno::Sequence<sal_Int8>();
95}
96
98{
99 throw SQLException( m_aReason, *this, OUString(),1,Any() );
100}
101
103{
104 throw SQLException( m_aReason, *this, OUString(),1,Any() );
105}
106
108{
109 throw SQLException( m_aReason, *this, OUString(),1,Any() );
110 }
111
113{
114 throw SQLException( m_aReason, *this, OUString(),1,Any() );
115}
116
118{
119 throw SQLException( m_aReason, *this, OUString(),1,Any() );
120}
121
123{
124 throw SQLException( m_aReason, *this, OUString(),1,Any() );
125}
126
127
128void FakedUpdateableResultSet::updateNull( sal_Int32 /* columnIndex */ )
129{
130 throw SQLException( m_aReason, *this, OUString(),1,Any() );
131}
132
133void FakedUpdateableResultSet::updateBoolean( sal_Int32 /* columnIndex */, sal_Bool /* x */ )
134{
135 throw SQLException( m_aReason, *this, OUString(),1,Any() );
136}
137
138void FakedUpdateableResultSet::updateByte( sal_Int32 /* columnIndex */, sal_Int8 /* x */ )
139{
140 throw SQLException( m_aReason, *this, OUString(),1,Any() );
141}
142
143void FakedUpdateableResultSet::updateShort( sal_Int32 /* columnIndex */, sal_Int16 /* x */ )
144{
145 throw SQLException( m_aReason, *this, OUString(),1,Any() );
146}
147
148void FakedUpdateableResultSet::updateInt( sal_Int32 /* columnIndex */, sal_Int32 /* x */ )
149{
150 throw SQLException( m_aReason, *this, OUString(),1,Any() );
151}
152
153void FakedUpdateableResultSet::updateLong( sal_Int32 /* columnIndex */, sal_Int64 /* x */ )
154{
155 throw SQLException( m_aReason, *this, OUString(),1,Any() );
156}
157
158void FakedUpdateableResultSet::updateFloat( sal_Int32 /* columnIndex */, float /* x */ )
159{
160 throw SQLException( m_aReason, *this, OUString(),1,Any() );
161}
162
163void FakedUpdateableResultSet::updateDouble( sal_Int32 /* columnIndex */, double /* x */ )
164{
165 throw SQLException( m_aReason, *this, OUString(),1,Any() );
166}
167
168void FakedUpdateableResultSet::updateString( sal_Int32 /* columnIndex */, const OUString& /* x */ )
169{
170 throw SQLException( m_aReason, *this, OUString(),1,Any() );
171}
172
173void FakedUpdateableResultSet::updateBytes( sal_Int32 /* columnIndex */, const css::uno::Sequence< sal_Int8 >& /* x */ )
174{
175 throw SQLException( m_aReason, *this, OUString(),1,Any() );
176}
177
178void FakedUpdateableResultSet::updateDate( sal_Int32 /* columnIndex */, const css::util::Date& /* x */ )
179{
180 throw SQLException( m_aReason, *this, OUString(),1,Any() );
181}
182
183void FakedUpdateableResultSet::updateTime( sal_Int32 /* columnIndex */, const css::util::Time& /* x */ )
184{
185 throw SQLException( m_aReason, *this, OUString(),1,Any() );
186}
187
188void FakedUpdateableResultSet::updateTimestamp( sal_Int32 /* columnIndex */, const css::util::DateTime& /* x */ )
189{
190 throw SQLException( m_aReason, *this, OUString(),1,Any() );
191}
192
193void FakedUpdateableResultSet::updateBinaryStream( sal_Int32 /* columnIndex */, const css::uno::Reference< css::io::XInputStream >& /* x */, sal_Int32 /* length */ )
194{
195 throw SQLException( m_aReason, *this, OUString(),1,Any() );
196}
197
198void FakedUpdateableResultSet::updateCharacterStream( sal_Int32 /* columnIndex */, const css::uno::Reference< css::io::XInputStream >& /* x */, sal_Int32 /* length */ )
199{
200 throw SQLException( m_aReason, *this, OUString(),1,Any() );
201}
202
203void FakedUpdateableResultSet::updateObject( sal_Int32 /* columnIndex */, const css::uno::Any& /* x */ )
204{
205 throw SQLException( m_aReason, *this, OUString(),1,Any() );
206}
207
208void FakedUpdateableResultSet::updateNumericObject( sal_Int32 /* columnIndex */, const css::uno::Any& /* x */, sal_Int32 /* scale */ )
209{
210 throw SQLException( m_aReason, *this, OUString(),1,Any() );
211}
212
213}
214
215/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &reqType) override
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 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 updateShort(sal_Int32 columnIndex, sal_Int16 x) override
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
@ table
std::mutex mutex
unsigned char sal_Bool
signed char sal_Int8
Any result