1
0
mirror of synced 2025-03-04 20:03:21 +03:00

added distint() and forUpdate()

This commit is contained in:
zYne 2007-05-15 23:08:03 +00:00
parent 5b6ce9c0bc
commit 1d0330945f

View File

@ -1122,6 +1122,33 @@ class Doctrine_Query2 extends Doctrine_Hydrate2 implements Countable
{
return $this->getParser('select')->parse($select);
}
/**
* distinct
* Makes the query SELECT DISTINCT.
*
* @param bool $flag Whether or not the SELECT is DISTINCT (default true).
* @return Doctrine_Query
*/
public function distinct($flag = true)
{
$this->_parts['distinct'] = (bool) $flag;
return $this;
}
/**
* forUpdate
* Makes the query SELECT FOR UPDATE.
*
* @param bool $flag Whether or not the SELECT is FOR UPDATE (default true).
* @return Doctrine_Query
*/
public function forUpdate($flag = true)
{
$this->_parts[self::FOR_UPDATE] = (bool) $flag;
return $this;
}
/**
* delete
* sets the query type to DELETE