From 4c38968b151af31ebd9ffa381f7a00df7183a8d6 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Wed, 7 Sep 2011 15:09:23 +0200 Subject: Add bind structures --- odb/oracle/binding.hxx | 45 +++++++++++++++++++++++++++++++++++++++++++++ odb/oracle/oracle-types.hxx | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 odb/oracle/binding.hxx create mode 100644 odb/oracle/oracle-types.hxx diff --git a/odb/oracle/binding.hxx b/odb/oracle/binding.hxx new file mode 100644 index 0000000..778e7fc --- /dev/null +++ b/odb/oracle/binding.hxx @@ -0,0 +1,45 @@ +// file : odb/oracle/binding.hxx +// author : Constantin Michael +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : ODB NCUEL; see accompanying LICENSE file + +#ifndef ODB_ORACLE_BINDING_HXX +#define ODB_ORACLE_BINDING_HXX + +#include + +#include // std::size_t + +#include +#include + +#include + +namespace odb +{ + namespace oracle + { + class LIBODB_ORACLE_EXPORT binding + { + public: + typedef oracle::bind bind_type; + + binding (bind_type* b, std::size_t n) + : bind (b), count (n), version (0) + { + } + + bind_type* bind; + std::size_t count; + std::size_t version; + + private: + binding (const binding&); + binding& operator= (const binding&); + }; + } +} + +#include + +#endif // ODB_ORACLE_BINDING_HXX diff --git a/odb/oracle/oracle-types.hxx b/odb/oracle/oracle-types.hxx new file mode 100644 index 0000000..70006c6 --- /dev/null +++ b/odb/oracle/oracle-types.hxx @@ -0,0 +1,34 @@ +// file : odb/oracle/oracle-types.hxx +// author : Constantin Michael +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : ODB NCUEL; see accompanying LICENSE file + +#ifndef ODB_ORACLE_ORACLE_TYPES_HXX +#define ODB_ORACLE_ORACLE_TYPES_HXX + +#include + +#include +#include + +namespace odb +{ + namespace oracle + { + struct bind + { + ub2 type; // The type stored in the memory pointed to by buffer + // This must be an external OCI type identifier + // of the form SQLT_XXX. + void* buffer; + ub2* size; // The number of bytes of data contained by buffer. + sb4 capacity; // The maximum number of bytes that can be stored in + // buffer. + sb2* indicator; // Pointer to an OCI indicator variable. + }; + } +} + +#include + +#endif // ODB_ORACLE_ORACLE_TYPES_HXX -- cgit v1.1