5.3.7 SessionFactory

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.

openSession(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.

Array getOpenSessions();

Get all open sessions that have been created by this SessionFactory.

close(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.

Download this Manual
PDF (US Ltr) - 4.8Mb
PDF (A4) - 4.8Mb
EPUB - 1.9Mb
HTML Download (TGZ) - 1.8Mb
HTML Download (Zip) - 1.9Mb
User Comments
Sign Up Login You must be logged in to post a comment.