22#include <com/sun/star/sdbc/XResultSet.hpp>
23#include <com/sun/star/sdbc/XRow.hpp>
24#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
25#include <com/sun/star/sdbc/XCloseable.hpp>
26#include <com/sun/star/sdbc/XColumnLocate.hpp>
27#include <com/sun/star/util/XCancellable.hpp>
28#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
29#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
30#include <com/sun/star/sdbc/XRowUpdate.hpp>
42#include <com/sun/star/lang/XEventListener.hpp>
47 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XResultSet,
49 css::sdbc::XResultSetMetaDataSupplier,
50 css::util::XCancellable,
51 css::sdbc::XWarningsSupplier,
52 css::sdbc::XResultSetUpdate,
53 css::sdbc::XRowUpdate,
54 css::sdbc::XCloseable,
55 css::sdbc::XColumnLocate,
56 css::lang::XServiceInfo,
99 css::uno::Reference< css::sdbc::XResultSetMetaData>
m_xMetaData;
101 css::uno::Reference< css::container::XIndexAccess>
m_xColsIdx;
118 static void initializeRow(
OValueRefRow& _rRow,sal_Int32 _nColumnCount);
123 sal_Int32 nOffset = 1,
124 bool bEvaluate =
true,
125 bool bRetrieveData =
true);
127 std::unique_ptr<OKeyValue> GetOrderbyKeyValue(
OValueRefRow const & _rRow);
128 bool IsSorted()
const {
return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] >= 0;}
133 void checkIndex(sal_Int32 columnIndex );
140 void updateValue(sal_Int32 columnIndex,
const ORowSetValue& x );
142 void clearInsertRow();
146 using OResultSet_BASE::rBHelper;
149 virtual bool fillIndexValues(
const css::uno::Reference< css::sdbcx::XColumnsSupplier> &_xIndex);
152 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( )
const override;
154 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper()
override;
163 virtual void SAL_CALL disposing() override final;
165 virtual css::
uno::Any SAL_CALL queryInterface( const css::
uno::
Type & rType ) override;
166 virtual
void SAL_CALL acquire() noexcept override;
167 virtual
void SAL_CALL release() noexcept override;
171 virtual css::
uno::
Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
173 virtual
sal_Bool SAL_CALL next( ) override;
174 virtual
sal_Bool SAL_CALL isBeforeFirst( ) override;
175 virtual
sal_Bool SAL_CALL isAfterLast( ) override;
176 virtual
sal_Bool SAL_CALL isFirst( ) override;
177 virtual
sal_Bool SAL_CALL isLast( ) override;
178 virtual
void SAL_CALL beforeFirst( ) override;
179 virtual
void SAL_CALL afterLast( ) override;
180 virtual
sal_Bool SAL_CALL first( ) override;
181 virtual
sal_Bool SAL_CALL last( ) override;
182 virtual sal_Int32 SAL_CALL getRow( ) override;
183 virtual
sal_Bool SAL_CALL absolute( sal_Int32 row ) override;
184 virtual
sal_Bool SAL_CALL relative( sal_Int32 rows ) override;
185 virtual
sal_Bool SAL_CALL previous( ) override;
186 virtual
void SAL_CALL refreshRow( ) override;
187 virtual
sal_Bool SAL_CALL rowUpdated( ) override;
188 virtual
sal_Bool SAL_CALL rowInserted( ) override;
189 virtual
sal_Bool SAL_CALL rowDeleted( ) override;
192 virtual
sal_Bool SAL_CALL wasNull( ) override;
193 virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) override;
194 virtual
sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) override;
195 virtual
sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) override;
196 virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) override;
197 virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) override;
198 virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) override;
199 virtual
float SAL_CALL getFloat( sal_Int32 columnIndex ) override;
200 virtual
double SAL_CALL getDouble( sal_Int32 columnIndex ) override;
201 virtual css::
uno::
Sequence<
sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) override;
202 virtual css::util::
Date SAL_CALL getDate( sal_Int32 columnIndex ) override;
203 virtual css::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) override;
204 virtual css::util::
DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) override;
205 virtual css::
uno::
Reference< css::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) override;
206 virtual css::
uno::
Reference< css::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) override;
207 virtual css::
uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const css::
uno::
Reference< css::container::XNameAccess >& typeMap ) override;
208 virtual css::
uno::
Reference< css::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) override;
209 virtual css::
uno::
Reference< css::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) override;
210 virtual css::
uno::
Reference< css::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) override;
211 virtual css::
uno::
Reference< css::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) override;
213 virtual css::
uno::
Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) override;
215 virtual
void SAL_CALL cancel( ) override;
217 virtual
void SAL_CALL close( ) override;
219 virtual css::
uno::Any SAL_CALL getWarnings( ) override;
220 virtual
void SAL_CALL clearWarnings( ) override;
222 virtual
void SAL_CALL insertRow( ) override;
223 virtual
void SAL_CALL updateRow( ) override;
224 virtual
void SAL_CALL deleteRow( ) override;
225 virtual
void SAL_CALL cancelRowUpdates( ) override;
226 virtual
void SAL_CALL moveToInsertRow( ) override;
227 virtual
void SAL_CALL moveToCurrentRow( ) override;
229 virtual
void SAL_CALL updateNull( sal_Int32 columnIndex ) override;
230 virtual
void SAL_CALL updateBoolean( sal_Int32 columnIndex,
sal_Bool x ) override;
231 virtual
void SAL_CALL updateByte( sal_Int32 columnIndex,
sal_Int8 x ) override;
232 virtual
void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) override;
233 virtual
void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) override;
234 virtual
void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) override;
235 virtual
void SAL_CALL updateFloat( sal_Int32 columnIndex,
float x ) override;
236 virtual
void SAL_CALL updateDouble( sal_Int32 columnIndex,
double x ) override;
237 virtual
void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) override;
238 virtual
void SAL_CALL updateBytes( sal_Int32 columnIndex, const css::
uno::
Sequence<
sal_Int8 >& x ) override;
239 virtual
void SAL_CALL updateDate( sal_Int32 columnIndex, const css::util::
Date& x ) override;
240 virtual
void SAL_CALL updateTime( sal_Int32 columnIndex, const css::util::Time& x ) override;
241 virtual
void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const css::util::
DateTime& x ) override;
242 virtual
void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const css::
uno::
Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
243 virtual
void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const css::
uno::
Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
244 virtual
void SAL_CALL updateObject( sal_Int32 columnIndex, const css::
uno::Any& x ) override;
245 virtual
void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::
uno::Any& x, sal_Int32
scale ) override;
247 virtual sal_Int32 SAL_CALL findColumn( const OUString&
columnName ) override;
249 virtual
void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
252 inline sal_Int32 mapColumn(sal_Int32 column);
254 void doTableSpecials(const
OSQLTable& _xTable);
256 sal_Int32 getRowCountResult()
const {
return m_nRowCountResult; }
262 m_aSelectRow = _rRow;
263 m_nColumnCount = m_aSelectRow->size();
265 void setColumnMapping(std::vector<sal_Int32>&& _aColumnMapping) { m_aColMapping = std::move(_aColumnMapping); }
268 void setOrderByColumns(std::vector<sal_Int32>&& _aColumnOrderBy) { m_aOrderbyColumnNumber = std::move(_aColumnOrderBy); }
269 void setOrderByAscending(std::vector<TAscendingOrder>&& _aOrderbyAsc) { m_aOrderbyAscending = std::move(_aOrderbyAsc); }
270 void setMetaData(
const css::uno::Reference< css::sdbc::XResultSetMetaData>& _xMetaData) { m_xMetaData = _xMetaData;}
272 static void setBoundedColumns(
const OValueRefRow& _rRow,
274 const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,
275 const css::uno::Reference< css::container::XIndexAccess>& _xNames,
276 bool _bSetColumnMapping,
277 const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _xMetaData,
278 std::vector<sal_Int32>& _rColMapping);
282 virtual sal_Int32 getDriverPos()
const override;
283 virtual bool isRowDeleted()
const override;
288 sal_Int32
map = column;
290 OSL_ENSURE(column > 0,
"file::OResultSet::mapColumn: invalid column index!");
the class OSkipDeletedSet supports a general method to skip deleted rows
void setBindingRow(const OValueRefRow &_aRow)
void setSelectRow(const OValueRefRow &_rRow)
OValueRefRow m_aEvaluateRow
std::vector< sal_Int32 > m_aColMapping
::rtl::Reference< connectivity::OSQLColumns > m_xColumns
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xMetaData
void setAssignValues(const ORefAssignValues &_aAssignValues)
void setSqlAnalyzer(OSQLAnalyzer *_pSQLAnalyzer)
css::uno::Reference< css::uno::XInterface > m_xStatement
OValueRefRow m_aSelectRow
sal_Int32 m_nLastVisitedPos
rtl::Reference< OFileTable > m_pTable
sal_Int32 m_nResultSetType
std::vector< TAscendingOrder > m_aOrderbyAscending
connectivity::OSQLParseTreeIterator & m_aSQLIterator
void setColumnMapping(std::vector< sal_Int32 > &&_aColumnMapping)
OSQLAnalyzer * m_pSQLAnalyzer
void setEvaluationRow(const OValueRefRow &_aRow)
OKeySet::iterator m_aFileSetIter
connectivity::OSQLParseNode * m_pParseTree
::rtl::Reference< OKeySet > m_pFileSet
sal_Int32 m_nFetchDirection
ORefAssignValues m_aAssignValues
sal_Int32 m_nRowCountResult
OValueRefRow m_aInsertRow
sal_Int32 mapColumn(sal_Int32 column)
std::unique_ptr< OSortIndex > m_pSortIndex
void setOrderByAscending(std::vector< TAscendingOrder > &&_aOrderbyAsc)
css::uno::Reference< css::container::XNameAccess > m_xColNames
std::vector< sal_Int32 > m_aOrderbyColumnNumber
css::uno::Reference< css::container::XIndexAccess > m_xColsIdx
void setOrderByColumns(std::vector< sal_Int32 > &&_aColumnOrderBy)
sal_Int32 m_nResultSetConcurrency
OSkipDeletedSet m_aSkipDeletedSet
void setMetaData(const css::uno::Reference< css::sdbc::XResultSetMetaData > &_xMetaData)
#define OOO_DLLPUBLIC_FILE
static bool getValue(EContact *pContact, sal_Int32 nColumnNum, GType nType, GValue *pStackValue, bool &_out_rWasNull)
::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::lang::XServiceInfo, css::lang::XEventListener > OResultSet_BASE
css::uno::Reference< css::sdbcx::XColumnsSupplier > OSQLTable
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
std::map< OUString, rtl::Reference< Entity > > map