original_string: protected function runSql($file, $message, $notFoundMessage, $output)
      {
          if (! is_file($file)) {
              $output->writeln($notFoundMessage);
  
              return;
          }
  
          $output->writeln($message);
  
          $dataSql = file_get_contents($file);
  
          // Split the sql file on new lines and insert into the database one line at a time
          foreach (preg_split('/;\s*\n/', $dataSql) as $command) {
              try {
                  $query = $this->db->query($command, DbAdapter::QUERY_MODE_EXECUTE);
              } catch (Database_Exception $e) {
                  if ($e->getCode() !== 1065) { // empty query
                      throw $e;
                  }
              }
          }
      }
code: protected function runSql($file, $message, $notFoundMessage, $output)
      {
          if (! is_file($file)) {
              $output->writeln($notFoundMessage);
  
              return;
          }
  
          $output->writeln($message);
  
          $dataSql = file_get_contents($file);
  
          // Split the sql file on new lines and insert into the database one line at a time
          foreach (preg_split('/;\s*\n/', $dataSql) as $command) {
              try {
                  $query = $this->db->query($command, DbAdapter::QUERY_MODE_EXECUTE);
              } catch (Database_Exception $e) {
                  if ($e->getCode() !== 1065) { // empty query
                      throw $e;
                  }
              }
          }
      }
code_tokens: protected function runSql ( $ file , $ message , $ notFoundMessage , $ output ) { if ( ! is_file ( $ file ) ) { $ output -> writeln ( $ notFoundMessage ) ; return ; } $ output -> writeln ( $ message ) ; $ dataSql = file_get_contents ( $ file ) ; // Split the sql file on new lines and insert into the database one line at a time foreach ( preg_split ( '/;\s*\n/' , $ dataSql ) as $ command ) { try { $ query = $ this -> db -> query ( $ command , DbAdapter :: QUERY_MODE_EXECUTE ) ; } catch ( Database_Exception $ e ) { if ( $ e -> getCode ( ) !== 1065 ) { // empty query throw $ e ; } } } }
docstring: Given a filepath to a SQL file, load it and run the SQL statements inside
  
  @param  string $file            Path to SQL file
  @param  string $message         Message to output to the console if the file exists
  @param  string $notFoundMessage Message to output to the console if the file does not exist
docstring_tokens: Given a filepath to a SQL file load it and run the SQL statements inside