aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/container-statements.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-12-21 15:35:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-12-21 15:35:51 +0200
commit2ce2258f8a014186639b7fed4b80020a82508cd1 (patch)
tree24a850cc0bb54c674b61b3f260b513cf506cd779 /odb/sqlite/container-statements.txx
parent3edeea46dc85e37a3205f2f38f2ebb645df69c4f (diff)
Do not select object id in container SELECT statement
Diffstat (limited to 'odb/sqlite/container-statements.txx')
-rw-r--r--odb/sqlite/container-statements.txx24
1 files changed, 15 insertions, 9 deletions
diff --git a/odb/sqlite/container-statements.txx b/odb/sqlite/container-statements.txx
index 5cf3463..43afb39 100644
--- a/odb/sqlite/container-statements.txx
+++ b/odb/sqlite/container-statements.txx
@@ -22,8 +22,9 @@ namespace odb
&traits::load_all,
&traits::delete_all),
id_binding_ (0),
- cond_image_binding_ (0, 0), // Initialized by impl.
- data_image_binding_ (0, 0) // Initialized by impl.
+ cond_image_binding_ (0, 0), // Initialized by impl.
+ data_image_binding_ (0, 0), // Initialized by impl.
+ select_image_binding_ (0, 0) // Initialized by impl.
{
cond_image_.version = 0;
cond_image_version_ = 0;
@@ -39,24 +40,29 @@ namespace odb
container_statements_impl (connection_type& conn)
: base (conn)
{
- this->cond_image_bind_ = cond_image_bind_array_;
- this->data_image_bind_ = data_image_bind_array_;
this->data_image_truncated_ = data_image_truncated_array_;
+ this->select_image_truncated_ = data_image_truncated_array_ +
+ traits::id_column_count;
- this->cond_image_binding_.bind = this->cond_image_bind_;
+ this->cond_image_binding_.bind = cond_image_bind_;
this->cond_image_binding_.count = traits::cond_column_count;
- this->data_image_binding_.bind = this->data_image_bind_;
+ this->data_image_binding_.bind = data_image_bind_;
this->data_image_binding_.count = traits::data_column_count;
- std::memset (cond_image_bind_array_, 0, sizeof (cond_image_bind_array_));
- std::memset (data_image_bind_array_, 0, sizeof (data_image_bind_array_));
+ this->select_image_binding_.bind = data_image_bind_ +
+ traits::id_column_count;
+ this->select_image_binding_.count = traits::data_column_count -
+ traits::id_column_count;
+
+ std::memset (cond_image_bind_, 0, sizeof (cond_image_bind_));
+ std::memset (data_image_bind_, 0, sizeof (data_image_bind_));
std::memset (data_image_truncated_array_,
0,
sizeof (data_image_truncated_array_));
for (std::size_t i (0); i < traits::data_column_count; ++i)
- data_image_bind_array_[i].truncated = data_image_truncated_array_ + i;
+ data_image_bind_[i].truncated = data_image_truncated_array_ + i;
this->insert_one_text_ = traits::insert_one_statement;
this->select_all_text_ = traits::select_all_statement;