summaryrefslogtreecommitdiff
path: root/libodbcpp/column.h
diff options
context:
space:
mode:
Diffstat (limited to 'libodbcpp/column.h')
-rw-r--r--libodbcpp/column.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libodbcpp/column.h b/libodbcpp/column.h
index 3b3370f..67dd0c4 100644
--- a/libodbcpp/column.h
+++ b/libodbcpp/column.h
@@ -22,7 +22,7 @@ namespace ODBC {
operator Glib::ustring () const;
operator struct tm () const;
virtual void rebind(Command *, unsigned int col) const = 0;
- virtual Glib::ustring compose() const = 0;
+ virtual const Glib::ustring & compose() const = 0;
virtual Glib::ustring compose(const Glib::ustring & fmt) const = 0;
virtual int writeToBuf(char ** buf) const = 0;
virtual int writeToBuf(char ** buf, const char * fmt) const = 0;
@@ -30,6 +30,8 @@ namespace ODBC {
const unsigned int colNo;
const Glib::ustring name;
+ protected:
+ mutable Glib::ustring * composeCache;
private:
SQLUINTEGER bindSize; // Allocated memory
friend class SelectCommand;
@@ -40,7 +42,7 @@ namespace ODBC {
_Column(const Glib::ustring &, unsigned int);
~_Column() {}
void rebind(Command *, unsigned int col) const;
- Glib::ustring compose() const;
+ const Glib::ustring & compose() const;
Glib::ustring compose(const Glib::ustring & fmt) const;
int writeToBuf(char ** buf) const;
int writeToBuf(char ** buf, const char * fmt) const;