original_string: public function execute($innerQuery, $bind = array())
      {
          $query = $this->generateRankingQuery($innerQuery);
          $data  = Db::fetchAll($query, $bind);
  
          if ($this->columnToMarkExcludedRows !== false) {
              // split the result into the regular result and the rows with special treatment
              $excludedFromLimit = array();
              $result = array();
              foreach ($data as &$row) {
                  if ($row[$this->columnToMarkExcludedRows] != 0) {
                      $excludedFromLimit[] = $row;
                  } else {
                      $result[] = $row;
                  }
              }
              $data = array(
                  'result'            => &$result,
                  'excludedFromLimit' => &$excludedFromLimit
              );
          }
  
          if ($this->partitionColumn !== false) {
              if ($this->columnToMarkExcludedRows !== false) {
                  $data['result'] = $this->splitPartitions($data['result']);
              } else {
                  $data = $this->splitPartitions($data);
              }
          }
  
          return $data;
      }
code: public function execute($innerQuery, $bind = array())
      {
          $query = $this->generateRankingQuery($innerQuery);
          $data  = Db::fetchAll($query, $bind);
  
          if ($this->columnToMarkExcludedRows !== false) {
              // split the result into the regular result and the rows with special treatment
              $excludedFromLimit = array();
              $result = array();
              foreach ($data as &$row) {
                  if ($row[$this->columnToMarkExcludedRows] != 0) {
                      $excludedFromLimit[] = $row;
                  } else {
                      $result[] = $row;
                  }
              }
              $data = array(
                  'result'            => &$result,
                  'excludedFromLimit' => &$excludedFromLimit
              );
          }
  
          if ($this->partitionColumn !== false) {
              if ($this->columnToMarkExcludedRows !== false) {
                  $data['result'] = $this->splitPartitions($data['result']);
              } else {
                  $data = $this->splitPartitions($data);
              }
          }
  
          return $data;
      }
code_tokens: public function execute ( $ innerQuery , $ bind = array ( ) ) { $ query = $ this -> generateRankingQuery ( $ innerQuery ) ; $ data = Db :: fetchAll ( $ query , $ bind ) ; if ( $ this -> columnToMarkExcludedRows !== false ) { // split the result into the regular result and the rows with special treatment $ excludedFromLimit = array ( ) ; $ result = array ( ) ; foreach ( $ data as & $ row ) { if ( $ row [ $ this -> columnToMarkExcludedRows ] != 0 ) { $ excludedFromLimit [ ] = $ row ; } else { $ result [ ] = $ row ; } } $ data = array ( 'result' => & $ result , 'excludedFromLimit' => & $ excludedFromLimit ) ; } if ( $ this -> partitionColumn !== false ) { if ( $ this -> columnToMarkExcludedRows !== false ) { $ data [ 'result' ] = $ this -> splitPartitions ( $ data [ 'result' ] ) ; } else { $ data = $ this -> splitPartitions ( $ data ) ; } } return $ data ; }
docstring: Executes the query.
  The object has to be configured first using the other methods.
  
  @param $innerQuery string  The "payload" query that does the actual data aggregation. The ordering
  has to be specified in this query. {@link RankingQuery} cannot apply ordering
  itself.
  @param $bind array         Bindings for the inner query.
  @return array              The format depends on which methods have been used
  to configure the ranking query.
docstring_tokens: Executes the query . The object has to be configured first using the other methods .