|
LMDBAL 0.6.0
LMDB (Lightning Memory-Mapped Database Manager) Abstraction Layer
|
RAII guard that keeps the database environment active. More...
Public Member Functions | |
| Session () | |
| Constructs an empty session that is not bound to any database. | |
| ~Session () | |
| Destroys the session, unregistering it if still active. | |
| Session (const Session &)=delete | |
| Session (Session &&) | |
| Transfers ownership of the session to a new instance. | |
| Session & | operator= (const Session &)=delete |
| Session & | operator= (Session &&) |
| Move-assigns a session, releasing the currently held one if present. | |
| void | close () |
| Closes the session explicitly. | |
| bool | opened () const |
| Reports whether this session still owns an opened database. | |
Friends | |
| class | Base |
RAII guard that keeps the database environment active.
Instances are obtained from LMDBAL::Base::open(). While at least one session exists, the underlying LMDB environment remains opened. Destroying or closing the session releases the reference; the final session deactivates the database.
|
explicit |
Constructs an empty session that is not bound to any database.
Users normally receive ready-to-use sessions from LMDBAL::Base::open().
| LMDBAL::Session::Session | ( | Session && | other | ) |
Transfers ownership of the session to a new instance.
The original session becomes inactive, while the database keeps tracking the new object.
| void LMDBAL::Session::close | ( | ) |
Closes the session explicitly.
Unregisters the session and deactivates the database if it was the last holder.