aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-22 12:03:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-22 12:03:11 +0200
commit531c792dd4eecd246cc1ccebac812d6888464a78 (patch)
tree9bed050c98a2c407c68e808ae1f1d296a65c5fee /odb/exceptions.cxx
parent1cddfd09a7007f77fc243f178b1ca88ea4d0f4f6 (diff)
Add session, database operations on pointers and const objects
Currently, session is just an object cache. The persist, update, and erase database operations are overloaded to also work on object pointers. All the database operations and the query facility now support const objects. New session-related exceptions: not_in_session, already_in_session, const_object.
Diffstat (limited to 'odb/exceptions.cxx')
-rw-r--r--odb/exceptions.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index c480125..a41f719 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -25,6 +25,24 @@ namespace odb
return "transaction already committed or rolled back";
}
+ const char* already_in_session::
+ what () const throw ()
+ {
+ return "session already in effect in this thread";
+ }
+
+ const char* not_in_session::
+ what () const throw ()
+ {
+ return "session not in effect in this thread";
+ }
+
+ const char* const_object::
+ what () const throw ()
+ {
+ return "object cached in session is const";
+ }
+
const char* deadlock::
what () const throw ()
{