aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.hxx
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.hxx
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.hxx')
-rw-r--r--odb/exceptions.hxx24
1 files changed, 24 insertions, 0 deletions
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*