LibreOffice Module connectivity (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
pq_sdbc_driver::Statement Class Reference

#include <pq_statement.hxx>

Inheritance diagram for pq_sdbc_driver::Statement:
[legend]
Collaboration diagram for pq_sdbc_driver::Statement:
[legend]

Public Member Functions

 Statement (const rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &con, struct ConnectionSettings *pSettings)
 
virtual ~Statement () 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 (const OUString &sql) override
 
virtual sal_Int32 SAL_CALL executeUpdate (const OUString &sql) override
 
virtual sal_Bool SAL_CALL execute (const OUString &sql) override
 
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection () 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 void SAL_CALL disposing () override
 
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData () 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 checkClosed ()
 
void raiseSQLException (std::u16string_view sql, const char *errorMsg)
 

Private Attributes

css::uno::Any m_props [STATEMENT_SIZE]
 
css::uno::Reference< css::sdbc::XConnection > m_connection
 
ConnectionSettingsm_pSettings
 
css::uno::Reference< css::sdbc::XCloseable > m_lastResultset
 
::rtl::Reference< comphelper::RefCountedMutexm_xMutex
 
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
OBroadcastHelperrBHelper
 
OMultiTypeInterfaceContainerHelperInt32 aBoundLC
 
OMultiTypeInterfaceContainerHelperInt32 aVetoableLC
 
Impl *const m_pReserved
 

Detailed Description

Definition at line 77 of file pq_statement.hxx.

Constructor & Destructor Documentation

◆ Statement()

pq_sdbc_driver::Statement::Statement ( const rtl::Reference< comphelper::RefCountedMutex > &  refMutex,
const css::uno::Reference< css::sdbc::XConnection > &  con,
struct ConnectionSettings pSettings 
)
Parameters
ppConnectionThe piece of memory, pConnection points to, is accessible as long as a reference to parameter con is held.

Definition at line 137 of file pq_statement.cxx.

References m_props, pq_sdbc_driver::STATEMENT_MAX_ROWS, pq_sdbc_driver::STATEMENT_QUERY_TIME_OUT, pq_sdbc_driver::STATEMENT_RESULT_SET_CONCURRENCY, and pq_sdbc_driver::STATEMENT_RESULT_SET_TYPE.

◆ ~Statement()

pq_sdbc_driver::Statement::~Statement ( )
overridevirtual

Definition at line 157 of file pq_statement.cxx.

Member Function Documentation

◆ acquire()

virtual void SAL_CALL pq_sdbc_driver::Statement::acquire ( )
inlineoverridevirtualnoexcept

Definition at line 103 of file pq_statement.hxx.

◆ checkClosed()

void pq_sdbc_driver::Statement::checkClosed ( )
private
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Definition at line 161 of file pq_statement.cxx.

References Any, m_pSettings, and pq_sdbc_driver::ConnectionSettings::pConnection.

Referenced by execute(), and getConnection().

◆ clearWarnings()

void pq_sdbc_driver::Statement::clearWarnings ( )
overridevirtual

Definition at line 765 of file pq_statement.cxx.

◆ close()

void pq_sdbc_driver::Statement::close ( )
overridevirtual

Definition at line 191 of file pq_statement.cxx.

References m_connection, m_lastResultset, m_pSettings, and m_xMutex.

Referenced by disposing().

◆ convertFastPropertyValue()

sal_Bool pq_sdbc_driver::Statement::convertFastPropertyValue ( css::uno::Any &  rConvertedValue,
css::uno::Any &  rOldValue,
sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overridevirtual

◆ disposing()

void pq_sdbc_driver::Statement::disposing ( )
overridevirtual

Definition at line 873 of file pq_statement.cxx.

References close().

◆ execute()

sal_Bool pq_sdbc_driver::Statement::execute ( const OUString &  sql)
overridevirtual

◆ executeQuery()

Reference< XResultSet > pq_sdbc_driver::Statement::executeQuery ( const OUString &  sql)
overridevirtual

Definition at line 222 of file pq_statement.cxx.

References execute(), m_lastResultset, and raiseSQLException().

◆ executeUpdate()

sal_Int32 pq_sdbc_driver::Statement::executeUpdate ( const OUString &  sql)
overridevirtual

Definition at line 231 of file pq_statement.cxx.

References execute(), m_multipleResultUpdateCount, and raiseSQLException().

◆ getConnection()

Reference< XConnection > pq_sdbc_driver::Statement::getConnection ( )
overridevirtual

Definition at line 748 of file pq_statement.cxx.

References checkClosed(), m_connection, and m_xMutex.

◆ getFastPropertyValue()

void pq_sdbc_driver::Statement::getFastPropertyValue ( css::uno::Any &  rValue,
sal_Int32  nHandle 
) const
overridevirtual

Implements cppu::OPropertySetHelper.

Definition at line 837 of file pq_statement.cxx.

References m_props, and nHandle.

◆ getGeneratedValues()

Reference< XResultSet > pq_sdbc_driver::Statement::getGeneratedValues ( )
overridevirtual

◆ getImplementationId()

Sequence< sal_Int8 > pq_sdbc_driver::Statement::getImplementationId ( )
overridevirtual

Definition at line 186 of file pq_statement.cxx.

◆ getInfoHelper()

cppu::IPropertyArrayHelper & pq_sdbc_driver::Statement::getInfoHelper ( )
overridevirtual

◆ getMetaData()

Reference< css::sdbc::XResultSetMetaData > pq_sdbc_driver::Statement::getMetaData ( )
overridevirtual

Definition at line 769 of file pq_statement.cxx.

References m_lastResultset.

◆ getMoreResults()

sal_Bool pq_sdbc_driver::Statement::getMoreResults ( )
overridevirtual

Definition at line 858 of file pq_statement.cxx.

References m_lastResultset, and m_multipleResultUpdateCount.

◆ getPropertySetInfo()

Reference< XPropertySetInfo > pq_sdbc_driver::Statement::getPropertySetInfo ( )
override

◆ getResultSet()

Reference< XResultSet > pq_sdbc_driver::Statement::getResultSet ( )
overridevirtual

Definition at line 848 of file pq_statement.cxx.

References m_lastResultset.

◆ getTypes()

Sequence< Type > pq_sdbc_driver::Statement::getTypes ( )
overridevirtual

Definition at line 176 of file pq_statement.cxx.

◆ getUpdateCount()

sal_Int32 pq_sdbc_driver::Statement::getUpdateCount ( )
overridevirtual

Definition at line 853 of file pq_statement.cxx.

References m_multipleResultUpdateCount.

◆ getWarnings()

Any pq_sdbc_driver::Statement::getWarnings ( )
overridevirtual

Definition at line 760 of file pq_statement.cxx.

References Any.

◆ queryInterface()

Any pq_sdbc_driver::Statement::queryInterface ( const css::uno::Type &  reqType)
overridevirtual

Reimplemented from cppu::OPropertySetHelper.

Definition at line 169 of file pq_statement.cxx.

References Any.

◆ raiseSQLException()

void pq_sdbc_driver::Statement::raiseSQLException ( std::u16string_view  sql,
const char *  errorMsg 
)
private
Exceptions
css::sdbc::SQLException

Definition at line 212 of file pq_statement.cxx.

References Any, pq_sdbc_driver::ConnectionSettings::encoding, and SAL_WARN.

Referenced by executeQuery(), and executeUpdate().

◆ release()

virtual void SAL_CALL pq_sdbc_driver::Statement::release ( )
inlineoverridevirtualnoexcept

Definition at line 104 of file pq_statement.hxx.

◆ setFastPropertyValue_NoBroadcast()

void pq_sdbc_driver::Statement::setFastPropertyValue_NoBroadcast ( sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overridevirtual

Implements cppu::OPropertySetHelper.

Definition at line 831 of file pq_statement.cxx.

References m_props, and nHandle.

Member Data Documentation

◆ m_connection

css::uno::Reference< css::sdbc::XConnection > pq_sdbc_driver::Statement::m_connection
private

Definition at line 82 of file pq_statement.hxx.

Referenced by close(), execute(), getConnection(), and getGeneratedValues().

◆ m_lastOidInserted

sal_Int32 pq_sdbc_driver::Statement::m_lastOidInserted
private

Definition at line 88 of file pq_statement.hxx.

Referenced by execute(), and getGeneratedValues().

◆ m_lastQuery

OString pq_sdbc_driver::Statement::m_lastQuery
private

Definition at line 90 of file pq_statement.hxx.

Referenced by execute(), and getGeneratedValues().

◆ m_lastResultset

css::uno::Reference< css::sdbc::XCloseable > pq_sdbc_driver::Statement::m_lastResultset
private

Definition at line 84 of file pq_statement.hxx.

Referenced by close(), execute(), executeQuery(), getMetaData(), getMoreResults(), and getResultSet().

◆ m_lastTableInserted

OUString pq_sdbc_driver::Statement::m_lastTableInserted
private

Definition at line 89 of file pq_statement.hxx.

Referenced by execute(), and getGeneratedValues().

◆ m_multipleResultAvailable

bool pq_sdbc_driver::Statement::m_multipleResultAvailable
private

Definition at line 86 of file pq_statement.hxx.

Referenced by execute().

◆ m_multipleResultUpdateCount

sal_Int32 pq_sdbc_driver::Statement::m_multipleResultUpdateCount
private

Definition at line 87 of file pq_statement.hxx.

Referenced by execute(), executeUpdate(), getMoreResults(), and getUpdateCount().

◆ m_props

css::uno::Any pq_sdbc_driver::Statement::m_props[STATEMENT_SIZE]
private

◆ m_pSettings

ConnectionSettings* pq_sdbc_driver::Statement::m_pSettings
private

Definition at line 83 of file pq_statement.hxx.

Referenced by checkClosed(), close(), execute(), and getGeneratedValues().

◆ m_xMutex

::rtl::Reference< comphelper::RefCountedMutex > pq_sdbc_driver::Statement::m_xMutex
private

Definition at line 85 of file pq_statement.hxx.

Referenced by close(), execute(), getConnection(), and getGeneratedValues().


The documentation for this class was generated from the following files: