added distint() and forUpdate()
This commit is contained in:
parent
5b6ce9c0bc
commit
1d0330945f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user