LibreOffice Module connectivity (master) 1
AResultSet.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/AResultSet.hxx>
22#include <com/sun/star/sdbc/DataType.hpp>
23#include <com/sun/star/sdbc/KeyRule.hpp>
24#include <com/sun/star/sdbc/IndexType.hpp>
25#include <com/sun/star/sdbcx/CompareBookmark.hpp>
27#include <com/sun/star/lang/DisposedException.hpp>
28#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
29#include <com/sun/star/sdbc/ResultSetType.hpp>
30#include <com/sun/star/sdbc/FetchDirection.hpp>
34#include <com/sun/star/beans/PropertyAttribute.hpp>
38#include <comphelper/types.hxx>
39
40using namespace ::comphelper;
41
42
43#include <oledb.h>
44
45#define CHECK_RETURN(x) \
46 if(!SUCCEEDED(x)) \
47 ADOS::ThrowException(m_pStmt->m_pConnection->getConnection(),*this);
48
49using namespace connectivity::ado;
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
55
56// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.AResultSet","com.sun.star.sdbc.ResultSet");
57OUString SAL_CALL OResultSet::getImplementationName( )
58{
59 return "com.sun.star.sdbcx.ado.ResultSet";
60}
61
62css::uno::Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( )
63{
64 return {"com.sun.star.sdbc.ResultSet","com.sun.star.sdbcx.ResultSet"};
65}
66
67sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName )
68{
69 return cppu::supportsService(this, _rServiceName);
70}
71
74 ,m_pRecordSet(_pRecordSet)
75 ,m_pStmt(pStmt)
76 ,m_xStatement(*pStmt)
77 ,m_nRowPos(0)
78 ,m_bEOF(false)
79 ,m_bOnFirstAfterOpen(false)
80{
81}
82
83OResultSet::OResultSet(ADORecordset* _pRecordSet) : OResultSet_BASE(m_aMutex)
85 ,m_pRecordSet(_pRecordSet)
86 ,m_pStmt(nullptr)
87 ,m_nRowPos(0)
88 ,m_bEOF(false)
89 ,m_bOnFirstAfterOpen(false)
90{
91}
92
94{
95 osl_atomic_increment( &m_refCount );
96 if (!m_pRecordSet)
97 {
98 OSL_FAIL( "OResultSet::construct: no RecordSet!" );
99 Reference< XInterface > xInt( *this );
100 osl_atomic_decrement( &m_refCount );
102 }
103 m_pRecordSet->AddRef();
104 VARIANT_BOOL bIsAtBOF;
105 CHECK_RETURN(m_pRecordSet->get_BOF(&bIsAtBOF))
106 m_bOnFirstAfterOpen = bIsAtBOF != VARIANT_TRUE;
107 osl_atomic_decrement( &m_refCount );
108}
109
111{
112 if(m_pRecordSet)
113 m_pRecordSet->Release();
114}
115
117{
119
120 ::osl::MutexGuard aGuard(m_aMutex);
121 if(m_pRecordSet)
122 m_pRecordSet->Close();
123 m_xStatement.clear();
124 m_xMetaData.clear();
125}
126
127Any SAL_CALL OResultSet::queryInterface( const Type & rType )
128{
130 return aRet.hasValue() ? aRet : OResultSet_BASE::queryInterface(rType);
131}
132
133css::uno::Sequence< css::uno::Type > SAL_CALL OResultSet::getTypes( )
134{
138
139 return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes());
140}
141
142
143sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName )
144{
145 ::osl::MutexGuard aGuard( m_aMutex );
146 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
147
148
150 sal_Int32 nLen = xMeta->getColumnCount();
151 sal_Int32 i = 1;
152 for(;i<=nLen;++i)
153 {
154 if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) :
155 columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i)))
156 return i;
157 }
158
160 assert(false);
161 return 0; // Never reached
162}
163#define BLOCK_SIZE 256
164
166{
167 ::osl::MutexGuard aGuard( m_aMutex );
168 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
169
170 WpADOField aField = ADOS::getField(m_pRecordSet,columnIndex);
171
172 if((aField.GetAttributes() & adFldLong) == adFldLong)
173 {
174 //Copy the data only up to the Actual Size of Field.
175 sal_Int32 nSize = aField.GetActualSize();
177 sal_Int32 index = 0;
178 while(index < nSize)
179 {
180 m_aValue = aField.GetChunk(BLOCK_SIZE);
181 if(m_aValue.isNull())
182 break;
183 UCHAR chData;
184 for(LONG index2 = 0;index2 < BLOCK_SIZE;++index2)
185 {
186 HRESULT hr = ::SafeArrayGetElement(m_aValue.parray,&index2,&chData);
187 if(SUCCEEDED(hr))
188 {
189 //Take BYTE by BYTE and advance Memory Location
190 aData.getArray()[index++] = chData;
191 }
192 else
193 break;
194 }
195 }
196
197 return new ::comphelper::SequenceInputStream(aData);
198 }
199 // else we ask for a bytesequence
200 aField.get_Value(m_aValue);
201
202 return m_aValue.isNull() ? nullptr : new ::comphelper::SequenceInputStream(m_aValue.getByteSequence());
203}
204
206{
207 ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getCharacterStream", *this );
208 return nullptr;
209}
210
211OLEVariant OResultSet::getValue(sal_Int32 columnIndex )
212{
213 ::osl::MutexGuard aGuard( m_aMutex );
214 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
215
216 WpADOField aField = ADOS::getField(m_pRecordSet,columnIndex);
217 aField.get_Value(m_aValue);
218 return m_aValue;
219}
220
221sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex )
222{
223 return getValue(columnIndex).getBool();
224}
225
226
227sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex )
228{
229 return getValue(columnIndex).getInt8();
230}
231
232
233Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex )
234{
235 return getValue(columnIndex).getByteSequence();
236}
237
238
239css::util::Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex )
240{
241 return getValue(columnIndex).getDate();
242}
243
244
245double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex )
246{
247 return getValue(columnIndex).getDouble();
248}
249
250
251float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex )
252{
253 return getValue(columnIndex).getFloat();
254}
255
256
257sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex )
258{
259 return getValue(columnIndex).getInt32();
260}
261
262
263sal_Int32 SAL_CALL OResultSet::getRow( )
264{
265 ::osl::MutexGuard aGuard( m_aMutex );
266 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
267
268
269 PositionEnum_Param aPos;
270 m_pRecordSet->get_AbsolutePosition(&aPos);
271 return (aPos > 0) ? static_cast<sal_Int32>(aPos) : m_nRowPos;
272 // return the rowcount from driver if the driver doesn't support this return our count
273}
274
275
276sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 /*columnIndex*/ )
277{
279 return sal_Int64(0);
280}
281
282
284{
285 ::osl::MutexGuard aGuard( m_aMutex );
286 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
287
288
289 if(!m_xMetaData.is())
291 return m_xMetaData;
292}
293
294Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ )
295{
296 ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getArray", *this );
297 return nullptr;
298}
299
300
301Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ )
302{
304 return nullptr;
305}
306
307Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ )
308{
310 return nullptr;
311}
312
313
314Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ )
315{
317 return nullptr;
318}
319
320
321Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< css::container::XNameAccess >& /*typeMap*/ )
322{
323 return getValue(columnIndex).makeAny();
324}
325
326
327sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex )
328{
329 return getValue(columnIndex).getInt16();
330}
331
332
333OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex )
334{
335 return getValue(columnIndex).getString();
336}
337
338
339css::util::Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex )
340{
341 return getValue(columnIndex).getTime();
342}
343
344
345css::util::DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex )
346{
347 return getValue(columnIndex).getDateTime();
348}
349
350
352{
353 ::osl::MutexGuard aGuard( m_aMutex );
354 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
355
356
357 VARIANT_BOOL bIsAtEOF;
358 CHECK_RETURN(m_pRecordSet->get_EOF(&bIsAtEOF))
359 return bIsAtEOF == VARIANT_TRUE;
360}
361
363{
364 ::osl::MutexGuard aGuard( m_aMutex );
365 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
366
367
368 return m_nRowPos == 1;
369}
370
372{
373 ::osl::MutexGuard aGuard( m_aMutex );
374 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
375
376
377 return true;
378}
379
381{
382 ::osl::MutexGuard aGuard( m_aMutex );
383 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
384
385
386 if(first())
388}
389
390void SAL_CALL OResultSet::afterLast( )
391{
392 ::osl::MutexGuard aGuard( m_aMutex );
393 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
394
395
396 if(last())
397 next();
398 m_bEOF = true;
399}
400
401
402void SAL_CALL OResultSet::close( )
403{
404 {
405 ::osl::MutexGuard aGuard( m_aMutex );
406 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
407
408 }
409 dispose();
410}
411
412
414{
415 ::osl::MutexGuard aGuard( m_aMutex );
416 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
417
418
419 if(SUCCEEDED(m_pRecordSet->MoveFirst()))
420 {
421 m_nRowPos = 1;
422 m_bOnFirstAfterOpen = false;
423 return true;
424 }
425 return false;
426}
427
428
430{
431 ::osl::MutexGuard aGuard( m_aMutex );
432 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
433
434
435 bool bRet = SUCCEEDED(m_pRecordSet->MoveLast());
436 if(bRet)
437 {
438 m_pRecordSet->get_RecordCount(&m_nRowPos);
439 m_bOnFirstAfterOpen = false;
440 }
441 return bRet;
442}
443
444sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row )
445{
446 ::osl::MutexGuard aGuard( m_aMutex );
447 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
448
449
450 if(!row) // absolute with zero not allowed
452
453 bool bCheck = true;
454 if(row < 0)
455 {
456 bCheck = SUCCEEDED(m_pRecordSet->MoveLast());
457 if ( bCheck )
458 {
459 while(++row < 0 && bCheck)
460 bCheck = SUCCEEDED(m_pRecordSet->MovePrevious());
461 }
462 }
463 else
464 {
465 first();
466 OLEVariant aEmpty;
467 aEmpty.setNoArg();
468 bCheck = SUCCEEDED(m_pRecordSet->Move(row-1,aEmpty)); // move to row -1 because we stand already on the first
469 if(bCheck)
470 m_nRowPos = row;
471 }
472 if(bCheck)
473 m_bOnFirstAfterOpen = false;
474 return bCheck;
475}
476
477sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row )
478{
479 ::osl::MutexGuard aGuard( m_aMutex );
480 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
481
482
483 OLEVariant aEmpty;
484 aEmpty.setNoArg();
485 sal_Int32 nNewPos = row;
486 if ( m_bOnFirstAfterOpen && nNewPos > 0 )
487 --nNewPos;
488 bool bRet = SUCCEEDED(m_pRecordSet->Move(row,aEmpty));
489 if(bRet)
490 {
491 m_nRowPos += row;
492 m_bOnFirstAfterOpen = false;
493 }
494 return bRet;
495}
496
498{
499 ::osl::MutexGuard aGuard( m_aMutex );
500 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
501
502 bool bRet = SUCCEEDED(m_pRecordSet->MovePrevious());
503 if(bRet)
504 {
505 --m_nRowPos;
506 m_bOnFirstAfterOpen = false;
507 }
508 return bRet;
509}
510
512{
513 ::osl::MutexGuard aGuard( m_aMutex );
514 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
515 return m_xStatement;
516}
517
518
520{
521 ::osl::MutexGuard aGuard( m_aMutex );
522 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
523
524
525 sal_Int32 eRec;
526 m_pRecordSet->get_Status(&eRec);
527 bool bRet = (RecordStatusEnum(eRec) & adRecDeleted) == adRecDeleted;
528 if(bRet)
529 --m_nRowPos;
530 return bRet;
531}
532
534{ ::osl::MutexGuard aGuard( m_aMutex );
535 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
536
537
538 sal_Int32 eRec;
539 m_pRecordSet->get_Status(&eRec);
540 bool bRet = (RecordStatusEnum(eRec) & adRecNew) == adRecNew;
541 if(bRet)
542 ++m_nRowPos;
543 return bRet;
544}
545
547{
548 ::osl::MutexGuard aGuard( m_aMutex );
549 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
550
551
552 sal_Int32 eRec;
553 m_pRecordSet->get_Status(&eRec);
554 return (RecordStatusEnum(eRec) & adRecModified) == adRecModified;
555}
556
557
559{
560 ::osl::MutexGuard aGuard( m_aMutex );
561 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
562
563
564 OSL_ENSURE(!m_nRowPos,"OResultSet::isBeforeFirst: Error in setting m_nRowPos!");
565 VARIANT_BOOL bIsAtBOF = VARIANT_TRUE;
567 {
568 OSL_ENSURE(!m_nRowPos,"OResultSet::isBeforeFirst: Error in setting m_nRowPos!");
569 m_pRecordSet->get_BOF(&bIsAtBOF);
570 }
571 return bIsAtBOF == VARIANT_TRUE;
572}
573
574
576{
577 ::osl::MutexGuard aGuard( m_aMutex );
578 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
579
580
581 bool bRet = true;
583 {
584 m_bOnFirstAfterOpen = false;
585 ++m_nRowPos;
586 }
587 else
588 {
589 bRet = SUCCEEDED(m_pRecordSet->MoveNext());
590
591 if(bRet)
592 {
593 VARIANT_BOOL bIsAtEOF;
594 CHECK_RETURN(m_pRecordSet->get_EOF(&bIsAtEOF))
595 bRet = bIsAtEOF != VARIANT_TRUE;
596 ++m_nRowPos;
597 }
598 else
600 }
601
602 return bRet;
603}
604
605
607{
608 ::osl::MutexGuard aGuard( m_aMutex );
609 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
610
611
612 return m_aValue.isNull();
613}
614
615
616void SAL_CALL OResultSet::cancel( )
617{
618 ::osl::MutexGuard aGuard( m_aMutex );
619 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
620
621
622 m_pRecordSet->Cancel();
623}
624
626{
627}
628
630{
631 return Any();
632}
633
634void SAL_CALL OResultSet::insertRow( )
635{
636 ::osl::MutexGuard aGuard( m_aMutex );
637 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
638
639
640 OLEVariant aEmpty;
641 aEmpty.setNoArg();
642 m_pRecordSet->AddNew(aEmpty,aEmpty);
643}
644
645void SAL_CALL OResultSet::updateRow( )
646{
647 ::osl::MutexGuard aGuard( m_aMutex );
648 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
649
650
651 OLEVariant aEmpty;
652 aEmpty.setNoArg();
653 m_pRecordSet->Update(aEmpty,aEmpty);
654}
655
656void SAL_CALL OResultSet::deleteRow( )
657{
658 ::osl::MutexGuard aGuard( m_aMutex );
659 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
660
661
662 m_pRecordSet->Delete();
663 m_pRecordSet->UpdateBatch(adAffectCurrent);
664}
665
666
668{
669 ::osl::MutexGuard aGuard( m_aMutex );
670 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
671
672
673 m_pRecordSet->CancelUpdate();
674}
675
676
678{
679 // ::osl::MutexGuard aGuard( m_aMutex );
680 //checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
681 // if ( getResultSetConcurrency() == ResultSetConcurrency::READ_ONLY )
682 // throw SQLException();
683}
684
685
687{
688}
689
690void OResultSet::updateValue(sal_Int32 columnIndex,const OLEVariant& x)
691{
692 ::osl::MutexGuard aGuard( m_aMutex );
693 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
694
695 WpADOField aField = ADOS::getField(m_pRecordSet,columnIndex);
696 aField.PutValue(x);
697}
698
699void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex )
700{
702 x.setNull();
703 updateValue(columnIndex,x);
704}
705
706
707void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x )
708{
709 updateValue(columnIndex,bool(x));
710}
711
712void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x )
713{
714 updateValue(columnIndex,x);
715}
716
717
718void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x )
719{
720 updateValue(columnIndex,x);
721}
722
723void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x )
724{
725 updateValue(columnIndex,x);
726}
727
728void SAL_CALL OResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x )
729{
730 updateValue(columnIndex,x);
731}
732
733void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x )
734{
735 updateValue(columnIndex,x);
736}
737
738
739void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x )
740{
741 updateValue(columnIndex,x);
742}
743
744void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x )
745{
746 updateValue(columnIndex,x);
747}
748
749void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x )
750{
751 updateValue(columnIndex,x);
752}
753
754void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const css::util::Date& x )
755{
756 updateValue(columnIndex,x);
757}
758
759
760void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const css::util::Time& x )
761{
762 updateValue(columnIndex,x);
763}
764
765
766void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const css::util::DateTime& x )
767{
768 updateValue(columnIndex,x);
769}
770
771
772void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< css::io::XInputStream >& x, sal_Int32 length )
773{
774 if(!x.is())
776
778 x->readBytes(aSeq,length);
779 updateBytes(columnIndex,aSeq);
780}
781
782void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< css::io::XInputStream >& x, sal_Int32 length )
783{
784 if(!x.is())
786
788 x->readBytes(aSeq,length);
789 updateBytes(columnIndex,aSeq);
790}
791
793{
794 ::osl::MutexGuard aGuard( m_aMutex );
795 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
796
797
798 m_pRecordSet->Resync(adAffectCurrent);
799}
800
801void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x )
802{
803 if (!::dbtools::implUpdateObject(this, columnIndex, x))
804 throw SQLException();
805}
806
807
808void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ )
809{
810 if (!::dbtools::implUpdateObject(this, columnIndex, x))
811 throw SQLException();
812}
813
814// XRowLocate
816{
817 ::osl::MutexGuard aGuard( m_aMutex );
818 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
819
820 if(m_nRowPos < static_cast<sal_Int32>(m_aBookmarks.size())) // this bookmark was already fetched
821 return Any(sal_Int32(m_nRowPos-1));
822
823 OLEVariant aVar;
824 m_pRecordSet->get_Bookmark(&aVar);
825 m_aBookmarks.push_back(aVar);
826 return Any(static_cast<sal_Int32>(m_aBookmarks.size()-1));
827
828}
829
830sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark )
831{
832 ::osl::MutexGuard aGuard( m_aMutex );
833 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
834
835
836 sal_Int32 nPos = 0;
837 bookmark >>= nPos;
838 OSL_ENSURE(nPos >= 0 && nPos < static_cast<sal_Int32>(m_aBookmarks.size()),"Invalid Index for vector");
839 if(nPos < 0 || nPos >= static_cast<sal_Int32>(m_aBookmarks.size()))
841
842 return SUCCEEDED(m_pRecordSet->Move(0,m_aBookmarks[nPos]));
843}
844
845sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows )
846{
847 ::osl::MutexGuard aGuard( m_aMutex );
848 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
849
850
851 sal_Int32 nPos = 0;
852 bookmark >>= nPos;
853 nPos += rows;
854 OSL_ENSURE(nPos >= 0 && nPos < static_cast<sal_Int32>(m_aBookmarks.size()),"Invalid Index for vector");
855 if(nPos < 0 || nPos >= static_cast<sal_Int32>(m_aBookmarks.size()))
857 return SUCCEEDED(m_pRecordSet->Move(rows,m_aBookmarks[nPos]));
858}
859
860sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& bookmark1, const Any& bookmark2 )
861{
862 ::osl::MutexGuard aGuard( m_aMutex );
863 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
864
865 sal_Int32 nPos1 = 0;
866 bookmark1 >>= nPos1;
867 sal_Int32 nPos2 = 0;
868 bookmark2 >>= nPos2;
869 if(nPos1 == nPos2) // they should be equal
870 return css::sdbcx::CompareBookmark::EQUAL;
871
872 OSL_ENSURE((nPos1 >= 0 && nPos1 < static_cast<sal_Int32>(m_aBookmarks.size())) || (nPos1 >= 0 && nPos2 < static_cast<sal_Int32>(m_aBookmarks.size())),"Invalid Index for vector");
873
874 CompareEnum eNum;
875 m_pRecordSet->CompareBookmarks(m_aBookmarks[nPos1],m_aBookmarks[nPos2],&eNum);
876 return static_cast<sal_Int32>(eNum) - 1;
877}
878
880{
881 ::osl::MutexGuard aGuard( m_aMutex );
882 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
883
884
885 WpADOProperties aProps;
886 m_pRecordSet->get_Properties(&aProps);
887 ADOS::ThrowException(static_cast<OConnection*>(m_pStmt->getConnection().get())->getConnection(),*this);
888 OSL_ENSURE(aProps.IsValid(),"There are no properties at the connection");
889
890 WpADOProperty aProp(aProps.GetItem(OUString("Bookmarks Ordered")));
891 OLEVariant aVar;
892 if(aProp.IsValid())
893 aVar = aProp.GetValue();
894 else
895 ADOS::ThrowException(static_cast<OConnection*>(m_pStmt->getConnection().get())->getConnection(),*this);
896
897 bool bValue(false);
898 if(!aVar.isNull() && !aVar.isEmpty())
899 bValue = aVar.getBool();
900 return bValue;
901}
902
903sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& bookmark )
904{
905 ::osl::MutexGuard aGuard( m_aMutex );
906 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
907
908
909 sal_Int32 nPos = 0;
910 bookmark >>= nPos;
911 return nPos;
912}
913
914// XDeleteRows
916{
917 ::osl::MutexGuard aGuard( m_aMutex );
918 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
919
920
921 OLEVariant aVar;
922 sal_Int32 nPos = 0;
923
924 // Create SafeArray Bounds and initialize the array
925 SAFEARRAYBOUND rgsabound[1];
926 rgsabound[0].lLbound = 0;
927 rgsabound[0].cElements = rows.getLength();
928 SAFEARRAY *psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
929
930 const Any* pBegin = rows.getConstArray();
931 const Any* pEnd = pBegin + rows.getLength();
932 for(sal_Int32 i=0;pBegin != pEnd ;++pBegin,++i)
933 {
934 *pBegin >>= nPos;
935 SafeArrayPutElement(psa,&i,&m_aBookmarks[nPos]);
936 }
937
938 // Initialize and fill the SafeArray
939 OLEVariant vsa;
940 vsa.setArray(psa,VT_VARIANT);
941
942 m_pRecordSet->put_Filter(vsa);
943 m_pRecordSet->Delete(adAffectGroup);
944 m_pRecordSet->UpdateBatch(adAffectGroup);
945
946 Sequence< sal_Int32 > aSeq(rows.getLength());
947 if(first())
948 {
949 sal_Int32* pSeq = aSeq.getArray();
950 sal_Int32 i=0;
951 do
952 {
953 OSL_ENSURE(i<aSeq.getLength(),"Index greater than length of sequence");
954 m_pRecordSet->get_Status(&pSeq[i]);
955 if(pSeq[i++] == adRecDeleted)
956 --m_nRowPos;
957 }
958 while(next());
959 }
960 return aSeq;
961}
962
964{
965 sal_Int32 nValue=ResultSetConcurrency::READ_ONLY;
966 LockTypeEnum eRet;
967 if(!SUCCEEDED(m_pRecordSet->get_LockType(&eRet)))
968 {
969 switch(eRet)
970 {
971 case adLockReadOnly:
972 nValue = ResultSetConcurrency::READ_ONLY;
973 break;
974 default:
975 nValue = ResultSetConcurrency::UPDATABLE;
976 break;
977 }
978 }
979 return nValue;
980}
981
983{
984 sal_Int32 nValue=0;
985 CursorTypeEnum eRet;
986 if(!SUCCEEDED(m_pRecordSet->get_CursorType(&eRet)))
987 {
988 switch(eRet)
989 {
990 case adOpenUnspecified:
991 case adOpenForwardOnly:
992 nValue = ResultSetType::FORWARD_ONLY;
993 break;
994 case adOpenStatic:
995 case adOpenKeyset:
996 nValue = ResultSetType::SCROLL_INSENSITIVE;
997 break;
998 case adOpenDynamic:
999 nValue = ResultSetType::SCROLL_SENSITIVE;
1000 break;
1001 }
1002 }
1003 return nValue;
1004}
1005
1007{
1008 return FetchDirection::FORWARD;
1009}
1010
1012{
1013 sal_Int32 nValue=-1;
1014 m_pRecordSet->get_CacheSize(&nValue);
1015 return nValue;
1016}
1017
1019{
1020 return OUString();
1021}
1022
1023
1024void OResultSet::setFetchDirection(sal_Int32 /*_par0*/)
1025{
1026 ::dbtools::throwFeatureNotImplementedSQLException( "ResultSet::FetchDirection", *this );
1027}
1028
1029void OResultSet::setFetchSize(sal_Int32 _par0)
1030{
1031 m_pRecordSet->put_CacheSize(_par0);
1032}
1033
1035{
1036 return new ::cppu::OPropertyArrayHelper
1037 {
1038 {
1039 {
1042 },
1043 {
1046 },
1047 {
1049 PROPERTY_ID_ISBOOKMARKABLE, cppu::UnoType<bool>::get(), PropertyAttribute::READONLY
1050 },
1051 {
1054 },
1055 {
1057 PROPERTY_ID_RESULTSETTYPE, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::READONLY
1058 }
1059 }
1060 };
1061}
1062
1064{
1065 return *getArrayHelper();
1066}
1067
1069 Any & rConvertedValue,
1070 Any & rOldValue,
1071 sal_Int32 nHandle,
1072 const Any& rValue )
1073{
1074 switch(nHandle)
1075 {
1080 throw css::lang::IllegalArgumentException();
1081 break;
1083 return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getFetchDirection());
1085 return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getFetchSize());
1086 default:
1087 ;
1088 }
1089 return false;
1090}
1091
1092void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
1093{
1094 switch(nHandle)
1095 {
1100 throw Exception("cannot set prop " + OUString::number(nHandle), nullptr);
1101 break;
1103 setFetchDirection(getINT32(rValue));
1104 break;
1106 setFetchSize(getINT32(rValue));
1107 break;
1108 default:
1109 ;
1110 }
1111}
1112
1113void OResultSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
1114{
1115 switch(nHandle)
1116 {
1118 {
1119 VARIANT_BOOL bBool;
1120 m_pRecordSet->Supports(adBookmark,&bBool);
1121 rValue <<= (bBool == VARIANT_TRUE);
1122 }
1123 break;
1125 rValue <<= getCursorName();
1126 break;
1128 rValue <<= getResultSetConcurrency();
1129 break;
1131 rValue <<= getResultSetType();
1132 break;
1134 rValue <<= getFetchDirection();
1135 break;
1137 rValue <<= getFetchSize();
1138 break;
1139 }
1140}
1141
1142void SAL_CALL OResultSet::acquire() noexcept
1143{
1144 OResultSet_BASE::acquire();
1145}
1146
1147void SAL_CALL OResultSet::release() noexcept
1148{
1149 OResultSet_BASE::release();
1150}
1151
1152css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( )
1153{
1154 return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
1155}
1156
1157
1158/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define CHECK_RETURN(x)
Definition: AResultSet.cxx:45
#define BLOCK_SIZE
Definition: AResultSet.cxx:163
::cppu::IPropertyArrayHelper * getArrayHelper()
void disposing(std::unique_lock< std::mutex > &rGuard)
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
static WpADOField getField(ADORecordset *_pRecordSet, sal_Int32 _nColumnIndex)
Definition: adoimp.cxx:309
WpADOConnection & getConnection()
css::uno::Any makeAny() const
css::util::Date getDate() const
css::util::DateTime getDateTime() const
css::util::Time getTime() const
css::uno::Sequence< sal_Int8 > getByteSequence() const
void setArray(SAFEARRAY *pSafeArray, VARTYPE vtType)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: AResultSet.cxx:133
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:294
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
sal_Int32 getResultSetType() const
Definition: AResultSet.cxx:982
virtual sal_Bool SAL_CALL rowUpdated() override
Definition: AResultSet.cxx:546
void setFetchSize(sal_Int32 _par0)
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:257
virtual sal_Int32 SAL_CALL compareBookmarks(const css::uno::Any &first, const css::uno::Any &second) override
virtual sal_Bool SAL_CALL first() override
Definition: AResultSet.cxx:413
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
Definition: AResultSet.cxx:760
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:339
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:345
sal_Int32 getFetchSize() const
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
Definition: AResultSet.cxx:444
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
Definition: AResultSet.cxx:739
static sal_Int32 getFetchDirection()
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:251
virtual void SAL_CALL disposing() override
Definition: AResultSet.cxx:116
virtual void SAL_CALL deleteRow() override
Definition: AResultSet.cxx:656
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:239
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
Definition: AResultSet.cxx:477
virtual void SAL_CALL clearWarnings() override
Definition: AResultSet.cxx:625
static OUString getCursorName()
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:301
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL close() override
Definition: AResultSet.cxx:402
virtual sal_Bool SAL_CALL isLast() override
Definition: AResultSet.cxx:371
css::uno::Reference< css::uno::XInterface > m_xStatement
Definition: AResultSet.hxx:65
OStatement_Base * m_pStmt
Definition: AResultSet.hxx:64
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
Definition: AResultSet.cxx:744
virtual sal_Bool SAL_CALL isFirst() override
Definition: AResultSet.cxx:362
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: AResultSet.cxx:67
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:276
virtual sal_Bool SAL_CALL hasOrderedBookmarks() override
Definition: AResultSet.cxx:879
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
Definition: AResultSet.cxx:728
virtual sal_Bool SAL_CALL next() override
Definition: AResultSet.cxx:575
virtual void SAL_CALL beforeFirst() override
Definition: AResultSet.cxx:380
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
Definition: AResultSet.cxx:712
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual ~OResultSet() override
Definition: AResultSet.cxx:110
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:327
virtual css::uno::Any SAL_CALL getWarnings() override
Definition: AResultSet.cxx:629
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
Definition: AResultSet.cxx:733
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:227
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
Definition: AResultSet.cxx:707
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:245
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
Definition: AResultSet.cxx:723
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:233
virtual void SAL_CALL moveToInsertRow() override
Definition: AResultSet.cxx:677
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual css::uno::Any SAL_CALL getBookmark() override
Definition: AResultSet.cxx:815
void setFetchDirection(sal_Int32 _par0)
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
Definition: AResultSet.cxx:283
virtual sal_Int32 SAL_CALL findColumn(const OUString &columnName) override
Definition: AResultSet.cxx:143
virtual sal_Bool SAL_CALL isAfterLast() override
Definition: AResultSet.cxx:351
virtual void SAL_CALL afterLast() override
Definition: AResultSet.cxx:390
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:205
virtual sal_Bool SAL_CALL isBeforeFirst() override
Definition: AResultSet.cxx:558
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
Definition: AResultSet.cxx:766
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual sal_Bool SAL_CALL last() override
Definition: AResultSet.cxx:429
virtual void SAL_CALL insertRow() override
Definition: AResultSet.cxx:634
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: AResultSet.cxx:62
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL updateRow() override
Definition: AResultSet.cxx:645
OLEVariant getValue(sal_Int32 columnIndex)
Definition: AResultSet.cxx:211
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
Definition: AResultSet.cxx:718
virtual void SAL_CALL refreshRow() override
Definition: AResultSet.cxx:792
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:699
virtual sal_Bool SAL_CALL moveToBookmark(const css::uno::Any &bookmark) override
std::vector< OLEVariant > m_aBookmarks
Definition: AResultSet.hxx:67
virtual sal_Bool SAL_CALL previous() override
Definition: AResultSet.cxx:497
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:314
sal_Int32 getResultSetConcurrency() const
Definition: AResultSet.cxx:963
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:333
void updateValue(sal_Int32 columnIndex, const OLEVariant &x)
Definition: AResultSet.cxx:690
virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xMetaData
Definition: AResultSet.hxx:66
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:307
virtual sal_Bool SAL_CALL rowInserted() override
Definition: AResultSet.cxx:533
virtual void SAL_CALL cancel() override
Definition: AResultSet.cxx:616
virtual void SAL_CALL moveToCurrentRow() override
Definition: AResultSet.cxx:686
virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows(const css::uno::Sequence< css::uno::Any > &rows) override
virtual sal_Bool SAL_CALL moveRelativeToBookmark(const css::uno::Any &bookmark, sal_Int32 rows) override
OResultSet(ADORecordset *_pRecordSet, OStatement_Base *pStmt)
Definition: AResultSet.cxx:72
virtual sal_Int32 SAL_CALL hashBookmark(const css::uno::Any &bookmark) override
virtual sal_Bool SAL_CALL wasNull() override
Definition: AResultSet.cxx:606
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:221
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
Definition: AResultSet.cxx:511
virtual void SAL_CALL cancelRowUpdates() override
Definition: AResultSet.cxx:667
virtual sal_Bool SAL_CALL rowDeleted() override
Definition: AResultSet.cxx:519
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
Definition: AResultSet.cxx:165
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual sal_Int32 SAL_CALL getRow() override
Definition: AResultSet.cxx:263
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
Definition: AResultSet.cxx:754
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection() override
Definition: AStatement.cxx:317
OLEVariant GetChunk(long Length) const
Definition: Awrapado.cxx:529
void get_Value(OLEVariant &aValVar) const
Definition: Awrapado.cxx:486
sal_Int32 GetActualSize() const
Definition: Awrapado.cxx:438
bool PutValue(const OLEVariant &aVariant)
Definition: Awrapado.cxx:501
sal_Int32 GetAttributes() const
Definition: Awrapado.cxx:446
OLEVariant GetValue() const
Definition: Awrapado.cxx:601
WrapT GetItem(sal_Int32 index) const
Definition: Aolewrap.hxx:102
mutable::osl::Mutex m_aMutex
css::uno::Type const & get()
const OUString & getNameByIndex(sal_Int32 _nIndex) const
Definition: propertyids.cxx:95
ULONG m_refCount
float x
sal_Int16 nValue
std::mutex m_aMutex
sal_uInt16 nPos
Sequence< sal_Int8 > aSeq
constexpr OUStringLiteral aData
@ Exception
sal_Int32 getINT32(const Any &_rAny)
Type
::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::util::XCancellable, css::sdbc::XWarningsSupplier, css::sdbc::XResultSetUpdate, css::sdbc::XRowUpdate, css::sdbc::XCloseable, css::sdbc::XColumnLocate, css::sdbcx::XRowLocate, css::sdbcx::XDeleteRows, css::lang::XServiceInfo > OResultSet_BASE
Definition: AResultSet.hxx:55
void checkDisposed(bool _bThrow)
Definition: dbtools.cxx:1951
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void throwFunctionSequenceException(const Reference< XInterface > &Context, const Any &Next)
void throwFeatureNotImplementedSQLException(const OUString &_rFeatureName, const Reference< XInterface > &_rxContext, const Any &_rNextException)
void throwInvalidColumnException(const OUString &_rColumnName, const Reference< XInterface > &_rxContext)
bool implUpdateObject(const Reference< XRowUpdate > &_rxUpdatedObject, const sal_Int32 _nColumnIndex, const Any &_rValue)
Definition: dbtools.cxx:1427
int i
index
void dispose()
const char * columnName
Definition: pq_statics.cxx:56
#define PROPERTY_ID_ISBOOKMARKABLE
Definition: propertyids.hxx:82
#define PROPERTY_ID_RESULTSETTYPE
Definition: propertyids.hxx:44
#define PROPERTY_ID_CURSORNAME
Definition: propertyids.hxx:42
#define PROPERTY_ID_RESULTSETCONCURRENCY
Definition: propertyids.hxx:43
#define PROPERTY_ID_FETCHSIZE
Definition: propertyids.hxx:46
#define PROPERTY_ID_FETCHDIRECTION
Definition: propertyids.hxx:45
LONG
return hr
unsigned char sal_Bool
signed char sal_Int8
const SvXMLTokenMapEntry aTypes[]