aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-10-30 17:52:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-01 14:29:56 +0200
commit62d4405faf1060e447dc06fbda6789ff36bdbe36 (patch)
tree5d92b75b5440c8035236e5f963fbff9c4fe1532e /odb/oracle/statement.hxx
parente0ab16f484d0b39e3760a063b3416cbd74a26c5e (diff)
Rework statement interfaces wrt param/result passing
Diffstat (limited to 'odb/oracle/statement.hxx')
-rw-r--r--odb/oracle/statement.hxx33
1 files changed, 16 insertions, 17 deletions
diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx
index a883d6c..0b56b8f 100644
--- a/odb/oracle/statement.hxx
+++ b/odb/oracle/statement.hxx
@@ -36,16 +36,16 @@ namespace odb
protected:
statement (connection&, const std::string& statement);
- // Bind output parameters to this statement. This function must only
- // be called once. Multiple calls to it will result in memory leaks due
- // to lost OCIBind resources.
+ // Bind parameters for this statement. This function must only
+ // be called once. Multiple calls to it will result in memory
+ // leaks due to lost OCIBind resources.
//
void
- bind_param (bind*, std::size_t count, std::size_t offset);
+ bind_param (bind*, std::size_t count);
- // Bind input parameters to this statement. This function must only be
- // called once. Multiple calls to it will result in memory leaks due to
- // lost OCIDefine resources.
+ // Bind results for this statement. This function must only be
+ // called once. Multiple calls to it will result in memory leaks
+ // due to lost OCIDefine resources.
//
void
bind_result (bind*,
@@ -81,13 +81,13 @@ namespace odb
select_statement (connection& conn,
const std::string& statement,
- binding& cond,
- binding& data,
+ binding& param,
+ binding& result,
std::size_t lob_prefetch_size = 0);
select_statement (connection& conn,
const std::string& statement,
- binding& data,
+ binding& result,
std::size_t lob_prefetch_size = 0);
enum result
@@ -105,7 +105,7 @@ namespace odb
void
stream_result ()
{
- statement::stream_result (data_.bind, data_.count);
+ statement::stream_result (result_.bind, result_.count);
}
void
@@ -116,8 +116,8 @@ namespace odb
select_statement& operator= (const select_statement&);
private:
- binding& data_;
- std::size_t data_version_;
+ binding& result_;
+ std::size_t result_version_;
const std::size_t lob_prefetch_size_;
bool done_;
};
@@ -130,7 +130,7 @@ namespace odb
insert_statement (connection& conn,
const std::string& statement,
- binding& data,
+ binding& param,
bool returning);
// Return true if successful and false if the row is a duplicate. All
@@ -175,8 +175,7 @@ namespace odb
update_statement (connection& conn,
const std::string& statement,
- binding& cond,
- binding& data);
+ binding& param);
void
execute ();
@@ -193,7 +192,7 @@ namespace odb
delete_statement (connection& conn,
const std::string& statement,
- binding& cond);
+ binding& param);
unsigned long long
execute ();