Setting Isolation Levels
You can use the
isolation() method of
RWDBConnection to set the isolation level of the connection.
Table 5 shows the mapping between the argument you pass for
IsolationType, and the isolation level set by the MySQL statement
SET SESSION TRANSACTION ISOLATION LEVEL.
Table 5 – Setting the isolation level
RWDBConnection:: IsolationType | MySQL Isolation Level |
---|
Unknown | READ_UNCOMMITTED |
ANSILevel1 | READ_COMMITTED |
ANSILevel2 | REPEATABLE_READ |
ANSILevel3 | SERIALIZABLE |
To determine the current isolation level, call RWDBConnection::isolation() without an argument.