aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/statement.hxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-11-15 11:36:05 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-11-16 12:48:18 +0200
commitf8d8de4ef1ec010cb81c75b00d8229204e7b1788 (patch)
tree7137a795683758710d60b18c9d24b4b59d95db29 /odb/oracle/statement.hxx
parent7f348b4e2874d7aa39fbf093e56323f6e73ca052 (diff)
Use Oracle NUMBER to store returning ID value in 32-bit insert statement impl
Diffstat (limited to 'odb/oracle/statement.hxx')
-rw-r--r--odb/oracle/statement.hxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx
index 3687728..2e5c6ba 100644
--- a/odb/oracle/statement.hxx
+++ b/odb/oracle/statement.hxx
@@ -20,6 +20,7 @@
#include <odb/oracle/oracle-fwd.hxx>
#include <odb/oracle/auto-handle.hxx>
+#include <odb/oracle/details/number.hxx>
#include <odb/oracle/details/export.hxx>
namespace odb
@@ -213,16 +214,22 @@ namespace odb
// Only OCI versions 11.2 and greater support conversion of the internal
// Oracle type NUMBER to an external 64-bit integer type. If we detect
// version 11.2 or greater we provide an unsigned long long image.
- // Otherwise, we revert to using a 32-bit unsigned integer.
+ // Otherwise, we revert to using a NUMBER image and manipulate it using
+ // the custom conversion algorithms found in details/number.hxx.
//
public:
struct id_bind_type
{
union
{
- unsigned int value32;
- unsigned long long value64;
- } id;
+ struct
+ {
+ char buffer[21];
+ ub4 size;
+ } number;
+
+ unsigned long long integer;
+ }id;
sb2 indicator;
};