SparkseePython
6.0.2
|
Public Member Functions | |
def | rollback (self) |
Rollbacks a transaction. | |
def | pre_commit (self) |
PreCommits a transaction. More... | |
def | begin (self) |
Begins a transaction. | |
def | begin_update (self) |
Begins an update transaction. | |
def | new_query (self, lang) |
Creates a new Query. More... | |
def | commit (self) |
Commits a transaction. | |
def | get_graph (self) |
Gets the Graph instance. More... | |
def | close (self) |
Closes the Session instance. More... | |
def | new_objects (self) |
Creates a new Objects instance. More... | |
def | get_in_memory_pool_capacity (self) |
Gets the capacity of the in-memory pool. More... | |
def | is_closed (self) |
Gets if Session instance has been closed or not. More... | |
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.
def sparksee.Session.close | ( | self | ) |
Closes the Session instance.
It must be called to ensure the integrity of all data.
def sparksee.Session.get_in_memory_pool_capacity | ( | self | ) |
Gets the capacity of the in-memory pool.
def sparksee.Session.is_closed | ( | self | ) |
def sparksee.Session.new_objects | ( | self | ) |
def sparksee.Session.new_query | ( | self, | |
lang | |||
) |
Creates a new Query.
lang | The query language to create the query for |
def sparksee.Session.pre_commit | ( | self | ) |
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).