LibreOffice Module connectivity (master) 1
AStatement.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <ado/AStatement.hxx>
21#include <ado/AConnection.hxx>
22#include <ado/AResultSet.hxx>
24#include <osl/thread.h>
28#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
29#include <com/sun/star/sdbc/ResultSetType.hpp>
30#include <com/sun/star/sdbc/FetchDirection.hpp>
32#include <comphelper/types.hxx>
33#include <rtl/ref.hxx>
34
35#undef max
36
37#include <algorithm>
38#include <numeric>
39
40using namespace ::comphelper;
41
42#define CHECK_RETURN(x) \
43 if(!x) \
44 ADOS::ThrowException(m_pConnection->getConnection(),*this);
45
46
47using namespace connectivity::ado;
48
49
50using namespace com::sun::star::uno;
51using namespace com::sun::star::lang;
52using namespace com::sun::star::beans;
53using namespace com::sun::star::sdbc;
54
57 ,m_pConnection(_pConnection)
58 ,m_nMaxRows(0)
59 ,m_nFetchSize(1)
60 ,m_eLockType(adLockReadOnly)
61 ,m_eCursorType(adOpenForwardOnly)
62{
63 osl_atomic_increment( &m_refCount );
64
66 if(m_Command.IsValid())
68 else
70
73
74 m_pConnection->acquire();
75
76 osl_atomic_decrement( &m_refCount );
77}
78
80{
81 // free the cursor if alive
82 Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
83 if (xComp.is())
84 xComp->dispose();
85 m_xResultSet.clear();
86}
87
88
90{
91 ::osl::MutexGuard aGuard(m_aMutex);
92
93
95
96 if ( m_Command.IsValid() )
99
100 if ( m_RecordSet.IsValid() )
101 m_RecordSet.PutRefDataSource( nullptr );
103
104 if (m_pConnection)
105 m_pConnection->release();
106
107 OStatement_BASE::disposing();
108}
109
110void SAL_CALL OStatement_Base::release() noexcept
111{
112 OStatement_BASE::release();
113}
114
115Any SAL_CALL OStatement_Base::queryInterface( const Type & rType )
116{
117 Any aRet = OStatement_BASE::queryInterface(rType);
118 return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType);
119}
120
121css::uno::Sequence< css::uno::Type > SAL_CALL OStatement_Base::getTypes( )
122{
126
127 return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes());
128}
129
130
132{
133 ::osl::MutexGuard aGuard( m_aMutex );
134 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
135
136
138}
139
140
142{
143 {
144 ::osl::MutexGuard aGuard( m_aMutex );
145 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
146
147 }
148 dispose();
149}
150
151
153{
154
155}
156
157
159{
160 ::osl::MutexGuard aGuard( m_aMutex );
161 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
162
163
164 clearWarnings ();
165
166 if (m_xResultSet.get().is())
168}
169
170// clearMyResultSet
171// If a ResultSet was created for this Statement, close it
172
173
175{
176 ::osl::MutexGuard aGuard( m_aMutex );
177 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
178
179 try
182 m_xResultSet.get(), css::uno::UNO_QUERY);
183 if ( xCloseable.is() )
184 xCloseable->close();
185 }
186 catch( const DisposedException& ) { }
187
188 m_xResultSet.clear();
189}
190
192{
193 ::osl::MutexGuard aGuard( m_aMutex );
194 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
195
196
198}
199
200// getPrecision
201// Given a SQL type, return the maximum precision for the column.
202// Returns -1 if not known
203
204
205sal_Int32 OStatement_Base::getPrecision ( sal_Int32 sqlType)
206{
207 ::osl::MutexGuard aGuard( m_aMutex );
208 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
209
210
211 sal_Int32 prec = -1;
212 OTypeInfo aInfo;
213 aInfo.nType = static_cast<sal_Int16>(sqlType);
214 if (!m_aTypeInfo.empty())
215 {
216 std::vector<OTypeInfo>::const_iterator aIter = std::find(m_aTypeInfo.begin(),m_aTypeInfo.end(),aInfo);
217 for(;aIter != m_aTypeInfo.end();++aIter)
218 {
219 prec = std::max(prec,(*aIter).nPrecision);
220 }
221 }
222
223 return prec;
224}
225
226// setWarning
227// Sets the warning
228
229
230void OStatement_Base::setWarning (const SQLWarning &ex)
231{
232 ::osl::MutexGuard aGuard( m_aMutex );
233 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
234
235
237}
238
239void OStatement_Base::assignRecordSet( ADORecordset* _pRS )
240{
241 WpADORecordset aOldRS( m_RecordSet );
242 m_RecordSet.set( _pRS );
243
244 if ( aOldRS.IsValid() )
245 aOldRS.PutRefDataSource( nullptr );
246
247 if ( m_RecordSet.IsValid() )
248 m_RecordSet.PutRefDataSource( static_cast<IDispatch*>(m_Command) );
249}
250
251sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql )
252{
253 ::osl::MutexGuard aGuard( m_aMutex );
254 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
255
256
257 // Reset the statement handle and warning
258
259 reset();
260
261 try
262 {
263 ADORecordset* pSet = nullptr;
266
267 assignRecordSet( pSet );
268 }
269 catch (SQLWarning& ex)
270 {
271
272 // Save pointer to warning and save with ResultSet
273 // object once it is created.
274
276 }
277
278 return m_RecordSet.IsValid();
279}
280
282{
283 ::osl::MutexGuard aGuard( m_aMutex );
284 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
285
286
287 reset();
288
290
291 WpADORecordset aSet;
292 aSet.Create();
294 OLEVariant aCmd;
296 OLEVariant aCon;
297 aCon.setNoArg();
300 CHECK_RETURN(aSet.Open(aCmd,aCon,m_eCursorType,m_eLockType,adOpenUnspecified))
301
302
307
308 rtl::Reference<OResultSet> pSet = new OResultSet(aSet,this);
309 pSet->construct();
310
312
313 return pSet;
314}
315
316
318{
319 ::osl::MutexGuard aGuard( m_aMutex );
320 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
321
322
323 return static_cast<Reference< XConnection >>(m_pConnection);
324}
325
326
327Any SAL_CALL OStatement::queryInterface( const Type & rType )
328{
329 Any aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this));
330 return aRet.hasValue() ? aRet : OStatement_Base::queryInterface(rType);
331}
332
333
334void SAL_CALL OStatement::addBatch( const OUString& sql )
335{
336 ::osl::MutexGuard aGuard( m_aMutex );
337 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
338
339
340 m_aBatchVector.push_back(sql);
341}
342
344{
345 ::osl::MutexGuard aGuard( m_aMutex );
346 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
347
348
349 reset();
350
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();
354
355
356 if ( m_RecordSet.IsValid() )
357 m_RecordSet.PutRefDataSource( nullptr );
360
362 if ( m_RecordSet.IsValid() )
363 m_RecordSet.PutRefDataSource(static_cast<IDispatch*>(m_Command));
364
366
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)
371 {
372 pSet = nullptr;
373 OLEVariant aRecordsAffected;
374 if(m_RecordSet.NextRecordset(aRecordsAffected,&pSet) && pSet)
375 {
376 assignRecordSet( pSet );
377
378 ADO_LONGPTR nValue;
380 pArray[j] = nValue;
381 }
382 }
383 return aRet;
384}
385
386
387sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const OUString& sql )
388{
389 ::osl::MutexGuard aGuard( m_aMutex );
390 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
391
392
393 reset();
394
395 try {
396 ADORecordset* pSet = nullptr;
398 CHECK_RETURN(m_Command.Execute(m_RecordsAffected,m_Parameters,long(adCmdText)|long(adExecuteNoRecords),&pSet))
399 }
400 catch (SQLWarning& ex) {
401
402 // Save pointer to warning and save with ResultSet
403 // object once it is created.
404
406 }
409
410 return 0;
411}
412
413
415{
416 ::osl::MutexGuard aGuard( m_aMutex );
417 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
418
419
420 return m_xResultSet;
421}
422
423
425{
426 ::osl::MutexGuard aGuard( m_aMutex );
427 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
428
429
430 ADO_LONGPTR nRet;
432 return nRet;
433 return -1;
434}
435
436
438{
439 ::osl::MutexGuard aGuard( m_aMutex );
440 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
441
442
443 // clear previous warnings
444
445 clearWarnings ();
446
447 // Call SQLMoreResults
448
449 try
450 {
451 ADORecordset* pSet=nullptr;
452 OLEVariant aRecordsAffected;
453 if(m_RecordSet.IsValid() && m_RecordSet.NextRecordset(aRecordsAffected,&pSet) && pSet)
454 assignRecordSet( pSet );
455 }
456 catch (SQLWarning &)
457 {
458
459 //TODO: Save pointer to warning and save with ResultSet
460 // object once it is created.
461 }
462 return m_RecordSet.IsValid();
463}
464
465
467{
468 ::osl::MutexGuard aGuard( m_aMutex );
469 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
470
471
472 return Any(m_aLastWarning);
473}
474
475
477{
478 ::osl::MutexGuard aGuard( m_aMutex );
479 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
480
481
482 m_aLastWarning = SQLWarning();
483}
484
485
487{
489}
490
492{
493 ADO_LONGPTR nRet=-1;
496 return nRet;
497}
498
500{
501 sal_Int32 nValue;
502
503 switch(m_eLockType)
504 {
505 case adLockReadOnly:
506 nValue = ResultSetConcurrency::READ_ONLY;
507 break;
508 default:
509 nValue = ResultSetConcurrency::UPDATABLE;
510 break;
511 }
512
513 return nValue;
514}
515
517{
518 sal_Int32 nValue=0;
519 switch(m_eCursorType)
520 {
521 case adOpenUnspecified:
522 case adOpenForwardOnly:
523 nValue = ResultSetType::FORWARD_ONLY;
524 break;
525 case adOpenStatic:
526 case adOpenKeyset:
527 nValue = ResultSetType::SCROLL_INSENSITIVE;
528 break;
529 case adOpenDynamic:
530 nValue = ResultSetType::SCROLL_SENSITIVE;
531 break;
532 }
533 return nValue;
534}
535
537{
538 return FetchDirection::FORWARD;
539}
540
542{
543 return m_nFetchSize;
544}
545
547{
548 return 0;
549}
550
552{
553 return m_Command.GetName();
554}
555
556void OStatement_Base::setQueryTimeOut(sal_Int32 seconds)
557{
558 ::osl::MutexGuard aGuard( m_aMutex );
559 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
560
561
563}
564
565void OStatement_Base::setMaxRows(sal_Int32 _par0)
566{
567 ::osl::MutexGuard aGuard( m_aMutex );
568 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
569
570 m_nMaxRows = _par0;
571}
572
574{
575 ::osl::MutexGuard aGuard( m_aMutex );
576 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
577
578 switch(_par0)
579 {
580 case ResultSetConcurrency::READ_ONLY:
581 m_eLockType = adLockReadOnly;
582 break;
583 default:
584 m_eLockType = adLockOptimistic;
585 break;
586 }
587}
588
590{
591 ::osl::MutexGuard aGuard( m_aMutex );
592 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
593
594
595 switch(_par0)
596 {
597 case ResultSetType::FORWARD_ONLY:
598 m_eCursorType = adOpenForwardOnly;
599 break;
600 case ResultSetType::SCROLL_INSENSITIVE:
601 m_eCursorType = adOpenKeyset;
602 break;
603 case ResultSetType::SCROLL_SENSITIVE:
604 m_eCursorType = adOpenDynamic;
605 break;
606 }
607}
608
609void OStatement_Base::setFetchDirection(sal_Int32 /*_par0*/)
610{
611 ::osl::MutexGuard aGuard( m_aMutex );
612 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
613 ::dbtools::throwFeatureNotImplementedSQLException( "Statement::FetchDirection", *this );
614}
615
616void OStatement_Base::setFetchSize(sal_Int32 _par0)
617{
618 ::osl::MutexGuard aGuard( m_aMutex );
619 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
620
621
622 m_nFetchSize = _par0;
623}
624
625void OStatement_Base::setMaxFieldSize(sal_Int32 /*_par0*/)
626{
627 ::osl::MutexGuard aGuard( m_aMutex );
628 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
629 ::dbtools::throwFeatureNotImplementedSQLException( "Statement::MaxFieldSize", *this );
630}
631
632void OStatement_Base::setCursorName(std::u16string_view _par0)
633{
634 ::osl::MutexGuard aGuard( m_aMutex );
635 checkDisposed(OStatement_BASE::rBHelper.bDisposed);
636
637 m_Command.put_Name(_par0);
638}
639
640
642{
643 return new ::cppu::OPropertyArrayHelper
644 {
645 {
646 {
650 0
651 },
652 {
656 0
657 },
658 {
662 0
663 },
664 {
668 0
669 },
670 {
674 0
675 },
676 {
680 0
681 },
682 {
686 0
687 },
688 {
692 0
693 },
694 {
698 0
699 },
700 {
704 0
705 }
706 }
707 };
708}
709
710
712{
713 return *getArrayHelper();
714}
715
717 Any & rConvertedValue,
718 Any & rOldValue,
719 sal_Int32 nHandle,
720 const Any& rValue )
721{
722 bool bModified = false;
723
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.
728
729 try
730 {
731 switch(nHandle)
732 {
734 bModified = ::comphelper::tryPropertyValue( rConvertedValue, rOldValue, rValue, bValidAdoRS ? getMaxRows() : m_nMaxRows );
735 break;
736
738 bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getResultSetType());
739 break;
741 bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getFetchSize());
742 break;
744 bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getResultSetConcurrency());
745 break;
747 bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getQueryTimeOut());
748 break;
750 bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getMaxFieldSize());
751 break;
753 bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getCursorName());
754 break;
756 bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getFetchDirection());
757 break;
758 }
759 }
760 catch( const Exception& )
761 {
762 bModified = true; // will ensure that the property is set
763 OSL_FAIL( "OStatement_Base::convertFastPropertyValue: caught something strange!" );
764 }
765 return bModified;
766}
767
768void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
769{
770 switch(nHandle)
771 {
774 break;
777 break;
780 break;
783 break;
786 break;
789 break;
792 break;
795 break;
797 // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
799 // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
800 default:
801 ;
802 }
803}
804
805void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
806{
807 switch(nHandle)
808 {
810 rValue <<= getQueryTimeOut();
811 break;
813 rValue <<= getMaxFieldSize();
814 break;
816 rValue <<= getMaxRows();
817 break;
819 rValue <<= getCursorName();
820 break;
822 rValue <<= getResultSetConcurrency();
823 break;
825 rValue <<= getResultSetType();
826 break;
828 rValue <<= getFetchDirection();
829 break;
831 rValue <<= getFetchSize();
832 break;
834 rValue <<= true;
835 break;
837 default:
838 ;
839 }
840}
841
843{
844}
845IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.AStatement","com.sun.star.sdbc.Statement");
846
847void SAL_CALL OStatement_Base::acquire() noexcept
848{
849 OStatement_BASE::acquire();
850}
851
852void SAL_CALL OStatement::acquire() noexcept
853{
855}
856
857void SAL_CALL OStatement::release() noexcept
858{
860}
861
862css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OStatement_Base::getPropertySetInfo( )
863{
864 return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
865}
866
867/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define CHECK_RETURN(x)
Definition: AStatement.cxx:42
IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.AStatement","com.sun.star.sdbc.Statement")
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
::dbtools::OPropertyMap & getPropMap()
Definition: TConnection.cxx:68
static void ThrowException(ADOConnection *_pAdoCon, const css::uno::Reference< css::uno::XInterface > &_xInterface)
Definition: ADriver.cxx:207
WpADOConnection & getConnection()
void setIDispatch(IDispatch *pDispInterface)
virtual void SAL_CALL cancel() override
Definition: AStatement.cxx:131
std::vector< connectivity::OTypeInfo > m_aTypeInfo
Definition: AStatement.hxx:70
sal_Int32 getResultSetConcurrency() const
Definition: AStatement.cxx:499
void setQueryTimeOut(sal_Int32 _par0)
Definition: AStatement.cxx:556
sal_Int32 getPrecision(sal_Int32 sqlType)
Definition: AStatement.cxx:205
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual void SAL_CALL acquire() noexcept override
Definition: AStatement.cxx:847
css::uno::WeakReference< css::sdbc::XResultSet > m_xResultSet
Definition: AStatement.hxx:62
void setCursorName(std::u16string_view _par0)
Definition: AStatement.cxx:632
void setResultSetType(sal_Int32 _par0)
Definition: AStatement.cxx:589
void assignRecordSet(ADORecordset *_pRS)
Definition: AStatement.cxx:239
void setMaxFieldSize(sal_Int32 _par0)
Definition: AStatement.cxx:625
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection() override
Definition: AStatement.cxx:317
virtual sal_Bool SAL_CALL execute(const OUString &sql) override
Definition: AStatement.cxx:251
static sal_Int32 getFetchDirection()
Definition: AStatement.cxx:536
virtual sal_Int32 SAL_CALL executeUpdate(const OUString &sql) override
Definition: AStatement.cxx:387
virtual sal_Int32 SAL_CALL getUpdateCount() override
Definition: AStatement.cxx:424
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
void setResultSetConcurrency(sal_Int32 _par0)
Definition: AStatement.cxx:573
void setMaxRows(sal_Int32 _par0)
Definition: AStatement.cxx:565
void setWarning(const css::sdbc::SQLWarning &ex)
virtual void SAL_CALL close() override
Definition: AStatement.cxx:141
css::sdbc::SQLWarning m_aLastWarning
Definition: AStatement.hxx:57
virtual void SAL_CALL clearWarnings() override
Definition: AStatement.cxx:476
virtual css::uno::Any SAL_CALL getWarnings() override
Definition: AStatement.cxx:466
void setFetchDirection(sal_Int32 _par0)
Definition: AStatement.cxx:609
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: AStatement.cxx:121
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
Definition: AStatement.cxx:711
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getResultSet() override
Definition: AStatement.cxx:414
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual sal_Bool SAL_CALL getMoreResults() override
Definition: AStatement.cxx:437
virtual void SAL_CALL disposing() override
Definition: AStatement.cxx:89
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: AStatement.cxx:862
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
Definition: AStatement.cxx:641
static sal_Int32 getMaxFieldSize()
Definition: AStatement.cxx:546
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL executeQuery(const OUString &sql) override
Definition: AStatement.cxx:281
void setFetchSize(sal_Int32 _par0)
Definition: AStatement.cxx:616
virtual void SAL_CALL release() noexcept override
Definition: AStatement.cxx:110
std::vector< OUString > m_aBatchVector
Definition: AStatement.hxx:60
virtual void SAL_CALL addBatch(const OUString &sql) override
Definition: AStatement.cxx:334
virtual void SAL_CALL release() noexcept override
Definition: AStatement.cxx:857
virtual void SAL_CALL acquire() noexcept override
Definition: AStatement.cxx:852
virtual void SAL_CALL clearBatch() override
Definition: AStatement.cxx:152
virtual css::uno::Sequence< sal_Int32 > SAL_CALL executeBatch() override
Definition: AStatement.cxx:343
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
sal_Int32 get_CommandTimeout() const
Definition: Awrapado.cxx:301
void put_CommandTimeout(sal_Int32 nRet)
Definition: Awrapado.cxx:309
bool Execute(OLEVariant &RecordsAffected, OLEVariant &Parameters, long Options, ADORecordset **ppiRset)
Definition: Awrapado.cxx:329
bool put_CommandText(std::u16string_view aCon)
Definition: Awrapado.cxx:292
bool put_Name(std::u16string_view Name)
Definition: Awrapado.cxx:376
bool putref_ActiveConnection(const WpADOConnection &rCon)
Definition: Awrapado.cxx:246
bool get_CacheSize(sal_Int32 &_nRet) const
Definition: Awrapado.cxx:876
bool put_MaxRecords(ADO_LONGPTR _nRet)
Definition: Awrapado.cxx:846
bool put_CacheSize(sal_Int32 _nRet)
Definition: Awrapado.cxx:882
bool UpdateBatch(AffectEnum AffectRecords)
Definition: Awrapado.cxx:888
bool Open(VARIANT Source, VARIANT ActiveConnection, CursorTypeEnum CursorType, LockTypeEnum LockType, sal_Int32 Options)
Definition: Awrapado.cxx:668
void PutRefDataSource(IUnknown *pIUnknown)
Definition: Awrapado.cxx:730
bool get_CursorType(CursorTypeEnum &_nRet) const
Definition: Awrapado.cxx:852
bool get_LockType(LockTypeEnum &_nRet) const
Definition: Awrapado.cxx:864
bool NextRecordset(OLEVariant &RecordsAffected, ADORecordset **ppiRset)
Definition: Awrapado.cxx:828
bool get_MaxRecords(ADO_LONGPTR &_nRet) const
Definition: Awrapado.cxx:840
bool get_RecordCount(ADO_LONGPTR &_nRet) const
Definition: Awrapado.cxx:834
mutable::osl::Mutex m_aMutex
css::uno::Type const & get()
const OUString & getNameByIndex(sal_Int32 _nIndex) const
Definition: propertyids.cxx:95
ULONG m_refCount
sal_Int16 nValue
std::mutex m_aMutex
sal_Int32 getINT32(const Any &_rAny)
OUString getString(const Any &_rAny)
Type
::cppu::WeakComponentImplHelper< css::sdbc::XStatement, css::sdbc::XWarningsSupplier, css::util::XCancellable, css::sdbc::XCloseable, css::sdbc::XMultipleResults > OStatement_BASE
Definition: AStatement.hxx:44
::cppu::ImplHelper1< css::sdbc::XStatement > OStatement_Base
Definition: Statement.hxx:31
void checkDisposed(bool _bThrow)
Definition: dbtools.cxx:1951
void throwFunctionSequenceException(const Reference< XInterface > &Context, const Any &Next)
void throwFeatureNotImplementedSQLException(const OUString &_rFeatureName, const Reference< XInterface > &_rxContext, const Any &_rNextException)
void dispose()
#define PROPERTY_ID_RESULTSETTYPE
Definition: propertyids.hxx:44
#define PROPERTY_ID_QUERYTIMEOUT
Definition: propertyids.hxx:39
#define PROPERTY_ID_USEBOOKMARKS
Definition: propertyids.hxx:48
#define PROPERTY_ID_CURSORNAME
Definition: propertyids.hxx:42
#define PROPERTY_ID_RESULTSETCONCURRENCY
Definition: propertyids.hxx:43
#define PROPERTY_ID_MAXFIELDSIZE
Definition: propertyids.hxx:40
#define PROPERTY_ID_FETCHSIZE
Definition: propertyids.hxx:46
#define PROPERTY_ID_MAXROWS
Definition: propertyids.hxx:41
#define PROPERTY_ID_ESCAPEPROCESSING
Definition: propertyids.hxx:47
#define PROPERTY_ID_FETCHDIRECTION
Definition: propertyids.hxx:45
#define VT_ERROR
unsigned char sal_Bool
const SvXMLTokenMapEntry aTypes[]