summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-07-06 13:17:46 +0000
committerKurt Zenker <kz@openoffice.org>2006-07-06 13:17:46 +0000
commit7487899b36536b1779ea5a56881d93237743be50 (patch)
tree75c6ecfc7b42b96e6974029143b771782d3ba756
parent8056282bec45f9edf4effb3620648f7ad57aa1e2 (diff)
INTEGRATION: CWS kabparam (1.2.102); FILE MERGED
2006/06/29 08:15:22 ebischoff 1.2.102.1: #i66691# Support for parametrized queries in KDE address book connector
-rw-r--r--connectivity/source/drivers/kab/KPreparedStatement.hxx31
1 files changed, 14 insertions, 17 deletions
diff --git a/connectivity/source/drivers/kab/KPreparedStatement.hxx b/connectivity/source/drivers/kab/KPreparedStatement.hxx
index 215b5fe4815c..37e508e16b28 100644
--- a/connectivity/source/drivers/kab/KPreparedStatement.hxx
+++ b/connectivity/source/drivers/kab/KPreparedStatement.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: KPreparedStatement.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: obo $ $Date: 2005-12-19 16:50:16 $
+ * last change: $Author: kz $ $Date: 2006-07-06 14:17:46 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -39,11 +39,13 @@
#ifndef _CONNECTIVITY_KAB_STATEMENT_HXX_
#include "KStatement.hxx"
#endif
-
#ifndef _CONNECTIVITY_KAB_RESULTSETMETADATA_HXX_
#include "KResultSetMetaData.hxx"
#endif
+#ifndef _CONNECTIVITY_FILE_VALUE_HXX_
+#include <connectivity/FValue.hxx>
+#endif
#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
#endif
@@ -69,37 +71,32 @@ namespace connectivity
class KabPreparedStatement : public KabPreparedStatement_BASE
{
protected:
- struct Parameter
- {
- ::com::sun::star::uno::Any aValue;
- sal_Int32 nDataType;
-
- Parameter(const ::com::sun::star::uno::Any& rValue,
- sal_Int32 rDataType)
- : aValue(rValue), nDataType(rDataType)
- { }
- };
-
-// ::std::vector< Parameter> m_aParameters;
-// Not used so far
::rtl::OUString m_sSqlStatement;
::rtl::Reference< KabResultSetMetaData >
m_xMetaData;
sal_Bool m_bPrepared;
+ mutable sal_Int32 m_nParameterIndex;
+ OValueRow m_aParameterRow;
- void checkParameterIndex(sal_Int32 _parameterIndex);
+ void checkAndResizeParameters(sal_Int32 nParams) throw(::com::sun::star::sdbc::SQLException);
void setKabFields() const throw(::com::sun::star::sdbc::SQLException);
protected:
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
sal_Int32 nHandle,
const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception);
+
+ virtual void resetParameters() const throw(::com::sun::star::sdbc::SQLException);
+ virtual void getNextParameter(::rtl::OUString &rParameter) const throw(::com::sun::star::sdbc::SQLException);
virtual ~KabPreparedStatement();
public:
DECLARE_SERVICE_INFO();
KabPreparedStatement(KabConnection* _pConnection, const ::rtl::OUString& sql);
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
// XPreparedStatement
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL executeQuery( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL executeUpdate( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);