23#include <com/sun/star/sdbc/DataType.hpp>
24#include <com/sun/star/beans/PropertyAttribute.hpp>
25#include <com/sun/star/beans/PropertyVetoException.hpp>
26#include <com/sun/star/sdbcx/CompareBookmark.hpp>
27#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
28#include <com/sun/star/sdbc/ResultSetType.hpp>
52#define ODBC_SQL_NOT_DEFINED 99UL
60 const SQLLEN nMaxBookmarkLen = 20;
65OUString SAL_CALL OResultSet::getImplementationName( )
67 return "com.sun.star.sdbcx.odbc.ResultSet";
72 return {
"com.sun.star.sdbc.ResultSet",
"com.sun.star.sdbcx.ResultSet" };
75sal_Bool SAL_CALL OResultSet::supportsService(
const OUString& _rServiceName )
83 ,m_bFetchDataInOrder(true)
84 ,m_aStatementHandle(_pStatementHandle)
85 ,m_aConnectionHandle(pStmt->getConnectionHandle())
88 ,m_nTextEncoding(pStmt->getOwnConnection()->getTextEncoding())
91 ,m_nCurrentFetchState(0)
94 ,m_bRowInserted(false)
96 ,m_bUseFetchScroll(false)
102 setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR,
m_pRowStatusArray.get());
110 SQLULEN nCurType = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_TYPE);
112 if( (nValueLen & SQL_CA2_SENSITIVITY_DELETIONS) != SQL_CA2_SENSITIVITY_DELETIONS ||
113 (nValueLen & SQL_CA2_CRC_EXACT) != SQL_CA2_CRC_EXACT)
121 SQLUINTEGER nValueLen = 0;
147 SQLUSMALLINT nSupported = 0;
178 setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR,
nullptr);
186 if ( _bUnbindHandle )
196 case DataType::VARCHAR:
197 delete static_cast< OString*
>(
reinterpret_cast< void *
>(rPtrAddr));
199 case DataType::BIGINT:
200 delete static_cast< sal_Int64*
>(
reinterpret_cast< void *
>(rPtrAddr));
202 case DataType::DECIMAL:
203 case DataType::NUMERIC:
204 delete static_cast< OString*
>(
reinterpret_cast< void *
>(rPtrAddr));
207 case DataType::DOUBLE:
208 delete static_cast< double*
>(
reinterpret_cast< void *
>(rPtrAddr));
210 case DataType::LONGVARCHAR:
212 delete []
static_cast< char*
>(
reinterpret_cast< void *
>(rPtrAddr));
214 case DataType::LONGVARBINARY:
216 delete []
static_cast< char*
>(
reinterpret_cast< void *
>(rPtrAddr));
219 delete static_cast< DATE_STRUCT*
>(
reinterpret_cast< void *
>(rPtrAddr));
222 delete static_cast< TIME_STRUCT*
>(
reinterpret_cast< void *
>(rPtrAddr));
224 case DataType::TIMESTAMP:
225 delete static_cast< TIMESTAMP_STRUCT*
>(
reinterpret_cast< void *
>(rPtrAddr));
228 case DataType::TINYINT:
229 delete static_cast< sal_Int8*
>(
reinterpret_cast< void *
>(rPtrAddr));
231 case DataType::SMALLINT:
232 delete static_cast< sal_Int16*
>(
reinterpret_cast< void *
>(rPtrAddr));
234 case DataType::INTEGER:
235 delete static_cast< sal_Int32*
>(
reinterpret_cast< void *
>(rPtrAddr));
237 case DataType::FLOAT:
238 delete static_cast< float*
>(
reinterpret_cast< void *
>(rPtrAddr));
240 case DataType::BINARY:
241 case DataType::VARBINARY:
242 delete static_cast< sal_Int8*
>(
reinterpret_cast< void *
>(rPtrAddr));
257 case DataType::VARCHAR:
258 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new OString()),_nType);
260 case DataType::BIGINT:
261 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new sal_Int64(0)),_nType);
263 case DataType::DECIMAL:
264 case DataType::NUMERIC:
265 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new OString()),_nType);
268 case DataType::DOUBLE:
269 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new double(0.0)),_nType);
271 case DataType::LONGVARCHAR:
273 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new char[2]),_nType);
275 case DataType::LONGVARBINARY:
277 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new char[2]),_nType);
280 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new DATE_STRUCT),_nType);
283 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new TIME_STRUCT),_nType);
285 case DataType::TIMESTAMP:
286 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new TIMESTAMP_STRUCT),_nType);
289 case DataType::TINYINT:
292 case DataType::SMALLINT:
293 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new sal_Int16(0)),_nType);
295 case DataType::INTEGER:
296 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new sal_Int32(0)),_nType);
298 case DataType::FLOAT:
299 aPair =
TVoidPtr(
reinterpret_cast< sal_Int64
>(
new float(0)),_nType);
301 case DataType::BINARY:
302 case DataType::VARBINARY:
306 SAL_WARN(
"connectivity.odbc",
"Unknown type");
315 sal_Int32 nLen = xMeta->getColumnCount();
320 m_aRow[0].setTypeKind(DataType::VARBINARY);
321 m_aRow[0].setBound(
false );
323 for(sal_Int32
i = 1;
i<=nLen;++
i)
325 sal_Int32
nType = xMeta->getColumnType(
i);
341 return aRet.hasValue() ? aRet : OResultSet_BASE::queryInterface(rType);
350 return ::comphelper::concatSequences(
aTypes.getTypes(),OResultSet_BASE::getTypes());
359 ::osl::MutexGuard aGuard(
m_aMutex );
362 sal_Int32 nLen = xMeta->getColumnCount();
366 if(xMeta->isCaseSensitive(
i) ?
columnName == xMeta->getColumnName(
i) :
367 columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(
i)))
378 SAL_INFO(
"connectivity.odbc",
"odbc lionel@mamane.lu OResultSet::ensureCacheForColumn" );
380 assert(columnIndex >= 0);
382 const TDataRow::size_type oldCacheSize =
m_aRow.size();
383 const TDataRow::size_type uColumnIndex =
static_cast<TDataRow::size_type
>(columnIndex);
385 if (oldCacheSize > uColumnIndex)
389 m_aRow.resize(columnIndex + 1);
390 TDataRow::iterator
i (
m_aRow.begin() + oldCacheSize);
391 const TDataRow::const_iterator
end(
m_aRow.end());
392 for (;
i !=
end; ++
i)
401 rItem.setBound(
false);
407 ::osl::MutexGuard aGuard(
m_aMutex );
417 ::osl::MutexGuard aGuard(
m_aMutex );
437 return impl_getValue<sal_Int8>(columnIndex, SQL_C_BIT);
442 ::osl::MutexGuard aGuard(
m_aMutex );
446 auto const & row =
m_aRow[columnIndex];
447 if constexpr ( std::is_same_v<css::util::Time, T> )
448 return row.getTime();
449 else if constexpr ( std::is_same_v<css::util::DateTime, T> )
450 return row.getDateTime();
451 else if constexpr ( std::is_same_v<css::util::Date, T> )
452 return row.getDate();
453 else if constexpr ( std::is_same_v<OUString, T> )
454 return row.getString();
455 else if constexpr ( std::is_same_v<sal_Int64, T> )
456 return row.getLong();
457 else if constexpr ( std::is_same_v<sal_Int32, T> )
458 return row.getInt32();
459 else if constexpr ( std::is_same_v<sal_Int16, T> )
460 return row.getInt16();
461 else if constexpr ( std::is_same_v<sal_Int8, T> )
462 return row.getInt8();
463 else if constexpr ( std::is_same_v<float, T> )
464 return row.getFloat();
465 else if constexpr ( std::is_same_v<double, T> )
466 return row.getDouble();
467 else if constexpr ( std::is_same_v<bool, T> )
468 return row.getBool();
475 return getValue<bool>( columnIndex );
480 return getValue<sal_Int8>( columnIndex );
486 ::osl::MutexGuard aGuard(
m_aMutex );
492 switch(
m_aRow[columnIndex].getTypeKind())
494 case DataType::BINARY:
495 case DataType::VARBINARY:
496 case DataType::LONGVARBINARY:
497 nRet =
m_aRow[columnIndex].getSequence();
501 OUString
const & sRet =
m_aRow[columnIndex].getString();
518 case SQL_LONGVARCHAR:
530 DATE_STRUCT aDate = impl_getValue< DATE_STRUCT> ( columnIndex,
533 return Date(aDate.day, aDate.month, aDate.year);
538 return getValue<Date>( columnIndex );
544 return getValue<double>( columnIndex );
550 return getValue<float>( columnIndex );
555 return getValue<sal_Int16>( columnIndex );
560 return getValue<sal_Int32>( columnIndex );
565 return getValue<sal_Int64>( columnIndex );
571 return impl_getValue<sal_Int64>(columnIndex, SQL_C_SBIGINT);
573 catch(
const SQLException&)
581 ::osl::MutexGuard aGuard(
m_aMutex );
589 ::osl::MutexGuard aGuard(
m_aMutex );
627 return getValue<ORowSetValue>( columnIndex ).makeAny();
638 return getValue<OUString>( columnIndex );
643 TIME_STRUCT aTime = impl_getValue< TIME_STRUCT > ( columnIndex,
646 return Time(0, aTime.second,aTime.minute,aTime.hour,
false);
650 return getValue<Time>( columnIndex );
655 TIMESTAMP_STRUCT aTime = impl_getValue< TIMESTAMP_STRUCT > ( columnIndex,
669 return getValue<DateTime>( columnIndex );
674 ::osl::MutexGuard aGuard(
m_aMutex );
681 ::osl::MutexGuard aGuard(
m_aMutex );
689 ::osl::MutexGuard aGuard(
m_aMutex );
697 ::osl::MutexGuard aGuard(
m_aMutex );
706 ::osl::MutexGuard aGuard(
m_aMutex );
717 ::osl::MutexGuard aGuard(
m_aMutex );
729 ::osl::MutexGuard aGuard(
m_aMutex );
765 ::osl::MutexGuard aGuard(
m_aMutex );
773 ::osl::MutexGuard aGuard(
m_aMutex );
784 ::osl::MutexGuard aGuard(
m_aMutex );
795 ::osl::MutexGuard aGuard(
m_aMutex );
811 ::osl::MutexGuard aGuard(
m_aMutex );
820 ::osl::MutexGuard aGuard(
m_aMutex );
838 ::osl::MutexGuard aGuard(
m_aMutex );
849 aBookmark.getArray(),
855 if ( bPositionByBookmark )
867 aBookmark.realloc(nRealLen);
872 catch(
const SQLException&)
881 if ( bPositionByBookmark )
883 setStmtOption<SQLLEN*, SQL_IS_POINTER>(SQL_ATTR_FETCH_BOOKMARK_PTR,
reinterpret_cast<SQLLEN*
>(aBookmark.getArray()));
914 ::osl::MutexGuard aGuard(
m_aMutex );
922 if ( bPositionByBookmark )
925 assert(
m_aRow[0].isBound());
927 SQLLEN nRealLen = aBookmark.getLength();
931 aBookmark.getArray(),
932 aBookmark.getLength(),
940 assert(nRealLen == aBookmark.getLength());
953 OSL_ENSURE(nRet == SQL_SUCCESS,
"ODBC insert could not unbind the columns after success");
959 OSL_ENSURE(nRet == SQL_SUCCESS,
"ODBC insert could not unbind the columns after failure");
966 SQLRETURN nRet = SQL_SUCCESS;
975 [&
nPos](
const TBookmarkPosMap::value_type& rEntry) { return rEntry.second == nPos; });
991 ::osl::MutexGuard aGuard(
m_aMutex );
997 OSL_VERIFY(
unbind() == SQL_SUCCESS );
1009 ::osl::MutexGuard aGuard(
m_aMutex );
1014 OSL_ENSURE(
pData !=
nullptr,
"Data for update is NULL!");
1030 ::osl::MutexGuard aGuard(
m_aMutex );
1035 OTools::bindValue(
m_pStatement->
getOwnConnection(),
m_aStatementHandle,columnIndex,SQL_CHAR,0,
nullptr,
pData,&
m_aLengthVector[columnIndex],**
this,
m_nTextEncoding,
m_pStatement->
getOwnConnection()->
useOldDateFormat());
1078 sal_Int32
nType =
m_aRow[columnIndex].getTypeKind();
1082 m_aRow[columnIndex].setBound(
true);
1088 sal_Int32
nType =
m_aRow[columnIndex].getTypeKind();
1091 m_aRow[columnIndex].setTypeKind(nType);
1092 m_aRow[columnIndex].setBound(
true);
1123 x->readBytes(aSeq,length);
1134 ::osl::MutexGuard aGuard(
m_aMutex );
1146 throw SQLException();
1153 throw SQLException();
1161 throw SQLException();
1162 return m_aRow[0].makeAny();
1169 [
this] (
const TBookmarkPosMap::value_type& bookmarkPos) {
1170 return bookmarkPos.second == m_nRowPos;
1177 m_nUseBookmarks = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_USE_BOOKMARKS);
1180 throw SQLException();
1184 OSL_ENSURE(bookmark.hasElements(),
"Invalid bookmark from length 0!");
1189 return aFind->first;
1195 ::osl::MutexGuard aGuard(
m_aMutex );
1200 bookmark >>= aBookmark;
1201 OSL_ENSURE(aBookmark.hasElements(),
"Invalid bookmark from length 0!");
1202 if(aBookmark.hasElements())
1204 SQLRETURN nReturn = setStmtOption<SQLLEN*, SQL_IS_POINTER>(SQL_ATTR_FETCH_BOOKMARK_PTR,
reinterpret_cast<SQLLEN*
>(aBookmark.getArray()));
1206 if ( SQL_INVALID_HANDLE != nReturn && SQL_ERROR != nReturn )
1223 ::osl::MutexGuard aGuard(
m_aMutex );
1229 bookmark >>= aBookmark;
1230 setStmtOption<SQLLEN*, SQL_IS_POINTER>(SQL_ATTR_FETCH_BOOKMARK_PTR,
reinterpret_cast<SQLLEN*
>(aBookmark.getArray()));
1239 ::osl::MutexGuard aGuard(
m_aMutex );
1242 return (lhs == rhs) ? CompareBookmark::EQUAL : CompareBookmark::NOT_EQUAL;
1260 sal_Int32 *pRet = aRet.getArray();
1262 const Any *pBegin = rows.getConstArray();
1263 const Any *pEnd = pBegin + rows.getLength();
1265 for(;pBegin != pEnd;++pBegin,++pRet)
1275 catch(
const SQLException&)
1293 SQLPOINTER sv =
reinterpret_cast<SQLPOINTER
>(
value);
1299 sal_uInt32
nValue = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CONCURRENCY);
1300 if(SQL_CONCUR_READ_ONLY ==
nValue)
1301 nValue = ResultSetConcurrency::READ_ONLY;
1303 nValue = ResultSetConcurrency::UPDATABLE;
1310 sal_uInt32
nValue = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_SENSITIVITY);
1311 if(SQL_SENSITIVE ==
nValue)
1312 nValue = ResultSetType::SCROLL_SENSITIVE;
1313 else if(SQL_INSENSITIVE ==
nValue)
1314 nValue = ResultSetType::SCROLL_INSENSITIVE;
1317 SQLULEN nCurType = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_TYPE);
1318 if(SQL_CURSOR_KEYSET_DRIVEN == nCurType)
1319 nValue = ResultSetType::SCROLL_SENSITIVE;
1320 else if(SQL_CURSOR_STATIC == nCurType)
1321 nValue = ResultSetType::SCROLL_INSENSITIVE;
1322 else if(SQL_CURSOR_FORWARD_ONLY == nCurType)
1323 nValue = ResultSetType::FORWARD_ONLY;
1324 else if(SQL_CURSOR_DYNAMIC == nCurType)
1325 nValue = ResultSetType::SCROLL_SENSITIVE;
1332 return getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_ARRAY_SIZE);
1338 SQLSMALLINT nRealLen = 0;
1340 return OUString::createFromAscii(
reinterpret_cast<char*
>(
pName));
1348 const SQLULEN nCursorType = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_TYPE);
1350 sal_Int32 nAttr = 0;
1355 case SQL_CURSOR_FORWARD_ONLY:
1357 case SQL_CURSOR_STATIC:
1360 case SQL_CURSOR_KEYSET_DRIVEN:
1363 case SQL_CURSOR_DYNAMIC:
1375 m_nUseBookmarks = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_USE_BOOKMARKS);
1378 return (
m_nUseBookmarks != SQL_UB_OFF) && (nAttr & SQL_CA1_BOOKMARK) == SQL_CA1_BOOKMARK;
1385 OSL_ENSURE(_par0>0,
"Illegal fetch direction!");
1388 setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_TYPE, _par0);
1394 OSL_ENSURE(_par0>0,
"Illegal fetch size!");
1397 throw css::beans::PropertyVetoException(
"SDBC/ODBC layer not prepared for fetchSize > 1", *
this);
1399 setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_ARRAY_SIZE, _par0);
1401 setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR,
m_pRowStatusArray.get());
1413 PropertyAttribute::READONLY
1431 PropertyAttribute::READONLY
1437 PropertyAttribute::READONLY
1443 PropertyAttribute::READONLY
1455 Any & rConvertedValue,
1466 throw css::lang::IllegalArgumentException();
1468 return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue,
getFetchDirection());
1470 return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue,
getFetchSize());
1488 throw Exception(
"cannot set prop " + OUString::number(nHandle),
nullptr);
1532 if (
m_aRow[_nColumn].isBound())
1542 sal_Int32 upper=_nColumn;
1544 while (lower < upper)
1546 const sal_Int32
middle=(upper-lower)/2 + lower;
1564 TDataRow::iterator pColumn =
m_aRow.begin() + curCol;
1565 const TDataRow::const_iterator pColumnEnd =
m_aRow.begin() + _nColumn + 1;
1573 catch (SQLException &)
1577 pColumn->setBound(
true);
1582 for (; pColumn != pColumnEnd; ++curCol, ++pColumn)
1584 const sal_Int32
nType = pColumn->getTypeKind();
1587 case DataType::CHAR:
1588 case DataType::VARCHAR:
1589 case DataType::DECIMAL:
1590 case DataType::NUMERIC:
1591 case DataType::LONGVARCHAR:
1592 case DataType::CLOB:
1595 case DataType::FLOAT:
1596 *pColumn = impl_getValue<float>(curCol, SQL_C_FLOAT);
1598 case DataType::REAL:
1599 case DataType::DOUBLE:
1600 *pColumn = impl_getValue<double>(curCol, SQL_C_DOUBLE);
1602 case DataType::BINARY:
1603 case DataType::VARBINARY:
1604 case DataType::LONGVARBINARY:
1605 case DataType::BLOB:
1608 case DataType::DATE:
1611 case DataType::TIME:
1614 case DataType::TIMESTAMP:
1620 case DataType::TINYINT:
1621 *pColumn = impl_getValue<sal_Int8>(curCol, SQL_C_TINYINT);
1623 case DataType::SMALLINT:
1624 *pColumn = impl_getValue<sal_Int16>(curCol, SQL_C_SHORT);
1626 case DataType::INTEGER:
1627 *pColumn = impl_getValue<sal_Int32>(curCol, SQL_C_LONG);
1629 case DataType::BIGINT:
1633 SAL_WARN(
"connectivity.odbc",
"Unknown DataType");
1638 pColumn->setBound(
true);
1639 if(
nType != pColumn->getTypeKind())
1641 pColumn->setTypeKind(
nType);
1648 OResultSet_BASE::acquire();
1653 OResultSet_BASE::release();
1658 return ::cppu::OPropertySetHelper::createPropertySetInfo(
getInfoHelper());
1663 SQLSMALLINT nFetchOrientation = SQL_FETCH_NEXT;
1664 switch(_eCursorPosition)
1667 nFetchOrientation = SQL_FETCH_NEXT;
1670 nFetchOrientation = SQL_FETCH_PRIOR;
1673 nFetchOrientation = SQL_FETCH_FIRST;
1676 nFetchOrientation = SQL_FETCH_LAST;
1679 nFetchOrientation = SQL_FETCH_RELATIVE;
1682 nFetchOrientation = SQL_FETCH_ABSOLUTE;
1687 [&
_nOffset](
const TBookmarkPosMap::value_type& rEntry) { return rEntry.second == _nOffset; });
1690 SAL_WARN(
"connectivity.odbc",
"Bookmark not found!");
1708 "connectivity.odbc",
1709 "move(" << nFetchOrientation <<
"," <<
_nOffset <<
"), FetchState = "
1716 switch(_eCursorPosition)
1740 m_nUseBookmarks = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_USE_BOOKMARKS);
1751 OSL_ENSURE(bookmark.hasElements(),
"Invalid bookmark from length 0!");
1754 m_aRow[0].setBound(
true);
1768 sal_Int32
nValue = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_NUMBER);
1770 "connectivity.odbc",
1782 ::osl::MutexGuard aGuard(
m_aMutex );
1791 SQLRETURN nRet = _nRet;
1792 if( nRet != SQL_NEED_DATA)
1795 void* pColumnIndex =
nullptr;
1800 if (nRet != SQL_SUCCESS && nRet != SQL_SUCCESS_WITH_INFO && nRet != SQL_NEED_DATA)
1803 sal_IntPtr nColumnIndex (
reinterpret_cast<sal_IntPtr
>(pColumnIndex));
1805 switch(
m_aRow[nColumnIndex].getTypeKind())
1807 case DataType::BINARY:
1808 case DataType::VARBINARY:
1809 case DataType::LONGVARBINARY:
1810 case DataType::BLOB:
1816 OUString
const & sRet =
m_aRow[nColumnIndex].getString();
1820 case DataType::LONGVARCHAR:
1821 case DataType::CLOB:
1823 OUString sRet =
m_aRow[nColumnIndex].getString();
1829 SAL_WARN(
"connectivity.odbc",
"Not supported at the moment!");
1833 while (nRet == SQL_NEED_DATA);
1838 std::map<sal_Int32,SWORD>::const_iterator aFind =
m_aODBCColumnTypes.find(columnIndex);
1844 return aFind->second;
#define N3SQLBulkOperations(a, b)
#define N3SQLGetStmtAttr(a, b, c, d, e)
#define N3SQLBindCol(a, b, c, d, e, f)
#define N3SQLSetStmtAttr(a, b, c, d)
#define N3SQLPutData(a, b, c)
#define N3SQLSetPos(a, b, c, d)
#define N3SQLFetchScroll(a, b, c)
#define N3SQLParamData(a, b)
#define N3SQLFreeStmt(a, b)
#define N3SQLGetFunctions(a, b, c)
#define N3SQLCloseCursor(a)
#define N3SQLGetCursorName(a, b, c, d)
#define ODBC_SQL_NOT_DEFINED
::cppu::IPropertyArrayHelper * getArrayHelper()
void disposing(std::unique_lock< std::mutex > &rGuard)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
the class OSkipDeletedSet supports a general method to skip deleted rows
bool useOldDateFormat() const
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual bool isRowDeleted() const override
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
sal_Int32 getResultSetType() const
virtual sal_Bool SAL_CALL rowUpdated() override
void setFetchSize(sal_Int32 _par0)
css::uno::Reference< css::uno::XInterface > m_xStatement
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
void ensureCacheForColumn(sal_Int32 columnIndex)
virtual sal_Bool SAL_CALL first() override
SQLRETURN m_nCurrentFetchState
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual sal_Bool SAL_CALL moveToBookmark(const css::uno::Any &bookmark) override
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
sal_Int32 getFetchSize() const
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
TVoidPtr allocBindColumn(sal_Int32 _nType, sal_Int32 _nColumnIndex)
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
std::unique_ptr< SQLUSMALLINT[]> m_pRowStatusArray
virtual void SAL_CALL disposing() override
virtual void SAL_CALL deleteRow() override
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
virtual void SAL_CALL clearWarnings() override
virtual bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData) override
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
T impl_getValue(const sal_Int32 _nColumnIndex, SQLSMALLINT nType)
virtual void SAL_CALL close() override
virtual sal_Bool SAL_CALL isLast() override
virtual sal_Int32 getDriverPos() const override
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual sal_Bool SAL_CALL moveRelativeToBookmark(const css::uno::Any &bookmark, sal_Int32 rows) override
virtual sal_Bool SAL_CALL isFirst() override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
void fillNeededData(SQLRETURN _nRet)
SWORD impl_getColumnType_nothrow(sal_Int32 columnIndex)
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual sal_Int32 SAL_CALL hashBookmark(const css::uno::Any &bookmark) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
T getValue(sal_Int32 columnIndex)
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL hasOrderedBookmarks() override
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
virtual sal_Bool SAL_CALL next() override
css::util::DateTime impl_getTimestamp(sal_Int32 columnIndex)
virtual void SAL_CALL beforeFirst() override
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
virtual ~OResultSet() override
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
OUString getCursorName() const
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xMetaData
void fillColumn(sal_Int32 _nToColumn)
virtual css::uno::Any SAL_CALL getWarnings() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows(const css::uno::Sequence< css::uno::Any > &rows) override
void updateValue(sal_Int32 columnIndex, SQLSMALLINT _nType, void const *_pValue)
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
OStatement_Base * m_pStatement
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
css::uno::Sequence< sal_Int8 > impl_getBookmark()
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
static sal_Int32 getFetchDirection()
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
virtual void SAL_CALL moveToInsertRow() override
std::vector< SQLLEN > m_aLengthVector
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
T getStmtOption(SQLINTEGER fOption) const
virtual css::uno::Any SAL_CALL getBookmark() override
void setFetchDirection(sal_Int32 _par0)
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
virtual sal_Int32 SAL_CALL findColumn(const OUString &columnName) override
sal_uInt32 m_nUseBookmarks
virtual sal_Bool SAL_CALL isAfterLast() override
virtual void SAL_CALL afterLast() override
virtual void SAL_CALL release() noexcept override
virtual sal_Bool SAL_CALL isBeforeFirst() override
virtual sal_Bool SAL_CALL last() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL insertRow() override
SQLHANDLE m_aStatementHandle
oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
virtual void SAL_CALL updateRow() override
css::util::Time impl_getTime(sal_Int32 columnIndex)
TVoidVector m_aBindVector
bool impl_getBoolean(sal_Int32 columnIndex)
rtl_TextEncoding m_nTextEncoding
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
virtual void SAL_CALL refreshRow() override
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
virtual sal_Int32 SAL_CALL compareBookmarks(const css::uno::Any &first, const css::uno::Any &second) override
css::util::Date impl_getDate(sal_Int32 columnIndex)
virtual sal_Bool SAL_CALL previous() override
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
sal_Int32 getResultSetConcurrency() const
OResultSet(SQLHANDLE _pStatementHandle, OStatement_Base *pStmt)
std::map< sal_Int32, SWORD > m_aODBCColumnTypes
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
std::unique_ptr< OSkipDeletedSet > m_pSkipDeletedSet
virtual sal_Bool SAL_CALL rowInserted() override
virtual void SAL_CALL cancel() override
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
TBookmarkPosMap m_aPosToBookmarks
css::uno::Sequence< sal_Int8 > impl_getBytes(sal_Int32 columnIndex)
virtual void SAL_CALL moveToCurrentRow() override
bool moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset)
OUString impl_getString(sal_Int32 columnIndex)
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
sal_Int64 impl_getLong(sal_Int32 columnIndex)
SQLRETURN unbind(bool _bUnbindHandle=true)
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
SQLHANDLE m_aConnectionHandle
virtual sal_Bool SAL_CALL wasNull() override
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
SQLRETURN setStmtOption(SQLINTEGER fOption, T value) const
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
virtual void SAL_CALL cancelRowUpdates() override
virtual sal_Bool SAL_CALL rowDeleted() override
virtual sal_Int32 SAL_CALL getRow() override
bool isBookmarkable() const
SQLUINTEGER getCursorProperties(SQLINTEGER _nCursorType, bool bFirst)
getCursorProperties return the properties for a specific cursor type
OConnection * getOwnConnection() const
mutable::osl::Mutex m_aMutex
css::uno::Type const & get()
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::unique_ptr< sal_Int32[]> pData
double getLength(const B2DPolygon &rCandidate)
sal_Int32 getINT32(const Any &_rAny)
std::pair< sal_Int64, sal_Int32 > TVoidPtr
::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::util::XCancellable, css::sdbc::XWarningsSupplier, css::sdbc::XResultSetUpdate, css::sdbc::XRowUpdate, css::sdbcx::XRowLocate, css::sdbcx::XDeleteRows, css::sdbc::XCloseable, css::sdbc::XColumnLocate, css::lang::XServiceInfo > OResultSet_BASE
void checkDisposed(bool _bThrow)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
#define PROPERTY_ID_ISBOOKMARKABLE
#define PROPERTY_ID_RESULTSETTYPE
#define PROPERTY_ID_CURSORNAME
#define PROPERTY_ID_RESULTSETCONCURRENCY
#define PROPERTY_ID_FETCHSIZE
#define PROPERTY_ID_FETCHDIRECTION