function Query::__toString

Same name in other branches
  1. 9 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__toString()
  2. 9 core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::__toString()
  3. 8.9.x core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__toString()
  4. 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::__toString()
  5. 10 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__toString()
  6. 10 core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::__toString()
  7. 11.x core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__toString()
  8. 11.x core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::__toString()

Implements PHP magic __toString method to convert the query to a string.

The toString operation is how we compile a query object to a prepared statement.

Return value

A prepared statement query string for this object.

6 methods override Query::__toString()
DeleteQuery::__toString in includes/database/query.inc
Implements PHP magic __toString method to convert the query to a string.
InsertQuery::__toString in includes/database/query.inc
Implements PHP magic __toString method to convert the query to a string.
MergeQuery::__toString in includes/database/query.inc
Implements PHP magic __toString method to convert the query to a string.
SelectQuery::__toString in includes/database/select.inc
Implements PHP magic __toString method to convert the query to a string.
TruncateQuery::__toString in includes/database/query.inc
Implements PHP magic __toString method to convert the query to a string.

... See full list

File

includes/database/query.inc, line 377

Class

Query
Base class for query builders.

Code

public abstract function __toString();

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