aboutsummaryrefslogtreecommitdiff
path: root/odb/database.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-20 16:05:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-20 16:05:01 +0200
commit2d3d20ee4e3ce52d6a2b235e86aa3fa63fe61611 (patch)
tree54f5b2a074c997c9f762147c65b1b9406a63d0bb /odb/database.hxx
parent4ecaf6e91c2f1107f855c93fc2e0e4efb03c4cb0 (diff)
Add persist(const) version, make update()'s argument const
Diffstat (limited to 'odb/database.hxx')
-rw-r--r--odb/database.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/odb/database.hxx b/odb/database.hxx
index ab80da4..4858f0f 100644
--- a/odb/database.hxx
+++ b/odb/database.hxx
@@ -35,6 +35,10 @@ namespace odb
//
template <typename T>
typename object_traits<T>::id_type
+ persist (const T& object);
+
+ template <typename T>
+ typename object_traits<T>::id_type
persist (T& object);
// Throw object_not_persistent if not found.
@@ -61,7 +65,7 @@ namespace odb
//
template <typename T>
void
- update (T& object);
+ update (const T& object);
// Make the object transient. Throw object_not_persistent if not
// found.