LibreOffice Module connectivity (master) 1
|
#include <FPreparedStatement.hxx>
Public Member Functions | |
DECLARE_SERVICE_INFO () | |
OPreparedStatement (OConnection *_pConnection) | |
virtual void | construct (const OUString &sql) override |
virtual void SAL_CALL | disposing () override |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &rType) override |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept 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 |
Public Member Functions inherited from connectivity::file::OStatement_BASE2 | |
OStatement_BASE2 (OConnection *_pConnection) | |
virtual void SAL_CALL | disposing () override |
virtual void SAL_CALL | release () noexcept override |
Public Member Functions inherited from connectivity::file::OStatement_Base | |
connectivity::OSQLParseNode * | getParseTree () const |
OStatement_Base (OConnection *_pConnection) | |
OConnection * | getOwnConnection () const |
virtual void | construct (const OUString &sql) |
virtual void SAL_CALL | disposing () override |
virtual void SAL_CALL | acquire () 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::Any SAL_CALL | getWarnings () override |
virtual void SAL_CALL | clearWarnings () override |
virtual void SAL_CALL | cancel () override |
virtual void SAL_CALL | close () override |
Public Member Functions inherited from comphelper::OPropertyContainer | |
virtual | ~OPropertyContainer () |
Public Member Functions inherited from comphelper::OPropertyArrayUsageHelper< OStatement_Base > | |
OPropertyArrayUsageHelper () | |
virtual | ~OPropertyArrayUsageHelper () |
::cppu::IPropertyArrayHelper * | getArrayHelper () |
Protected Member Functions | |
virtual rtl::Reference< OResultSet > | createResultSet () override |
::rtl::Reference< OResultSet > | makeResultSet () |
void | initResultSet (OResultSet *) |
void | checkAndResizeParameters (sal_Int32 parameterIndex) |
void | setParameter (sal_Int32 parameterIndex, const ORowSetValue &x) |
sal_uInt32 | AddParameter (connectivity::OSQLParseNode const *pParameter, const css::uno::Reference< css::beans::XPropertySet > &_xCol) |
void | scanParameter (OSQLParseNode *pParseNode, std::vector< OSQLParseNode * > &_rParaNodes) |
void | describeColumn (OSQLParseNode const *_pParameter, OSQLParseNode const *_pNode, const OSQLTable &_xTable) |
void | describeParameter () |
virtual void | parseParamterElem (const OUString &_sColumnName, OSQLParseNode *pRow_Value_Constructor_Elem) override |
virtual void | initializeResultSet (OResultSet *_pResult) override |
virtual | ~OPreparedStatement () override |
Protected Member Functions inherited from connectivity::file::OStatement_Base | |
void | createColumnMapping () |
void | analyzeSQL () |
void | setOrderbyColumn (connectivity::OSQLParseNode const *pColumnRef, connectivity::OSQLParseNode const *pAscendingDescending) |
virtual void | initializeResultSet (OResultSet *_pResult) |
void | closeResultSet () |
void | disposeResultSet () |
void | GetAssignValues () |
void | SetAssignValue (const OUString &aColumnName, const OUString &aValue, bool bSetNull=false, sal_uInt32 nParameter=SQL_NO_PARAMETER) |
void | ParseAssignValues (const std::vector< OUString > &aColumnNameList, connectivity::OSQLParseNode *pRow_Value_Constructor_Elem, sal_Int32 nIndex) |
virtual void | parseParamterElem (const OUString &_sColumnName, OSQLParseNode *pRow_Value_Constructor_Elem) |
virtual rtl::Reference< OResultSet > | createResultSet ()=0 |
virtual ::cppu::IPropertyArrayHelper * | createArrayHelper () const override |
virtual ::cppu::IPropertyArrayHelper &SAL_CALL | getInfoHelper () override |
virtual | ~OStatement_Base () override |
Protected Member Functions inherited from comphelper::OPropertyContainer | |
OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper) | |
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 |
virtual css::uno::Any SAL_CALL | getFastPropertyValue (sal_Int32 nHandle) override final |
virtual void | getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0 |
virtual void SAL_CALL | setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final |
Protected Member Functions inherited from comphelper::OPropertyContainerHelper | |
OPropertyContainerHelper () | |
~OPropertyContainerHelper () | |
void | registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType) |
void | registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType) |
void | registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue) |
void | revokeProperty (sal_Int32 _nHandle) |
bool | isRegisteredProperty (sal_Int32 _nHandle) const |
bool | isRegisteredProperty (const OUString &_rName) const |
bool | convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) |
void | setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) |
void | getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const |
void | describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const |
const css::beans::Property & | getProperty (const OUString &_rName) const |
virtual ::cppu::IPropertyArrayHelper * | createArrayHelper () const =0 |
Additional Inherited Members | |
Static Protected Member Functions inherited from comphelper::OPropertyContainer | |
static css::uno::Sequence< css::uno::Type > | getBaseTypes () |
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 33 of file FPreparedStatement.hxx.
|
overrideprotectedvirtual |
Definition at line 57 of file FPreparedStatement.cxx.
OPreparedStatement::OPreparedStatement | ( | OConnection * | _pConnection | ) |
Definition at line 51 of file FPreparedStatement.cxx.
|
overridevirtualnoexcept |
Reimplemented from connectivity::file::OStatement_Base.
Definition at line 383 of file FPreparedStatement.cxx.
References connectivity::file::OStatement_Base::acquire().
|
protected |
Definition at line 421 of file FPreparedStatement.cxx.
References connectivity::OSQLParseNode::count(), eType, connectivity::OMetaConnection::getPropMap(), connectivity::OSQLParseTreeIterator::isCaseSensitive(), connectivity::file::OStatement_Base::m_aSQLIterator, m_xParamColumns, nNullable, PROPERTY_ID_ISNULLABLE, PROPERTY_ID_NAME, PROPERTY_ID_PRECISION, PROPERTY_ID_SCALE, PROPERTY_ID_TYPE, and SQL_ISRULE.
Referenced by describeColumn(), and parseParamterElem().
|
protected |
Definition at line 393 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), i, connectivity::file::OStatement_Base::m_aAssignValues, connectivity::file::OStatement_Base::m_aParameterIndexes, m_aParameterRow, o3tl::make_unsigned(), and dbtools::throwInvalidIndexException().
Referenced by setNull(), and setParameter().
|
overridevirtual |
Definition at line 358 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), cppu::BaseMutex::m_aMutex, and m_aParameterRow.
|
overridevirtual |
Reimplemented from connectivity::file::OStatement_Base.
Definition at line 141 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), connectivity::file::OStatement_Base::closeResultSet(), and cppu::BaseMutex::m_aMutex.
|
overridevirtual |
css::sdbc::SQLException | |
css::uno::RuntimeException |
Reimplemented from connectivity::file::OStatement_Base.
Definition at line 77 of file FPreparedStatement.cxx.
References connectivity::file::OStatement_Base::construct(), describeParameter(), connectivity::OSQLParseTreeIterator::getParameters(), connectivity::OSQLParseTreeIterator::getStatementType(), connectivity::file::OStatement_Base::m_aColMapping, connectivity::file::OStatement_Base::m_aEvaluateRow, m_aParameterRow, connectivity::file::OStatement_Base::m_aSQLIterator, connectivity::file::OStatement_Base::m_xColNames, connectivity::file::OStatement_Base::m_xDBMetaData, m_xParamColumns, connectivity::Select, and connectivity::file::OResultSet::setBoundedColumns().
|
overrideprotectedvirtual |
Implements connectivity::file::OStatement_Base.
Reimplemented in connectivity::component::OComponentPreparedStatement, connectivity::dbase::ODbasePreparedStatement, and connectivity::flat::OFlatPreparedStatement.
Definition at line 367 of file FPreparedStatement.cxx.
References connectivity::file::OStatement_Base::m_aSQLIterator.
Referenced by makeResultSet().
connectivity::file::OPreparedStatement::DECLARE_SERVICE_INFO | ( | ) |
|
protected |
Definition at line 463 of file FPreparedStatement.cxx.
References AddParameter(), connectivity::OSQLParseTreeIterator::getColumnRange(), connectivity::file::OStatement_Base::m_aSQLIterator, and SQL_ISRULE.
Referenced by describeParameter().
|
protected |
Definition at line 482 of file FPreparedStatement.cxx.
References describeColumn(), connectivity::OSQLParseTreeIterator::getTables(), connectivity::file::OStatement_Base::m_aSQLIterator, connectivity::file::OStatement_Base::m_pParseTree, and scanParameter().
Referenced by construct().
|
overridevirtual |
Reimplemented from connectivity::file::OStatement_BASE2.
Definition at line 62 of file FPreparedStatement.cxx.
References connectivity::file::OStatement_BASE2::disposing(), cppu::BaseMutex::m_aMutex, m_aParameterRow, m_xMetaData, and m_xParamColumns.
|
overridevirtual |
Definition at line 150 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), connectivity::OSQLParseTreeIterator::getStatementType(), cppu::BaseMutex::m_aMutex, connectivity::file::OStatement_Base::m_aSQLIterator, makeResultSet(), and connectivity::Select.
|
overridevirtual |
Definition at line 197 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), cppu::BaseMutex::m_aMutex, and makeResultSet().
|
overridevirtual |
Definition at line 164 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), cppu::BaseMutex::m_aMutex, and makeResultSet().
|
overridevirtual |
Definition at line 188 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), cppu::BaseMutex::m_aMutex, and connectivity::file::OStatement_Base::m_pConnection.
|
overridevirtual |
Definition at line 129 of file FPreparedStatement.cxx.
References connectivity::checkDisposed(), connectivity::OSQLParseTreeIterator::getSelectColumns(), connectivity::OSQLParseTreeIterator::getTables(), cppu::BaseMutex::m_aMutex, connectivity::file::OStatement_Base::m_aSQLIterator, connectivity::file::OStatement_Base::m_pTable, and m_xMetaData.
Referenced by initResultSet().
|
overridevirtual |
Reimplemented from connectivity::file::OStatement_Base.
Definition at line 119 of file FPreparedStatement.cxx.
References aTypes, and connectivity::file::OStatement_Base::getTypes().
|
overrideprotectedvirtual |
Reimplemented from connectivity::file::OStatement_Base.
Definition at line 500 of file FPreparedStatement.cxx.
References i, connectivity::file::OStatement_Base::initializeResultSet(), connectivity::file::OStatement_Base::m_aAssignValues, m_aParameterRow, connectivity::file::OStatement_Base::m_pSQLAnalyzer, m_xParamColumns, nCount, size, and SQL_NO_PARAMETER.
Referenced by makeResultSet().
|
protected |
Definition at line 372 of file FPreparedStatement.cxx.
References getMetaData(), m_aParameterRow, connectivity::file::OStatement_Base::m_pConnection, m_xParamColumns, connectivity::file::OResultSet::OpenImpl(), and connectivity::file::OResultSet::setMetaData().
Referenced by makeResultSet().
|
protected |
Definition at line 99 of file FPreparedStatement.cxx.
References connectivity::file::OStatement_Base::closeResultSet(), createResultSet(), initializeResultSet(), initResultSet(), and connectivity::file::OStatement_Base::m_xResultSet.
Referenced by execute(), executeQuery(), and executeUpdate().
|
overrideprotectedvirtual |
Reimplemented from connectivity::file::OStatement_Base.
Definition at line 537 of file FPreparedStatement.cxx.
References AddParameter(), connectivity::find(), connectivity::file::OStatement_Base::m_pTable, connectivity::file::OStatement_Base::m_xColNames, m_xParamColumns, and connectivity::file::OStatement_Base::SetAssignValue().
|
overridevirtual |
Reimplemented from connectivity::file::OStatement_Base.
|
overridevirtualnoexcept |
Reimplemented from connectivity::file::OStatement_BASE2.
Definition at line 388 of file FPreparedStatement.cxx.
References connectivity::file::OStatement_BASE2::release().
|
protected |
Definition at line 66 of file FNoException.cxx.
References connectivity::OSQLParseNode::count(), DBG_ASSERT, connectivity::OSQLParseNode::getChild(), connectivity::OSQLParseNode::getNodeType(), i, connectivity::Punctuation, scanParameter(), and SQL_ISRULE.
Referenced by describeParameter(), and scanParameter().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Definition at line 206 of file FPreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 211 of file FPreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Definition at line 234 of file FPreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 240 of file FPreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 246 of file FPreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 252 of file FPreparedStatement.cxx.
References dbtools::throwFeatureNotImplementedSQLException().
|
overridevirtual |
Definition at line 258 of file FPreparedStatement.cxx.
References checkAndResizeParameters(), connectivity::file::OStatement_Base::m_aAssignValues, cppu::BaseMutex::m_aMutex, connectivity::file::OStatement_Base::m_aParameterIndexes, and m_aParameterRow.
Referenced by setObjectNull().
|
overridevirtual |
|
overridevirtual |
Definition at line 309 of file FPreparedStatement.cxx.
References setNull().
|
overridevirtual |
|
protected |
Definition at line 410 of file FPreparedStatement.cxx.
References checkAndResizeParameters(), connectivity::file::OStatement_Base::m_aAssignValues, cppu::BaseMutex::m_aMutex, connectivity::file::OStatement_Base::m_aParameterIndexes, and x.
Referenced by setBoolean(), setByte(), setDouble(), setFloat(), setInt(), setShort(), and setString().
|
overridevirtual |
|
overridevirtual |
Definition at line 329 of file FPreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
Definition at line 182 of file FPreparedStatement.cxx.
References setParameter(), and x.
|
overridevirtual |
|
overridevirtual |
|
protected |
Definition at line 44 of file FPreparedStatement.hxx.
Referenced by checkAndResizeParameters(), clearParameters(), construct(), disposing(), initializeResultSet(), initResultSet(), and setNull().
|
protected |
Definition at line 45 of file FPreparedStatement.hxx.
Referenced by disposing(), and getMetaData().
|
protected |
Definition at line 47 of file FPreparedStatement.hxx.
Referenced by AddParameter(), construct(), disposing(), initializeResultSet(), initResultSet(), and parseParamterElem().