Select::compiled

public Select::compiled()

Check whether a condition has been previously compiled.

Return value

TRUE if the condition has been previously compiled.

Overrides QueryConditionTrait::compiled

File

core/lib/Drupal/Core/Database/Query/Select.php, line 251

Class

Select
Query builder for SELECT statements.

Namespace

Drupal\Core\Database\Query

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public function compiled() {
  if (!$this->condition->compiled() || !$this->having->compiled()) {
    return FALSE;
  }
 
  foreach ($this->tables as $table) {
    // If this table is a subquery, check its status recursively.
    if ($table['table'] instanceof SelectInterface) {
      if (!$table['table']->compiled()) {
        return FALSE;
      }
    }
    if (!empty($table['condition']) && $table['condition'] instanceof ConditionInterface) {
      if (!$table['condition']->compiled()) {
        return FALSE;
      }
    }
  }
 
  foreach ($this->union as $union) {
    if (!$union['query']->compiled()) {
      return FALSE;
    }
  }
 
  return TRUE;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.