From 531c792dd4eecd246cc1ccebac812d6888464a78 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 22 Nov 2010 12:03:11 +0200 Subject: 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. --- odb/exceptions.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'odb/exceptions.cxx') 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 () { -- cgit v1.1