mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 04:38:03 +08:00
phpdoc
This commit is contained in:
@@ -21,7 +21,7 @@ use yii\base\Component;
|
||||
*
|
||||
* For example,
|
||||
*
|
||||
* ~~~
|
||||
* ```php
|
||||
* $query = new Query;
|
||||
* // compose the query
|
||||
* $query->select('id, name')
|
||||
@@ -33,7 +33,7 @@ use yii\base\Component;
|
||||
* $command = $query->createCommand();
|
||||
* // $command->sql returns the actual SQL
|
||||
* $rows = $command->queryAll();
|
||||
* ~~~
|
||||
* ```
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @author Carsten Brandt <mail@cebe.cc>
|
||||
|
||||
@@ -65,7 +65,7 @@ trait QueryTrait
|
||||
* }
|
||||
* ~~~
|
||||
*
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
*/
|
||||
public function indexBy($column)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ trait QueryTrait
|
||||
* See [[QueryInterface::where()]] for detailed documentation.
|
||||
*
|
||||
* @param string|array $condition the conditions that should be put in the WHERE part.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see andWhere()
|
||||
* @see orWhere()
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ trait QueryTrait
|
||||
* The new condition and the existing one will be joined using the 'AND' operator.
|
||||
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
|
||||
* on how to specify this parameter.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see where()
|
||||
* @see orWhere()
|
||||
*/
|
||||
@@ -113,7 +113,7 @@ trait QueryTrait
|
||||
* The new condition and the existing one will be joined using the 'OR' operator.
|
||||
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
|
||||
* on how to specify this parameter.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see where()
|
||||
* @see andWhere()
|
||||
*/
|
||||
@@ -149,7 +149,7 @@ trait QueryTrait
|
||||
*
|
||||
* @param array $condition the conditions that should be put in the WHERE part.
|
||||
* See [[where()]] on how to specify this parameter.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see where()
|
||||
* @see andFilterWhere()
|
||||
* @see orFilterWhere()
|
||||
@@ -173,7 +173,7 @@ trait QueryTrait
|
||||
*
|
||||
* @param array $condition the new WHERE condition. Please refer to [[where()]]
|
||||
* on how to specify this parameter.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see filterWhere()
|
||||
* @see orFilterWhere()
|
||||
*/
|
||||
@@ -196,7 +196,7 @@ trait QueryTrait
|
||||
*
|
||||
* @param array $condition the new WHERE condition. Please refer to [[where()]]
|
||||
* on how to specify this parameter.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see filterWhere()
|
||||
* @see andFilterWhere()
|
||||
*/
|
||||
@@ -305,14 +305,14 @@ trait QueryTrait
|
||||
/**
|
||||
* Sets the ORDER BY part of the query.
|
||||
* @param string|array $columns the columns (and the directions) to be ordered by.
|
||||
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
|
||||
* Columns can be specified in either a string (e.g. `"id ASC, name DESC"`) or an array
|
||||
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
|
||||
* The method will automatically quote the column names unless a column contains some parenthesis
|
||||
* (which means the column contains a DB expression).
|
||||
* Note that if your order-by is an expression containing commas, you should always use an array
|
||||
* to represent the order-by information. Otherwise, the method will not be able to correctly determine
|
||||
* the order-by columns.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see addOrderBy()
|
||||
*/
|
||||
public function orderBy($columns)
|
||||
@@ -328,7 +328,7 @@ trait QueryTrait
|
||||
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
|
||||
* The method will automatically quote the column names unless a column contains some parenthesis
|
||||
* (which means the column contains a DB expression).
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
* @see orderBy()
|
||||
*/
|
||||
public function addOrderBy($columns)
|
||||
@@ -363,7 +363,7 @@ trait QueryTrait
|
||||
/**
|
||||
* Sets the LIMIT part of the query.
|
||||
* @param integer $limit the limit. Use null or negative value to disable limit.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
*/
|
||||
public function limit($limit)
|
||||
{
|
||||
@@ -374,7 +374,7 @@ trait QueryTrait
|
||||
/**
|
||||
* Sets the OFFSET part of the query.
|
||||
* @param integer $offset the offset. Use null or negative value to disable offset.
|
||||
* @return static the query object itself
|
||||
* @return static the query object itself.
|
||||
*/
|
||||
public function offset($offset)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user