Commit Graph

61 Commits

Author SHA1 Message Date
Aleksandr Golovko
a2f70f6484 Update Query doc return type
When used ActiveQuery chain call after call any of join type IDE cannot resolve ActiveQuery methods such an asArray
Example:
SomeActiveRecordModel::find()
            ->select('...') // return ActiveQuery
            ->leftJoin('...', '...') // return Query
            ->asArray() // it's become undefined
            ->column();
2015-08-21 17:14:00 +03:00
Alexander Mohorev
68c30c1034 Replace aliases of functions 2015-06-29 22:59:22 +03:00
Alexander Mohorev
ae42a054bb PSR-2 spaces, commas, etc 2015-06-09 00:05:06 +03:00
Carsten Brandt
f68e970de2 link to PHP classes just as we do with normal classes
apidoc can handle this!
2015-06-05 21:53:24 +02:00
Alexander Makarov
67658cf57d Replaced static with $this in phpdoc since current IDEs are finally able to handle it correctly 2015-05-31 13:39:30 +03:00
Carsten Brandt
1cfc40d6e5 link to the guide on quoting from query phpdoc
fixes #8141
2015-04-20 23:24:01 +02:00
Carsten Brandt
f99f333218 added note to docs about #8085 2015-04-15 10:03:42 +02:00
Klimov Paul
b8081b59b3 Fixed yii\db\Query::count() fails for query containing 'having' without 'group by' 2015-04-14 16:11:07 +03:00
Qiang Xue
aead65f2d2 Fixes #7515: Added support to use indexBy() together with column() in query builder 2015-04-08 22:54:30 -04:00
Carsten Brandt
4267b53d43 added doc about count() return value
fixes #yiisoft/yii#3712
2015-01-14 18:33:41 +01:00
Paul Klimov
5ad6ba5c9e Fix from e719ff5 moved to yii\sphinx\Query 2014-12-23 18:39:52 +02:00
Paul Klimov
e719ff5854 yii\db\Query::queryScalar() fixed to use static when creating subquery 2014-12-23 18:17:17 +02:00
Qiang Xue
2544e86d2c Fixes #5735: Added yii\bootstrap\Tabs::renderTabContent to support manually rendering tab contents 2014-10-24 07:54:48 -04:00
Serge Postrash
5acf17e658 Fixed phpdoc for yii\db\Query [skip ci] 2014-10-05 11:24:40 +04:00
Carsten Brandt
9df21d46f3 reverted addition of $where property 2014-09-24 13:39:03 +02:00
Carsten Brandt
222f9ddfad added missing documentation about the NOT operator in Query
fixes #5147
2014-09-24 12:53:33 +02:00
Qiang Xue
b9c97ff2aa Fixes #4938: When yii\db\ActiveQuery is used to build sub-queries, its WHERE clause is not correctly generated 2014-09-12 16:46:12 -04:00
Carsten Brandt
2f4a09ef53 phpdoc 2014-06-25 19:33:29 +02:00
Carsten Brandt
91965fd391 phpdoc formatting issues 2014-04-23 02:55:17 +02:00
Carsten Brandt
76d8e2b5b3 code style, fixes #3140 2014-04-17 13:24:16 +02:00
Qiang Xue
a60d295253 Added support for using sub-queries when building a DB query with IN condition 2014-04-15 20:20:18 -04:00
Alex-Code
cee5fa5dd3 New addSelect method
New addSelect method. Useful for scopes.
2014-04-08 12:10:29 +01:00
Qiang Xue
0fa19291f1 refactored filterWhere(). 2014-04-02 20:03:42 -04:00
Carsten Brandt
e9e59483f4 removed unnecessary code duplication 2014-04-02 19:07:13 +02:00
Carsten Brandt
96f1c4c10b renamed Query::filter() to Query::filterWhere() 2014-04-02 18:48:14 +02:00
Alexander Makarov
06fdb79730 Added support for arbitrary number of parameters for NOT, AND, OR in filter methods of Query 2014-03-31 15:09:33 +04:00
Alexander Makarov
ecf019e311 Merge branch 'master' 2014-03-31 02:20:56 +04:00
Alexander Makarov
ab799d8ea9 Fixes #2911: Removed tbl_ default for table prefix 2014-03-30 19:33:46 +04:00
Alexander Makarov
8cd247730a Query::filter() adjustments 2014-03-29 23:26:02 +04:00
Alexander Makarov
a884c80fe3 Merge branch 'master' 2014-03-29 22:55:59 +04:00
Qiang Xue
13c0931b23 Fixes #2880 2014-03-27 10:58:56 -04:00
Alexander Makarov
3c1a8141fd fixes #2002 2014-03-27 12:41:16 +04:00
Carsten Brandt
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
Koudy
411dc71b09 Fixed getting the count for queries with the union 2014-03-22 13:48:09 +04:00
SonicGD
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
Alexander Mohorev
c7e8d8b900 @param, @var, @property and @return must declare types as boolean, integer, string, array or null 2014-03-03 20:50:44 +03:00
Jacob Morrison
0e2b2fcbe6 Fix for logic Query::queryScalar uses to check for SELECT DISTINCT 2014-02-27 16:59:47 -08:00
Jacob Morrison
a3e128bb0b Query::queryScalar wasn't making SELECT DISTINCT queries subqueries 2014-02-27 16:04:16 -08:00
Carsten Brandt
d3d832a3bf phpdoc fixes 2014-02-25 12:51:08 +01:00
Qiang Xue
fb3b2f2c7d Fixes #2490: yii\db\Query::count() and other query scalar methods now properly handle queries with GROUP BY clause 2014-02-19 08:38:43 -05:00
Qiang Xue
9a068f50f4 Refactored batch query. 2014-02-15 11:22:48 -05:00
Qiang Xue
3a930bd675 Finished batch query feature. 2014-02-14 18:13:42 -05:00
Qiang Xue
1571c72251 Fixes #2409: Added support for fetching data from database in batches 2014-02-14 16:45:46 -05:00
Qiang Xue
f59598bb8b Added support for building SQLs with sub-queries 2014-02-11 23:23:02 -05:00
Qiang Xue
1f42b72baa Fixes #2346: ActiveQuery used in building sub-query should not need to set FROM clause explicitly. 2014-02-06 10:39:27 -05:00
Ivan Pomortsev
c9c59bdc26 Update Query.php
Using short array syntax.
2014-01-23 17:57:31 +03:00
Ivan Pomortsev
5f3d601b36 Update Query.php
Change passing parameters to array with two elements – 'all' which means if we use UNION or UNION ALL construction and 'query' which is our sql query that will be at right of construction.
2014-01-23 16:53:04 +03:00
Ivan Pomortsev
8109708b37 Update Query.php
Forget one ";" :D
2014-01-23 09:08:59 +03:00
Ivan Pomortsev
01c89ea3da Update Query.php
Change union method to accept also <code>$all</code> variable. TRUE means that we must results <code>UNION ALL</code> construction, FALSE – that <code>UNION</code>.
2014-01-23 08:51:15 +03:00
Qiang Xue
febce76397 fixed build break and fixed doc about exists/not exists. 2014-01-11 10:17:14 -05:00