29#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
30#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
53 SelectColumnDescription( sal_Int32 _nPosition, sal_Int32 _nType, sal_Int32 _nScale,
bool _bNullable, OUString _sDefaultValue )
65 void getColumnPositions(
const css::uno::Reference< css::container::XNameAccess >& _rxQueryColumns,
66 const css::uno::Sequence< OUString >& _rColumnNames,
67 std::u16string_view _rsUpdateTableName,
69 bool i_bAppendTableName =
false);
71 typedef std::pair<ORowSetRow,std::pair<sal_Int32,css::uno::Reference< css::sdbc::XRow> > >
OKeySetValue;
94 typedef std::map< std::vector<bool>,
95 css::uno::Reference< css::sdbc::XPreparedStatement > >
99 css::uno::Reference< css::sdbc::XResultSet>
m_xSet;
100 css::uno::Reference< css::sdbc::XRow>
m_xRow;
101 css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer >
m_xComposer;
124 const OUString& i_rUpdateTableName,
125 const css::uno::Reference< css::sdbc::XDatabaseMetaData>& i_xMeta,
126 const css::uno::Reference< css::container::XNameAccess>& i_xQueryColumns,
127 std::unique_ptr<SelectColumnsMetaData>
const & o_pKeyColumnNames);
131 const css::uno::Reference< css::sdbc::XParameters > &_xParameter,
140 void executeUpdate(
const ORowSetRow& _rInsertRow,
const ORowSetRow& _rOriginalRow,
const OUString& i_sSQL, std::u16string_view i_sTableName,
const std::vector<sal_Int32>& _aIndexColumnPositions = std::vector<sal_Int32>());
141 void executeInsert(
const ORowSetRow& _rInsertRow,
const OUString& i_sSQL, std::u16string_view i_sTableName,
bool bRefetch =
false);
142 void executeStatement(OUStringBuffer& io_aFilter, css::uno::Reference< css::sdb::XSingleSelectQueryComposer>& io_xAnalyzer);
147 OUString _sUpdateTableName,
148 const css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
150 sal_Int32 i_nMaxRows,
151 sal_Int32& o_nRowCount);
154 virtual void construct(
const css::uno::Reference< css::sdbc::XResultSet>& _xDriverSet,
const OUString& i_sRowSetFilter)
override;
155 virtual void reset(
const css::uno::Reference< css::sdbc::XResultSet>& _xDriverSet)
override;
159 virtual OUString SAL_CALL
getString( sal_Int32 columnIndex )
override;
162 virtual sal_Int16 SAL_CALL
getShort( sal_Int32 columnIndex )
override;
163 virtual sal_Int32 SAL_CALL
getInt( sal_Int32 columnIndex )
override;
164 virtual sal_Int64 SAL_CALL
getLong( sal_Int32 columnIndex )
override;
165 virtual float SAL_CALL
getFloat( sal_Int32 columnIndex )
override;
166 virtual double SAL_CALL
getDouble( sal_Int32 columnIndex )
override;
167 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
getBytes( sal_Int32 columnIndex )
override;
168 virtual css::util::Date SAL_CALL
getDate( sal_Int32 columnIndex )
override;
169 virtual css::util::Time SAL_CALL
getTime( sal_Int32 columnIndex )
override;
170 virtual css::util::DateTime SAL_CALL
getTimestamp( sal_Int32 columnIndex )
override;
171 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
getBinaryStream( sal_Int32 columnIndex )
override;
172 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
getCharacterStream( sal_Int32 columnIndex )
override;
173 virtual css::uno::Any SAL_CALL
getObject( sal_Int32 columnIndex,
const css::uno::Reference< css::container::XNameAccess >& typeMap )
override;
174 virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL
getRef( sal_Int32 columnIndex )
override;
175 virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL
getBlob( sal_Int32 columnIndex )
override;
176 virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL
getClob( sal_Int32 columnIndex )
override;
177 virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL
getArray( sal_Int32 columnIndex )
override;
187 virtual bool next()
override;
190 virtual bool first()
override;
191 virtual bool last( )
override;
192 virtual sal_Int32
getRow( )
override;
193 virtual bool absolute( sal_Int32 row )
override;
202 virtual bool moveToBookmark(
const css::uno::Any& bookmark )
override;
204 virtual sal_Int32
compareBookmarks(
const css::uno::Any& first,
const css::uno::Any& second )
override;
208 virtual sal_Int32
hashBookmark(
const css::uno::Any& bookmark )
override;
virtual sal_Bool SAL_CALL wasNull() override
void executeUpdate(const ORowSetRow &_rInsertRow, const ORowSetRow &_rOriginalRow, const OUString &i_sSQL, std::u16string_view i_sTableName, const std::vector< sal_Int32 > &_aIndexColumnPositions=std::vector< sal_Int32 >())
std::unique_ptr< SelectColumnsMetaData > m_pKeyColumnNames
void executeStatement(OUStringBuffer &io_aFilter, css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &io_xAnalyzer)
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
std::vector< OUString > m_aAutoColumns
virtual void makeNewStatement()
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
OUpdatedParameter m_aUpdatedParameter
virtual void insertRow(const ORowSetRow &_rInsertRow, const connectivity::OSQLTable &_xTable) override
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
css::uno::Reference< css::sdbc::XPreparedStatement > m_xStatement
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
void findTableColumnsMatching_throw(const css::uno::Any &i_aTable, const OUString &i_rUpdateTableName, const css::uno::Reference< css::sdbc::XDatabaseMetaData > &i_xMeta, const css::uno::Reference< css::container::XNameAccess > &i_xQueryColumns, std::unique_ptr< SelectColumnsMetaData > const &o_pKeyColumnNames)
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
css::uno::Reference< css::sdbc::XRow > m_xRow
void tryRefetch(const ORowSetRow &_rInsertRow, bool bRefetch)
virtual void reset(const css::uno::Reference< css::sdbc::XResultSet > &_xDriverSet) override
static void setOneKeyColumnParameter(sal_Int32 &nPos, const css::uno::Reference< css::sdbc::XParameters > &_xParameter, const connectivity::ORowSetValue &_rValue, sal_Int32 _nType, sal_Int32 _nScale)
virtual sal_Int32 getRow() override
virtual css::uno::Any getBookmark() override
virtual sal_Int32 compareBookmarks(const css::uno::Any &first, const css::uno::Any &second) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
connectivity::OSQLTable m_xTable
virtual bool absolute(sal_Int32 row) override
OKeySetMatrix::iterator m_aKeyIter
OUStringBuffer createKeyFilter()
virtual void construct(const css::uno::Reference< css::sdbc::XResultSet > &_xDriverSet, const OUString &i_sRowSetFilter) override
virtual bool rowUpdated() override
bool doTryRefetch_throw()
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual bool hasOrderedBookmarks() override
virtual bool rowInserted() override
void executeInsert(const ORowSetRow &_rInsertRow, const OUString &i_sSQL, std::u16string_view i_sTableName, bool bRefetch=false)
virtual bool moveToBookmark(const css::uno::Any &bookmark) override
std::unique_ptr< SelectColumnsMetaData > m_pParameterNames
std::unique_ptr< SelectColumnsMetaData > m_pColumnNames
virtual sal_Int32 hashBookmark(const css::uno::Any &bookmark) override
const OUString m_sUpdateTableName
rtl::Reference< ORowSetValueVector > m_aParameterValueForCache
virtual bool last() override
vStatements_t m_vStatements
OKeySet(connectivity::OSQLTable _aTable, OUString _sUpdateTableName, const css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer > &_xComposer, const ORowSetValueVector &_aParameterValueForCache, sal_Int32 i_nMaxRows, sal_Int32 &o_nRowCount)
std::unique_ptr< SelectColumnsMetaData > m_pForeignColumnNames
virtual void afterLast() override
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
std::vector< OUString > m_aFilterColumns
static void impl_convertValue_throw(const ORowSetRow &_rInsertRow, const SelectColumnDescription &i_aMetaData)
std::map< std::vector< bool >, css::uno::Reference< css::sdbc::XPreparedStatement > > vStatements_t
css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer > m_xComposer
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
virtual void beforeFirst() override
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
virtual void updateRow(const ORowSetRow &_rInsertRow, const ORowSetRow &_rOriginalRow, const connectivity::OSQLTable &_xTable) override
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
virtual void deleteRow(const ORowSetRow &_rInsertRow, const connectivity::OSQLTable &_xTable) override
virtual bool first() override
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
virtual bool next() override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
virtual void refreshRow() override
void copyRowValue(const ORowSetRow &_rInsertRow, ORowSetRow const &_rKeyRow, sal_Int32 i_nBookmark)
copies the values from the insert row into the key row
virtual bool previous() override
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
css::uno::Reference< css::sdbc::XResultSet > m_xSet
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual bool rowDeleted() override
css::uno::Reference< css::sdbcx::XColumnsSupplier > OSQLTable
std::map< OUString, SelectColumnDescription, ::comphelper::UStringMixLess > SelectColumnsMetaData
std::map< sal_Int32, rtl::Reference< ORowSetValueVector > > OUpdatedParameter
std::pair< ORowSetRow, std::pair< sal_Int32, css::uno::Reference< css::sdbc::XRow > > > OKeySetValue
void getColumnPositions(const Reference< XNameAccess > &_rxQueryColumns, const css::uno::Sequence< OUString > &_aColumnNames, std::u16string_view _rsUpdateTableName, SelectColumnsMetaData &o_rColumnNames, bool i_bAppendTableName)
std::map< sal_Int32, OKeySetValue > OKeySetMatrix
SelectColumnDescription(sal_Int32 _nPosition, sal_Int32 _nType, sal_Int32 _nScale, bool _bNullable, OUString _sDefaultValue)
SelectColumnDescription()