This commit is contained in:
parent
f07ab595ac
commit
46d74951ef
@ -168,27 +168,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
'offset' => array(),
|
'offset' => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array $_queryComponents Two dimensional array containing the components of this query,
|
|
||||||
* informations about their relations and other related information.
|
|
||||||
* The components are constructed during query parsing.
|
|
||||||
*
|
|
||||||
* Keys are component aliases and values the following:
|
|
||||||
*
|
|
||||||
* table table object associated with given alias
|
|
||||||
*
|
|
||||||
* relation the relation object owned by the parent
|
|
||||||
*
|
|
||||||
* parent the alias of the parent
|
|
||||||
*
|
|
||||||
* agg the aggregates of this component
|
|
||||||
*
|
|
||||||
* map the name of the column / aggregate value this
|
|
||||||
* component is mapped to a collection
|
|
||||||
*/
|
|
||||||
protected $_queryComponents = array();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer $type the query type
|
* @var integer $type the query type
|
||||||
*
|
*
|
||||||
@ -201,11 +180,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
*/
|
*/
|
||||||
protected $_hydrator;
|
protected $_hydrator;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Doctrine_Query_Tokenizer The tokenizer that is used during the query parsing process.
|
|
||||||
*/
|
|
||||||
protected $_tokenizer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Doctrine_Query_Parser The parser that is used for query parsing.
|
* @var Doctrine_Query_Parser The parser that is used for query parsing.
|
||||||
*/
|
*/
|
||||||
@ -271,19 +245,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
$this->_options[$name] = $value;
|
$this->_options[$name] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* hasTableAlias
|
|
||||||
* whether or not this object has given tableAlias
|
|
||||||
*
|
|
||||||
* @param string $tableAlias the table alias to be checked
|
|
||||||
* @return boolean true if this object has given alias, otherwise false
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function hasTableAlias($sqlTableAlias)
|
|
||||||
{
|
|
||||||
return $this->hasSqlTableAlias($sqlTableAlias);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hasSqlTableAlias
|
* hasSqlTableAlias
|
||||||
* whether or not this object has given tableAlias
|
* whether or not this object has given tableAlias
|
||||||
@ -296,18 +257,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return (isset($this->_tableAliasMap[$sqlTableAlias]));
|
return (isset($this->_tableAliasMap[$sqlTableAlias]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* getTableAliases
|
|
||||||
* returns all table aliases
|
|
||||||
*
|
|
||||||
* @return array table aliases as an array
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function getTableAliases()
|
|
||||||
{
|
|
||||||
return $this->getTableAliasMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getTableAliasMap
|
* getTableAliasMap
|
||||||
* returns all table aliases
|
* returns all table aliases
|
||||||
@ -319,21 +268,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $this->_tableAliasMap;
|
return $this->_tableAliasMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* getQueryPart
|
|
||||||
* gets a query part from the query part array
|
|
||||||
*
|
|
||||||
* @param string $name the name of the query part to be set
|
|
||||||
* @param string $part query part string
|
|
||||||
* @throws Doctrine_Query_Exception if trying to set unknown query part
|
|
||||||
* @return Doctrine_Query_Abstract this object
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function getQueryPart($part)
|
|
||||||
{
|
|
||||||
return $this->getSqlQueryPart($part);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSqlQueryPart
|
* getSqlQueryPart
|
||||||
* gets an SQL query part from the SQL query part array
|
* gets an SQL query part from the SQL query part array
|
||||||
@ -351,21 +285,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $this->_sqlParts[$part];
|
return $this->_sqlParts[$part];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* setQueryPart
|
|
||||||
* sets a query part in the query part array
|
|
||||||
*
|
|
||||||
* @param string $name the name of the query part to be set
|
|
||||||
* @param string $part query part string
|
|
||||||
* @throws Doctrine_Query_Exception if trying to set unknown query part
|
|
||||||
* @return Doctrine_Hydrate this object
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function setQueryPart($name, $part)
|
|
||||||
{
|
|
||||||
return $this->setSqlQueryPart($name, $part);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setSqlQueryPart
|
* setSqlQueryPart
|
||||||
* sets an SQL query part in the SQL query part array
|
* sets an SQL query part in the SQL query part array
|
||||||
@ -394,21 +313,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* addQueryPart
|
|
||||||
* adds a query part in the query part array
|
|
||||||
*
|
|
||||||
* @param string $name the name of the query part to be added
|
|
||||||
* @param string $part query part string
|
|
||||||
* @throws Doctrine_Query_Exception if trying to add unknown query part
|
|
||||||
* @return Doctrine_Hydrate this object
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function addQueryPart($name, $part)
|
|
||||||
{
|
|
||||||
return $this->addSqlQueryPart($name, $part);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addSqlQueryPart
|
* addSqlQueryPart
|
||||||
* adds an SQL query part to the SQL query part array
|
* adds an SQL query part to the SQL query part array
|
||||||
@ -431,20 +335,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* removeQueryPart
|
|
||||||
* removes a query part from the query part array
|
|
||||||
*
|
|
||||||
* @param string $name the name of the query part to be removed
|
|
||||||
* @throws Doctrine_Query_Exception if trying to remove unknown query part
|
|
||||||
* @return Doctrine_Hydrate this object
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function removeQueryPart($name)
|
|
||||||
{
|
|
||||||
return $this->removeSqlQueryPart($name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removeSqlQueryPart
|
* removeSqlQueryPart
|
||||||
* removes a query part from the query part array
|
* removes a query part from the query part array
|
||||||
@ -614,24 +504,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* getTableAlias
|
|
||||||
* some database such as Oracle need the identifier lengths to be < ~30 chars
|
|
||||||
* hence Doctrine creates as short identifier aliases as possible
|
|
||||||
*
|
|
||||||
* this method is used for the creation of short table aliases, its also
|
|
||||||
* smart enough to check if an alias already exists for given component (componentAlias)
|
|
||||||
*
|
|
||||||
* @param string $componentAlias the alias for the query component to search table alias for
|
|
||||||
* @param string $tableName the table name from which the table alias is being created
|
|
||||||
* @return string the generated / fetched short alias
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function getTableAlias($componentAlias, $tableName = null)
|
|
||||||
{
|
|
||||||
return $this->getSqlTableAlias($componentAlias, $tableName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSqlTableAlias
|
* getSqlTableAlias
|
||||||
* some database such as Oracle need the identifier lengths to be < ~30 chars
|
* some database such as Oracle need the identifier lengths to be < ~30 chars
|
||||||
@ -659,19 +531,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $this->generateTableAlias($componentAlias, $tableName);
|
return $this->generateTableAlias($componentAlias, $tableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* generateNewTableAlias
|
|
||||||
* generates a new alias from given table alias
|
|
||||||
*
|
|
||||||
* @param string $tableAlias table alias from which to generate the new alias from
|
|
||||||
* @return string the created table alias
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function generateNewTableAlias($oldAlias)
|
|
||||||
{
|
|
||||||
return $this->generateNewSqlTableAlias($oldAlias);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* generateNewSqlTableAlias
|
* generateNewSqlTableAlias
|
||||||
* generates a new alias from given table alias
|
* generates a new alias from given table alias
|
||||||
@ -698,19 +557,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $oldAlias;
|
return $oldAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* getTableAliasSeed
|
|
||||||
* returns the alias seed for given table alias
|
|
||||||
*
|
|
||||||
* @param string $tableAlias table alias that identifies the alias seed
|
|
||||||
* @return integer table alias seed
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function getTableAliasSeed($sqlTableAlias)
|
|
||||||
{
|
|
||||||
return $this->getSqlTableAliasSeed($sqlTableAlias);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSqlTableAliasSeed
|
* getSqlTableAliasSeed
|
||||||
* returns the alias seed for given table alias
|
* returns the alias seed for given table alias
|
||||||
@ -726,46 +572,6 @@ abstract class Doctrine_Query_Abstract
|
|||||||
return $this->_tableAliasSeeds[$sqlTableAlias];
|
return $this->_tableAliasSeeds[$sqlTableAlias];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* hasAliasDeclaration
|
|
||||||
* whether or not this object has a declaration for given component alias
|
|
||||||
*
|
|
||||||
* @param string $componentAlias the component alias the retrieve the declaration from
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function hasAliasDeclaration($componentAlias)
|
|
||||||
{
|
|
||||||
return isset($this->_queryComponents[$componentAlias]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getAliasDeclaration
|
|
||||||
* get the declaration for given component alias
|
|
||||||
*
|
|
||||||
* @param string $componentAlias the component alias the retrieve the declaration from
|
|
||||||
* @return array the alias declaration
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public function getAliasDeclaration($componentAlias)
|
|
||||||
{
|
|
||||||
return $this->getQueryComponent($componentAlias);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getQueryComponent
|
|
||||||
* get the declaration for given component alias
|
|
||||||
*
|
|
||||||
* @param string $componentAlias the component alias the retrieve the declaration from
|
|
||||||
* @return array the alias declaration
|
|
||||||
*/
|
|
||||||
public function getQueryComponent($componentAlias)
|
|
||||||
{
|
|
||||||
if ( ! isset($this->_queryComponents[$componentAlias])) {
|
|
||||||
throw new Doctrine_Query_Exception('Unknown component alias ' . $componentAlias);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->_queryComponents[$componentAlias];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* copyAliases
|
* copyAliases
|
||||||
@ -781,7 +587,7 @@ abstract class Doctrine_Query_Abstract
|
|||||||
public function copyAliases(Doctrine_Query_Abstract $query)
|
public function copyAliases(Doctrine_Query_Abstract $query)
|
||||||
{
|
{
|
||||||
$this->_tableAliasMap = $query->_tableAliasMap;
|
$this->_tableAliasMap = $query->_tableAliasMap;
|
||||||
$this->_queryComponents = $query->_queryComponents;
|
$this->_queryComponents = $query->_queryComponents;
|
||||||
$this->_tableAliasSeeds = $query->_tableAliasSeeds;
|
$this->_tableAliasSeeds = $query->_tableAliasSeeds;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user