=== modified file 'includes/database/query.inc' --- includes/database/query.inc 2010-03-09 05:01:45 +0000 +++ includes/database/query.inc 2010-05-19 00:49:41 +0000 @@ -197,6 +197,14 @@ interface QueryAlterableInterface { * The previously attached metadata object, or NULL if one doesn't exist. */ public function getMetaData($key); + + /** + * Gets the current connection. + * + * This method returns by reference. That allows alter hooks to access the + * data structure directly and manipulate it before it gets compiled. + */ + public function &connection(); } /** @@ -262,6 +270,16 @@ abstract class Query implements QueryPla public function nextPlaceholder() { return $this->nextPlaceholder++; } + + /** + * Gets the current connection. + * + * This method returns by reference. That allows alter hooks to access the + * data structure directly and manipulate it before it gets compiled. + */ + public function &connection() { + return $this->connection; + } } /** === modified file 'includes/database/select.inc' --- includes/database/select.inc 2010-02-17 05:24:53 +0000 +++ includes/database/select.inc 2010-05-19 00:52:36 +0000 @@ -491,6 +491,10 @@ class SelectQueryExtender implements Sel /* Implementations of QueryAlterableInterface. */ + public function &connection() { + return $this->connection; + } + public function addTag($tag) { $this->query->addTag($tag); return $this;