LibreOffice Module connectivity (master) 1
|
#include <APreparedStatement.hxx>
Public Member Functions | |
DECLARE_SERVICE_INFO () | |
OPreparedStatement (OConnection *_pConnection, const OUString &sql) | |
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 &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () 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 void SAL_CALL | close () override |
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL | getMetaData () override |
virtual void SAL_CALL | disposing () 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 |
Public Member Functions inherited from connectivity::ado::OStatement_Base | |
OStatement_Base (OConnection *_pConnection) | |
virtual void SAL_CALL | disposing () 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 &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | getPropertySetInfo () 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 void SAL_CALL | cancel () override |
virtual void SAL_CALL | close () 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 |
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 |
Public Member Functions inherited from comphelper::OPropertyArrayUsageHelper< OStatement_Base > | |
OPropertyArrayUsageHelper () | |
virtual | ~OPropertyArrayUsageHelper () |
::cppu::IPropertyArrayHelper * | getArrayHelper () |
Protected Member Functions | |
virtual | ~OPreparedStatement () override |
Protected Member Functions inherited from connectivity::ado::OStatement_Base | |
void | assignRecordSet (ADORecordset *_pRS) |
void | reset () |
void | clearMyResultSet () |
void | setWarning (const css::sdbc::SQLWarning &ex) |
sal_Int32 | getRowCount () |
sal_Int32 | getPrecision (sal_Int32 sqlType) |
void | disposeResultSet () |
virtual ::cppu::IPropertyArrayHelper * | createArrayHelper () const 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 |
virtual void SAL_CALL | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override |
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 () | |
virtual ::cppu::IPropertyArrayHelper * | createArrayHelper () const =0 |
Protected Attributes | |
css::uno::Reference< css::sdbc::XResultSetMetaData > | m_xMetaData |
ADOParameters * | m_pParameters |
Protected Attributes inherited from connectivity::ado::OStatement_Base | |
std::vector< OUString > | m_aBatchVector |
css::uno::WeakReference< css::sdbc::XResultSet > | m_xResultSet |
OConnection * | m_pConnection |
WpADOCommand | m_Command |
WpADORecordset | m_RecordSet |
OLEVariant | m_RecordsAffected |
OLEVariant | m_Parameters |
std::vector< connectivity::OTypeInfo > | m_aTypeInfo |
ADO_LONGPTR | m_nMaxRows |
sal_Int32 | m_nFetchSize |
LockTypeEnum | m_eLockType |
CursorTypeEnum | m_eCursorType |
Protected Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
Protected Attributes inherited from cppu::OPropertySetHelper | |
OBroadcastHelper & | rBHelper |
OMultiTypeInterfaceContainerHelperInt32 | aBoundLC |
OMultiTypeInterfaceContainerHelperInt32 | aVetoableLC |
Impl *const | m_pReserved |
Private Member Functions | |
void | setParameter (sal_Int32 parameterIndex, const DataTypeEnum &_eType, sal_Int32 _nSize, const OLEVariant &Val) |
void | replaceParameterNodeName (OSQLParseNode const *_pNode, const OUString &_sDefaultName, sal_Int32 &_nParameterCount) |
Additional Inherited Members | |
Static Public Member Functions inherited from cppu::OPropertySetHelper | |
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | createPropertySetInfo (IPropertyArrayHelper &rProperties) |
Static Protected Member Functions inherited from comphelper::OPropertyArrayUsageHelper< OStatement_Base > | |
static std::mutex & | theMutex () |
Static Protected Attributes inherited from comphelper::OPropertyArrayUsageHelper< OStatement_Base > | |
static sal_Int32 | s_nRefCount |
::cppu::IPropertyArrayHelper * | s_pProps |
Definition at line 38 of file APreparedStatement.hxx.
|
overrideprotectedvirtual |
Definition at line 85 of file APreparedStatement.cxx.
References m_pParameters.
OPreparedStatement::OPreparedStatement | ( | OConnection * | _pConnection, |
const OUString & | sql | ||
) |
Definition at line 57 of file APreparedStatement.cxx.
References CHECK_RETURN, connectivity::ado::WpADOCommand::get_Parameters(), connectivity::ado::ODriver::getContext(), connectivity::ado::OConnection::getDriver(), connectivity::ado::OStatement_Base::m_Command, m_pParameters, m_refCount, connectivity::OSQLParser::parseTree(), connectivity::ado::WpADOCommand::put_CommandText(), connectivity::ado::WpADOCommand::put_Prepared(), and replaceParameterNodeName().
|
overridevirtualnoexcept |
Reimplemented from connectivity::ado::OStatement_Base.
Reimplemented in connectivity::ado::OCallableStatement.
Definition at line 424 of file APreparedStatement.cxx.
References connectivity::ado::OStatement_Base::acquire().
Referenced by connectivity::ado::OCallableStatement::acquire().
|
overridevirtual |
Definition at line 400 of file APreparedStatement.cxx.
References CHECK_RETURN, connectivity::checkDisposed(), i, cppu::BaseMutex::m_aMutex, m_pParameters, nCount, connectivity::ado::WpADOParameter::PutValue(), and connectivity::ado::OLEVariant::setEmpty().
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Definition at line 131 of file APreparedStatement.cxx.
References connectivity::checkDisposed(), dispose(), and cppu::BaseMutex::m_aMutex.
connectivity::ado::OPreparedStatement::DECLARE_SERVICE_INFO | ( | ) |
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Definition at line 120 of file APreparedStatement.cxx.
References connectivity::ado::OStatement_Base::disposing(), m_pParameters, and m_xMetaData.
|
overridevirtual |
Definition at line 143 of file APreparedStatement.cxx.
References CHECK_RETURN, connectivity::checkDisposed(), connectivity::ado::OStatement_Base::clearWarnings(), connectivity::ado::WpADOCommand::Execute(), connectivity::ado::WpOLEBase< T >::IsValid(), cppu::BaseMutex::m_aMutex, connectivity::ado::OStatement_Base::m_Command, connectivity::ado::OStatement_Base::m_Parameters, connectivity::ado::OStatement_Base::m_RecordsAffected, connectivity::ado::OStatement_Base::m_RecordSet, and connectivity::ado::WpOLEBase< T >::set().
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Definition at line 181 of file AStatement.cxx.
|
overridevirtual |
Definition at line 238 of file APreparedStatement.cxx.
References CHECK_RETURN, connectivity::checkDisposed(), connectivity::ado::WpOLEBase< T >::clear(), connectivity::ado::WpADORecordset::Close(), connectivity::ado::WpADORecordset::Create(), connectivity::ado::OStatement_Base::disposeResultSet(), connectivity::ado::WpADORecordset::get_CacheSize(), connectivity::ado::WpADORecordset::get_CursorType(), connectivity::ado::WpADORecordset::get_LockType(), connectivity::ado::WpADORecordset::get_MaxRecords(), getMetaData(), connectivity::ado::WpOLEBase< T >::IsValid(), cppu::BaseMutex::m_aMutex, connectivity::ado::OStatement_Base::m_Command, connectivity::ado::OStatement_Base::m_eCursorType, connectivity::ado::OStatement_Base::m_eLockType, connectivity::ado::OStatement_Base::m_nFetchSize, connectivity::ado::OStatement_Base::m_nMaxRows, connectivity::ado::OStatement_Base::m_RecordSet, m_xMetaData, connectivity::ado::OStatement_Base::m_xResultSet, connectivity::ado::WpADORecordset::Open(), connectivity::ado::OStatement_Base::OResultSet, connectivity::ado::WpADORecordset::put_CacheSize(), connectivity::ado::WpADORecordset::put_MaxRecords(), connectivity::ado::OLEVariant::setIDispatch(), and connectivity::ado::OLEVariant::setNoArg().
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Definition at line 179 of file AStatement.cxx.
|
overridevirtual |
Definition at line 164 of file APreparedStatement.cxx.
References CHECK_RETURN, connectivity::checkDisposed(), connectivity::ado::WpADOCommand::Execute(), connectivity::ado::OConnection::getConnection(), connectivity::ado::OLEVariant::getInt32(), connectivity::ado::OLEVariant::getType(), cppu::BaseMutex::m_aMutex, connectivity::ado::OStatement_Base::m_Command, connectivity::ado::OStatement_Base::m_Parameters, connectivity::ado::OStatement_Base::m_pConnection, connectivity::ado::OStatement_Base::m_RecordsAffected, connectivity::ado::OStatement_Base::m_RecordSet, connectivity::ado::WpOLEBase< T >::set(), connectivity::ado::ADOS::ThrowException(), and VT_ERROR.
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Definition at line 180 of file AStatement.cxx.
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Definition at line 230 of file APreparedStatement.cxx.
References connectivity::checkDisposed(), cppu::BaseMutex::m_aMutex, and connectivity::ado::OStatement_Base::m_pConnection.
|
overridevirtual |
Definition at line 113 of file APreparedStatement.cxx.
References connectivity::ado::WpOLEBase< T >::IsValid(), connectivity::ado::OStatement_Base::m_RecordSet, and m_xMetaData.
Referenced by executeQuery().
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Definition at line 104 of file APreparedStatement.cxx.
References aTypes, and connectivity::ado::OStatement_Base::getTypes().
|
overridevirtual |
Reimplemented from connectivity::ado::OStatement_Base.
Reimplemented in connectivity::ado::OCallableStatement.
|
overridevirtualnoexcept |
Reimplemented from connectivity::ado::OStatement_Base.
Reimplemented in connectivity::ado::OCallableStatement.
Definition at line 429 of file APreparedStatement.cxx.
References connectivity::ado::OStatement_Base::release().
Referenced by connectivity::ado::OCallableStatement::release().
|
private |
Definition at line 434 of file APreparedStatement.cxx.
References connectivity::OSQLParseNode::append(), connectivity::OSQLParseNode::count(), connectivity::OSQLParseNode::getChild(), i, connectivity::Name, nCount, connectivity::Punctuation, connectivity::OSQLParseNode::replaceAndDelete(), replaceParameterNodeName(), and SQL_ISRULE.
Referenced by OPreparedStatement(), and replaceParameterNodeName().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Definition at line 272 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 277 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Definition at line 297 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 302 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 307 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 312 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 317 of file APreparedStatement.cxx.
References connectivity::ado::OLEVariant::setNull(), and setParameter().
Referenced by setObjectNull().
|
overridevirtual |
|
overridevirtual |
Definition at line 358 of file APreparedStatement.cxx.
References setNull().
|
overridevirtual |
|
private |
css::sdbc::SQLException | |
css::uno::RuntimeException |
Definition at line 182 of file APreparedStatement.cxx.
References connectivity::ado::WpADOParameter::AppendChunk(), CHECK_RETURN, connectivity::checkDisposed(), connectivity::ado::WpADOCommand::CreateParameter(), eType, connectivity::ado::WpADOParameter::GetADOType(), connectivity::ado::WpADOParameter::GetAttributes(), connectivity::ado::OConnection::getConnection(), cppu::BaseMutex::m_aMutex, connectivity::ado::OStatement_Base::m_Command, connectivity::ado::OStatement_Base::m_pConnection, m_pParameters, nCount, connectivity::ado::WpADOParameter::put_Size(), connectivity::ado::WpADOParameter::put_Type(), connectivity::ado::WpADOParameter::PutValue(), and connectivity::ado::ADOS::ThrowException().
Referenced by setBoolean(), setByte(), setDouble(), setFloat(), setInt(), setLong(), setNull(), setShort(), setString(), and setTime().
|
overridevirtual |
|
overridevirtual |
Definition at line 375 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 225 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 287 of file APreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
|
protected |
Definition at line 56 of file APreparedStatement.hxx.
Referenced by clearParameters(), disposing(), connectivity::ado::OCallableStatement::getBoolean(), connectivity::ado::OCallableStatement::getByte(), connectivity::ado::OCallableStatement::getBytes(), connectivity::ado::OCallableStatement::getDate(), connectivity::ado::OCallableStatement::getDouble(), connectivity::ado::OCallableStatement::getFloat(), connectivity::ado::OCallableStatement::getInt(), connectivity::ado::OCallableStatement::getLong(), connectivity::ado::OCallableStatement::getShort(), connectivity::ado::OCallableStatement::getString(), connectivity::ado::OCallableStatement::getTime(), connectivity::ado::OCallableStatement::getTimestamp(), OPreparedStatement(), connectivity::ado::OCallableStatement::registerNumericOutParameter(), connectivity::ado::OCallableStatement::registerOutParameter(), setParameter(), and ~OPreparedStatement().
|
protected |
Definition at line 55 of file APreparedStatement.hxx.
Referenced by disposing(), executeQuery(), and getMetaData().