original_string: private function setupConnection()
      {
          $requiredMode = $this->options->quoteIdentifier;
          if ( $requiredMode == ezcDbMssqlOptions::QUOTES_GUESS )
          {
              $result = parent::query( "SELECT sessionproperty('QUOTED_IDENTIFIER')" );
              $rows = $result->fetchAll();
              $mode = (int)$rows[0][0];
              if ( $mode == 0 )
              {
                  $this->identifierQuoteChars = array( 'start' => '[', 'end' => ']' );
              }
              else
              {
                  $this->identifierQuoteChars = array( 'start' => '"', 'end' => '"' );
              }
          }
          else if ( $requiredMode == ezcDbMssqlOptions::QUOTES_COMPLIANT )
          {
              parent::exec( 'SET QUOTED_IDENTIFIER ON' );
              $this->identifierQuoteChars = array( 'start' => '"', 'end' => '"' );
          }
          else if ( $requiredMode == ezcDbMssqlOptions::QUOTES_LEGACY )
          {
              parent::exec( 'SET QUOTED_IDENTIFIER OFF' );
              $this->identifierQuoteChars = array( 'start' => '[', 'end' => ']' );
          }
      }
code: private function setupConnection()
      {
          $requiredMode = $this->options->quoteIdentifier;
          if ( $requiredMode == ezcDbMssqlOptions::QUOTES_GUESS )
          {
              $result = parent::query( "SELECT sessionproperty('QUOTED_IDENTIFIER')" );
              $rows = $result->fetchAll();
              $mode = (int)$rows[0][0];
              if ( $mode == 0 )
              {
                  $this->identifierQuoteChars = array( 'start' => '[', 'end' => ']' );
              }
              else
              {
                  $this->identifierQuoteChars = array( 'start' => '"', 'end' => '"' );
              }
          }
          else if ( $requiredMode == ezcDbMssqlOptions::QUOTES_COMPLIANT )
          {
              parent::exec( 'SET QUOTED_IDENTIFIER ON' );
              $this->identifierQuoteChars = array( 'start' => '"', 'end' => '"' );
          }
          else if ( $requiredMode == ezcDbMssqlOptions::QUOTES_LEGACY )
          {
              parent::exec( 'SET QUOTED_IDENTIFIER OFF' );
              $this->identifierQuoteChars = array( 'start' => '[', 'end' => ']' );
          }
      }
code_tokens: private function setupConnection ( ) { $ requiredMode = $ this -> options -> quoteIdentifier ; if ( $ requiredMode == ezcDbMssqlOptions :: QUOTES_GUESS ) { $ result = parent :: query ( "SELECT sessionproperty('QUOTED_IDENTIFIER')" ) ; $ rows = $ result -> fetchAll ( ) ; $ mode = ( int ) $ rows [ 0 ] [ 0 ] ; if ( $ mode == 0 ) { $ this -> identifierQuoteChars = array ( 'start' => '[' , 'end' => ']' ) ; } else { $ this -> identifierQuoteChars = array ( 'start' => '"' , 'end' => '"' ) ; } } else if ( $ requiredMode == ezcDbMssqlOptions :: QUOTES_COMPLIANT ) { parent :: exec ( 'SET QUOTED_IDENTIFIER ON' ) ; $ this -> identifierQuoteChars = array ( 'start' => '"' , 'end' => '"' ) ; } else if ( $ requiredMode == ezcDbMssqlOptions :: QUOTES_LEGACY ) { parent :: exec ( 'SET QUOTED_IDENTIFIER OFF' ) ; $ this -> identifierQuoteChars = array ( 'start' => '[' , 'end' => ']' ) ; } }
docstring: Sets up opened connection according to options.
docstring_tokens: Sets up opened connection according to options .