From bc41469ad35c0c0be8729f7323420187c1a31364 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Jun 2012 16:20:04 +0200 Subject: Add argument to session ctor that indicates whether to make it current --- doc/manual.xhtml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'doc/manual.xhtml') diff --git a/doc/manual.xhtml b/doc/manual.xhtml index 5552657..73b4e61 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -8402,7 +8402,7 @@ namespace odb class session { public: - session (); + session (bool make_current = true); ~session (); // Copying or assignment of sessions is not supported. @@ -8448,10 +8448,11 @@ namespace odb } -

The session constructor creates a new session and sets it as a - current session for this thread. If we try to create another - session while there is already a current session in effect, - the constructor throws the odb::already_in_session +

The session constructor creates a new session and, if the + make_current argument is true, sets it as a + current session for this thread. If we try to make a session current + while there is already another session in effect for this thread, + then the constructor throws the odb::already_in_session exception. The destructor clears the current session for this thread if this session is the current one.

-- cgit v1.1