summaryrefslogtreecommitdiff
path: root/connectivity/source/inc/odbc/OPreparedStatement.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/inc/odbc/OPreparedStatement.hxx')
-rw-r--r--connectivity/source/inc/odbc/OPreparedStatement.hxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/connectivity/source/inc/odbc/OPreparedStatement.hxx b/connectivity/source/inc/odbc/OPreparedStatement.hxx
index 0d34099f39ab..139ea3fda327 100644
--- a/connectivity/source/inc/odbc/OPreparedStatement.hxx
+++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx
@@ -46,6 +46,7 @@ namespace connectivity
public OPreparedStatement_BASE
{
protected:
+ static const short invalid_scale = -1;
struct Parameter
{
::com::sun::star::uno::Any aValue;
@@ -74,15 +75,20 @@ namespace connectivity
void putParamData (sal_Int32 index) throw(::com::sun::star::sdbc::SQLException);
void setStream (sal_Int32 ParameterIndex,const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x,
SQLLEN length,sal_Int32 SQLtype) throw(::com::sun::star::sdbc::SQLException);
- sal_Int8* getLengthBuf (sal_Int32 index);
- sal_Int8* allocBindBuf ( sal_Int32 index, sal_Int32 bufLen);
+ SQLLEN* getLengthBuf (sal_Int32 index);
+ void* allocBindBuf ( sal_Int32 index, sal_Int32 bufLen);
void initBoundParam () throw(::com::sun::star::sdbc::SQLException);
- void setParameter(sal_Int32 parameterIndex,sal_Int32 _nType,sal_Int32 _nSize,void* _pData);
+ void setParameterPre(sal_Int32 parameterIndex);
+ template <typename T> void setScalarParameter(sal_Int32 parameterIndex, sal_Int32 _nType, SQLULEN _nColumnSize, const T i_Value);
+ void setParameter(sal_Int32 parameterIndex, sal_Int32 _nType, SQLULEN _nColumnSize, sal_Int32 _nScale, const void* _pData, SQLULEN _nDataLen, SQLLEN _nDataAllocLen);
+ void setParameter(sal_Int32 parameterIndex, sal_Int32 _nType, sal_Int32 _nColumnSize, sal_Int32 _nByteSize, void* _pData);
+ // Wrappers for special cases
+ void setParameter(sal_Int32 parameterIndex, sal_Int32 _nType, sal_Int16 _nScale, const ::rtl::OUString &_sData);
+ void setParameter(sal_Int32 parameterIndex, sal_Int32 _nType, const com::sun::star::uno::Sequence< sal_Int8 > &_Data);
sal_Bool isPrepared() const { return m_bPrepared;}
void prepareStatement();
void checkParameterIndex(sal_Int32 _parameterIndex);
- void setDecimal( sal_Int32 parameterIndex, const ::rtl::OUString& x );
/**
creates the driver specific resultset (factory)