111 Commits

Author SHA1 Message Date
de1750228d Fixes #13879: Added upsert support for yii\db\QueryBuilder and yii\db\Command 2018-02-09 01:05:50 +03:00
d16586334d Fixes #7640: Implemented custom data types support. Added JSON support for MySQL and PostgreSQL, array support for PostgreSQL 2018-02-05 04:59:14 +07:00
315855f7f5 Fixes #15357: Added multi statement support for yii\db\sqlite\Command 2017-12-20 00:02:14 +03:00
980cfde0f1 Fixes #14877: Disabled profiling on connection opening when profiling is disabled 2017-10-20 01:28:05 +03:00
9e6f9e3b6d Fixed serialization of yii\db\Connection instance closes database connection 2017-09-01 13:30:56 +03:00
5a8c3d537b Enable phpdoc_summary rule in php-cs-fixer config (#14675)
* Enable `phpdoc_summary` rule in php-cs-fixer config.

* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
2fa4ccc1da Fix phpdoc for $_master and $_slave properties in yii\db\Connection (#14447) 2017-07-13 12:24:14 +02:00
f5e8a89319 Fix slave usage disabled after Connection::close, set _slave to false instead of nulll
fixes #14165
close #14168
2017-07-12 15:03:48 +02:00
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +03:00
cb53b2feec Fixes #14081: Added yii\caching\CacheInterface to make custom cache extensions adoption easier 2017-06-11 19:18:33 +03:00
be658f82bf release version 2.0.12 2017-06-05 16:33:41 +02:00
4b9e48b8dc improved docs: link term "path alias" to the guide 2017-06-02 10:45:20 +02:00
6e7ea782c0 fix cloning of DB connection for sqlite in-memory db
fixes #14131
close #14232
2017-06-01 11:43:49 +02:00
5ed6910e1c Added support for cloning a db connection
improved fix #14020
fixes #13890

https://github.com/yiisoft/yii2/pull/14020/files#r115185865

close #14121
2017-05-10 09:46:10 +02:00
fb2441c3d7 moved query log logic into private method and reduced calls to getRawSql()
fixes #12528
2017-05-08 00:04:37 +02:00
65ea226729 added option to disable query logging in DB command
fixes #12528
2017-05-08 00:04:13 +02:00
e62ea0136c Fixed phpdoc broken links to PHP manual pages [skip ci] 2017-04-11 00:43:38 +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
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
c19b2f7dc8 release version 2.0.11 2017-02-01 17:46:29 +01:00
d8566aecc4 Exception within useMaster() completely disables slaves 2017-01-07 18:49:52 +08: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
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
7a3a342127 Fix errors reported by apidoc extension. (#12986) 2016-11-13 14:51:21 +01:00
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
487b2cb439 make db\Connection phpdoc more clear
fixes #12429
2016-09-05 12:36:07 +02:00
926a238595 Removed duplicate sentence in docblock (#12290) [skip ci] 2016-08-24 13:31:53 +03:00
434a4ce632 Typos in class docblock (#12270) 2016-08-23 22:23:30 +02:00
6263eeba69 Updated PHPDoc 2016-07-25 23:33:42 +03:00
326cdfeb52 added test for #11256 2016-07-06 14:51:59 +02:00
bcc19e97cb added note about Oracle DB connection charset
close #11387
2016-07-06 13:00:18 +02:00
af5f5d0e3e Fixes #9851: Fixed partial commit / rollback in nested transactions 2016-02-15 23:32:32 +03:00
f620f4de90 phpdoc fixes 2016-02-07 19:48:13 +01:00
b43ebcc368 yii\db\Connection::createCommand() removed DI usage for performance reasons 2016-02-04 14:32:09 +02:00
49c15fa304 better documentation for Command in db Connection 2016-02-04 13:24:08 +01:00
8b92b08306 db/Connection - update PHPDocs, update CHANGELOG 2016-02-04 14:03:57 +02:00
aa36f63f4c Fixed issue #7674 2016-02-04 14:03:46 +02:00
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
603a956b8d Implemented __sleep in yii\db\Connection
to support serializing the connection object without exceptions.

- Added test for serializing an open connection.
- Added unserialize test

close #10149
2015-11-16 22:44:57 +01:00
a030cd4250 Allow the use of Yii aliases in an SQLite dsn
Making it possible to use a SQLite DSN like;

```php
'db' => [
    'dsn' => 'sqlite:@app/db/database.sqlite3',
]
```

That way it'll always work out of the box and absolute paths aren't
needed.

close #9869
2015-10-09 16:21:33 +02:00
0407407b76 fix coding style to follow PSR-2 2015-10-05 13:58:47 +06:00
329fe129fe Fixed #9454: changed sqlsrv pdo class selection 2015-08-21 13:25:02 +02:00
afe21a986a PSR-2 anonymous functions 2015-06-09 00:14:44 +03:00
bb8550886e PHP type casting 2014-10-25 15:30:03 +03:00
4054b2196f fixed broken links 2014-10-06 22:04:59 +02:00
d2b864da84 prepare for 2.0.0-rc release. 2014-09-27 21:59:54 -04:00