original_string: protected function processInsertGetIdForOdbc(Connection $connection)
      {
          $result = $connection->selectFromWriteConnection(
              'SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS int) AS insertid'
          );
  
          if (! $result) {
              throw new Exception('Unable to retrieve lastInsertID for ODBC.');
          }
  
          $row = $result[0];
  
          return is_object($row) ? $row->insertid : $row['insertid'];
      }
code: protected function processInsertGetIdForOdbc(Connection $connection)
      {
          $result = $connection->selectFromWriteConnection(
              'SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS int) AS insertid'
          );
  
          if (! $result) {
              throw new Exception('Unable to retrieve lastInsertID for ODBC.');
          }
  
          $row = $result[0];
  
          return is_object($row) ? $row->insertid : $row['insertid'];
      }
code_tokens: protected function processInsertGetIdForOdbc ( Connection $ connection ) { $ result = $ connection -> selectFromWriteConnection ( 'SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS int) AS insertid' ) ; if ( ! $ result ) { throw new Exception ( 'Unable to retrieve lastInsertID for ODBC.' ) ; } $ row = $ result [ 0 ] ; return is_object ( $ row ) ? $ row -> insertid : $ row [ 'insertid' ] ; }
docstring: Process an "insert get ID" query for ODBC.
  
  @param  \Illuminate\Database\Connection  $connection
  @return int
  
  @throws \Exception
docstring_tokens: Process an insert get ID query for ODBC .