You are here

public function QueryResultTableFormatter::writeMetadata in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Commands/QueryResultTableFormatter.php \Drupal\salesforce\Commands\QueryResultTableFormatter::writeMetadata()
  2. 5.0.x src/Commands/QueryResultTableFormatter.php \Drupal\salesforce\Commands\QueryResultTableFormatter::writeMetadata()

File

src/Commands/QueryResultTableFormatter.php, line 26

Class

QueryResultTableFormatter
Format QueryResult metadata.

Namespace

Drupal\salesforce\Commands

Code

public function writeMetadata(OutputInterface $output, $query, FormatterOptions $options) {
  $output
    ->writeln(str_pad(' ', 10 + strlen($query
    ->getPrettyQuery()), '-'));
  $output
    ->writeln(dt('  Size: !size', [
    '!size' => $query
      ->getSize(),
  ]));
  $output
    ->writeln(dt('  Total: !total', [
    '!total' => $query
      ->getTotal(),
  ]));
  $output
    ->writeln(dt('  Query: !query', [
    '!query' => $query
      ->getPrettyQuery(),
  ]));
}