Changing Default Transaction Behavior
You can change default transaction behavior as follows:
To prevent updates to database content, explicitly start a transaction and specify that it is read only:
START TRANSACTION READ ONLY(see
START TRANSACTION). This starts an explicit transaction (see About Implicit and Explicit Transactions ) which will suspend the
AUTOCOMMITsetting. This setting affects only the newly started transaction.
To change default autocommit behavior, specify
SET AUTOCOMMIT OFF(See
SET). When autocommit behavior is disabled and there is no
START TRANSACTIONstatement, then execution of a statement implicitly starts a transaction. This transaction remains open until a
ROLLBACKstatement is executed (see
ROLLBACK). Autocommit remains disabled unless there is a
SET AUTOCOMMIT ONstatement or the connection closes.
To change the default transaction isolation level, specify
SET ISOLATION LEVEL isolation_level. The new setting is in effect with the start of the next transaction and stays in effect unless the level is reset with another
SETcommand or the connection closes. See Supported Transaction Isolation Levels for a description of each transaction isolation level that NuoDB supports.
Another way to set the default transaction isolation level is to specify the isolation connection property when you open a connection. For example:
nuosql test@localhost --user dba --password dba --connection-property isolation=read_committed