This class is used to generate and manage sessions. A
Session
provides a context for database transactions and operations.
Each independent user should have its own session.
Press CTRL+C to copyopenSession(Object mappings, Function(Object error, Session session) callback);
Open a database session object. Table
mappings
are validated at the
beginning of the session. Resources required for sessions are
allocated in advance; if those resources are not available, the
method returns an error in the callback.
Press CTRL+C to copyArray getOpenSessions();
Get all open sessions that have been created by this
SessionFactory
.
Press CTRL+C to copyclose(Function(Error err));
Close the connection to the database. This ensures proper disconnection. The function passed in is called when the close operation is complete.