original_string: public function setTransactionIsolationLevel($level = null)
      {
          $this->_connect();
          $sql = null;
  
          // Default transaction level in sql server
          if ($level === null)
          {
              $level = SQLSRV_TXN_READ_COMMITTED;
          }
  
          switch ($level) {
              case SQLSRV_TXN_READ_UNCOMMITTED:
                  $sql = "READ UNCOMMITTED";
                  break;
              case SQLSRV_TXN_READ_COMMITTED:
                  $sql = "READ COMMITTED";
                  break;
              case SQLSRV_TXN_REPEATABLE_READ:
                  $sql = "REPEATABLE READ";
                  break;
              case SQLSRV_TXN_SNAPSHOT:
                  $sql = "SNAPSHOT";
                  break;
              case SQLSRV_TXN_SERIALIZABLE:
                  $sql = "SERIALIZABLE";
                  break;
              default:
                  // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
                  throw new Zend_Db_Adapter_Sqlsrv_Exception("Invalid transaction isolation level mode '$level' specified");
          }
  
          if (!sqlsrv_query($this->_connection, "SET TRANSACTION ISOLATION LEVEL $sql;")) {
              // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
              throw new Zend_Db_Adapter_Sqlsrv_Exception("Transaction cannot be changed to '$level'");
          }
  
          return true;
      }
code: public function setTransactionIsolationLevel($level = null)
      {
          $this->_connect();
          $sql = null;
  
          // Default transaction level in sql server
          if ($level === null)
          {
              $level = SQLSRV_TXN_READ_COMMITTED;
          }
  
          switch ($level) {
              case SQLSRV_TXN_READ_UNCOMMITTED:
                  $sql = "READ UNCOMMITTED";
                  break;
              case SQLSRV_TXN_READ_COMMITTED:
                  $sql = "READ COMMITTED";
                  break;
              case SQLSRV_TXN_REPEATABLE_READ:
                  $sql = "REPEATABLE READ";
                  break;
              case SQLSRV_TXN_SNAPSHOT:
                  $sql = "SNAPSHOT";
                  break;
              case SQLSRV_TXN_SERIALIZABLE:
                  $sql = "SERIALIZABLE";
                  break;
              default:
                  // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
                  throw new Zend_Db_Adapter_Sqlsrv_Exception("Invalid transaction isolation level mode '$level' specified");
          }
  
          if (!sqlsrv_query($this->_connection, "SET TRANSACTION ISOLATION LEVEL $sql;")) {
              // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
              throw new Zend_Db_Adapter_Sqlsrv_Exception("Transaction cannot be changed to '$level'");
          }
  
          return true;
      }
code_tokens: public function setTransactionIsolationLevel ( $ level = null ) { $ this -> _connect ( ) ; $ sql = null ; // Default transaction level in sql server if ( $ level === null ) { $ level = SQLSRV_TXN_READ_COMMITTED ; } switch ( $ level ) { case SQLSRV_TXN_READ_UNCOMMITTED : $ sql = "READ UNCOMMITTED" ; break ; case SQLSRV_TXN_READ_COMMITTED : $ sql = "READ COMMITTED" ; break ; case SQLSRV_TXN_REPEATABLE_READ : $ sql = "REPEATABLE READ" ; break ; case SQLSRV_TXN_SNAPSHOT : $ sql = "SNAPSHOT" ; break ; case SQLSRV_TXN_SERIALIZABLE : $ sql = "SERIALIZABLE" ; break ; default : // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php'; throw new Zend_Db_Adapter_Sqlsrv_Exception ( "Invalid transaction isolation level mode '$level' specified" ) ; } if ( ! sqlsrv_query ( $ this -> _connection , "SET TRANSACTION ISOLATION LEVEL $sql;" ) ) { // require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php'; throw new Zend_Db_Adapter_Sqlsrv_Exception ( "Transaction cannot be changed to '$level'" ) ; } return true ; }
docstring: Set the transaction isoltion level.
  
  @param integer|null $level A fetch mode from SQLSRV_TXN_*.
  @return true
  @throws Zend_Db_Adapter_Sqlsrv_Exception
docstring_tokens: Set the transaction isoltion level .