Issue #2344831 by martin107, jhodgdon, tstoeckler, Mile23: Document behavior of Drupal/Core/Database/Query/SelectInterface::__toString()

8.0.x
webchick 2015-10-04 23:25:54 -07:00
parent 8bd7a50b66
commit 8144cceb92
2 changed files with 11 additions and 0 deletions

View File

@ -338,6 +338,9 @@ class SelectExtender implements SelectInterface {
return $this;
}
/**
* {@inheritdoc}
*/
public function __toString() {
return (string) $this->query;
}

View File

@ -648,4 +648,12 @@ interface SelectInterface extends ConditionInterface, AlterableInterface, Extend
*/
public function forUpdate($set = TRUE);
/**
* Returns a string representation of how the query will be executed in SQL.
*
* @return string
* The Select Query object expressed as a string.
*/
public function __toString();
}