45#include <com/sun/star/sdbc/XParameters.hpp>
46#include <com/sun/star/sdbc/XMultipleResults.hpp>
47#include <com/sun/star/sdbc/XGeneratedResultSet.hpp>
48#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
64#define PREPARED_STATEMENT_SIZE 9
66typedef ::cppu::WeakComponentImplHelper< css::sdbc::XPreparedStatement,
67 css::sdbc::XParameters,
68 css::sdbc::XCloseable,
69 css::sdbc::XWarningsSupplier,
70 css::sdbc::XMultipleResults,
71 css::sdbc::XGeneratedResultSet,
72 css::sdbc::XResultSetMetaDataSupplier
99 const css::uno::Reference< css::sdbc::XConnection> & con,
105 virtual void SAL_CALL
acquire() noexcept
override { PreparedStatement_BASE::acquire(); }
106 virtual void SAL_CALL
release() noexcept
override { PreparedStatement_BASE::release(); }
107 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type & reqType )
override;
110 virtual void SAL_CALL
close( )
override;
113 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL
executeQuery()
override;
116 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL
getConnection( )
override;
118 virtual void SAL_CALL
setNull( sal_Int32 parameterIndex, sal_Int32 sqlType )
override;
120 sal_Int32 parameterIndex, sal_Int32 sqlType,
const OUString&
typeName )
override;
122 virtual void SAL_CALL
setByte( sal_Int32 parameterIndex,
sal_Int8 x )
override;
123 virtual void SAL_CALL
setShort( sal_Int32 parameterIndex, sal_Int16 x )
override;
124 virtual void SAL_CALL
setInt( sal_Int32 parameterIndex, sal_Int32 x )
override;
125 virtual void SAL_CALL
setLong( sal_Int32 parameterIndex, sal_Int64 x )
override;
126 virtual void SAL_CALL
setFloat( sal_Int32 parameterIndex,
float x )
override;
127 virtual void SAL_CALL
setDouble( sal_Int32 parameterIndex,
double x )
override;
128 virtual void SAL_CALL
setString( sal_Int32 parameterIndex,
const OUString& x )
override;
130 sal_Int32 parameterIndex,
const css::uno::Sequence< sal_Int8 >& x )
override;
131 virtual void SAL_CALL
setDate( sal_Int32 parameterIndex,
const css::util::Date& x )
override;
132 virtual void SAL_CALL
setTime( sal_Int32 parameterIndex,
const css::util::Time& x )
override;
134 sal_Int32 parameterIndex,
const css::util::DateTime& x )
override;
136 sal_Int32 parameterIndex,
137 const css::uno::Reference< css::io::XInputStream >& x,
138 sal_Int32 length )
override;
140 sal_Int32 parameterIndex,
141 const css::uno::Reference< css::io::XInputStream >& x,
142 sal_Int32 length )
override;
143 virtual void SAL_CALL
setObject( sal_Int32 parameterIndex,
const css::uno::Any& x )
override;
145 sal_Int32 parameterIndex,
146 const css::uno::Any& x,
147 sal_Int32 targetSqlType,
148 sal_Int32
scale )
override;
149 virtual void SAL_CALL
setRef(
150 sal_Int32 parameterIndex,
151 const css::uno::Reference< css::sdbc::XRef >& x )
override;
153 sal_Int32 parameterIndex,
154 const css::uno::Reference< css::sdbc::XBlob >& x )
override;
156 sal_Int32 parameterIndex,
157 const css::uno::Reference< css::sdbc::XClob >& x )
override;
159 sal_Int32 parameterIndex,
160 const css::uno::Reference< css::sdbc::XArray >& x )
override;
164 virtual css::uno::Any SAL_CALL
getWarnings( )
override;
168 virtual css::uno::Sequence< css::uno::Type > SAL_CALL
getTypes()
override;
175 css::uno::Any & rConvertedValue,
176 css::uno::Any & rOldValue,
178 const css::uno::Any& rValue )
override;
182 const css::uno::Any& rValue )
override;
184 using ::cppu::OPropertySetHelper::getFastPropertyValue;
187 css::uno::Any& rValue,
188 sal_Int32 nHandle )
const override;
191 css::uno::Reference < css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo()
override;
194 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL
198 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL
getResultSet( )
override;
204 virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL
getMetaData( )
override;
207 virtual void SAL_CALL
disposing()
override;
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual void SAL_CALL setTimestamp(sal_Int32 parameterIndex, const css::util::DateTime &x) override
virtual void SAL_CALL setInt(sal_Int32 parameterIndex, sal_Int32 x) override
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection() override
virtual void SAL_CALL setFloat(sal_Int32 parameterIndex, float x) override
virtual void SAL_CALL setDouble(sal_Int32 parameterIndex, double x) override
virtual void SAL_CALL setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) override
css::uno::Reference< css::sdbc::XConnection > m_connection
sal_Int32 m_lastOidInserted
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getGeneratedValues() override
virtual void SAL_CALL close() override
virtual cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual sal_Bool SAL_CALL execute() override
void checkColumnIndex(sal_Int32 parameterIndex)
virtual void SAL_CALL disposing() override
virtual void SAL_CALL setLong(sal_Int32 parameterIndex, sal_Int64 x) override
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual sal_Int32 SAL_CALL executeUpdate() override
virtual void SAL_CALL setClob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XClob > &x) override
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL executeQuery() override
virtual void SAL_CALL release() noexcept override
virtual sal_Int32 SAL_CALL getUpdateCount() override
virtual void SAL_CALL setObject(sal_Int32 parameterIndex, const css::uno::Any &x) override
virtual void SAL_CALL setBinaryStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL setString(sal_Int32 parameterIndex, const OUString &x) override
virtual void SAL_CALL setCharacterStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL setRef(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XRef > &x) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &reqType) override
sal_Int32 m_multipleResultUpdateCount
virtual void SAL_CALL setObjectWithInfo(sal_Int32 parameterIndex, const css::uno::Any &x, sal_Int32 targetSqlType, sal_Int32 scale) 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 css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getResultSet() override
virtual void SAL_CALL acquire() noexcept override
ConnectionSettings * m_pSettings
css::uno::Reference< css::sdbc::XCloseable > m_lastResultset
::rtl::Reference< comphelper::RefCountedMutex > m_xMutex
virtual void SAL_CALL setBoolean(sal_Int32 parameterIndex, sal_Bool x) override
virtual void SAL_CALL clearParameters() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual sal_Bool SAL_CALL getMoreResults() override
virtual void SAL_CALL setTime(sal_Int32 parameterIndex, const css::util::Time &x) override
bool m_multipleResultAvailable
std::vector< OString > m_vars
virtual void SAL_CALL setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString &typeName) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual ~PreparedStatement() override
std::vector< OString > m_splittedStatement
virtual void SAL_CALL setBytes(sal_Int32 parameterIndex, const css::uno::Sequence< sal_Int8 > &x) override
virtual void SAL_CALL setByte(sal_Int32 parameterIndex, sal_Int8 x) override
virtual void SAL_CALL clearWarnings() override
virtual void SAL_CALL setArray(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XArray > &x) override
css::uno::Any m_props[PREPARED_STATEMENT_SIZE]
void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual void SAL_CALL setShort(sal_Int32 parameterIndex, sal_Int16 x) override
virtual css::uno::Any SAL_CALL getWarnings() override
virtual void SAL_CALL setDate(sal_Int32 parameterIndex, const css::util::Date &x) override
OUString m_lastTableInserted
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
OString m_executedStatement
PreparedStatement(const rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &con, struct ConnectionSettings *pSettings, OString stmt)
void raiseSQLException(const char *errorMsg)
virtual void SAL_CALL setBlob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XBlob > &x) override
const sal_Int32 PREPARED_STATEMENT_FETCH_DIRECTION
const sal_Int32 PREPARED_STATEMENT_MAX_FIELD_SIZE
const sal_Int32 PREPARED_STATEMENT_RESULT_SET_TYPE
const sal_Int32 PREPARED_STATEMENT_QUERY_TIME_OUT
const sal_Int32 PREPARED_STATEMENT_ESCAPE_PROCESSING
::cppu::WeakComponentImplHelper< css::sdbc::XPreparedStatement, css::sdbc::XParameters, css::sdbc::XCloseable, css::sdbc::XWarningsSupplier, css::sdbc::XMultipleResults, css::sdbc::XGeneratedResultSet, css::sdbc::XResultSetMetaDataSupplier > PreparedStatement_BASE
const sal_Int32 PREPARED_STATEMENT_FETCH_SIZE
const sal_Int32 PREPARED_STATEMENT_RESULT_SET_CONCURRENCY
const sal_Int32 PREPARED_STATEMENT_CURSOR_NAME
const sal_Int32 PREPARED_STATEMENT_MAX_ROWS
#define PREPARED_STATEMENT_SIZE