This class is a singleton that contains thread-local parameters of the database transaction.
The database cursor.
The id of the user.
The language code defines in the context.
Start a new transaction and return a context manager.
Stop a started transaction. This method should not be called directly as it will be by the context manager when exiting the with statement.
Update the transaction context and return a context manager. The context will be restored when exiting the with statement.
Modify the user of the transaction and return a context manager. set_context will put the previous user id in the context to simulate the record rules. The user will be restored when exiting the with statement.
Modify the cursor of the transaction and return a context manager. The previous cursor will be restored when exiting the with statement.
Change the cursor of the transaction with a new one on the same database and return a context manager. The previous cursor will be restored when exiting the with statement and the new one will be closed.