Shortcut for creating subqueries

This commit is contained in:
Thomas Gelf 2013-08-20 22:37:32 +02:00 committed by Eric Lippmann
parent d181e8018b
commit 5467950e79
1 changed files with 9 additions and 0 deletions

View File

@ -257,6 +257,15 @@ abstract class AbstractQuery extends Query
return $this->customVars[$customvar] . '.varvalue';
}
protected function createSubQuery($queryName, $columns = array())
{
$class = '\\'
. substr(__CLASS__, 0, strrpos(__CLASS__, '\\') + 1)
. ucfirst($queryName) . 'Query';
$query = new $class($this->ds, $columns);
return $query;
}
protected function customvarNameToTypeName($customvar)
{
// TODO: Improve this: