Sparksee
6.0.2
|
Public Member Functions | |
virtual | ~Session () |
Destructor. | |
Graph * | GetGraph () |
Gets the Graph instance. More... | |
Objects * | NewObjects () |
Creates a new Objects instance. More... | |
void | Begin () |
Begins a transaction. | |
void | BeginUpdate () |
Begins an update transaction. | |
void | Commit () |
Commits a transaction. | |
void | Rollback () |
Rollbacks a transaction. | |
Query * | NewQuery (sparksee::gdb::QueryLanguage lang) |
Creates a new Query. More... | |
int64_t | PreCommit () |
PreCommits a transaction. More... | |
int64_t | GetInMemoryPoolCapacity () |
Gets the capacity of the in-memory pool. More... | |
Private Member Functions | |
sparksee_core::Session * | GetHandler () |
Gets the handled reference. More... | |
const sparksee_core::Session * | GetHandler () const |
Gets the handled reference. More... | |
void | SetHandler (sparksee_core::Session *h) |
Sets the handled reference. More... | |
void | FreeHandler () |
Frees (deletes) the handled reference. | |
bool_t | IsNull () const |
Gets if the handler is NULL. More... | |
Friends | |
class | Database |
class | Graph |
class | Objects |
class | ObjectsIterator |
class | KeyValues |
class | Values |
class | ValuesIterator |
class | TextStream |
class | ValueArray |
Session class.
A Session is a stateful period of activity of a user with the Database.
All the manipulation of a Database must be enclosed into a Session. A Session can be initiated from a Database instance and allows for getting a Graph instance which represents the persistent graph (the graph database).
Also, temporary data is associated to the Session, thus when a Session is closed, all the temporary data associated to the Session is removed too. Objects or Values instances or even session attributes are an example of temporary data.
Moreover, a Session is exclusive for a thread, thus if it is shared among threads results may be fatal or unexpected.
Check out the 'Processing' and 'Transactions' sections in the SPARKSEE User Manual for details about how Sessions work and the use of transactions.
int64_t Session::GetInMemoryPoolCapacity | ( | ) |
Gets the capacity of the in-memory pool.
Query* Session::NewQuery | ( | sparksee::gdb::QueryLanguage | lang | ) |
Creates a new Query.
lang | The query language to create the query for |
int64_t Session::PreCommit | ( | ) |
PreCommits a transaction.
YOU SHOULD NOT USE THIS METHOD. This method exists for a specific service and it is used to force that the transaction is written in the recovery log even though it had not been committed yet (and may never be).