aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-05-27 11:06:00 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-05-27 15:20:38 +0200
commit3bc0a2048527ed8ed216425b058b7fd67da401e5 (patch)
treeaa22b85ca8e64d29b315fe074ae695b1e03b3955
parent952b5dc4b93fae4f49465b87e977fc67a34b6098 (diff)
Cleanup object-statements
-rw-r--r--odb/pgsql/object-statements.hxx30
-rw-r--r--odb/pgsql/object-statements.txx5
2 files changed, 13 insertions, 22 deletions
diff --git a/odb/pgsql/object-statements.hxx b/odb/pgsql/object-statements.hxx
index 3059a01..0d2607b 100644
--- a/odb/pgsql/object-statements.hxx
+++ b/odb/pgsql/object-statements.hxx
@@ -1,4 +1,4 @@
-// file : odb/sqlite/object-statements.hxx
+// file : odb/pgsql/object-statements.hxx
// author : Constantin Michael <constantin@codesynthesis.com>
// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
@@ -252,15 +252,15 @@ namespace odb
persist_.reset (
new (details::shared) persist_statement_type (
conn_,
- // @@ name,
+ object_traits::persist_statement_name,
object_traits::persist_statement,
object_traits::persist_statement_types,
object_traits::persist_statement_count,
in_image_binding_,
- in_image_native_binding));
+ in_image_native_binding_));
+ }
- persist_->cached (true);
- } return *persist_;
+ return *persist_;
}
find_statement_type&
@@ -271,15 +271,13 @@ namespace odb
find_.reset (
new (details::shared) find_statement_type (
conn_,
- // @@ name,
+ object_traits::find_statement_name,
object_traits::find_statement,
object_traits::find_statement_types,
object_traits::find_statement_count,
id_image_binding_,
id_image_native_binding_,
out_image_binding_));
-
- find_->cached (true);
}
return *find_;
@@ -293,16 +291,14 @@ namespace odb
update_.reset (
new (details::shared) update_statement_type (
conn_,
- // @@ name,
+ object_traits::update_statement_name,
object_traits::update_statement,
object_traits::update_statement_types,
object_traits::update_statement_count,
id_image_binding_,
- id_image_native_binding,
- in_image_binding_
- in_image_native_binding));
-
- update_->cached (true);
+ id_image_native_binding_,
+ in_image_binding_,
+ in_image_native_binding_));
}
return *update_;
@@ -316,14 +312,12 @@ namespace odb
erase_.reset (
new (details::shared) erase_statement_type (
conn_,
- // @@ name,
+ object_traits::erase_statement_name,
object_traits::erase_statement,
object_traits::erase_statement_types,
object_traits::erase_statment_count,
- id_image_binding_
+ id_image_binding_,
id_image_native_binding_));
-
- erase_->cached (true);
}
return *erase_;
diff --git a/odb/pgsql/object-statements.txx b/odb/pgsql/object-statements.txx
index a36551a..f355b13 100644
--- a/odb/pgsql/object-statements.txx
+++ b/odb/pgsql/object-statements.txx
@@ -24,7 +24,7 @@ namespace odb
in_image_native_binding_ (in_image_values_,
in_image_lengths_,
in_image_formats_,
- object_traits::in_column_count)
+ object_traits::in_column_count),
out_image_binding_ (out_image_bind_,
object_traits::out_column_count),
id_image_binding_ (in_image_bind_ + object_traits::in_column_count,
@@ -45,9 +45,6 @@ namespace odb
std::memset (out_image_bind_, 0, sizeof (out_image_bind_));
std::memset (out_image_truncated_, 0, sizeof (out_image_truncated_));
- // @@ Is it necessary to zero native array contents?
- //
-
for (std::size_t i (0); i < object_traits::out_column_count; ++i)
out_image_bind_[i].truncated = out_image_truncated_ + i;
}