aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-05-24 16:36:07 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-05-24 16:36:07 +0200
commit334d438fc22f4f4b1c3e85a44b81b469f9f5ba54 (patch)
treefc926c28ecf40944abac10a080aba855e214b722 /odb
parent94c9f7a9ac7aa3f2ebe839a10b96bd7171da1738 (diff)
Correct bind struct and add initial buffer type enumeration
Diffstat (limited to 'odb')
-rw-r--r--odb/pgsql/pgsql-types.hxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/odb/pgsql/pgsql-types.hxx b/odb/pgsql/pgsql-types.hxx
index 930eb2b..b872e6d 100644
--- a/odb/pgsql/pgsql-types.hxx
+++ b/odb/pgsql/pgsql-types.hxx
@@ -23,7 +23,24 @@ namespace odb
//
struct bind
{
- Oid type;
+ // @@ Initial set of buffer types to support numeric,
+ // text, and binary data types.
+ enum buffer_type
+ {
+ smallint, // Buffer is short; size, capacity, truncated are unused.
+ integer, // Buffer is int; size, capacity, truncated are unused.
+ bigint, // Buffer is long long; size, capacity, truncated are unused.
+ real, // Buffer is float; size, capacity, truncated are unused.
+ dbl, // Buffer is double; size, capacity, truncated are unused.
+
+ // @@ Do we require different buffer types for each of these?
+ //
+ numeric, // Buffer is a char array.
+ text, // Buffer is a char array.
+ bytea // Buffer is a char array.
+ };
+
+ buffer_type type;
void* buffer;
std::size_t* size;
std::size_t capacity;