22#include <com/sun/star/sdbc/FetchDirection.hpp>
23#include <com/sun/star/sdbc/XResultSet.hpp>
24#include <com/sun/star/sdbc/XRow.hpp>
25#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
26#include <com/sun/star/sdbc/XCloseable.hpp>
27#include <com/sun/star/sdbc/XColumnLocate.hpp>
28#include <com/sun/star/util/XCancellable.hpp>
29#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
30#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
31#include <com/sun/star/sdbc/XRowUpdate.hpp>
32#include <com/sun/star/sdbcx/XRowLocate.hpp>
33#include <com/sun/star/sdbcx/XDeleteRows.hpp>
50 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XResultSet,
52 css::sdbc::XResultSetMetaDataSupplier,
53 css::util::XCancellable,
54 css::sdbc::XWarningsSupplier,
55 css::sdbc::XResultSetUpdate,
56 css::sdbc::XRowUpdate,
57 css::sdbcx::XRowLocate,
58 css::sdbcx::XDeleteRows,
59 css::sdbc::XCloseable,
60 css::sdbc::XColumnLocate,
64 typedef std::pair<sal_Int64,sal_Int32>
TVoidPtr;
70 bool operator()(
const css::uno::Sequence<sal_Int8>& _rLH,
71 const css::uno::Sequence<sal_Int8>& _rRH)
const
73 if(_rLH.getLength() == _rRH.getLength())
75 sal_Int32
nCount = _rLH.getLength();
82 for(
i=0;
i <
nCount;++
i,--pLHBack,--pRHBack)
84 if(!(*pLHBack) && *pRHBack)
86 else if(*pLHBack && !(*pRHBack))
89 for(
i=0,++pLHBack,++pRHBack;
i <
nCount;++pLHBack,++pRHBack,++
i)
90 if(*pLHBack < *pRHBack)
95 return *
reinterpret_cast<const sal_Int32*
>(_rLH.getConstArray()) < *
reinterpret_cast<const sal_Int32*
>(_rRH.getConstArray());
99 return _rLH.getLength() < _rRH.getLength();
149 bool isBookmarkable()
const;
150 sal_Int32 getResultSetConcurrency()
const;
151 sal_Int32 getResultSetType()
const;
153 sal_Int32 getFetchSize()
const;
154 OUString getCursorName()
const;
155 template <
typename T, SQLINTEGER BufferLength > T getStmtOption (SQLINTEGER fOption)
const;
157 void setFetchDirection(sal_Int32 _par0);
158 void setFetchSize(sal_Int32 _par0);
159 template <
typename T, SQLINTEGER BufferLength > SQLRETURN setStmtOption (SQLINTEGER fOption, T value)
const;
162 void ensureCacheForColumn(sal_Int32 columnIndex);
163 void invalidateCache();
164 void fillColumn(sal_Int32 _nToColumn);
166 void releaseBuffer();
169 void updateValue(sal_Int32 columnIndex, SQLSMALLINT _nType,
void const * _pValue);
170 void fillNeededData(SQLRETURN _nRet);
172 TVoidPtr allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex);
173 SQLRETURN unbind(
bool _bUnbindHandle =
true);
174 SWORD impl_getColumnType_nothrow(sal_Int32 columnIndex);
177 template <
typename T > T
getValue( sal_Int32 columnIndex );
180 template <
typename T > T impl_getValue(
const sal_Int32 _nColumnIndex, SQLSMALLINT nType );
184 bool impl_getBoolean( sal_Int32 columnIndex );
187 css::uno::Sequence< sal_Int8 > impl_getBytes( sal_Int32 columnIndex );
190 css::util::Date impl_getDate( sal_Int32 columnIndex );
193 css::util::Time impl_getTime( sal_Int32 columnIndex );
196 css::util::DateTime impl_getTimestamp( sal_Int32 columnIndex );
199 sal_Int64 impl_getLong( sal_Int32 columnIndex );
202 OUString impl_getString( sal_Int32 columnIndex );
205 css::uno::Sequence<sal_Int8> impl_getBookmark( );
209 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( )
const override;
211 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper()
override;
214 css::uno::Any & rConvertedValue,
215 css::uno::Any & rOldValue,
217 const css::uno::Any& rValue )
override;
220 const css::uno::Any& rValue
223 css::uno::Any& rValue,
239 css::uno::Reference< css::uno::XInterface > operator *()
241 return css::uno::Reference< css::uno::XInterface >(*
static_cast<OResultSet_BASE*
>(
this));
244 void setMetaData(
const css::uno::Reference< css::sdbc::XResultSetMetaData>& _xMetaData) { m_xMetaData = _xMetaData;}
247 virtual void SAL_CALL disposing()
override;
249 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type & rType )
override;
250 virtual void SAL_CALL acquire() noexcept override;
251 virtual
void SAL_CALL release() noexcept override;
253 virtual css::
uno::Sequence< css::
uno::
Type > SAL_CALL getTypes( ) override;
255 virtual css::
uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
257 virtual
sal_Bool SAL_CALL next( ) override;
258 virtual
sal_Bool SAL_CALL isBeforeFirst( ) override;
259 virtual
sal_Bool SAL_CALL isAfterLast( ) override;
260 virtual
sal_Bool SAL_CALL isFirst( ) override;
261 virtual
sal_Bool SAL_CALL isLast( ) override;
262 virtual
void SAL_CALL beforeFirst( ) override;
263 virtual
void SAL_CALL afterLast( ) override;
264 virtual
sal_Bool SAL_CALL first( ) override;
265 virtual
sal_Bool SAL_CALL last( ) override;
266 virtual sal_Int32 SAL_CALL getRow( ) override;
267 virtual
sal_Bool SAL_CALL absolute( sal_Int32 row ) override;
268 virtual
sal_Bool SAL_CALL relative( sal_Int32 rows ) override;
269 virtual
sal_Bool SAL_CALL previous( ) override;
270 virtual
void SAL_CALL refreshRow( ) override;
271 virtual
sal_Bool SAL_CALL rowUpdated( ) override;
272 virtual
sal_Bool SAL_CALL rowInserted( ) override;
273 virtual
sal_Bool SAL_CALL rowDeleted( ) override;
274 virtual css::
uno::Reference< css::
uno::
XInterface > SAL_CALL getStatement( ) override;
276 virtual
sal_Bool SAL_CALL wasNull( ) override;
277 virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) override;
278 virtual
sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) override;
279 virtual
sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) override;
280 virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) override;
281 virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) override;
282 virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) override;
283 virtual
float SAL_CALL getFloat( sal_Int32 columnIndex ) override;
284 virtual
double SAL_CALL getDouble( sal_Int32 columnIndex ) override;
285 virtual css::
uno::Sequence<
sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) override;
286 virtual css::util::
Date SAL_CALL getDate( sal_Int32 columnIndex ) override;
287 virtual css::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) override;
288 virtual css::util::
DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) override;
289 virtual css::
uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) override;
290 virtual css::
uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) override;
291 virtual css::
uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const css::
uno::Reference< css::container::XNameAccess >& typeMap ) override;
292 virtual css::
uno::Reference< css::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) override;
293 virtual css::
uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) override;
294 virtual css::
uno::Reference< css::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) override;
295 virtual css::
uno::Reference< css::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) override;
297 virtual css::
uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) override;
299 virtual
void SAL_CALL cancel( ) override;
301 virtual
void SAL_CALL close( ) override;
303 virtual css::
uno::Any SAL_CALL getWarnings( ) override;
304 virtual
void SAL_CALL clearWarnings( ) override;
306 virtual
void SAL_CALL insertRow( ) override;
307 virtual
void SAL_CALL updateRow( ) override;
308 virtual
void SAL_CALL deleteRow( ) override;
309 virtual
void SAL_CALL cancelRowUpdates( ) override;
310 virtual
void SAL_CALL moveToInsertRow( ) override;
311 virtual
void SAL_CALL moveToCurrentRow( ) override;
313 virtual
void SAL_CALL updateNull( sal_Int32 columnIndex ) override;
314 virtual
void SAL_CALL updateBoolean( sal_Int32 columnIndex,
sal_Bool x ) override;
315 virtual
void SAL_CALL updateByte( sal_Int32 columnIndex,
sal_Int8 x ) override;
316 virtual
void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) override;
317 virtual
void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) override;
318 virtual
void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) override;
319 virtual
void SAL_CALL updateFloat( sal_Int32 columnIndex,
float x ) override;
320 virtual
void SAL_CALL updateDouble( sal_Int32 columnIndex,
double x ) override;
321 virtual
void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) override;
322 virtual
void SAL_CALL updateBytes( sal_Int32 columnIndex, const css::
uno::Sequence<
sal_Int8 >& x ) override;
323 virtual
void SAL_CALL updateDate( sal_Int32 columnIndex, const css::util::
Date& x ) override;
324 virtual
void SAL_CALL updateTime( sal_Int32 columnIndex, const css::util::Time& x ) override;
325 virtual
void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const css::util::
DateTime& x ) override;
326 virtual
void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const css::
uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
327 virtual
void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const css::
uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
328 virtual
void SAL_CALL updateObject( sal_Int32 columnIndex, const css::
uno::Any& x ) override;
329 virtual
void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::
uno::Any& x, sal_Int32
scale ) override;
331 virtual sal_Int32 SAL_CALL findColumn( const OUString&
columnName ) override;
333 virtual css::
uno::Any SAL_CALL getBookmark( ) override;
334 virtual
sal_Bool SAL_CALL moveToBookmark( const css::
uno::Any& bookmark ) override;
335 virtual
sal_Bool SAL_CALL moveRelativeToBookmark( const css::
uno::Any& bookmark, sal_Int32 rows ) override;
336 virtual sal_Int32 SAL_CALL compareBookmarks( const css::
uno::Any& first, const css::
uno::Any& second ) override;
337 virtual
sal_Bool SAL_CALL hasOrderedBookmarks( ) override;
338 virtual sal_Int32 SAL_CALL hashBookmark( const css::
uno::Any& bookmark ) override;
340 virtual css::
uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const css::
uno::Sequence< css::
uno::Any >& rows ) override;
344 virtual sal_Int32 getDriverPos() const override;
345 virtual
bool isRowDeleted() const override;
css::uno::Reference< css::uno::XInterface > m_xStatement
SQLRETURN m_nCurrentFetchState
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
std::unique_ptr< SQLUSMALLINT[]> m_pRowStatusArray
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xMetaData
OStatement_Base * m_pStatement
static sal_Int32 getFetchDirection()
std::vector< SQLLEN > m_aLengthVector
sal_uInt32 m_nUseBookmarks
SQLHANDLE m_aStatementHandle
oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
TVoidVector m_aBindVector
rtl_TextEncoding m_nTextEncoding
void setMetaData(const css::uno::Reference< css::sdbc::XResultSetMetaData > &_xMetaData)
std::map< sal_Int32, SWORD > m_aODBCColumnTypes
std::unique_ptr< OSkipDeletedSet > m_pSkipDeletedSet
TBookmarkPosMap m_aPosToBookmarks
SQLHANDLE m_aConnectionHandle
std::vector< ORowSetValue > TDataRow
oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
std::map< css::uno::Sequence< sal_Int8 >, sal_Int32, TBookmarkPosMapCompare > TBookmarkPosMap
std::pair< sal_Int64, sal_Int32 > TVoidPtr
std::vector< TVoidPtr > TVoidVector
std::allocator< TVoidPtr > TVoidAlloc
void getValue(const OConnection *_pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _nType, bool &_bWasNull, const css::uno::Reference< css::uno::XInterface > &_xInterface, T &_rValue)
::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
#define OOO_DLLPUBLIC_ODBCBASE
Functor object for class ZZ returntype is void.
bool operator()(const css::uno::Sequence< sal_Int8 > &_rLH, const css::uno::Sequence< sal_Int8 > &_rRH) const