From d56c3e03eaf296c97b6add01b4e2ce543893d6c4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 20 Nov 2014 15:46:21 +0200 Subject: Add test --- odb/oracle/no-id-object-statements.hxx | 7 ++++--- odb/oracle/no-id-object-statements.txx | 10 +++++++--- odb/oracle/statement.cxx | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/odb/oracle/no-id-object-statements.hxx b/odb/oracle/no-id-object-statements.hxx index fe4d8d0..70f76e4 100644 --- a/odb/oracle/no-id-object-statements.hxx +++ b/odb/oracle/no-id-object-statements.hxx @@ -49,9 +49,9 @@ namespace odb // Object image. // image_type& - image () + image (std::size_t i = 0) { - return image_; + return image_[i]; } // Insert binding. @@ -108,7 +108,8 @@ namespace odb no_id_object_statements& operator= (const no_id_object_statements&); private: - image_type image_; + image_type image_[object_traits::batch]; + sb4 status_[object_traits::batch]; // Select binding. // diff --git a/odb/oracle/no-id-object-statements.txx b/odb/oracle/no-id-object-statements.txx index 31ed931..31f3891 100644 --- a/odb/oracle/no-id-object-statements.txx +++ b/odb/oracle/no-id-object-statements.txx @@ -19,13 +19,17 @@ namespace odb no_id_object_statements (connection_type& conn) : statements_base (conn), select_image_binding_ (select_image_bind_, select_column_count), - insert_image_binding_ (insert_image_bind_, insert_column_count) + insert_image_binding_ (insert_image_bind_, + insert_column_count, + object_traits::batch, + sizeof (image_type), + status_) { - image_.version = 0; + image_[0].version = 0; select_image_version_ = 0; insert_image_version_ = 0; - select_image_binding_.change_callback = image_.change_callback (); + select_image_binding_.change_callback = image_[0].change_callback (); std::memset (insert_image_bind_, 0, sizeof (insert_image_bind_)); std::memset (select_image_bind_, 0, sizeof (select_image_bind_)); diff --git a/odb/oracle/statement.cxx b/odb/oracle/statement.cxx index 023e41f..a8ff720 100644 --- a/odb/oracle/statement.cxx +++ b/odb/oracle/statement.cxx @@ -1366,7 +1366,7 @@ namespace odb if (status_[row] != ignore_code) translate_error (err2, OCI_ERROR, &conn_, row, mex_); - cerr << "[" << row << "] " << status_[row] << endl; + //cerr << "[" << row << "] " << status_[row] << endl; } } } -- cgit v1.1