Commit Graph

821 Commits

Author SHA1 Message Date
SilverFire - Dmitry Naumenko
2201bf14e2 Fixed parameters binding to the SQL query in yii\db\mysqlSchema::findConstraints()
Closes #10946
2016-02-24 08:31:24 +02:00
Carsten Brandt
762b9207ea Avoid some calls to new $this->modelClass in ActiveQuery
this fixes some cases of the problem described in #8639 and is fully BC.
Fixing other places may need BC breaks.
2016-02-23 13:24:01 +01:00
Alexander Makarov
5c4e2d4372 Removed unnecessary parentheses 2016-02-16 14:08:43 +03:00
Alexander Makarov
1f7134634b Use static:: instead of $this for static method calls 2016-02-16 14:06:23 +03:00
Alexander Makarov
1af5980b35 Removed unused use statement, replaced preg_split with explode 2016-02-16 13:46:13 +03:00
Alexander Makarov
386aacae5c Fixes #10422: yii\db\ColumnSchemaBuilder::buildNotNullString now returns NULL instead of empty string to properly work with MSSQL (reverted from commit 2498a9b3bb) 2016-02-16 01:39:42 +03:00
nevermnd
2498a9b3bb Fixes #10422: yii\db\ColumnSchemaBuilder::buildNotNullString now returns NULL instead of empty string to properly work with MSSQL 2016-02-15 23:55:34 +03:00
Sam Mousa
af5f5d0e3e Fixes #9851: Fixed partial commit / rollback in nested transactions 2016-02-15 23:32:32 +03:00
Carsten Brandt
ce35739469 joinWith implementation cleanup 2016-02-12 12:45:29 +01:00
Carsten Brandt
3f8df39f45 more tests for joinWith alias
also test on joining the same relation twice
2016-02-12 12:35:29 +01:00
Carsten Brandt
5f19e7aa41 Added Alias Syntax for joinWith()
Add alias syntax to joinWith(), e.g. joinWith('author a').
No need to know the table name for defining an alias for the relation.

fixes #2377, alternative to #8788, which allows later implementation of
getting alias and column name ambiguation.

depends on #10813 to be merged first.
2016-02-12 12:35:28 +01:00
Carsten Brandt
157d6c79cc fixes #4972 by adding and alias() to ActiveQuery
allows defining an alias without knowing the model table name.
2016-02-12 12:34:16 +01:00
Evgeniy Tkachenko
af9462bd31 Update return phpDoc queryOne & queryScalar. 2016-02-11 16:34:40 +03:00
Jan Siqueira
f9473ebc61 Fix default value parsing in pgsql\Schema for null values
Fixes #10692
close #10694
2016-02-07 20:07:17 +01:00
Carsten Brandt
f620f4de90 phpdoc fixes 2016-02-07 19:48:13 +01:00
Carsten Brandt
e43c41c9ea db layer phpdoc fixes 2016-02-07 16:33:26 +01:00
SilverFire - Dmitry Naumenko
b43ebcc368 yii\db\Connection::createCommand() removed DI usage for performance reasons 2016-02-04 14:32:09 +02:00
Carsten Brandt
49c15fa304 better documentation for Command in db Connection 2016-02-04 13:24:08 +01:00
SilverFire - Dmitry Naumenko
8b92b08306 db/Connection - update PHPDocs, update CHANGELOG 2016-02-04 14:03:57 +02:00
Sam Mousa
aa36f63f4c Fixed issue #7674 2016-02-04 14:03:46 +02:00
Carsten Brandt
8680f0f1d8 BC way of merging expression params of orderBy and groupBy
this logic should be moved to the sub methods in 2.1
2016-01-28 17:01:16 +01:00
Carsten Brandt
f0a62cdbd3 allow expressions in GROUP BY 2016-01-27 16:53:20 +01:00
Carsten Brandt
5a462dc5d2 added tests and documentation for #8824 2016-01-27 16:26:43 +01:00
Carsten Brandt
c3240525df updated docs about Expression class
fixes #10647
2016-01-27 15:33:01 +01:00
Andrew Nester
61df727eaf Expression objects for orderBy should be handled in QueryBuilder
fixes #10535
close #10637

- Added test to prove orderBy accepts \yii\db\Expression
2016-01-23 09:27:54 +01:00
githubjeka
2c3e9a4296 phpDoc of getTableSchema|loadTableSchema updated 2016-01-19 15:19:19 +03:00
githubjeka
5326b7aaf6 refactoring for getTableSchema 2016-01-19 15:19:04 +03:00
SilverFire - Dmitry Naumenko
387d5aa083 Merge branch '8573-oci-schema-number-mapping' of https://github.com/vbelogai/yii2 into vbelogai-8573-oci-schema-number-mapping 2016-01-17 13:29:04 +02:00
githubjeka
9ae21e5df2 phpDoc of joinWith updated to \yii\db\ActiveQuery 2016-01-12 12:20:12 +03:00
githubjeka
2b6ceb1eb7 phpDoc updated 2016-01-12 10:10:43 +03:00
Alexander Makarov
5cecb09c1b Fixes #9443: Added unsigned() to ColumnSchemaBuilder 2015-12-26 15:20:21 +03:00
Hereward Mills
a4acd048bc Add @throws tags to PHPDocs. 2015-12-24 11:11:03 +00:00
SilverFire - Dmitry Naumenko
2275156f7e PHPDoc updated 2015-12-15 19:14:55 +02:00
Carsten Brandt
468886a77b small refactoring for #9452 2015-12-06 06:04:46 +01:00
Klimov Paul
bea90e1228 Fixed yii\db\Query::where() does not add params from directly passed yii\db\Expression 2015-12-05 12:28:43 +02:00
SilverFire - Dmitry Naumenko
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
Carsten Brandt
ad69b0f8cb added note about fields that can be used in onCondition 2015-11-26 00:11:03 +01:00
Carsten Brandt
7c7ed48c4c cleanup docs and duplicate code in query 2015-11-25 23:31:29 +01:00
Alexander Makarov
8765cae71c Reverted #9656 because of BC break (reverted from commit 4a464afe9b) 2015-11-25 06:41:55 +03:00
Sam Mousa
4a464afe9b Fixes #9656: yii\db\BaseActiveRecord refactored in order to getting, setting and unsetring attribute values using the same approach 2015-11-20 15:45:12 +03:00
Alexander Makarov
e4f5b91f74 Fixed #6351 MySQL 5.1 compatibility 2015-11-20 02:26:15 +03:00
Sam Mousa
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
Alexander Makarov
7641d2d83b Enhanced #9337 as @klimov-paul suggested in e94810551c (commitcomment-14335135) 2015-11-11 21:14:23 +03:00
Alexander Makarov
cddb036cf9 Fixes #9790: Fixed yii\db\sqlite\QueryBuilder to generate proper SQL for UNION 2015-11-11 21:05:57 +03:00
Constantine Chuprik
e94810551c Fixes #9337: Added yii\db\ColumnSchemaBuilder::defaultExpression() to support DB Expression as default value 2015-11-11 20:42:07 +03:00
Alexander Makarov
95f251edd1 Fixes #10084: Improved DB docs 2015-11-04 12:08:18 +03:00
Steve Guns
d40435e931 Enhanced #6351 fix by reintroduced older (SQL CREATE) style FK detection for people still running MySQL servers where referential_constraints is not available 2015-10-27 17:44:16 +03:00
Carsten Brandt
decd45201c allow passing a single Expression object to select() and addSelect()
fixes #9883
2015-10-11 09:58:42 +02:00
Alexander Makarov
1b3770fd21 Use === instead of == where possible 2015-10-10 01:04:35 +03:00
Alexander Makarov
f83d233072 Fixed method call case to match definition 2015-10-10 00:26:44 +03:00