summaryrefslogtreecommitdiff
path: root/libodbcpp/bind.h
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-09-16 00:01:56 +0000
committerrandomdan <randomdan@localhost>2010-09-16 00:01:56 +0000
commit7297648c278903589beebf6fbc7511e5c1ff421d (patch)
treea2686c7d458aad2c32bcb1ae61cb4e04702fd9d4 /libodbcpp/bind.h
parentRemove duplication in ODBC::Connection constructors (diff)
downloadlibdbpp-odbc-7297648c278903589beebf6fbc7511e5c1ff421d.tar.bz2
libdbpp-odbc-7297648c278903589beebf6fbc7511e5c1ff421d.tar.xz
libdbpp-odbc-7297648c278903589beebf6fbc7511e5c1ff421d.zip
Rewrite the whole of parameter and column binding almost from scratch
No more template rubbish, no more messy partial specialisation Add copyless rebind of column to parameter Changes in project2 to suit
Diffstat (limited to 'libodbcpp/bind.h')
-rw-r--r--libodbcpp/bind.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/libodbcpp/bind.h b/libodbcpp/bind.h
index fd69900..cd45cf6 100644
--- a/libodbcpp/bind.h
+++ b/libodbcpp/bind.h
@@ -5,25 +5,20 @@
#include <vector>
namespace ODBC {
- class Command;
- class BindBase {
- public:
- BindBase();
- virtual ~BindBase() {}
- protected:
- SQLLEN bindLen; // Used memory
- friend class Param;
- friend class Column;
- friend class Command;
- };
- template <class t>
class Bind {
public:
- virtual ~Bind() {}
- mutable t value;
+ Bind();
+ virtual ~Bind() = 0;
+
+ virtual SQLSMALLINT ctype() const = 0; // The C type ID
+ virtual SQLINTEGER size() const = 0; // The size of the data
+ protected:
+ mutable SQLLEN bindLen; // How much data the driver wants to store
};
- typedef std::vector<char> SQLCHARVEC;
}
+void operator << (SQL_TIMESTAMP_STRUCT & target, const struct tm &);
+void operator << (struct tm &, const SQL_TIMESTAMP_STRUCT & target);
+
#endif