summaryrefslogtreecommitdiff
path: root/libodbcpp/column.h
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2006-07-08 16:32:05 +0000
committerrandomdan <randomdan@localhost>2006-07-08 16:32:05 +0000
commit2a1fa15d8baa4eda37e17b2e9362f8bde17a939d (patch)
tree09386e52320b7c52a521ab56fc7553896e639dcd /libodbcpp/column.h
downloadlibdbpp-odbc-2a1fa15d8baa4eda37e17b2e9362f8bde17a939d.tar.bz2
libdbpp-odbc-2a1fa15d8baa4eda37e17b2e9362f8bde17a939d.tar.xz
libdbpp-odbc-2a1fa15d8baa4eda37e17b2e9362f8bde17a939d.zip
libcodbcpp initial release
Diffstat (limited to 'libodbcpp/column.h')
-rw-r--r--libodbcpp/column.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/libodbcpp/column.h b/libodbcpp/column.h
new file mode 100644
index 0000000..9f597c7
--- /dev/null
+++ b/libodbcpp/column.h
@@ -0,0 +1,40 @@
+#ifndef ODBC_COLUMN_H
+#define ODBC_COLUMN_H
+
+#include "string.h"
+#include "bind.h"
+
+namespace ODBC {
+ class Column : public BindBase {
+ public:
+ Column(String, u_int);
+ virtual ~Column();
+ void bind(SQLHANDLE, SQLUINTEGER, SQLSMALLINT, void*, size_t);
+ operator int () const;
+ operator unsigned int () const;
+ operator long long () const;
+ operator unsigned long long () const;
+ operator double () const;
+ operator float () const;
+ operator const unsigned char * const () const;
+ operator const char * const () const;
+ operator std::string () const;
+ operator String () const;
+ operator const struct tm & () const;
+
+ const u_int colNo;
+ const String name;
+ private:
+ mutable bool fresh;
+ friend class SelectCommand;
+ };
+ template <class t>
+ class _Column : public Bind<t>, public Column {
+ public:
+ _Column(String, u_int);
+ ~_Column() {}
+ };
+}
+
+#endif
+