1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <ado/AStatement.hxx>
21 #include <ado/AConnection.hxx>
22 #include <ado/AResultSet.hxx>
23 #include <comphelper/property.hxx>
24 #include <osl/thread.h>
25 #include <cppuhelper/typeprovider.hxx>
26 #include <cppuhelper/queryinterface.hxx>
27 #include <comphelper/sequence.hxx>
28 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
29 #include <com/sun/star/sdbc/ResultSetType.hpp>
30 #include <com/sun/star/sdbc/FetchDirection.hpp>
31 #include <connectivity/dbexception.hxx>
32 #include <comphelper/types.hxx>
33 #include <rtl/ref.hxx>
40 using namespace ::comphelper
;
42 #define CHECK_RETURN(x) \
44 ADOS::ThrowException(m_pConnection->getConnection(),*this);
47 using namespace connectivity::ado
;
50 using namespace com::sun::star::uno
;
51 using namespace com::sun::star::lang
;
52 using namespace com::sun::star::beans
;
53 using namespace com::sun::star::sdbc
;
55 OStatement_Base::OStatement_Base(OConnection
* _pConnection
) : OStatement_BASE(m_aMutex
)
56 ,OPropertySetHelper(OStatement_BASE::rBHelper
)
57 ,m_pConnection(_pConnection
)
60 ,m_eLockType(adLockReadOnly
)
61 ,m_eCursorType(adOpenForwardOnly
)
63 osl_atomic_increment( &m_refCount
);
66 if(m_Command
.IsValid())
67 m_Command
.putref_ActiveConnection(m_pConnection
->getConnection());
69 ADOS::ThrowException(m_pConnection
->getConnection(),*this);
71 m_RecordsAffected
.setNoArg();
72 m_Parameters
.setNoArg();
74 m_pConnection
->acquire();
76 osl_atomic_decrement( &m_refCount
);
79 void OStatement_Base::disposeResultSet()
81 // free the cursor if alive
82 Reference
< XComponent
> xComp(m_xResultSet
.get(), UNO_QUERY
);
89 void OStatement_Base::disposing()
91 ::osl::MutexGuard
aGuard(m_aMutex
);
96 if ( m_Command
.IsValid() )
97 m_Command
.putref_ActiveConnection({});
100 if ( m_RecordSet
.IsValid() )
101 m_RecordSet
.PutRefDataSource( nullptr );
105 m_pConnection
->release();
107 OStatement_BASE::disposing();
110 void SAL_CALL
OStatement_Base::release() noexcept
112 OStatement_BASE::release();
115 Any SAL_CALL
OStatement_Base::queryInterface( const Type
& rType
)
117 Any aRet
= OStatement_BASE::queryInterface(rType
);
118 return aRet
.hasValue() ? aRet
: OPropertySetHelper::queryInterface(rType
);
121 css::uno::Sequence
< css::uno::Type
> SAL_CALL
OStatement_Base::getTypes( )
123 ::cppu::OTypeCollection
aTypes( cppu::UnoType
<css::beans::XMultiPropertySet
>::get(),
124 cppu::UnoType
<css::beans::XFastPropertySet
>::get(),
125 cppu::UnoType
<css::beans::XPropertySet
>::get());
127 return ::comphelper::concatSequences(aTypes
.getTypes(),OStatement_BASE::getTypes());
131 void SAL_CALL
OStatement_Base::cancel( )
133 ::osl::MutexGuard
aGuard( m_aMutex
);
134 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
137 CHECK_RETURN(m_Command
.Cancel())
141 void SAL_CALL
OStatement_Base::close( )
144 ::osl::MutexGuard
aGuard( m_aMutex
);
145 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
152 void SAL_CALL
OStatement::clearBatch( )
158 void OStatement_Base::reset()
160 ::osl::MutexGuard
aGuard( m_aMutex
);
161 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
166 if (m_xResultSet
.get().is())
171 // If a ResultSet was created for this Statement, close it
174 void OStatement_Base::clearMyResultSet ()
176 ::osl::MutexGuard
aGuard( m_aMutex
);
177 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
181 Reference
<XCloseable
> xCloseable(
182 m_xResultSet
.get(), css::uno::UNO_QUERY
);
183 if ( xCloseable
.is() )
186 catch( const DisposedException
& ) { }
188 m_xResultSet
.clear();
191 sal_Int32
OStatement_Base::getRowCount ()
193 ::osl::MutexGuard
aGuard( m_aMutex
);
194 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
197 return m_RecordsAffected
.getInt32();
201 // Given a SQL type, return the maximum precision for the column.
202 // Returns -1 if not known
205 sal_Int32
OStatement_Base::getPrecision ( sal_Int32 sqlType
)
207 ::osl::MutexGuard
aGuard( m_aMutex
);
208 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
213 aInfo
.nType
= static_cast<sal_Int16
>(sqlType
);
214 if (!m_aTypeInfo
.empty())
216 std::vector
<OTypeInfo
>::const_iterator aIter
= std::find(m_aTypeInfo
.begin(),m_aTypeInfo
.end(),aInfo
);
217 for(;aIter
!= m_aTypeInfo
.end();++aIter
)
219 prec
= std::max(prec
,(*aIter
).nPrecision
);
230 void OStatement_Base::setWarning (const SQLWarning
&ex
)
232 ::osl::MutexGuard
aGuard( m_aMutex
);
233 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
239 void OStatement_Base::assignRecordSet( ADORecordset
* _pRS
)
241 WpADORecordset
aOldRS( m_RecordSet
);
242 m_RecordSet
.set( _pRS
);
244 if ( aOldRS
.IsValid() )
245 aOldRS
.PutRefDataSource( nullptr );
247 if ( m_RecordSet
.IsValid() )
248 m_RecordSet
.PutRefDataSource( static_cast<IDispatch
*>(m_Command
) );
251 sal_Bool SAL_CALL
OStatement_Base::execute( const OUString
& sql
)
253 ::osl::MutexGuard
aGuard( m_aMutex
);
254 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
257 // Reset the statement handle and warning
263 ADORecordset
* pSet
= nullptr;
264 CHECK_RETURN(m_Command
.put_CommandText(sql
))
265 CHECK_RETURN(m_Command
.Execute(m_RecordsAffected
,m_Parameters
,adCmdText
,&pSet
))
267 assignRecordSet( pSet
);
269 catch (SQLWarning
& ex
)
272 // Save pointer to warning and save with ResultSet
273 // object once it is created.
278 return m_RecordSet
.IsValid();
281 Reference
< XResultSet
> SAL_CALL
OStatement_Base::executeQuery( const OUString
& sql
)
283 ::osl::MutexGuard
aGuard( m_aMutex
);
284 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
289 m_xResultSet
= WeakReference
<XResultSet
>(nullptr);
293 CHECK_RETURN(m_Command
.put_CommandText(sql
))
295 aCmd
.setIDispatch(m_Command
);
298 CHECK_RETURN(aSet
.put_CacheSize(m_nFetchSize
))
299 CHECK_RETURN(aSet
.put_MaxRecords(m_nMaxRows
))
300 CHECK_RETURN(aSet
.Open(aCmd
,aCon
,m_eCursorType
,m_eLockType
,adOpenUnspecified
))
303 CHECK_RETURN(aSet
.get_CacheSize(m_nFetchSize
))
304 CHECK_RETURN(aSet
.get_MaxRecords(m_nMaxRows
))
305 CHECK_RETURN(aSet
.get_CursorType(m_eCursorType
))
306 CHECK_RETURN(aSet
.get_LockType(m_eLockType
))
308 rtl::Reference
<OResultSet
> pSet
= new OResultSet(aSet
,this);
311 m_xResultSet
= WeakReference
<XResultSet
>(pSet
);
317 Reference
< XConnection
> SAL_CALL
OStatement_Base::getConnection( )
319 ::osl::MutexGuard
aGuard( m_aMutex
);
320 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
323 return static_cast<Reference
< XConnection
>>(m_pConnection
);
327 Any SAL_CALL
OStatement::queryInterface( const Type
& rType
)
329 Any aRet
= ::cppu::queryInterface(rType
,static_cast< XBatchExecution
*> (this));
330 return aRet
.hasValue() ? aRet
: OStatement_Base::queryInterface(rType
);
334 void SAL_CALL
OStatement::addBatch( const OUString
& sql
)
336 ::osl::MutexGuard
aGuard( m_aMutex
);
337 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
340 m_aBatchVector
.push_back(sql
);
343 Sequence
< sal_Int32
> SAL_CALL
OStatement::executeBatch( )
345 ::osl::MutexGuard
aGuard( m_aMutex
);
346 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
351 OUString aBatchSql
= std::accumulate(m_aBatchVector
.begin(), m_aBatchVector
.end(), OUString(),
352 [](const OUString
& rRes
, const OUString
& rStr
) { return rRes
+ rStr
+ ";"; });
353 sal_Int32 nLen
= m_aBatchVector
.size();
356 if ( m_RecordSet
.IsValid() )
357 m_RecordSet
.PutRefDataSource( nullptr );
359 m_RecordSet
.Create();
361 CHECK_RETURN(m_Command
.put_CommandText(aBatchSql
))
362 if ( m_RecordSet
.IsValid() )
363 m_RecordSet
.PutRefDataSource(static_cast<IDispatch
*>(m_Command
));
365 CHECK_RETURN(m_RecordSet
.UpdateBatch(adAffectAll
))
367 ADORecordset
* pSet
=nullptr;
368 Sequence
< sal_Int32
> aRet(nLen
);
369 sal_Int32
* pArray
= aRet
.getArray();
370 for(sal_Int32 j
=0;j
<nLen
;++j
)
373 OLEVariant aRecordsAffected
;
374 if(m_RecordSet
.NextRecordset(aRecordsAffected
,&pSet
) && pSet
)
376 assignRecordSet( pSet
);
379 if(m_RecordSet
.get_RecordCount(nValue
))
387 sal_Int32 SAL_CALL
OStatement_Base::executeUpdate( const OUString
& sql
)
389 ::osl::MutexGuard
aGuard( m_aMutex
);
390 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
396 ADORecordset
* pSet
= nullptr;
397 CHECK_RETURN(m_Command
.put_CommandText(sql
))
398 CHECK_RETURN(m_Command
.Execute(m_RecordsAffected
,m_Parameters
,long(adCmdText
)|long(adExecuteNoRecords
),&pSet
))
400 catch (SQLWarning
& ex
) {
402 // Save pointer to warning and save with ResultSet
403 // object once it is created.
407 if(!m_RecordsAffected
.isEmpty() && !m_RecordsAffected
.isNull() && m_RecordsAffected
.getType() != VT_ERROR
)
408 return m_RecordsAffected
.getInt32();
414 Reference
< XResultSet
> SAL_CALL
OStatement_Base::getResultSet( )
416 ::osl::MutexGuard
aGuard( m_aMutex
);
417 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
424 sal_Int32 SAL_CALL
OStatement_Base::getUpdateCount( )
426 ::osl::MutexGuard
aGuard( m_aMutex
);
427 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
431 if(m_RecordSet
.IsValid() && m_RecordSet
.get_RecordCount(nRet
))
437 sal_Bool SAL_CALL
OStatement_Base::getMoreResults( )
439 ::osl::MutexGuard
aGuard( m_aMutex
);
440 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
443 // clear previous warnings
447 // Call SQLMoreResults
451 ADORecordset
* pSet
=nullptr;
452 OLEVariant aRecordsAffected
;
453 if(m_RecordSet
.IsValid() && m_RecordSet
.NextRecordset(aRecordsAffected
,&pSet
) && pSet
)
454 assignRecordSet( pSet
);
459 //TODO: Save pointer to warning and save with ResultSet
460 // object once it is created.
462 return m_RecordSet
.IsValid();
466 Any SAL_CALL
OStatement_Base::getWarnings( )
468 ::osl::MutexGuard
aGuard( m_aMutex
);
469 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
472 return Any(m_aLastWarning
);
476 void SAL_CALL
OStatement_Base::clearWarnings( )
478 ::osl::MutexGuard
aGuard( m_aMutex
);
479 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
482 m_aLastWarning
= SQLWarning();
486 sal_Int32
OStatement_Base::getQueryTimeOut() const
488 return m_Command
.get_CommandTimeout();
491 sal_Int32
OStatement_Base::getMaxRows() const
494 if(!(m_RecordSet
.IsValid() && m_RecordSet
.get_MaxRecords(nRet
)))
495 ::dbtools::throwFunctionSequenceException(nullptr);
499 sal_Int32
OStatement_Base::getResultSetConcurrency() const
506 nValue
= ResultSetConcurrency::READ_ONLY
;
509 nValue
= ResultSetConcurrency::UPDATABLE
;
516 sal_Int32
OStatement_Base::getResultSetType() const
519 switch(m_eCursorType
)
521 case adOpenUnspecified
:
522 case adOpenForwardOnly
:
523 nValue
= ResultSetType::FORWARD_ONLY
;
527 nValue
= ResultSetType::SCROLL_INSENSITIVE
;
530 nValue
= ResultSetType::SCROLL_SENSITIVE
;
536 sal_Int32
OStatement_Base::getFetchDirection()
538 return FetchDirection::FORWARD
;
541 sal_Int32
OStatement_Base::getFetchSize() const
546 sal_Int32
OStatement_Base::getMaxFieldSize()
551 OUString
OStatement_Base::getCursorName() const
553 return m_Command
.GetName();
556 void OStatement_Base::setQueryTimeOut(sal_Int32 seconds
)
558 ::osl::MutexGuard
aGuard( m_aMutex
);
559 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
562 m_Command
.put_CommandTimeout(seconds
);
565 void OStatement_Base::setMaxRows(sal_Int32 _par0
)
567 ::osl::MutexGuard
aGuard( m_aMutex
);
568 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
573 void OStatement_Base::setResultSetConcurrency(sal_Int32 _par0
)
575 ::osl::MutexGuard
aGuard( m_aMutex
);
576 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
580 case ResultSetConcurrency::READ_ONLY
:
581 m_eLockType
= adLockReadOnly
;
584 m_eLockType
= adLockOptimistic
;
589 void OStatement_Base::setResultSetType(sal_Int32 _par0
)
591 ::osl::MutexGuard
aGuard( m_aMutex
);
592 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
597 case ResultSetType::FORWARD_ONLY
:
598 m_eCursorType
= adOpenForwardOnly
;
600 case ResultSetType::SCROLL_INSENSITIVE
:
601 m_eCursorType
= adOpenKeyset
;
603 case ResultSetType::SCROLL_SENSITIVE
:
604 m_eCursorType
= adOpenDynamic
;
609 void OStatement_Base::setFetchDirection(sal_Int32
/*_par0*/)
611 ::osl::MutexGuard
aGuard( m_aMutex
);
612 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
613 ::dbtools::throwFeatureNotImplementedSQLException( "Statement::FetchDirection", *this );
616 void OStatement_Base::setFetchSize(sal_Int32 _par0
)
618 ::osl::MutexGuard
aGuard( m_aMutex
);
619 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
622 m_nFetchSize
= _par0
;
625 void OStatement_Base::setMaxFieldSize(sal_Int32
/*_par0*/)
627 ::osl::MutexGuard
aGuard( m_aMutex
);
628 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
629 ::dbtools::throwFeatureNotImplementedSQLException( "Statement::MaxFieldSize", *this );
632 void OStatement_Base::setCursorName(std::u16string_view _par0
)
634 ::osl::MutexGuard
aGuard( m_aMutex
);
635 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
637 m_Command
.put_Name(_par0
);
641 ::cppu::IPropertyArrayHelper
* OStatement_Base::createArrayHelper( ) const
643 return new ::cppu::OPropertyArrayHelper
647 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME
),
648 PROPERTY_ID_CURSORNAME
,
649 cppu::UnoType
<OUString
>::get(),
653 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING
),
654 PROPERTY_ID_ESCAPEPROCESSING
,
655 cppu::UnoType
<bool>::get(),
659 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION
),
660 PROPERTY_ID_FETCHDIRECTION
,
661 cppu::UnoType
<sal_Int32
>::get(),
665 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE
),
666 PROPERTY_ID_FETCHSIZE
,
667 cppu::UnoType
<sal_Int32
>::get(),
671 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE
),
672 PROPERTY_ID_MAXFIELDSIZE
,
673 cppu::UnoType
<sal_Int32
>::get(),
677 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS
),
679 cppu::UnoType
<sal_Int32
>::get(),
683 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_QUERYTIMEOUT
),
684 PROPERTY_ID_QUERYTIMEOUT
,
685 cppu::UnoType
<sal_Int32
>::get(),
689 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY
),
690 PROPERTY_ID_RESULTSETCONCURRENCY
,
691 cppu::UnoType
<sal_Int32
>::get(),
695 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE
),
696 PROPERTY_ID_RESULTSETTYPE
,
697 cppu::UnoType
<sal_Int32
>::get(),
701 ::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_USEBOOKMARKS
),
702 PROPERTY_ID_USEBOOKMARKS
,
703 cppu::UnoType
<bool>::get(),
711 ::cppu::IPropertyArrayHelper
& OStatement_Base::getInfoHelper()
713 return *getArrayHelper();
716 sal_Bool
OStatement_Base::convertFastPropertyValue(
717 Any
& rConvertedValue
,
722 bool bModified
= false;
724 bool bValidAdoRS
= m_RecordSet
.IsValid();
725 // some of the properties below, when set, are remembered in a member, and applied in the next execute
726 // For these properties, the record set does not need to be valid to allow setting them.
727 // For all others (where the values are forwarded to the ADO RS directly), the recordset must be valid.
733 case PROPERTY_ID_MAXROWS
:
734 bModified
= ::comphelper::tryPropertyValue( rConvertedValue
, rOldValue
, rValue
, bValidAdoRS
? getMaxRows() : m_nMaxRows
);
737 case PROPERTY_ID_RESULTSETTYPE
:
738 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getResultSetType());
740 case PROPERTY_ID_FETCHSIZE
:
741 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getFetchSize());
743 case PROPERTY_ID_RESULTSETCONCURRENCY
:
744 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getResultSetConcurrency());
746 case PROPERTY_ID_QUERYTIMEOUT
:
747 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getQueryTimeOut());
749 case PROPERTY_ID_MAXFIELDSIZE
:
750 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getMaxFieldSize());
752 case PROPERTY_ID_CURSORNAME
:
753 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getCursorName());
755 case PROPERTY_ID_FETCHDIRECTION
:
756 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getFetchDirection());
760 catch( const Exception
& )
762 bModified
= true; // will ensure that the property is set
763 OSL_FAIL( "OStatement_Base::convertFastPropertyValue: caught something strange!" );
768 void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle
,const Any
& rValue
)
772 case PROPERTY_ID_QUERYTIMEOUT
:
773 setQueryTimeOut(comphelper::getINT32(rValue
));
775 case PROPERTY_ID_MAXFIELDSIZE
:
776 setMaxFieldSize(comphelper::getINT32(rValue
));
778 case PROPERTY_ID_MAXROWS
:
779 setMaxRows(comphelper::getINT32(rValue
));
781 case PROPERTY_ID_CURSORNAME
:
782 setCursorName(comphelper::getString(rValue
));
784 case PROPERTY_ID_RESULTSETCONCURRENCY
:
785 setResultSetConcurrency(comphelper::getINT32(rValue
));
787 case PROPERTY_ID_RESULTSETTYPE
:
788 setResultSetType(comphelper::getINT32(rValue
));
790 case PROPERTY_ID_FETCHDIRECTION
:
791 setFetchDirection(comphelper::getINT32(rValue
));
793 case PROPERTY_ID_FETCHSIZE
:
794 setFetchSize(comphelper::getINT32(rValue
));
796 case PROPERTY_ID_ESCAPEPROCESSING
:
797 // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
798 case PROPERTY_ID_USEBOOKMARKS
:
799 // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
805 void OStatement_Base::getFastPropertyValue(Any
& rValue
,sal_Int32 nHandle
) const
809 case PROPERTY_ID_QUERYTIMEOUT
:
810 rValue
<<= getQueryTimeOut();
812 case PROPERTY_ID_MAXFIELDSIZE
:
813 rValue
<<= getMaxFieldSize();
815 case PROPERTY_ID_MAXROWS
:
816 rValue
<<= getMaxRows();
818 case PROPERTY_ID_CURSORNAME
:
819 rValue
<<= getCursorName();
821 case PROPERTY_ID_RESULTSETCONCURRENCY
:
822 rValue
<<= getResultSetConcurrency();
824 case PROPERTY_ID_RESULTSETTYPE
:
825 rValue
<<= getResultSetType();
827 case PROPERTY_ID_FETCHDIRECTION
:
828 rValue
<<= getFetchDirection();
830 case PROPERTY_ID_FETCHSIZE
:
831 rValue
<<= getFetchSize();
833 case PROPERTY_ID_ESCAPEPROCESSING
:
836 case PROPERTY_ID_USEBOOKMARKS
:
842 OStatement::~OStatement()
845 IMPLEMENT_SERVICE_INFO(OStatement
,"com.sun.star.sdbcx.AStatement","com.sun.star.sdbc.Statement");
847 void SAL_CALL
OStatement_Base::acquire() noexcept
849 OStatement_BASE::acquire();
852 void SAL_CALL
OStatement::acquire() noexcept
854 OStatement_Base::acquire();
857 void SAL_CALL
OStatement::release() noexcept
859 OStatement_Base::release();
862 css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
OStatement_Base::getPropertySetInfo( )
864 return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
867 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */