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
Alexander Makarov
5ab4f0f090
Better quotes usage in strings
...
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
2015-10-10 00:23:52 +03:00
A Slatius
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
jeicd
c2f83da8d8
Fix phpdoc
2015-10-05 15:00:13 +06:00
jeicd
0407407b76
fix coding style to follow PSR-2
2015-10-05 13:58:47 +06:00
Vovan-VE
c68b9a486c
Fix: Issue #9814 : event type EVENT_AFTER_INSERT and EVENT_AFTER_UPDATE
...
Events `EVENT_AFTER_INSERT` and `EVENT_AFTER_UPDATE` are documented
as `Event`, but infact they are `AfterSaveEvent`.
2015-10-03 20:23:56 +08:00
John Was
eb6935e4a8
add more conditions when reading mysql information_schema to speed it up
2015-10-01 12:20:19 +02:00
Jan Waś
191185f5e3
Fixes #6351 : Find MySQL FK constraints from information_schema tables instead of SHOW CREATE TABLE to improve reliability
2015-09-29 13:47:20 +03:00
Alexander Makarov
ab0b50c30d
Merge pull request #9496 from daliran/Sqlsrv-MARS
...
Fixed #9454 : changed sqlsrv pdo class selection
2015-09-28 17:40:42 +03:00
Carsten Brandt
229a39dec1
Revert "Fixes #9758 : phpdoc correction"
...
This reverts commit 13a2b70a65 .
The docblock is totally valid as it describes the property defined by this getter.
2015-09-24 21:52:21 +02:00
Alexander Makarov
13a2b70a65
Fixes #9758 : phpdoc correction
2015-09-24 00:48:31 +03:00
Carsten Brandt
4e7adc13ea
adjusted docs about Query::from() and subqueries
...
also added a test to verify behavior
close #9720
close #9266
2015-09-19 17:41:45 +02:00
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
Davide Della Casa Venturelli
329fe129fe
Fixed #9454 : changed sqlsrv pdo class selection
2015-08-21 13:25:02 +02:00
AIZAWA, Hina
0f2a77ed36
Fixes #9442 : Fixed yii\db\Migration::renameTable() caused fatal error when using SQLite driver
2015-08-18 11:52:48 +03:00
Carsten Brandt
620ec4d132
added missing namespace on Exception in transaction docs
...
fixes #9429
2015-08-16 14:13:51 +02:00
Carsten Brandt
34d5b45b35
proper fix for #8844 , convert array before using it
...
fixes #9415
2015-08-14 12:26:36 +02:00
Nikola Kovacs
316e95b81d
Remove length from SchemaBuilderTrait::text.
...
close #9307
2015-08-05 22:50:46 +02:00
Michael Härtl
b071587e0a
Improve docs for bindParam() $value
2015-08-04 16:08:38 +02:00
Carsten Brandt
abc7dbbf0f
added missing @since annotations
2015-08-04 12:40:12 +02:00
Carsten Brandt
41b25e94b0
improved parameter naming and documentation of schemabuilder
...
changes according to #9191
close #9191
2015-08-04 11:58:41 +02:00
Carsten Brandt
681db52ba6
refactored SchemaBuilder
...
- rename class to ColumnSchemaBuilder as this is more appropriate
- changed internal organisation to match how the rest of schema related classes work
- the ColumnSchemaBuilder is now created the same way as QueryBuilder is
- removed static call magic and method annotations, now real methods are called as they are
- the whole code works on objects in a db context now instead of setting database connection in global state
- trait is now used by Migration by default but can be used in other contexts as well
Migration usage is now as follows:
```php
$this->createTable('example_table', [
'id' => $this->primaryKey(),
'name' => $this->string(64)->notNull(),
'type' => $this->integer()->notNull()->defaultValue(10),
'description' => $this->text(),
'rule_name' => $this->string(64),
'data' => $this->text(),
'created_at' => $this->datetime()->notNull(),
'updated_at' => $this->datetime(),
]);
```
2015-08-03 23:25:50 +02:00
Carsten Brandt
1948754d00
phpdoc and slight refactoring of SchemaBuilder
2015-08-03 17:38:13 +02:00
Carsten Brandt
d8bb724ec7
changed method visibility, fixed test break
2015-08-03 12:37:58 +02:00
Carsten Brandt
7150e830d9
do not use reserved php words as function in schemabuilder
...
there is a reason for them to be reserved, we should not add such workarounds to still use them.
close #9283
2015-08-03 11:21:58 +02:00