Boudewijn Vahrmeijer
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
8 years ago
Klimov Paul
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
8 years ago
Fabian Peter Hammerle
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'])
8 years ago
Nikola Kovacs
a56c598743
Portability fixes for SchemaBuilder on MSSQL
...
Changed timestamp mapping to datetime on MSSQL.
Timestamp is a unique number on MSSQL, not a timestamp.
> https://msdn.microsoft.com/en-us/library/ms182776(v=SQL.90).aspx
> The timestamp data type is just an incrementing number and does not
> preserve a date or a time. To record a date or time, use a datetime data type.
separated from #9191
close #9305
8 years ago
Evgeniy Tkachenko
3a6fbad561
phpDoc: Fix example for ActiveRelationTrait::via() ( #13008 ) [skip ci]
8 years ago
Robert Korulczyk
7a3a342127
Fix errors reported by apidoc extension. ( #12986 )
8 years ago
SilverFire - Dmitry Naumenko
6a4ea892c3
Added type mapping for `varbinary` data type in MySQL DBMS
...
Closes #11756
8 years ago
Alexander Makarov
d28009843e
#12950 : Mentioned AttributeTypecastBehavior in AR afterSave() docs
8 years ago
Boudewijn Vahrmeijer
7c7d751e67
Fixes #12015 Changed visibility `yii\db\ActiveQueryTrait::createModels()` from private to protected
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
Boudewijn Vahrmeijer
32f4dc8997
Fixes #5385 : links created from classes to corresponding guide articles ( #12920 )
8 years ago
Alexander Makarov
3d9945958d
Removed accidentally committed leftovers
8 years ago
Alexander Makarov
dd71fa3958
Fixes #4113 : Error page stacktrace was generating links to private methods which are not part of the API docs
8 years ago
nanodesu88
71d083d499
Fixes #12816 : Added `columnSchemaClass` option for `yii\db\Schema` which adds ability to specify custom `\yii\db\ColumnSchema` class
8 years ago
Carsten Brandt
1433d8a017
added example for relation name to AR phpdoc
...
fixes #12802
8 years ago
PowerGamer1
3c1eb55f55
PHPDoc @return fix for insert() ( #12757 ) [skip ci]
8 years ago
Alexander Makarov
677b55475b
Reverted accidental commit
8 years ago
Konstantin Tsukur
2ffa670885
add functions for filtering
8 years ago
Angel Guevara
6100849e2f
Documentation ActiveQueryInterface::one() ( #12682 )
...
* Documentation ActiveQueryInterface::one()
Currently there is an issue when using `BaseActiveRecord::findOne()` because it uses the return type for `ActiveQueryInterface::one()` which is inherited from `QueryInterface::one()` which returns `array|false`
https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/BaseActiveRecord.php?selectedAuthors%5B0%5D=angeldelcaos%40gmail.com&orderField=path&order=asc&honorSelectedPaths=0
* null -> `null`
8 years ago
Robert Korulczyk
e7195da4b3
Fix `yii\db\Query::having` phpdoc [skip ci]
8 years ago
SilverFire - Dmitry Naumenko
e6eed9a7c9
yii\db\mssql\QueryBuilder - TYPE_TEXT mapped to NVARCHAR(MAX)
8 years ago
githubjeka
4d43ec3867
NTEXT is being deprecated in MSSQL
8 years ago
SilverFire - Dmitry Naumenko
95152f3c2c
Fixed consistency of `indexBy` handling for `yii\db\Query::column()`
...
Closes #12649
8 years ago
SilverFire - Dmitry Naumenko
fb210b8839
Fixed typo in data type. Fixes #12599
8 years ago
SilverFire - Dmitry Naumenko
3861108553
Fixed casting of `binnary()` type for MSSQL. Closes #12599
8 years ago
rhertogh
f696a28c79
display the table when dropping index
...
display the table, helping when dropping multiple indices with the same name
8 years ago
Carsten Brandt
487b2cb439
make db\Connection phpdoc more clear
...
fixes #12429
8 years ago
Carsten Brandt
f006db9b2b
update docs of AR::update()
...
fixes #12461
8 years ago
Klimov Paul
ea03f56d42
`BaseActiveRecord` methods `canGetProperty()` and `canSetProperty()` improved to handle attribute list fetching failure.
8 years ago
__FresHmaN
b764a7a21e
Disable slaves when execute migrations to resolve master-slave replication no-sync ( #12460 )
...
Resolve #12446
8 years ago
__FresHmaN
af189518a3
removed incorrect docblocks
8 years ago
DrmagicE
b3081e53a5
Fixed bug in yii\db\mysql\QueryBuilder ( #12428 )
...
Bug in yii\db\mysql\QueryBuilder class on insert empty columns
8 years ago
Robert Korulczyk
ecfaa9875d
Fix phpdoc for constants in db\Schema [skip ci] ( #12418 )
8 years ago
Klimov Paul
75439d367d
Fixed `canGetProperty()` and `canSetProperty()` returns `false` for `yii\db\BaseActiveRecord` attributes
8 years ago
Klimov Paul
4f7b1b0817
Fixed `yii\db\BaseActiveRecord::refresh()` may set incorrect `oldAttributes` values at some cases
8 years ago
SilverFire - Dmitry Naumenko
1e1723a741
Updated PHPDoc in BaseActiveRecord
...
Closes #12349
8 years ago
SilverFire - Dmitry Naumenko
0f568807e5
Updated PHPDoc in ActiveRecordInterface
8 years ago
hAppywAy_
cac514e8e9
Fixes #12293 : Fixed MSSQL `Schema::resolveTableNames()` when using linked database tables
8 years ago
Roman Grinyov
926a238595
Removed duplicate sentence in docblock ( #12290 ) [skip ci]
8 years ago
Roman Grinyov
f0e999e017
Cosmetic changes ( #12292 ) [skip ci]
8 years ago
Roman Grinyov
434a4ce632
Typos in class docblock ( #12270 )
8 years ago
Nate Sanden
d33227ab85
typo fix ( #12217 ) [skip ci]
8 years ago
Klimov Paul
143f9070af
Fixed `yii\db\BaseActiveRecord::updateAttributes()` change `isNewRecord` state for the new model
8 years ago
Carsten Brandt
ef0658726f
Revert "Revert "fixed mysql defaul integer display width on unsigned pk""
...
This reverts commit 144d78ebb4
.
fixes #11541
8 years ago
Carsten Brandt
144d78ebb4
Revert "fixed mysql defaul integer display width on unsigned pk"
...
This reverts commit 85d89e4893
because it
is a breaking change. see #11541
8 years ago
Carsten Brandt
85d89e4893
fixed mysql defaul integer display width on unsigned pk
...
fixes #11541
8 years ago
Alexander Makarov
876ef142c1
Remove explicit property initialization with null
8 years ago
Alexander Makarov
9b1b4fc5fa
Added missing phpdoc
8 years ago
Alexander Makarov
c7d5e69cda
Eliminated unused variables
8 years ago
Alexander Makarov
ef4885f478
Removed unnecessary semicolon
8 years ago