summaryrefslogtreecommitdiff
path: root/libodbcpp/param.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 18:41:53 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 18:41:53 +0100
commit38b3452daeae0085506f5b4661203fb74a9b7840 (patch)
treed0d8c55a7785582d8a54755d738f78573f288fa2 /libodbcpp/param.h
parentCentralize all the column reference storage logic (diff)
downloadlibdbpp-odbc-38b3452daeae0085506f5b4661203fb74a9b7840.tar.bz2
libdbpp-odbc-38b3452daeae0085506f5b4661203fb74a9b7840.tar.xz
libdbpp-odbc-38b3452daeae0085506f5b4661203fb74a9b7840.zip
Add support for RDBMS boolean/bit types
Diffstat (limited to 'libodbcpp/param.h')
-rw-r--r--libodbcpp/param.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libodbcpp/param.h b/libodbcpp/param.h
index 37f8d5a..53ace67 100644
--- a/libodbcpp/param.h
+++ b/libodbcpp/param.h
@@ -28,6 +28,19 @@ namespace ODBC {
SQLLEN dataLength;
};
+ class BooleanParam : public Param {
+ public:
+ BooleanParam() : Param() { }
+ BooleanParam(Command * c, unsigned int i) : Param(c, i) { bindLen = size(); }
+ virtual SQLSMALLINT ctype() const { return SQL_C_BIT; }
+ virtual SQLSMALLINT stype() const { return SQL_C_BIT; }
+ virtual SQLULEN size() const { return sizeof(SQLINTEGER); }
+ virtual SQLINTEGER dp() const { return 0; }
+ virtual const void * dataAddress() const { return &data; }
+ void operator=(const SQLINTEGER & d) { data = d; }
+ protected:
+ SQLINTEGER data;
+ };
class SignedIntegerParam : public Param {
public:
SignedIntegerParam() : Param() { }