aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/statement.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/oracle/statement.hxx')
-rw-r--r--odb/oracle/statement.hxx87
1 files changed, 50 insertions, 37 deletions
diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx
index db032fa..f90efa3 100644
--- a/odb/oracle/statement.hxx
+++ b/odb/oracle/statement.hxx
@@ -317,45 +317,25 @@ namespace odb
// Return the number of parameter sets (out of n) that were attempted.
//
std::size_t
- execute (std::size_t n = 1, multiple_exceptions* = 0);
+ execute (std::size_t n, multiple_exceptions*);
// Return true if successful and false if this row is a duplicate.
// All other errors are reported via exceptions.
//
bool
- result (std::size_t i = 0);
+ result (std::size_t i);
+
+ bool
+ execute ()
+ {
+ execute (1, 0);
+ return result (0);
+ }
private:
insert_statement (const insert_statement&);
insert_statement& operator= (const insert_statement&);
- /*
- @@ RM
-
- // 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 NUMBER image and manipulate it using
- // the custom conversion algorithms found in details/number.hxx.
- //
- public:
- struct id_bind_type
- {
- union
- {
- struct
- {
- char buffer[21];
- ub4 size;
- } number;
-
- unsigned long long integer;
- } id;
-
- sb2 indicator;
- };
- */
-
private:
void
init (binding& param);
@@ -366,6 +346,7 @@ namespace odb
public: // For odb_oracle_returning_*().
binding* ret_;
ub4 ret_size_; // You don't want to know (see statement.cxx).
+ ub2* ret_prev_;
private:
bool result_;
@@ -394,12 +375,22 @@ namespace odb
//
update_statement (connection_type& conn,
const std::string& text,
+ bool process_text,
+ binding& param);
+
+ update_statement (connection_type& conn,
+ const std::string& text,
bool unique_hint,
bool process_text,
binding& param);
update_statement (connection_type& conn,
const char* text,
+ bool process_text,
+ binding& param);
+
+ update_statement (connection_type& conn,
+ const char* text,
bool unique_hint,
bool process_text,
binding& param);
@@ -407,7 +398,7 @@ namespace odb
// Return the number of parameter sets (out of n) that were attempted.
//
std::size_t
- execute (std::size_t n = 1, multiple_exceptions* = 0);
+ execute (std::size_t n, multiple_exceptions*);
// Return the number of rows affected (deleted) by the parameter
// set. If this is a batch (n > 1 in execute() call above) and it
@@ -418,7 +409,14 @@ namespace odb
using bulk_statement::result_unknown;
unsigned long long
- result (std::size_t i = 0);
+ result (std::size_t i);
+
+ unsigned long long
+ execute ()
+ {
+ execute (1, 0);
+ return result (0);
+ }
private:
update_statement (const update_statement&);
@@ -452,18 +450,26 @@ namespace odb
//
delete_statement (connection_type& conn,
const std::string& text,
- binding& param,
- bool unique_hint = false);
+ binding& param);
+
+ delete_statement (connection_type& conn,
+ const std::string& text,
+ bool unique_hint,
+ binding& param);
delete_statement (connection_type& conn,
const char* text,
- binding& param,
- bool unique_hint = false);
+ binding& param);
+
+ delete_statement (connection_type& conn,
+ const char* text,
+ bool unique_hint,
+ binding& param);
// Return the number of parameter sets (out of n) that were attempted.
//
std::size_t
- execute (std::size_t n = 1, multiple_exceptions* = 0);
+ execute (std::size_t n, multiple_exceptions*);
// Return the number of rows affected (deleted) by the parameter
// set. If this is a batch (n > 1 in execute() call above) and it
@@ -474,7 +480,14 @@ namespace odb
using bulk_statement::result_unknown;
unsigned long long
- result (std::size_t i = 0);
+ result (std::size_t i);
+
+ unsigned long long
+ execute ()
+ {
+ execute (1, 0);
+ return result (0);
+ }
private:
delete_statement (const delete_statement&);