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
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;
}
Please login to continue.