You are here

private function Select::GetUsedAliases in Drupal driver for SQL Server and SQL Azure 8

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Select.php \Drupal\Driver\Database\sqlsrv\Select::GetUsedAliases()
  2. 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Select.php \Drupal\Driver\Database\sqlsrv\Select::getUsedAliases()
1 call to Select::GetUsedAliases()
Select::countQuery in drivers/lib/Drupal/Driver/Database/sqlsrv/Select.php
This is like the default countQuery, but does not optimize field (or expressions) that are being used in conditions.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Select.php, line 435
Definition of Drupal\Driver\Database\sqlsrv\Select

Class

Select

Namespace

Drupal\Driver\Database\sqlsrv

Code

private function GetUsedAliases(DatabaseCondition $condition, array &$aliases = array()) {
  foreach ($condition
    ->conditions() as $key => $c) {
    if (is_string($key) && substr($key, 0, 1) == '#') {
      continue;
    }
    if (is_a($c['field'], DatabaseCondition::class)) {
      $this
        ->GetUsedAliases($c['field'], $aliases);
    }
    else {
      $aliases[$c['field']] = TRUE;
    }
  }
}