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>
39 using namespace ::comphelper
;
41 #define CHECK_RETURN(x) \
43 ADOS::ThrowException(*m_pConnection->getConnection(),*this);
46 using namespace connectivity::ado
;
49 using namespace com::sun::star::uno
;
50 using namespace com::sun::star::lang
;
51 using namespace com::sun::star::beans
;
52 using namespace com::sun::star::sdbc
;
53 using namespace ::std
;
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( nullptr );
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() throw()
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
= WpADORecordset( _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 OResultSet
* pSet
= new OResultSet(aSet
,this);
309 Reference
< XResultSet
> xRs
= pSet
;
312 m_xResultSet
= WeakReference
<XResultSet
>(xRs
);
318 Reference
< XConnection
> SAL_CALL
OStatement_Base::getConnection( )
320 ::osl::MutexGuard
aGuard( m_aMutex
);
321 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
324 return static_cast<Reference
< XConnection
>>(m_pConnection
);
328 Any SAL_CALL
OStatement::queryInterface( const Type
& rType
)
330 Any aRet
= ::cppu::queryInterface(rType
,static_cast< XBatchExecution
*> (this));
331 return aRet
.hasValue() ? aRet
: OStatement_Base::queryInterface(rType
);
335 void SAL_CALL
OStatement::addBatch( const OUString
& sql
)
337 ::osl::MutexGuard
aGuard( m_aMutex
);
338 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
341 m_aBatchVector
.push_back(sql
);
344 Sequence
< sal_Int32
> SAL_CALL
OStatement::executeBatch( )
346 ::osl::MutexGuard
aGuard( m_aMutex
);
347 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
352 OUString aBatchSql
= std::accumulate(m_aBatchVector
.begin(), m_aBatchVector
.end(), OUString(),
353 [](const OUString
& rRes
, const OUString
& rStr
) { return rRes
+ rStr
+ ";"; });
354 sal_Int32 nLen
= m_aBatchVector
.size();
357 if ( m_RecordSet
.IsValid() )
358 m_RecordSet
.PutRefDataSource( nullptr );
360 m_RecordSet
.Create();
362 CHECK_RETURN(m_Command
.put_CommandText(aBatchSql
))
363 if ( m_RecordSet
.IsValid() )
364 m_RecordSet
.PutRefDataSource(static_cast<IDispatch
*>(m_Command
));
366 CHECK_RETURN(m_RecordSet
.UpdateBatch(adAffectAll
))
368 ADORecordset
* pSet
=nullptr;
369 Sequence
< sal_Int32
> aRet(nLen
);
370 sal_Int32
* pArray
= aRet
.getArray();
371 for(sal_Int32 j
=0;j
<nLen
;++j
)
374 OLEVariant aRecordsAffected
;
375 if(m_RecordSet
.NextRecordset(aRecordsAffected
,&pSet
) && pSet
)
377 assignRecordSet( pSet
);
380 if(m_RecordSet
.get_RecordCount(nValue
))
388 sal_Int32 SAL_CALL
OStatement_Base::executeUpdate( const OUString
& sql
)
390 ::osl::MutexGuard
aGuard( m_aMutex
);
391 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
397 ADORecordset
* pSet
= nullptr;
398 CHECK_RETURN(m_Command
.put_CommandText(sql
))
399 CHECK_RETURN(m_Command
.Execute(m_RecordsAffected
,m_Parameters
,adCmdText
|adExecuteNoRecords
,&pSet
))
401 catch (SQLWarning
& ex
) {
403 // Save pointer to warning and save with ResultSet
404 // object once it is created.
408 if(!m_RecordsAffected
.isEmpty() && !m_RecordsAffected
.isNull() && m_RecordsAffected
.getType() != VT_ERROR
)
409 return m_RecordsAffected
.getInt32();
415 Reference
< XResultSet
> SAL_CALL
OStatement_Base::getResultSet( )
417 ::osl::MutexGuard
aGuard( m_aMutex
);
418 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
425 sal_Int32 SAL_CALL
OStatement_Base::getUpdateCount( )
427 ::osl::MutexGuard
aGuard( m_aMutex
);
428 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
432 if(m_RecordSet
.IsValid() && m_RecordSet
.get_RecordCount(nRet
))
438 sal_Bool SAL_CALL
OStatement_Base::getMoreResults( )
440 ::osl::MutexGuard
aGuard( m_aMutex
);
441 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
446 // clear previous warnings
450 // Call SQLMoreResults
454 ADORecordset
* pSet
=nullptr;
455 OLEVariant aRecordsAffected
;
456 if(m_RecordSet
.IsValid() && m_RecordSet
.NextRecordset(aRecordsAffected
,&pSet
) && pSet
)
457 assignRecordSet( pSet
);
459 catch (SQLWarning
&ex
)
462 // Save pointer to warning and save with ResultSet
463 // object once it is created.
467 return m_RecordSet
.IsValid();
471 Any SAL_CALL
OStatement_Base::getWarnings( )
473 ::osl::MutexGuard
aGuard( m_aMutex
);
474 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
477 return makeAny(m_aLastWarning
);
481 void SAL_CALL
OStatement_Base::clearWarnings( )
483 ::osl::MutexGuard
aGuard( m_aMutex
);
484 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
487 m_aLastWarning
= SQLWarning();
491 sal_Int32
OStatement_Base::getQueryTimeOut() const
493 return m_Command
.get_CommandTimeout();
496 sal_Int32
OStatement_Base::getMaxRows() const
499 if(!(m_RecordSet
.IsValid() && m_RecordSet
.get_MaxRecords(nRet
)))
500 ::dbtools::throwFunctionSequenceException(nullptr);
504 sal_Int32
OStatement_Base::getResultSetConcurrency() const
511 nValue
= ResultSetConcurrency::READ_ONLY
;
514 nValue
= ResultSetConcurrency::UPDATABLE
;
521 sal_Int32
OStatement_Base::getResultSetType() const
524 switch(m_eCursorType
)
526 case adOpenUnspecified
:
527 case adOpenForwardOnly
:
528 nValue
= ResultSetType::FORWARD_ONLY
;
532 nValue
= ResultSetType::SCROLL_INSENSITIVE
;
535 nValue
= ResultSetType::SCROLL_SENSITIVE
;
541 sal_Int32
OStatement_Base::getFetchDirection()
543 return FetchDirection::FORWARD
;
546 sal_Int32
OStatement_Base::getFetchSize() const
551 sal_Int32
OStatement_Base::getMaxFieldSize()
556 OUString
OStatement_Base::getCursorName() const
558 return m_Command
.GetName();
561 void OStatement_Base::setQueryTimeOut(sal_Int32 seconds
)
563 ::osl::MutexGuard
aGuard( m_aMutex
);
564 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
567 m_Command
.put_CommandTimeout(seconds
);
570 void OStatement_Base::setMaxRows(sal_Int32 _par0
)
572 ::osl::MutexGuard
aGuard( m_aMutex
);
573 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
578 void OStatement_Base::setResultSetConcurrency(sal_Int32 _par0
)
580 ::osl::MutexGuard
aGuard( m_aMutex
);
581 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
585 case ResultSetConcurrency::READ_ONLY
:
586 m_eLockType
= adLockReadOnly
;
589 m_eLockType
= adLockOptimistic
;
594 void OStatement_Base::setResultSetType(sal_Int32 _par0
)
596 ::osl::MutexGuard
aGuard( m_aMutex
);
597 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
602 case ResultSetType::FORWARD_ONLY
:
603 m_eCursorType
= adOpenForwardOnly
;
605 case ResultSetType::SCROLL_INSENSITIVE
:
606 m_eCursorType
= adOpenKeyset
;
608 case ResultSetType::SCROLL_SENSITIVE
:
609 m_eCursorType
= adOpenDynamic
;
614 void OStatement_Base::setFetchDirection(sal_Int32
/*_par0*/)
616 ::osl::MutexGuard
aGuard( m_aMutex
);
617 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
618 ::dbtools::throwFeatureNotImplementedSQLException( "Statement::FetchDirection", *this );
621 void OStatement_Base::setFetchSize(sal_Int32 _par0
)
623 ::osl::MutexGuard
aGuard( m_aMutex
);
624 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
627 m_nFetchSize
= _par0
;
630 void OStatement_Base::setMaxFieldSize(sal_Int32
/*_par0*/)
632 ::osl::MutexGuard
aGuard( m_aMutex
);
633 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
634 ::dbtools::throwFeatureNotImplementedSQLException( "Statement::MaxFieldSize", *this );
637 void OStatement_Base::setCursorName(const OUString
&_par0
)
639 ::osl::MutexGuard
aGuard( m_aMutex
);
640 checkDisposed(OStatement_BASE::rBHelper
.bDisposed
);
642 m_Command
.put_Name(_par0
);
646 ::cppu::IPropertyArrayHelper
* OStatement_Base::createArrayHelper( ) const
648 Sequence
< css::beans::Property
> aProps(10);
649 css::beans::Property
* pProperties
= aProps
.getArray();
651 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME
),
652 PROPERTY_ID_CURSORNAME
, cppu::UnoType
<OUString
>::get(), 0);
653 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING
),
654 PROPERTY_ID_ESCAPEPROCESSING
, cppu::UnoType
<bool>::get(), 0);
655 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION
),
656 PROPERTY_ID_FETCHDIRECTION
, cppu::UnoType
<sal_Int32
>::get(), 0);
657 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE
),
658 PROPERTY_ID_FETCHSIZE
, cppu::UnoType
<sal_Int32
>::get(), 0);
659 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE
),
660 PROPERTY_ID_MAXFIELDSIZE
, cppu::UnoType
<sal_Int32
>::get(), 0);
661 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS
),
662 PROPERTY_ID_MAXROWS
, cppu::UnoType
<sal_Int32
>::get(), 0);
663 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_QUERYTIMEOUT
),
664 PROPERTY_ID_QUERYTIMEOUT
, cppu::UnoType
<sal_Int32
>::get(), 0);
665 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY
),
666 PROPERTY_ID_RESULTSETCONCURRENCY
, cppu::UnoType
<sal_Int32
>::get(), 0);
667 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE
),
668 PROPERTY_ID_RESULTSETTYPE
, cppu::UnoType
<sal_Int32
>::get(), 0);
669 pProperties
[nPos
++] = css::beans::Property(::connectivity::OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_USEBOOKMARKS
),
670 PROPERTY_ID_USEBOOKMARKS
, cppu::UnoType
<bool>::get(), 0);
672 return new ::cppu::OPropertyArrayHelper(aProps
);
676 ::cppu::IPropertyArrayHelper
& OStatement_Base::getInfoHelper()
678 return *getArrayHelper();
681 sal_Bool
OStatement_Base::convertFastPropertyValue(
682 Any
& rConvertedValue
,
687 bool bModified
= false;
689 bool bValidAdoRS
= m_RecordSet
.IsValid();
690 // some of the properties below, when set, are remembered in a member, and applied in the next execute
691 // For these properties, the record set does not need to be valid to allow setting them.
692 // For all others (where the values are forwarded to the ADO RS directly), the recordset must be valid.
698 case PROPERTY_ID_MAXROWS
:
699 bModified
= ::comphelper::tryPropertyValue( rConvertedValue
, rOldValue
, rValue
, bValidAdoRS
? getMaxRows() : m_nMaxRows
);
702 case PROPERTY_ID_RESULTSETTYPE
:
703 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getResultSetType());
705 case PROPERTY_ID_FETCHSIZE
:
706 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getFetchSize());
708 case PROPERTY_ID_RESULTSETCONCURRENCY
:
709 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getResultSetConcurrency());
711 case PROPERTY_ID_QUERYTIMEOUT
:
712 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getQueryTimeOut());
714 case PROPERTY_ID_MAXFIELDSIZE
:
715 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getMaxFieldSize());
717 case PROPERTY_ID_CURSORNAME
:
718 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getCursorName());
720 case PROPERTY_ID_FETCHDIRECTION
:
721 bModified
= ::comphelper::tryPropertyValue(rConvertedValue
, rOldValue
, rValue
, getFetchDirection());
725 catch( const Exception
& )
727 bModified
= true; // will ensure that the property is set
728 OSL_FAIL( "OStatement_Base::convertFastPropertyValue: caught something strange!" );
733 void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle
,const Any
& rValue
)
737 case PROPERTY_ID_QUERYTIMEOUT
:
738 setQueryTimeOut(comphelper::getINT32(rValue
));
740 case PROPERTY_ID_MAXFIELDSIZE
:
741 setMaxFieldSize(comphelper::getINT32(rValue
));
743 case PROPERTY_ID_MAXROWS
:
744 setMaxRows(comphelper::getINT32(rValue
));
746 case PROPERTY_ID_CURSORNAME
:
747 setCursorName(comphelper::getString(rValue
));
749 case PROPERTY_ID_RESULTSETCONCURRENCY
:
750 setResultSetConcurrency(comphelper::getINT32(rValue
));
752 case PROPERTY_ID_RESULTSETTYPE
:
753 setResultSetType(comphelper::getINT32(rValue
));
755 case PROPERTY_ID_FETCHDIRECTION
:
756 setFetchDirection(comphelper::getINT32(rValue
));
758 case PROPERTY_ID_FETCHSIZE
:
759 setFetchSize(comphelper::getINT32(rValue
));
761 case PROPERTY_ID_ESCAPEPROCESSING
:
762 // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
763 case PROPERTY_ID_USEBOOKMARKS
:
764 // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
770 void OStatement_Base::getFastPropertyValue(Any
& rValue
,sal_Int32 nHandle
) const
774 case PROPERTY_ID_QUERYTIMEOUT
:
775 rValue
<<= getQueryTimeOut();
777 case PROPERTY_ID_MAXFIELDSIZE
:
778 rValue
<<= getMaxFieldSize();
780 case PROPERTY_ID_MAXROWS
:
781 rValue
<<= getMaxRows();
783 case PROPERTY_ID_CURSORNAME
:
784 rValue
<<= getCursorName();
786 case PROPERTY_ID_RESULTSETCONCURRENCY
:
787 rValue
<<= getResultSetConcurrency();
789 case PROPERTY_ID_RESULTSETTYPE
:
790 rValue
<<= getResultSetType();
792 case PROPERTY_ID_FETCHDIRECTION
:
793 rValue
<<= getFetchDirection();
795 case PROPERTY_ID_FETCHSIZE
:
796 rValue
<<= getFetchSize();
798 case PROPERTY_ID_ESCAPEPROCESSING
:
801 case PROPERTY_ID_USEBOOKMARKS
:
807 OStatement::~OStatement()
810 IMPLEMENT_SERVICE_INFO(OStatement
,"com.sun.star.sdbcx.AStatement","com.sun.star.sdbc.Statement");
812 void SAL_CALL
OStatement_Base::acquire() throw()
814 OStatement_BASE::acquire();
817 void SAL_CALL
OStatement::acquire() throw()
819 OStatement_Base::acquire();
822 void SAL_CALL
OStatement::release() throw()
824 OStatement_Base::release();
827 css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
OStatement_Base::getPropertySetInfo( )
829 return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
832 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */