nss: upgrade to release 3.73
[LibreOffice.git] / connectivity / source / drivers / postgresql / pq_fakedupdateableresultset.cxx
bloba75897ccb21159ba220fbfc8c0996d6327f7deeb
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 #include "pq_fakedupdateableresultset.hxx"
38 #include <com/sun/star/sdbc/SQLException.hpp>
39 #include <cppuhelper/typeprovider.hxx>
40 #include <cppuhelper/queryinterface.hxx>
43 using com::sun::star::uno::Sequence;
44 using com::sun::star::uno::Any;
45 using com::sun::star::uno::Type;
47 using com::sun::star::sdbc::SQLException;
48 using com::sun::star::sdbc::XResultSetUpdate;
49 using com::sun::star::sdbc::XRowUpdate;
51 namespace pq_sdbc_driver
54 FakedUpdateableResultSet::FakedUpdateableResultSet(
55 const ::rtl::Reference< comphelper::RefCountedMutex > & mutex,
56 const css::uno::Reference< css::uno::XInterface > &owner,
57 ConnectionSettings **pSettings,
58 PGresult *result,
59 const OUString &schema,
60 const OUString &table,
61 const OUString &aReason )
62 : ResultSet( mutex, owner, pSettings, result, schema, table ),
63 m_aReason( aReason )
67 css::uno::Any FakedUpdateableResultSet::queryInterface(
68 const css::uno::Type & reqType )
70 Any ret = ResultSet::queryInterface( reqType );
71 if( ! ret.hasValue() )
72 ret = ::cppu::queryInterface(
73 reqType,
74 static_cast< XResultSetUpdate * > ( this ),
75 static_cast< XRowUpdate * > ( this ) );
76 return ret;
80 css::uno::Sequence< css::uno::Type > FakedUpdateableResultSet::getTypes()
82 static cppu::OTypeCollection s_collection(
83 cppu::UnoType<XResultSetUpdate>::get(),
84 cppu::UnoType<XRowUpdate>::get(),
85 ResultSet::getTypes());
87 return s_collection.getTypes();
91 css::uno::Sequence< sal_Int8> FakedUpdateableResultSet::getImplementationId()
93 return css::uno::Sequence<sal_Int8>();
96 void FakedUpdateableResultSet::insertRow( )
98 throw SQLException( m_aReason, *this, OUString(),1,Any() );
101 void FakedUpdateableResultSet::updateRow( )
103 throw SQLException( m_aReason, *this, OUString(),1,Any() );
106 void FakedUpdateableResultSet::deleteRow( )
108 throw SQLException( m_aReason, *this, OUString(),1,Any() );
111 void FakedUpdateableResultSet::cancelRowUpdates( )
113 throw SQLException( m_aReason, *this, OUString(),1,Any() );
116 void FakedUpdateableResultSet::moveToInsertRow( )
118 throw SQLException( m_aReason, *this, OUString(),1,Any() );
121 void FakedUpdateableResultSet::moveToCurrentRow( )
123 throw SQLException( m_aReason, *this, OUString(),1,Any() );
127 void FakedUpdateableResultSet::updateNull( sal_Int32 /* columnIndex */ )
129 throw SQLException( m_aReason, *this, OUString(),1,Any() );
132 void FakedUpdateableResultSet::updateBoolean( sal_Int32 /* columnIndex */, sal_Bool /* x */ )
134 throw SQLException( m_aReason, *this, OUString(),1,Any() );
137 void FakedUpdateableResultSet::updateByte( sal_Int32 /* columnIndex */, sal_Int8 /* x */ )
139 throw SQLException( m_aReason, *this, OUString(),1,Any() );
142 void FakedUpdateableResultSet::updateShort( sal_Int32 /* columnIndex */, sal_Int16 /* x */ )
144 throw SQLException( m_aReason, *this, OUString(),1,Any() );
147 void FakedUpdateableResultSet::updateInt( sal_Int32 /* columnIndex */, sal_Int32 /* x */ )
149 throw SQLException( m_aReason, *this, OUString(),1,Any() );
152 void FakedUpdateableResultSet::updateLong( sal_Int32 /* columnIndex */, sal_Int64 /* x */ )
154 throw SQLException( m_aReason, *this, OUString(),1,Any() );
157 void FakedUpdateableResultSet::updateFloat( sal_Int32 /* columnIndex */, float /* x */ )
159 throw SQLException( m_aReason, *this, OUString(),1,Any() );
162 void FakedUpdateableResultSet::updateDouble( sal_Int32 /* columnIndex */, double /* x */ )
164 throw SQLException( m_aReason, *this, OUString(),1,Any() );
167 void FakedUpdateableResultSet::updateString( sal_Int32 /* columnIndex */, const OUString& /* x */ )
169 throw SQLException( m_aReason, *this, OUString(),1,Any() );
172 void FakedUpdateableResultSet::updateBytes( sal_Int32 /* columnIndex */, const css::uno::Sequence< sal_Int8 >& /* x */ )
174 throw SQLException( m_aReason, *this, OUString(),1,Any() );
177 void FakedUpdateableResultSet::updateDate( sal_Int32 /* columnIndex */, const css::util::Date& /* x */ )
179 throw SQLException( m_aReason, *this, OUString(),1,Any() );
182 void FakedUpdateableResultSet::updateTime( sal_Int32 /* columnIndex */, const css::util::Time& /* x */ )
184 throw SQLException( m_aReason, *this, OUString(),1,Any() );
187 void FakedUpdateableResultSet::updateTimestamp( sal_Int32 /* columnIndex */, const css::util::DateTime& /* x */ )
189 throw SQLException( m_aReason, *this, OUString(),1,Any() );
192 void FakedUpdateableResultSet::updateBinaryStream( sal_Int32 /* columnIndex */, const css::uno::Reference< css::io::XInputStream >& /* x */, sal_Int32 /* length */ )
194 throw SQLException( m_aReason, *this, OUString(),1,Any() );
197 void FakedUpdateableResultSet::updateCharacterStream( sal_Int32 /* columnIndex */, const css::uno::Reference< css::io::XInputStream >& /* x */, sal_Int32 /* length */ )
199 throw SQLException( m_aReason, *this, OUString(),1,Any() );
202 void FakedUpdateableResultSet::updateObject( sal_Int32 /* columnIndex */, const css::uno::Any& /* x */ )
204 throw SQLException( m_aReason, *this, OUString(),1,Any() );
207 void FakedUpdateableResultSet::updateNumericObject( sal_Int32 /* columnIndex */, const css::uno::Any& /* x */, sal_Int32 /* scale */ )
209 throw SQLException( m_aReason, *this, OUString(),1,Any() );
214 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */