6397791513
Fixed whitespaces to match code style [skip ci]
2017-03-14 09:42:13 +03:00
6a7c01de72
Fixed broken link
2017-03-13 16:12:32 -03:00
a9fb0171f7
Fixes #13745 : SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in MSSQL and bug fixes in yii\db\QueryBuilder::buildLikeCondition()
2017-03-11 22:36:01 +03:00
7d4b33a805
changed method visibility
...
this should not belong to exposed interface as it is only used
internally by transaction() method.
additional change to #13346
2017-03-10 02:30:16 +01:00
55dd16f1f7
Fixes #12715 : Exception SAVEPOINT LEVEL1 does not exist instead of deadlock exception
2017-03-07 22:58:46 +03:00
9a915ba10c
Fixes #8120 : Fixes LIKE special characters escaping for Cubrid/MSSQL/Oracle/SQLite in yii\db\QueryBuilder
2017-02-24 01:24:06 +03:00
407c38d13a
Merge branch 'master' into 13221_limit_offset_expression
2017-02-23 23:36:49 +02:00
6db6a2ddbe
Fixes #13418 : Fixed QueryBuilder::batchInsert() if $rows is \Generator
2017-02-24 00:28:27 +03:00
13de76714b
Refactored yii\db\Query::queryScalar() method
2017-02-23 22:01:48 +02:00
a182ce57fc
Fixes for issues found with Static Code Analysis with Php Inspections (EA Extended) ( #13606 )
...
* Php Inspections (EA Extended): language level migration fixes
* Php Inspections (EA Extended): instanceof a trait always return false
* Php Inspections (EA Extended): fixed preg_quote (/ is not escaped by default)
* Php Inspections (EA Extended): fixed a greedy regex
* Php Inspections (EA Extended): refereted instanceof self in a trait
* Php Inspections (EA Extended): revert language level changes in requirements checker
* Php Inspections (EA Extended): revert language level changes in requirements checker
* Php Inspections (EA Extended): more greedy regexes fixed
2017-02-22 17:07:52 +03:00
10b59ee6e4
Merge branch 'master' into 13221_limit_offset_expression
2017-02-22 17:02:04 +03:00
0ea45c78a8
Fixes #13571 : Fix yii\db\mssql\QueryBuilder::checkIntegrity for all tables
2017-02-22 16:57:32 +03:00
30b7fc8dc1
Fixes #13577 : yii\db\QueryBuilder::truncateTable should work consistent over all databases
2017-02-20 23:38:50 +03:00
fab53b4a6e
Fixes #13582 : Added tests for all yii\db\QueryBuilder::resetSequence implementations, fixed SQLite implementation
2017-02-20 23:04:04 +03:00
56c65f6079
Fixes #13577 : Implemented yii\db\mssql\QueryBuilder::resetSequence()
2017-02-20 14:54:33 +03:00
aeb6231d92
Fixes #13582 : PK column in yii\db\pgsql\resetSequence() was not quoted properly
2017-02-19 17:35:59 +03:00
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
2017-02-19 17:34:22 +03:00
ef4dadf437
Fixes #13592 : Fixes Oracle’s yii\db\oci\Schema::setTransactionIsolationLevel()
2017-02-19 17:32:51 +03:00
209fb7d94b
Fixes #13594 : Fixes insufficient quoting in yii\db\QueryBuilder::prepareInsertSelectSubQuery()
2017-02-18 23:58:04 +03:00
308abdc8a5
Merge branch 'master' into usemaster-improve
2017-02-10 04:27:51 +08:00
e295b28333
Added TODO comment
2017-02-09 16:43:37 +02:00
b68417b1ad
Fix: catch Throwable too
2017-02-09 22:06:12 +08:00
319e27c45c
Fixed yii\db\BaseActiveRecord::deleteAll() changes method signature declared by yii\db\ActiveRecordInterface::deleteAll()
2017-02-09 12:16:04 +02:00
c19b2f7dc8
release version 2.0.11
2017-02-01 17:46:29 +01:00
5609e918de
Fixed some malformed @var tags ( #13468 ) [skip ci]
2017-01-30 11:42:52 +03:00
37b8cbb2d0
Fixes #12758 : Added the ability to use instances of \yii\db\Query class as values in the \yii\db\QueryBuilder::insert() method
2017-01-29 00:54:46 +03:00
25f08afc96
Fixes #8293 : yii\db\Query can be passed to insert method in yii\db\QueryBuilder
2017-01-28 23:47:26 +03:00
cc37cd626f
Fixes #12599 : Fixed MSSQL fail to work with nvarbinary. Enhanced SQL scripts compatibility with older versions
2017-01-23 10:31:52 +03:00
3692941ead
Fixes #11464 : Foreign key name is not provided by schema
2017-01-16 00:27:20 +03:00
d8566aecc4
Exception within useMaster() completely disables slaves
2017-01-07 18:49:52 +08:00
0a978f9d1e
Fix fetching schema information for pgsql when PDO::ATTR_CASE is set
2017-01-05 17:54:37 +02:00
f3bc11c724
Implement #13219 : Ability to not shuffle masters connections ( #13241 )
...
* Implement #13219 : Ability to not shuffle masters connections
* Enh: add master connection getter
* Add test case for #13241 which implements #13219
* Doc comments [skip ci]
* Doc comments
* Fix: wrong return value when no masters
* Revert `getMasterPdo()` 4a786c7e10519bd1b3b5593e6fa0a6bbdafbb37a
* Fix: try to fix too slow test
* Refact: fix Single Responsibility; Fix possible BC break
* Update Connection.php
* Update Connection.php
* Update Connection.php
* Update Connection.php
* Updated CHANGELOG
* Fix: grammatic mistake
* Refact: property renamed from `randomizeMasters` to `shuffleMasters`
* Refact: split and try to simplify tests
2017-01-02 02:15:13 +01:00
30e599b94f
updated docs about deleteALl() and updateAll()
2016-12-27 21:35:45 +01:00
5488fc6e28
fixes #13221
...
Make \yii\db\QueryTrait::limit and \yii\db\QueryTrait::offset methods works with \yii\db\Expression
2016-12-20 14:08:03 +07:00
8f5f540455
Fix fetching table schema for pgsql when PDO::ATTR_CASE is set
2016-12-19 17:10:34 +02:00
3624eae23f
Merge pull request #13217 from yiisoft/throwable
...
Catch `\Throwable` in critical places
2016-12-18 19:53:27 +02:00
25e6eb04a5
refs #11122 : Fixed can not use orderBy with aggregate functions ( #12772 )
...
* refs #11122 : Fixed can not use `orderBy` with aggregate functions like `count`, `max` etc.
* Update QueryTest.php
2016-12-18 11:28:34 +02:00
cb52c42cf5
more details about PHP 5 and 7 compatibility regarding Throwable
2016-12-17 00:43:48 +01:00
350e93e626
Fixes #12612 : Query conditions added with yii\db\Query::andWhere() now get appended to the existing conditions if they were already being joined with the and operator
2016-12-16 13:19:14 +03:00
a3b6dfbb7b
Catch \Throwable in critical places
...
Added catch `\Throwable` to be compatible with PHP7.
Added it in cases where object state needs to be kept consistent.
Mainly on transactions but also some other places where some values are
reset before exiting.
Most of them could probably be refactored by using `finally` in 2.1, as
that requires PHP 5.5.
fixes #12619
2016-12-16 02:20:02 +01:00
3e03237713
Merge branch 'master' into query-filter-having
2016-12-15 18:04:05 +03:00
518be6b8ec
Enhanced PHPDocs markup
2016-12-14 23:07:44 +02:00
837b33767c
Fixes #11697 : Added filterHaving(), andFilterHaving() and orFilterHaving() to yii\db\Query
...
Signed-off-by: Alexander Makarov <sam@rmcreative.ru>
2016-12-14 23:58:04 +03:00
e78a7fe20e
Initial work on #11697
2016-12-14 23:57:02 +03:00
88f2348ed5
Fixed ActiveRecord::unlinkAll() to respect onCondition()
...
Closes #12213
2016-12-14 22:51:21 +02:00
ae83dd0524
Fixes #13128 : Fixed incorrect position of {pos} string in ColumnSchemaBuilder __toString
2016-12-11 23:36:35 +03:00
b8bf0d0c0c
added hint into foreign keys query for oracle 11g optimisation
...
update oci tests
improved varible name
Closes #13122
2016-12-10 20:26:22 +02:00
92eee10ae1
Change the name of method getQueryTableName and remove its $query argument ( #12893 )
...
* refactores getQueryTableName:
* replaces the $query argument with a $this implementation
* exposes getQueryTableName to be public instead of private. Fixes #12878
* added unit tests for exposed method
* updated changelog
* - methodname changed to 'getTableNameAndAlias'
- scope back to private
- added @internal tag to emphasize that the method is used purely for the internal workings of this piece of software.
- removed changelog (as the API has not changed)
* update tests
2016-12-08 21:22:18 +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
46da2df98d
yii\db\mysql\Schema::loadColumnSchema sets enumValues attribute incorrectly if enum definition contains comma
...
(i.e. "enum('a','B','c,D')" -> ['a','B','c','D'] instead of expected ['a','B','c,D'])
2016-11-29 00:21:44 +02:00