aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/pgsql-types.hxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-05-18 16:50:19 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-05-18 16:52:12 +0200
commit693759c14408c7607802888a5aed7b58d5c872b7 (patch)
tree6cdfb993a02efe6328aa46f5161361926753d7de /odb/pgsql/pgsql-types.hxx
parent2162b1fa3fc74baef93ef1ddbb6ba7d9d40ab511 (diff)
Add binding structure
Diffstat (limited to 'odb/pgsql/pgsql-types.hxx')
-rw-r--r--odb/pgsql/pgsql-types.hxx38
1 files changed, 38 insertions, 0 deletions
diff --git a/odb/pgsql/pgsql-types.hxx b/odb/pgsql/pgsql-types.hxx
new file mode 100644
index 0000000..930eb2b
--- /dev/null
+++ b/odb/pgsql/pgsql-types.hxx
@@ -0,0 +1,38 @@
+// file : odb/pgsql/pgsql-types.hxx
+// author : Constantin Michael <constantin@codesynthesis.com>
+// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_PGSQL_PGSQL_TYPES_HXX
+#define ODB_PGSQL_PGSQL_TYPES_HXX
+
+#include <odb/pre.hxx>
+
+#include <cstddef> // std::size_t
+
+#include <libpq-fe.h> // Oid
+
+#include <odb/pgsql/pgsql-oid.hxx>
+
+namespace odb
+{
+ namespace pgsql
+ {
+ // The libpq result binding. This data structures is
+ // modelled after MYSQL_BIND from MySQL.
+ //
+ struct bind
+ {
+ Oid type;
+ void* buffer;
+ std::size_t* size;
+ std::size_t capacity;
+ bool* is_null;
+ bool* truncated;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_PGSQL_PGSQL_TYPES_HXX