function Query::execute

Same name in this branch
  1. 8.9.x core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::execute()
  2. 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::execute()
  3. 8.9.x core/lib/Drupal/Core/Entity/Query/Null/Query.php \Drupal\Core\Entity\Query\Null\Query::execute()
  4. 8.9.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Query.php \Drupal\Core\Entity\KeyValueStore\Query\Query::execute()
Same name in other branches
  1. 7.x includes/database/query.inc \Query::execute()
  2. 9 core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::execute()
  3. 9 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::execute()
  4. 9 core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::execute()
  5. 9 core/lib/Drupal/Core/Entity/Query/Null/Query.php \Drupal\Core\Entity\Query\Null\Query::execute()
  6. 9 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Query.php \Drupal\Core\Entity\KeyValueStore\Query\Query::execute()
  7. 10 core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::execute()
  8. 10 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::execute()
  9. 10 core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::execute()
  10. 10 core/lib/Drupal/Core/Entity/Query/Null/Query.php \Drupal\Core\Entity\Query\Null\Query::execute()
  11. 10 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Query.php \Drupal\Core\Entity\KeyValueStore\Query\Query::execute()
  12. 11.x core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::execute()
  13. 11.x core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::execute()
  14. 11.x core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::execute()
  15. 11.x core/lib/Drupal/Core/Entity/Query/Null/Query.php \Drupal\Core\Entity\Query\Null\Query::execute()
  16. 11.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Query.php \Drupal\Core\Entity\KeyValueStore\Query\Query::execute()

Runs the query against the database.

Return value

\Drupal\Core\Database\StatementInterface|null A prepared statement, or NULL if the query is not valid.

7 methods override Query::execute()
Delete::execute in core/lib/Drupal/Core/Database/Query/Delete.php
Executes the DELETE query.
Insert::execute in core/lib/Drupal/Core/Database/Query/Insert.php
Executes the insert query.
Merge::execute in core/lib/Drupal/Core/Database/Query/Merge.php
Runs the query against the database.
Select::execute in core/lib/Drupal/Core/Database/Query/Select.php
Runs the query against the database.
Truncate::execute in core/lib/Drupal/Core/Database/Query/Truncate.php
Executes the TRUNCATE query.

... See full list

File

core/lib/Drupal/Core/Database/Query/Query.php, line 112

Class

Query
Base class for query builders.

Namespace

Drupal\Core\Database\Query

Code

protected abstract function execute();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.