LibreOffice Module connectivity (master) 1
|
#include <pq_preparedstatement.hxx>
Public Member Functions | |
PreparedStatement (const rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &con, struct ConnectionSettings *pSettings, OString stmt) | |
virtual | ~PreparedStatement () override |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &reqType) override |
virtual void SAL_CALL | close () override |
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL | executeQuery () override |
virtual sal_Int32 SAL_CALL | executeUpdate () override |
virtual sal_Bool SAL_CALL | execute () override |
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL | getConnection () override |
virtual void SAL_CALL | setNull (sal_Int32 parameterIndex, sal_Int32 sqlType) override |
virtual void SAL_CALL | setObjectNull (sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString &typeName) override |
virtual void SAL_CALL | setBoolean (sal_Int32 parameterIndex, sal_Bool x) override |
virtual void SAL_CALL | setByte (sal_Int32 parameterIndex, sal_Int8 x) override |
virtual void SAL_CALL | setShort (sal_Int32 parameterIndex, sal_Int16 x) override |
virtual void SAL_CALL | setInt (sal_Int32 parameterIndex, sal_Int32 x) override |
virtual void SAL_CALL | setLong (sal_Int32 parameterIndex, sal_Int64 x) 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 | setString (sal_Int32 parameterIndex, const OUString &x) override |
virtual void SAL_CALL | setBytes (sal_Int32 parameterIndex, const css::uno::Sequence< sal_Int8 > &x) override |
virtual void SAL_CALL | setDate (sal_Int32 parameterIndex, const css::util::Date &x) override |
virtual void SAL_CALL | setTime (sal_Int32 parameterIndex, const css::util::Time &x) override |
virtual void SAL_CALL | setTimestamp (sal_Int32 parameterIndex, const css::util::DateTime &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 | setCharacterStream (sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override |
virtual void SAL_CALL | setObject (sal_Int32 parameterIndex, const css::uno::Any &x) override |
virtual void SAL_CALL | setObjectWithInfo (sal_Int32 parameterIndex, const css::uno::Any &x, sal_Int32 targetSqlType, sal_Int32 scale) override |
virtual void SAL_CALL | setRef (sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XRef > &x) override |
virtual void SAL_CALL | setBlob (sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XBlob > &x) override |
virtual void SAL_CALL | setClob (sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XClob > &x) override |
virtual void SAL_CALL | setArray (sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XArray > &x) override |
virtual void SAL_CALL | clearParameters () override |
virtual css::uno::Any SAL_CALL | getWarnings () override |
virtual void SAL_CALL | clearWarnings () override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
virtual cppu::IPropertyArrayHelper &SAL_CALL | getInfoHelper () 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 void SAL_CALL | setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override |
void SAL_CALL | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override |
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | getPropertySetInfo () override |
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL | getGeneratedValues () override |
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL | getResultSet () override |
virtual sal_Int32 SAL_CALL | getUpdateCount () override |
virtual sal_Bool SAL_CALL | getMoreResults () override |
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL | getMetaData () override |
virtual void SAL_CALL | disposing () override |
Public Member Functions inherited from cppu::OPropertySetHelper | |
OPropertySetHelper (OBroadcastHelper &rBHelper) | |
OPropertySetHelper (OBroadcastHelper &rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring) | |
OPropertySetHelper (OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents, bool bIgnoreRuntimeExceptionsWhileFiring=false) | |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &rType) SAL_OVERRIDE |
css::uno::Sequence< css::uno::Type > | getTypes () |
void SAL_CALL | disposing () |
virtual void SAL_CALL | setPropertyValue (const ::rtl::OUString &rPropertyName, const css::uno::Any &aValue) SAL_OVERRIDE |
virtual css::uno::Any SAL_CALL | getPropertyValue (const ::rtl::OUString &aPropertyName) SAL_OVERRIDE |
virtual void SAL_CALL | addPropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | removePropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | addVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | removeVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE |
virtual void SAL_CALL | setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) SAL_OVERRIDE |
virtual css::uno::Any SAL_CALL | getFastPropertyValue (sal_Int32 nHandle) SAL_OVERRIDE |
virtual void SAL_CALL | setPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) SAL_OVERRIDE |
virtual css::uno::Sequence< css::uno::Any > SAL_CALL | getPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames) SAL_OVERRIDE |
virtual void SAL_CALL | addPropertiesChangeListener (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE |
virtual void SAL_CALL | removePropertiesChangeListener (const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE |
virtual void SAL_CALL | firePropertiesChangeEvent (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE |
Private Member Functions | |
void | checkColumnIndex (sal_Int32 parameterIndex) |
void | checkClosed () |
void | raiseSQLException (const char *errorMsg) |
Private Attributes | |
css::uno::Any | m_props [PREPARED_STATEMENT_SIZE] |
css::uno::Reference< css::sdbc::XConnection > | m_connection |
ConnectionSettings * | m_pSettings |
css::uno::Reference< css::sdbc::XCloseable > | m_lastResultset |
OString | m_stmt |
OString | m_executedStatement |
::rtl::Reference< comphelper::RefCountedMutex > | m_xMutex |
std::vector< OString > | m_vars |
std::vector< OString > | m_splittedStatement |
bool | m_multipleResultAvailable |
sal_Int32 | m_multipleResultUpdateCount |
sal_Int32 | m_lastOidInserted |
OUString | m_lastTableInserted |
OString | m_lastQuery |
Additional Inherited Members | |
Static Public Member Functions inherited from cppu::OPropertySetHelper | |
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | createPropertySetInfo (IPropertyArrayHelper &rProperties) |
Protected Member Functions inherited from cppu::OPropertySetHelper | |
void SAL_CALL | fire (sal_Int32 *pnHandles, const css::uno::Any *pNewValues, const css::uno::Any *pOldValues, sal_Int32 nCount, sal_Bool bVetoable) |
void SAL_CALL | setFastPropertyValues (sal_Int32 nSeqLen, sal_Int32 *pHandles, const css::uno::Any *pValues, sal_Int32 nHitCount) |
virtual IPropertyArrayHelper &SAL_CALL | getInfoHelper ()=0 |
virtual sal_Bool SAL_CALL | convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)=0 |
virtual void SAL_CALL | setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue)=0 |
virtual void SAL_CALL | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const=0 |
void | setDependentFastPropertyValue (sal_Int32 i_handle, const css::uno::Any &i_value) |
~OPropertySetHelper () | |
Protected Attributes inherited from cppu::OPropertySetHelper | |
OBroadcastHelper & | rBHelper |
OMultiTypeInterfaceContainerHelperInt32 | aBoundLC |
OMultiTypeInterfaceContainerHelperInt32 | aVetoableLC |
Impl *const | m_pReserved |
Definition at line 74 of file pq_preparedstatement.hxx.
pq_sdbc_driver::PreparedStatement::PreparedStatement | ( | const rtl::Reference< comphelper::RefCountedMutex > & | refMutex, |
const css::uno::Reference< css::sdbc::XConnection > & | con, | ||
struct ConnectionSettings * | pSettings, | ||
OString | stmt | ||
) |
ppConnection | The piece of memory, pConnection points to, is accessible as long as a reference to parameter con is held. |
Definition at line 149 of file pq_preparedstatement.cxx.
References index, pq_sdbc_driver::isNamedParameterStart(), pq_sdbc_driver::isQuoted(), m_props, m_splittedStatement, m_stmt, m_vars, pq_sdbc_driver::PREPARED_STATEMENT_MAX_ROWS, pq_sdbc_driver::PREPARED_STATEMENT_QUERY_TIME_OUT, pq_sdbc_driver::PREPARED_STATEMENT_RESULT_SET_CONCURRENCY, pq_sdbc_driver::PREPARED_STATEMENT_RESULT_SET_TYPE, and pq_sdbc_driver::splitSQL().
|
overridevirtual |
Definition at line 196 of file pq_preparedstatement.cxx.
|
inlineoverridevirtualnoexcept |
Definition at line 105 of file pq_preparedstatement.hxx.
|
private |
css::sdbc::SQLException | |
css::uno::RuntimeException |
Definition at line 213 of file pq_preparedstatement.cxx.
References Any, m_pSettings, and pq_sdbc_driver::ConnectionSettings::pConnection.
Referenced by getConnection(), setBoolean(), setBytes(), setDouble(), setFloat(), setInt(), setLong(), setNull(), setObjectNull(), and setString().
|
private |
Definition at line 200 of file pq_preparedstatement.cxx.
References Any, pq_sdbc_driver::ConnectionSettings::encoding, m_stmt, m_vars, and o3tl::make_unsigned().
Referenced by setBoolean(), setBytes(), setDouble(), setFloat(), setInt(), setLong(), setNull(), setObjectNull(), and setString().
|
overridevirtual |
Definition at line 613 of file pq_preparedstatement.cxx.
|
overridevirtual |
Definition at line 624 of file pq_preparedstatement.cxx.
|
overridevirtual |
Definition at line 243 of file pq_preparedstatement.cxx.
References m_connection, m_lastResultset, m_pSettings, and m_xMutex.
Referenced by disposing().
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 643 of file pq_preparedstatement.cxx.
References m_props, nHandle, pq_sdbc_driver::PREPARED_STATEMENT_CURSOR_NAME, pq_sdbc_driver::PREPARED_STATEMENT_ESCAPE_PROCESSING, pq_sdbc_driver::PREPARED_STATEMENT_FETCH_DIRECTION, pq_sdbc_driver::PREPARED_STATEMENT_FETCH_SIZE, pq_sdbc_driver::PREPARED_STATEMENT_MAX_FIELD_SIZE, pq_sdbc_driver::PREPARED_STATEMENT_MAX_ROWS, pq_sdbc_driver::PREPARED_STATEMENT_QUERY_TIME_OUT, pq_sdbc_driver::PREPARED_STATEMENT_RESULT_SET_CONCURRENCY, and pq_sdbc_driver::PREPARED_STATEMENT_RESULT_SET_TYPE.
|
overridevirtual |
Definition at line 705 of file pq_preparedstatement.cxx.
References close().
|
overridevirtual |
Definition at line 294 of file pq_preparedstatement.cxx.
References pq_sdbc_driver::CommandData::concurrency, pq_sdbc_driver::executePostgresCommand(), pq_sdbc_driver::extractIntProperty(), pq_sdbc_driver::getStatics(), index, pq_sdbc_driver::isNamedParameterStart(), pq_sdbc_driver::isOperator(), pq_sdbc_driver::isQuoted(), pq_sdbc_driver::isWhitespace(), m_connection, m_executedStatement, m_lastOidInserted, m_lastQuery, m_lastResultset, m_lastTableInserted, m_multipleResultAvailable, m_multipleResultUpdateCount, m_pSettings, m_splittedStatement, m_stmt, m_vars, m_xMutex, pq_sdbc_driver::CommandData::owner, pq_sdbc_driver::CommandData::pLastOidInserted, pq_sdbc_driver::CommandData::pLastQuery, pq_sdbc_driver::CommandData::pLastResultset, pq_sdbc_driver::CommandData::pLastTableInserted, pq_sdbc_driver::CommandData::pMultipleResultAvailable, pq_sdbc_driver::CommandData::pMultipleResultUpdateCount, pq_sdbc_driver::CommandData::ppSettings, pq_sdbc_driver::CommandData::refMutex, start, and pq_sdbc_driver::CommandData::tableSupplier.
Referenced by executeQuery(), and executeUpdate().
|
overridevirtual |
Definition at line 276 of file pq_preparedstatement.cxx.
References execute(), m_lastResultset, and raiseSQLException().
|
overridevirtual |
Definition at line 285 of file pq_preparedstatement.cxx.
References execute(), m_multipleResultUpdateCount, and raiseSQLException().
|
overridevirtual |
Definition at line 376 of file pq_preparedstatement.cxx.
References checkClosed(), m_connection, and m_xMutex.
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 695 of file pq_preparedstatement.cxx.
|
overridevirtual |
Definition at line 728 of file pq_preparedstatement.cxx.
References pq_sdbc_driver::getGeneratedValuesFromLastInsert(), m_connection, m_lastOidInserted, m_lastQuery, m_lastTableInserted, m_pSettings, and m_xMutex.
Definition at line 238 of file pq_preparedstatement.cxx.
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 637 of file pq_preparedstatement.cxx.
References pq_sdbc_driver::getPreparedStatementPropertyArrayHelper().
|
overridevirtual |
Definition at line 628 of file pq_preparedstatement.cxx.
References m_lastResultset.
|
overridevirtual |
Definition at line 719 of file pq_preparedstatement.cxx.
References m_lastResultset, and m_multipleResultUpdateCount.
|
override |
Definition at line 700 of file pq_preparedstatement.cxx.
References pq_sdbc_driver::getPreparedStatementPropertyArrayHelper().
|
overridevirtual |
Definition at line 711 of file pq_preparedstatement.cxx.
References m_lastResultset.
Definition at line 228 of file pq_preparedstatement.cxx.
|
overridevirtual |
Definition at line 715 of file pq_preparedstatement.cxx.
References m_multipleResultUpdateCount.
|
overridevirtual |
Definition at line 619 of file pq_preparedstatement.cxx.
References Any.
|
overridevirtual |
Reimplemented from cppu::OPropertySetHelper.
Definition at line 221 of file pq_preparedstatement.cxx.
References Any.
|
private |
css::sdbc::SQLException |
Definition at line 263 of file pq_preparedstatement.cxx.
References Any, pq_sdbc_driver::ConnectionSettings::encoding, m_executedStatement, and SAL_WARN.
Referenced by executeQuery(), and executeUpdate().
|
inlineoverridevirtualnoexcept |
Definition at line 106 of file pq_preparedstatement.hxx.
|
overridevirtual |
Definition at line 606 of file pq_preparedstatement.cxx.
References pq_sdbc_driver::array2String(), setString(), and x.
|
overridevirtual |
Definition at line 513 of file pq_preparedstatement.cxx.
References Any.
|
overridevirtual |
Definition at line 588 of file pq_preparedstatement.cxx.
References Any.
|
overridevirtual |
Definition at line 406 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), m_vars, m_xMutex, and x.
|
overridevirtual |
Definition at line 417 of file pq_preparedstatement.cxx.
|
overridevirtual |
Definition at line 477 of file pq_preparedstatement.cxx.
References Any, checkClosed(), checkColumnIndex(), m_vars, m_xMutex, and x.
|
overridevirtual |
Definition at line 523 of file pq_preparedstatement.cxx.
References Any.
|
overridevirtual |
Definition at line 597 of file pq_preparedstatement.cxx.
References Any.
|
overridevirtual |
Definition at line 497 of file pq_preparedstatement.cxx.
References setString(), dbtools::DBTypeConversion::toDateString(), and x.
|
overridevirtual |
Definition at line 452 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), m_vars, m_xMutex, and x.
|
overridevirtual |
Implements cppu::OPropertySetHelper.
Definition at line 689 of file pq_preparedstatement.cxx.
|
overridevirtual |
Definition at line 444 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), m_vars, m_xMutex, and x.
|
overridevirtual |
Definition at line 427 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), m_vars, m_xMutex, and x.
Referenced by setByte(), and setShort().
|
overridevirtual |
Definition at line 436 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), m_vars, m_xMutex, and x.
|
overridevirtual |
Definition at line 388 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), m_vars, and m_xMutex.
|
overridevirtual |
Definition at line 533 of file pq_preparedstatement.cxx.
References Any, pq_sdbc_driver::implSetObject(), and x.
Referenced by setObjectWithInfo().
|
overridevirtual |
Definition at line 396 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), m_vars, and m_xMutex.
|
overridevirtual |
Definition at line 543 of file pq_preparedstatement.cxx.
References Any, setObject(), setString(), and x.
|
overridevirtual |
Definition at line 579 of file pq_preparedstatement.cxx.
References Any.
|
overridevirtual |
Definition at line 422 of file pq_preparedstatement.cxx.
|
overridevirtual |
Definition at line 460 of file pq_preparedstatement.cxx.
References checkClosed(), checkColumnIndex(), pq_sdbc_driver::ConnectionSettings::encoding, m_vars, m_xMutex, pq_sdbc_driver::OUStringToOString(), x, and y.
Referenced by setArray(), setDate(), setObjectWithInfo(), setTime(), and setTimestamp().
|
overridevirtual |
Definition at line 502 of file pq_preparedstatement.cxx.
References setString(), dbtools::DBTypeConversion::toTimeString(), and x.
|
overridevirtual |
Definition at line 507 of file pq_preparedstatement.cxx.
References setString(), dbtools::DBTypeConversion::toDateTimeString(), and x.
|
private |
Definition at line 79 of file pq_preparedstatement.hxx.
Referenced by close(), execute(), getConnection(), and getGeneratedValues().
|
private |
Definition at line 83 of file pq_preparedstatement.hxx.
Referenced by execute(), and raiseSQLException().
|
private |
Definition at line 89 of file pq_preparedstatement.hxx.
Referenced by execute(), and getGeneratedValues().
|
private |
Definition at line 91 of file pq_preparedstatement.hxx.
Referenced by execute(), and getGeneratedValues().
|
private |
Definition at line 81 of file pq_preparedstatement.hxx.
Referenced by close(), execute(), executeQuery(), getMetaData(), getMoreResults(), and getResultSet().
|
private |
Definition at line 90 of file pq_preparedstatement.hxx.
Referenced by execute(), and getGeneratedValues().
|
private |
Definition at line 87 of file pq_preparedstatement.hxx.
Referenced by execute().
|
private |
Definition at line 88 of file pq_preparedstatement.hxx.
Referenced by execute(), executeUpdate(), getMoreResults(), and getUpdateCount().
|
private |
Definition at line 78 of file pq_preparedstatement.hxx.
Referenced by convertFastPropertyValue(), getFastPropertyValue(), PreparedStatement(), and setFastPropertyValue_NoBroadcast().
|
private |
Definition at line 80 of file pq_preparedstatement.hxx.
Referenced by checkClosed(), close(), execute(), and getGeneratedValues().
|
private |
Definition at line 86 of file pq_preparedstatement.hxx.
Referenced by execute(), and PreparedStatement().
|
private |
Definition at line 82 of file pq_preparedstatement.hxx.
Referenced by checkColumnIndex(), execute(), and PreparedStatement().
|
private |
Definition at line 85 of file pq_preparedstatement.hxx.
Referenced by checkColumnIndex(), clearParameters(), execute(), PreparedStatement(), setBoolean(), setBytes(), setDouble(), setFloat(), setInt(), setLong(), setNull(), setObjectNull(), and setString().
|
private |
Definition at line 84 of file pq_preparedstatement.hxx.
Referenced by clearParameters(), close(), execute(), getConnection(), getGeneratedValues(), setBoolean(), setBytes(), setDouble(), setFloat(), setInt(), setLong(), setNull(), setObjectNull(), and setString().