GnuCash  5.6-150-g038405b370+
Static Public Attributes
python.gnucash_core.SessionOpenMode Class Reference
Inheritance diagram for python.gnucash_core.SessionOpenMode:

Static Public Attributes

 SESSION_NORMAL_OPEN = gnucash_core_c.SESSION_NORMAL_OPEN
 
 SESSION_NEW_STORE = gnucash_core_c.SESSION_NEW_STORE
 
 SESSION_NEW_OVERWRITE = gnucash_core_c.SESSION_NEW_OVERWRITE
 
 SESSION_READ_ONLY = gnucash_core_c.SESSION_READ_ONLY
 
 SESSION_BREAK_LOCK = gnucash_core_c.SESSION_BREAK_LOCK
 

Detailed Description

Mode for opening sessions.

This replaces three booleans that were passed in order: ignore_lock, create,
and force. It's structured so that one can use it as a bit field with the
values in the same order, i.e. ignore_lock = 1 << 2, create_new = 1 << 1, and
force_new = 1.

enumeration members
-------------------

SESSION_NORMAL_OPEN = 0     (All False)
Open will fail if the URI doesn't exist or is locked.

SESSION_NEW_STORE = 2       (False, True, False (create))
Create a new store at the URI. It will fail if the store already exists and is found to contain data that would be overwritten.

SESSION_NEW_OVERWRITE = 3   (False, True, True (create | force))
Create a new store at the URI even if a store already exists there.

SESSION_READ_ONLY = 4,      (True, False, False (ignore_lock))
Open the session read-only, ignoring any existing lock and not creating one if the URI isn't locked.

SESSION_BREAK_LOCK = 5     (True, False, True (ignore_lock | force))
Open the session, taking over any existing lock.

source: lignucash/engine/qofsession.h

Definition at line 228 of file gnucash_core.py.


The documentation for this class was generated from the following file: