You are here

private function SelectQuery_sqlsrv::GetUsedAliases in Drupal driver for SQL Server and SQL Azure 7.3

Same name and namespace in other branches
  1. 7.2 sqlsrv/select.inc \SelectQuery_sqlsrv::GetUsedAliases()
1 call to SelectQuery_sqlsrv::GetUsedAliases()
SelectQuery_sqlsrv::countQuery in sqlsrv/select.inc
This is like the default countQuery, but does not optimize field (or expressions) that are being used in conditions.

File

sqlsrv/select.inc, line 490

Class

SelectQuery_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')) {
      $this
        ->GetUsedAliases($c['field'], $aliases);
    }
    else {
      $aliases[$c['field']] = TRUE;
    }
  }
}