Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
2f4a09ef
Commit
2f4a09ef
authored
Jun 25, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
phpdoc
parent
be78c434
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
Query.php
framework/db/Query.php
+2
-2
QueryTrait.php
framework/db/QueryTrait.php
+12
-12
No files found.
framework/db/Query.php
View file @
2f4a09ef
...
@@ -21,7 +21,7 @@ use yii\base\Component;
...
@@ -21,7 +21,7 @@ use yii\base\Component;
*
*
* For example,
* For example,
*
*
*
~~~
*
```php
* $query = new Query;
* $query = new Query;
* // compose the query
* // compose the query
* $query->select('id, name')
* $query->select('id, name')
...
@@ -33,7 +33,7 @@ use yii\base\Component;
...
@@ -33,7 +33,7 @@ use yii\base\Component;
* $command = $query->createCommand();
* $command = $query->createCommand();
* // $command->sql returns the actual SQL
* // $command->sql returns the actual SQL
* $rows = $command->queryAll();
* $rows = $command->queryAll();
*
~~~
*
```
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
...
...
framework/db/QueryTrait.php
View file @
2f4a09ef
...
@@ -65,7 +65,7 @@ trait QueryTrait
...
@@ -65,7 +65,7 @@ trait QueryTrait
* }
* }
* ~~~
* ~~~
*
*
* @return static the query object itself
* @return static the query object itself
.
*/
*/
public
function
indexBy
(
$column
)
public
function
indexBy
(
$column
)
{
{
...
@@ -79,7 +79,7 @@ trait QueryTrait
...
@@ -79,7 +79,7 @@ trait QueryTrait
* See [[QueryInterface::where()]] for detailed documentation.
* See [[QueryInterface::where()]] for detailed documentation.
*
*
* @param string|array $condition the conditions that should be put in the WHERE part.
* @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 andWhere()
* @see orWhere()
* @see orWhere()
*/
*/
...
@@ -94,7 +94,7 @@ trait QueryTrait
...
@@ -94,7 +94,7 @@ trait QueryTrait
* The new condition and the existing one will be joined using the 'AND' operator.
* 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()]]
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @return static the query object itself
* @return static the query object itself
.
* @see where()
* @see where()
* @see orWhere()
* @see orWhere()
*/
*/
...
@@ -113,7 +113,7 @@ trait QueryTrait
...
@@ -113,7 +113,7 @@ trait QueryTrait
* The new condition and the existing one will be joined using the 'OR' operator.
* 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()]]
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @return static the query object itself
* @return static the query object itself
.
* @see where()
* @see where()
* @see andWhere()
* @see andWhere()
*/
*/
...
@@ -149,7 +149,7 @@ trait QueryTrait
...
@@ -149,7 +149,7 @@ trait QueryTrait
*
*
* @param array $condition the conditions that should be put in the WHERE part.
* @param array $condition the conditions that should be put in the WHERE part.
* See [[where()]] on how to specify this parameter.
* See [[where()]] on how to specify this parameter.
* @return static the query object itself
* @return static the query object itself
.
* @see where()
* @see where()
* @see andFilterWhere()
* @see andFilterWhere()
* @see orFilterWhere()
* @see orFilterWhere()
...
@@ -173,7 +173,7 @@ trait QueryTrait
...
@@ -173,7 +173,7 @@ trait QueryTrait
*
*
* @param array $condition the new WHERE condition. Please refer to [[where()]]
* @param array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @return static the query object itself
* @return static the query object itself
.
* @see filterWhere()
* @see filterWhere()
* @see orFilterWhere()
* @see orFilterWhere()
*/
*/
...
@@ -196,7 +196,7 @@ trait QueryTrait
...
@@ -196,7 +196,7 @@ trait QueryTrait
*
*
* @param array $condition the new WHERE condition. Please refer to [[where()]]
* @param array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @return static the query object itself
* @return static the query object itself
.
* @see filterWhere()
* @see filterWhere()
* @see andFilterWhere()
* @see andFilterWhere()
*/
*/
...
@@ -305,14 +305,14 @@ trait QueryTrait
...
@@ -305,14 +305,14 @@ trait QueryTrait
/**
/**
* Sets the ORDER BY part of the query.
* Sets the ORDER BY part of the query.
* @param string|array $columns the columns (and the directions) to be ordered by.
* @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]`).
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* (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
* 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
* to represent the order-by information. Otherwise, the method will not be able to correctly determine
* the order-by columns.
* the order-by columns.
* @return static the query object itself
* @return static the query object itself
.
* @see addOrderBy()
* @see addOrderBy()
*/
*/
public
function
orderBy
(
$columns
)
public
function
orderBy
(
$columns
)
...
@@ -328,7 +328,7 @@ trait QueryTrait
...
@@ -328,7 +328,7 @@ trait QueryTrait
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* (which means the column contains a DB expression).
* @return static the query object itself
* @return static the query object itself
.
* @see orderBy()
* @see orderBy()
*/
*/
public
function
addOrderBy
(
$columns
)
public
function
addOrderBy
(
$columns
)
...
@@ -363,7 +363,7 @@ trait QueryTrait
...
@@ -363,7 +363,7 @@ trait QueryTrait
/**
/**
* Sets the LIMIT part of the query.
* Sets the LIMIT part of the query.
* @param integer $limit the limit. Use null or negative value to disable limit.
* @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
)
public
function
limit
(
$limit
)
{
{
...
@@ -374,7 +374,7 @@ trait QueryTrait
...
@@ -374,7 +374,7 @@ trait QueryTrait
/**
/**
* Sets the OFFSET part of the query.
* Sets the OFFSET part of the query.
* @param integer $offset the offset. Use null or negative value to disable offset.
* @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
)
public
function
offset
(
$offset
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment