yii\db\sqlite\Schema::setTransactionIsolationLevel PHP Method

setTransactionIsolationLevel() public method

Sets the isolation level of the current transaction.
See also: http://www.sqlite.org/pragma.html#pragma_read_uncommitted
public setTransactionIsolationLevel ( string $level )
$level string The transaction isolation level to use for this transaction. This can be either [[Transaction::READ_UNCOMMITTED]] or [[Transaction::SERIALIZABLE]].
    public function setTransactionIsolationLevel($level)
    {
        switch ($level) {
            case Transaction::SERIALIZABLE:
                $this->db->createCommand('PRAGMA read_uncommitted = False;')->execute();
                break;
            case Transaction::READ_UNCOMMITTED:
                $this->db->createCommand('PRAGMA read_uncommitted = True;')->execute();
                break;
            default:
                throw new NotSupportedException(get_class($this) . ' only supports transaction isolation levels READ UNCOMMITTED and SERIALIZABLE.');
        }
    }