34 Commits

Author SHA1 Message Date
52e4a3e645 release version 2.0.50 2024-05-30 20:23:31 +03:00
e2a167028b Upgrade to PSR12 coding standard (#20121) 2024-03-19 17:21:27 +03:00
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
4628b91e73 Fix types (#19332)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect
2022-03-30 18:40:10 +02:00
d9928455e3 Fix PhpDoc for yii\db\{QueryInterface,Query} (#18753) 2021-07-27 22:44:47 +03:00
ed8fbaa8b1 fix QueryInterface::count return type 2021-06-13 18:41:01 +05:00
6dad27d4a1 Reversed #18499 (#18546) 2021-03-04 12:53:11 +03:00
d1037db68d Fix #18499: When using yii\db\Query::all() and yii\db\Query::$indexBy, the yii\db\Query::$indexBy is auto inserted into yii\db\Query::$select - the same as in yii\db\Query::column()
Co-authored-by: Bizley <pawel@positive.codes>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2021-02-23 18:44:39 +03:00
7904bc2629 added note to QueryInterface::where() 2017-11-14 11:27:17 +01:00
98a71d8b0d Adjust QueryInterface and QueryTrait types on where() (#14714)
these did never allow a string condition. Only SQL Query and AR implementation do.

fixes #14496
2017-08-24 10:59:20 +02:00
e1b1622244 Fix \yii\db\QueryInterface type hints (#13959) [skip ci] 2017-04-11 18:20:41 +03:00
c19b2f7dc8 release version 2.0.11 2017-02-01 17:46:29 +01:00
c17766181f Added QueryInterface::emulateExecution()
Added `QueryInterface::emulateExecution()`, which allows preventing of
the actual query execution.
This allows to cancel `DataProvider` preventing search query execution
in case search model is invalid:

``` php
public function search($params)
    {
        $query = Item::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            $query->where('0=1');
            $query->emulateExecution(); // No SQL execution will be done
            return $dataProvider;
        }
```

This also fix unecessary query in case of `via()` usage. See #12390.

fixes #12390
fixes #6373
close #12708
2016-12-02 13:28:51 +01:00
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
293feeb522 Update QueryInterface.php
Missing closing bracket in OR condition example
2016-04-13 15:23:16 +02:00
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
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
f11bdfa2a7 Grammar fix: followings -> following 2015-04-21 15:08:16 +02:00
4267b53d43 added doc about count() return value
fixes #yiisoft/yii#3712
2015-01-14 18:33:41 +01:00
4e5b3b043e Update QueryInterface.php
A back quote sign in docblock missed.
2014-12-22 11:14:16 +03:00
9da53b702c typo fix [skip ci] 2014-11-03 17:05:00 -05:00
8a1bcd2775 one more example 2014-10-24 21:43:16 -02:00
0df9a82a7f updated documentation and tests
fixes #5331
2014-10-03 15:25:55 +02:00
f76e767edd added docs for #5147 2014-09-24 15:35:04 +02:00
4772be9cc4 doc typo
fixes #5147
[ci skip]
2014-09-24 14:16:34 +02:00
222f9ddfad added missing documentation about the NOT operator in Query
fixes #5147
2014-09-24 12:53:33 +02:00
91965fd391 phpdoc formatting issues 2014-04-23 02:55:17 +02:00
0fa19291f1 refactored filterWhere(). 2014-04-02 20:03:42 -04:00
96f1c4c10b renamed Query::filter() to Query::filterWhere() 2014-04-02 18:48:14 +02:00
3c1a8141fd fixes #2002 2014-03-27 12:41:16 +04:00
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
e27c3872ed doc improvements 2014-01-28 15:17:11 +01:00
0c38655217 psr-4 move 2014-01-10 21:41:43 -05:00