summaryrefslogtreecommitdiff
path: root/libodbcpp/column.h
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-06-11 09:03:42 +0000
committerrandomdan <randomdan@localhost>2010-06-11 09:03:42 +0000
commit1df33cc9d9a7804c78788d5717435ede44855ca0 (patch)
treeb78e66de0a9f7d6bb39038d6f628cbc871ffa652 /libodbcpp/column.h
parentInitial workings of project2 - renders gentoobrowse homepage (diff)
downloadlibdbpp-odbc-1df33cc9d9a7804c78788d5717435ede44855ca0.tar.bz2
libdbpp-odbc-1df33cc9d9a7804c78788d5717435ede44855ca0.tar.xz
libdbpp-odbc-1df33cc9d9a7804c78788d5717435ede44855ca0.zip
Use Glib::ustring in libodbcpp for data and std::string for non-data
Add support for parameters in SqlViews Uses parameters to implement category browse and search
Diffstat (limited to 'libodbcpp/column.h')
-rw-r--r--libodbcpp/column.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/libodbcpp/column.h b/libodbcpp/column.h
index 992a958..9f3b93d 100644
--- a/libodbcpp/column.h
+++ b/libodbcpp/column.h
@@ -1,13 +1,13 @@
#ifndef ODBC_COLUMN_H
#define ODBC_COLUMN_H
-#include "ustring.h"
+#include <glibmm/ustring.h>
#include "bind.h"
namespace ODBC {
class Column : public BindBase {
public:
- Column(String, unsigned int);
+ Column(const Glib::ustring &, unsigned int);
virtual ~Column();
void bind(SQLHANDLE, SQLUINTEGER, SQLSMALLINT, void*, size_t);
operator int () const;
@@ -19,22 +19,23 @@ namespace ODBC {
operator const unsigned char * () const;
operator const char * () const;
operator std::string () const;
- operator String () const;
+ operator Glib::ustring () const;
operator struct tm () const;
virtual void rebind(Command *, unsigned int col) const = 0;
virtual int writeToBuf(char ** buf) const = 0;
virtual int writeToBuf(char ** buf, const char * fmt) const = 0;
+ bool isNull() const;
const unsigned int colNo;
- const String name;
+ const Glib::ustring name;
private:
- mutable bool fresh;
+ SQLUINTEGER bindSize; // Allocated memory
friend class SelectCommand;
};
template <class t>
class _Column : public Bind<t>, public Column {
public:
- _Column(String, unsigned int);
+ _Column(const Glib::ustring &, unsigned int);
~_Column() {}
void rebind(Command *, unsigned int col) const;
int writeToBuf(char ** buf) const;