From 334d438fc22f4f4b1c3e85a44b81b469f9f5ba54 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Tue, 24 May 2011 16:36:07 +0200 Subject: Correct bind struct and add initial buffer type enumeration --- odb/pgsql/pgsql-types.hxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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; -- cgit v1.1