41using ::osl::MutexGuard;
56 css::uno::Reference<css::sdbc::XCloseable> xClose(
m_xResultSet, UNO_QUERY_THROW);
67 OCommonStatement_IBase::disposing();
135 int failure = mysql_real_query(pMySql, toExec.getStr(), toExec.getLength());
137 if (failure || mysql_errno(pMySql))
139 mysql_errno(pMySql), *
this,
152 "executeQuery called on SQL command that does not return a ResultSet",
"02000", 0,
156 "internal MySQL-SDBC error: executeQuery: no ResultSet after execute() returned true.",
176 if (!aRet.hasValue())
223 MYSQL_RES* pMysqlResult = mysql_store_result(pMySql);
224 if (pMysqlResult !=
nullptr)
233 else if (mysql_field_count(pMySql) == 0)
241 "mysql_store_result indicated success and SQL command was supposed to return a "
242 "ResultSet, but did not.",
260 int status = mysql_next_result(pMySql);
262 if (status > 0 || mysql_errno(pMySql))
264 mysql_errno(pMySql), *
this,
272 const OUString errMsg(
"mysql_next_result returned unexpected value: "
273 + OUString::number(status));
300 return new ::cppu::OPropertyArrayHelper{
369 return {
"com.sun.star.sdbc.Statement" };
387 return ::cppu::OPropertySetHelper::createPropertySetInfo(
getInfoHelper());
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
sal_Int32 m_nAffectedRows
void SAL_CALL disposing() override
void SAL_CALL getFastPropertyValue(Any &rValue, sal_Int32 nHandle) const override
void SAL_CALL clearWarnings() override
virtual ~OCommonStatement() override
void SAL_CALL acquire() noexcept override
Any SAL_CALL queryInterface(const css::uno::Type &rType) override
rtl::Reference< OConnection > m_xConnection
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
css::uno::Reference< css::sdbc::XResultSet > m_xResultSet
::cppu::IPropertyArrayHelper * createArrayHelper() const override
used to implement the creation of the array helper which is shared amongst all instances of the class...
void SAL_CALL close() override
void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any &rValue) override
void SAL_CALL release() noexcept override
OConnection * getOwnConnection() const
Any SAL_CALL getWarnings() override
void SAL_CALL cancel() override
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
SQLWarning m_aLastWarning
sal_Bool SAL_CALL convertFastPropertyValue(Any &rConvertedValue, Any &rOldValue, sal_Int32 nHandle, const Any &rValue) override
::cppu::IPropertyArrayHelper * getArrayHelper()
call this in the getInfoHelper method of your derived class.
sal_Int32 SAL_CALL getUpdateCount() override
css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void SAL_CALL release() noexcept override
Any SAL_CALL queryInterface(const css::uno::Type &rType) override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getResultSet() override
sal_Int32 SAL_CALL executeUpdate(const OUString &sql) override
virtual OUString SAL_CALL getImplementationName() override
css::uno::Reference< css::sdbc::XResultSet > SAL_CALL executeQuery(const OUString &sql) override
sal_Bool SAL_CALL getMoreResults() override
sal_Bool SAL_CALL execute(const OUString &sql) override
void SAL_CALL acquire() noexcept override
virtual sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
css::uno::Sequence< Type > SAL_CALL getTypes() override
mutable::osl::Mutex m_aMutex
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
OBroadcastHelper & rBHelper
css::uno::Type const & get()
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL dispose() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
void checkDisposed(bool _bThrow)
@ PROPERTY_ID_ESCAPEPROCESSING
@ PROPERTY_ID_FETCHDIRECTION
@ PROPERTY_ID_MAXFIELDSIZE
@ PROPERTY_ID_RESULTSETTYPE
@ PROPERTY_ID_RESULTSETCONCURRENCY
@ PROPERTY_ID_USEBOOKMARKS
@ PROPERTY_ID_QUERYTIMEOUT
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &_rLeft, const css::uno::Sequence< T > &_rRight)
concat two sequences
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void throwSQLExceptionWithMsg(const char *msg, const char *SQLSTATE, unsigned int errorNum, const css::uno::Reference< css::uno::XInterface > &_context, const rtl_TextEncoding encoding)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
Reference< XConnection > m_xConnection