23#include <com/sun/star/sdbc/XColumnLocate.hpp>
24#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
26#include <osl/diagnose.h>
27#include <core_resource.hxx>
31#include <com/sun/star/sdbc/XRowUpdate.hpp>
48 ,m_xTargetResultSetUpdate(xResultSetUpdate)
49 ,m_xTargetRowUpdate(xResultSetUpdate,UNO_QUERY)
51 ,m_bAlreadyAsked(false)
53 OSL_ENSURE(pParent,
"Window can't be null!");
61 OSL_ENSURE(xColumnLocate.is(),
"The rowset normally should support this");
65 throw SQLException(
DBA_RES(STR_UNEXPECTED_ERROR),*
this,
"S1000",0,
Any());
78 nPos = xColumnLocate->findColumn(sColumnName);
80 catch(
const SQLException&)
104 [](sal_Int32
n) { return n > 0; }))
106 bool bContinue =
true;
111 for(;pBegin != pEnd && bContinue;++pBegin)
115 OSL_ENSURE(
nPos != -1,
"Invalid position!");
122 sal_Int32 nRowCount = 0;
136 OSL_ENSURE(nRowCount,
"RowCount is 0!");
161 case DataType::VARCHAR:
162 aValue <<=
m_xRow->getString(column);
164 case DataType::DECIMAL:
165 case DataType::NUMERIC:
166 aValue <<=
m_xRow->getDouble(column);
168 case DataType::BIGINT:
169 aValue <<=
m_xRow->getLong(column);
171 case DataType::FLOAT:
172 aValue <<=
m_xRow->getFloat(column);
174 case DataType::DOUBLE:
175 aValue <<=
m_xRow->getDouble(column);
177 case DataType::LONGVARCHAR:
178 aValue <<=
m_xRow->getString(column);
180 case DataType::LONGVARBINARY:
181 aValue <<=
m_xRow->getBytes(column);
184 aValue <<=
m_xRow->getDate(column);
187 aValue <<=
m_xRow->getTime(column);
189 case DataType::TIMESTAMP:
190 aValue <<=
m_xRow->getTimestamp(column);
193 case DataType::BOOLEAN:
194 aValue <<=
m_xRow->getBoolean(column);
196 case DataType::TINYINT:
197 aValue <<=
m_xRow->getByte(column);
199 case DataType::SMALLINT:
200 aValue <<=
m_xRow->getShort(column);
202 case DataType::INTEGER:
203 aValue <<=
m_xRow->getInt(column);
206 aValue <<=
m_xRow->getDouble(column);
208 case DataType::BINARY:
209 case DataType::VARBINARY:
210 aValue <<=
m_xRow->getBytes(column);
213 aValue <<=
m_xRow->getBlob(column);
216 aValue <<=
m_xRow->getClob(column);
219 SAL_WARN(
"dbaccess.ui",
"Unknown type");
232 catch(
const SQLException&)
236 OUString sAskIfContinue =
DBA_RES(STR_ERROR_OCCURRED_WHILE_COPYING);
#define COLUMN_POSITION_NOT_FOUND
css::uno::Sequence< css::uno::Any > m_aSelection
css::uno::Reference< css::sdbc::XResultSet > m_xResultSet
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xResultSetMetaData
virtual void initialize()
css::uno::Reference< css::sdbc::XRow > m_xRow
virtual void initialize() override
css::uno::Reference< css::sdbc::XResultSetUpdate > m_xTargetResultSetUpdate
css::uno::Reference< css::sdbc::XRowUpdate > m_xTargetRowUpdate
std::vector< sal_Int32 > m_aColumnTypes
virtual bool Write() override
virtual bool Read() override
std::vector< sal_Int32 > m_aColumnMapping
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xTargetResultSetMetaData
#define SAL_WARN(area, stream)
constexpr OUStringLiteral PROPERTY_ISROWCOUNTFINAL(u"IsRowCountFinal")
constexpr OUStringLiteral PROPERTY_ROWCOUNT(u"RowCount")