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.hxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'odb/exceptions.hxx') diff --git a/odb/exceptions.hxx b/odb/exceptions.hxx index 91fa5ab..26550cb 100644 --- a/odb/exceptions.hxx +++ b/odb/exceptions.hxx @@ -14,6 +14,8 @@ namespace odb { + // Transaction exceptions. + // struct LIBODB_EXPORT already_in_transaction: odb::exception { virtual const char* @@ -32,6 +34,28 @@ namespace odb what () const throw (); }; + // Session exceptions. + // + struct LIBODB_EXPORT already_in_session: odb::exception + { + virtual const char* + what () const throw (); + }; + + struct LIBODB_EXPORT not_in_session: odb::exception + { + virtual const char* + what () const throw (); + }; + + struct LIBODB_EXPORT const_object: odb::exception + { + virtual const char* + what () const throw (); + }; + + // Database operations exceptions. + // struct LIBODB_EXPORT deadlock: odb::exception { virtual const char* -- cgit v1.1