Sam Mousa
5675ed818d
Fixed tests
8 years ago
Sam Mousa
7ab2a1efa8
Fixed test
8 years ago
Sam Mousa
e0e07c9c1b
Added test for indexing by related fields.
8 years ago
usix298
13c2f5370f
Fixed formatting in tests [skip ci]
8 years ago
Artur Fursa
1b322f519f
Fixes #13776 : Fixed setting precision and scale for decimal columns in MSSQL
8 years ago
Alexander Makarov
3f8e8a89eb
Used more specific unit test assertions in framework tests
8 years ago
gagatust
6397791513
Fixed whitespaces to match code style [skip ci]
8 years ago
Sergey Makinen
a9fb0171f7
Fixes #13745 : `SQLSTATE[HY093]: Invalid parameter number: parameter was not defined` in MSSQL and bug fixes in `yii\db\QueryBuilder::buildLikeCondition()`
8 years ago
Vladimir
55dd16f1f7
Fixes #12715 : Exception `SAVEPOINT LEVEL1 does not exist` instead of deadlock exception
8 years ago
Sergey Makinen
9a915ba10c
Fixes #8120 : Fixes LIKE special characters escaping for Cubrid/MSSQL/Oracle/SQLite in `yii\db\QueryBuilder`
8 years ago
Alex
6db6a2ddbe
Fixes #13418 : Fixed `QueryBuilder::batchInsert()` if $rows is `\Generator`
8 years ago
Bob Olde Hampsink
fab53b4a6e
Fixes #13582 : Added tests for all `yii\db\QueryBuilder::resetSequence` implementations, fixed SQLite implementation
8 years ago
Bob Olde Hampsink
56c65f6079
Fixes #13577 : Implemented `yii\db\mssql\QueryBuilder::resetSequence()`
8 years ago
Nikolay Oleynikov
7d82bbcd37
Fixes #13467 : `yii\data\ActiveDataProvider` no longer queries models if models count is zero
8 years ago
Nikolay Oleynikov
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
8 years ago
Sergey Makinen
ef4dadf437
Fixes #13592 : Fixes Oracle’s `yii\db\oci\Schema::setTransactionIsolationLevel()`
8 years ago
Boudewijn Vahrmeijer
45d670c995
Update ConnectionTest.php
8 years ago
Vovan-VE
3538bde085
Add test case for #13340 and update CHANGELOG
8 years ago
PowerGamer1
37b8cbb2d0
Fixes #12758 : Added the ability to use instances of `\yii\db\Query` class as values in the `\yii\db\QueryBuilder::insert()` method
8 years ago
Alexander Makarov
c4175be7a3
Adjusted command test for incorrect inserts to use data provider
8 years ago
voroks
25f08afc96
Fixes #8293 : `yii\db\Query` can be passed to `insert` method in `yii\db\QueryBuilder`
8 years ago
Alexander Makarov
1cc327f108
Run common batch insert tests for SQLite
8 years ago
Tobias Munk
f5ab85c393
updated debug settings (+56 squashed commits)
...
Squashed commits:
[c42f30c] updated base image, added docs & local test script
[88f0c40] debug
[6220c94] fixed network isolation
[c63c7c3] test mssql only on test/mssql branch
[74efc78] fixed isolation in after_script
[02b895b] updated test setup
[3335f39] updated retry
[bd123b2] updated service checks
[45e4c90] updated build
[d54da7a] updated after_script
[5a4c726] 🏭 wait for mysql
[08db878] fixed typo
[ea53c1e] updated build stages
[9807ce3] fixed typos
[cf9f64e] fixed mssql testing
[08001d6] added db create for mssql
[62f6b65] run travis (gitlab simulation) only in travis branch
[cf63da4] streamlined build
[76808ac] updated test jobs
[18d79b5] fixed test error
[7b2bce6] updated build & composer.lock
[244623a] updated build
[86bd71b] fixed cleanup
[86ab2e8] fixed cleanup
[091d4b8] fixed tests
[2d315b5] fixed build config
[2913644] fixed project names
[f53b823] refactored build config
[5a791fb] refactored docker db-tests
[b4479b0] revert
[a975fa5] updated gitlab build
[4e4e5e4] updated mssql setup
[d6ff03b] added sleep workaround
[578b102] removed host volumes in test
[928f50b] fixed path
[967ab10] updated tests
[520f317] bootstrap cubrid
[5f245e1] 🏭 fixed cubrid tests
[940dbbc] 🏭 pinned cubrid version 9.3.6.0002
[8d5ea69] 📝 dockerized test commands
[9954b54] updated cubrid
[fb3afac] updated docs
[3f63ced] updated isolation
[bdc3c83] 🏭 build cubrid
[b777911] 🏭 disabled mssql, updated cubrid
[36534e7] added travis-a-like stage
[6546f02] updated GitLab build
[c046096] updated test setup
- added mssql and cubrid stack
[5a0e635] disabled host-volume
[75cf342] fixed test
[8de0794] fixed testing
[465d27a] added stages
[63aa950] added script
[68eecef] fixed typo
[00e4b88] updated Docker build
[f9072cc] added dockerized test setup
8 years ago
João Pedro Pereira
3692941ead
Fixes #11464 : Foreign key name is not provided by schema
8 years ago
Vladimir
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
8 years ago
Klimov Paul
194577c55e
Code style fix
8 years ago
p.chapl
5488fc6e28
fixes #13221
...
Make \yii\db\QueryTrait::limit and \yii\db\QueryTrait::offset methods works with \yii\db\Expression
8 years ago
Pavel Chaplygin
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
8 years ago
SilverFire - Dmitry Naumenko
df733d1bbe
Fixed QueryBuilderTest
8 years ago
SilverFire - Dmitry Naumenko
2f8225a244
Fixed QueryBuilderTest to work with PgSQL and other DBMS
8 years ago
SilverFire - Dmitry Naumenko
54c7e0c434
Added tests for QueryBuilder::batchInsert()
8 years ago
Brandon Kelly
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
8 years ago
Alexander Makarov
b78d6367ba
Removed duplicate assertion from tests, divided test method into two
8 years ago
Alexander Makarov
837b33767c
Fixes #11697 : Added `filterHaving()`, `andFilterHaving()` and `orFilterHaving()` to `yii\db\Query`
...
Signed-off-by: Alexander Makarov <sam@rmcreative.ru>
8 years ago
SilverFire - Dmitry Naumenko
88f2348ed5
Fixed `ActiveRecord::unlinkAll()` to respect `onCondition()`
...
Closes #12213
8 years ago
Klimov Paul
50b668eee8
redundant code removed
8 years ago
Chris Harris
ae83dd0524
Fixes #13128 : Fixed incorrect position of {pos} string in ColumnSchemaBuilder `__toString`
8 years ago
Zlakomanov Alexander
b8bf0d0c0c
added hint into foreign keys query for oracle 11g optimisation
...
update oci tests
improved varible name
Closes #13122
8 years ago
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
Alexander Makarov
41b3f0db0b
Fixed driver name in MSSQL test
8 years ago
Walt Sorensen
f76f0cff6c
Test against the current hhvm version ( #12971 )
...
* Test against the current hhvm version
This provides the current HHVM version (3.15.2 as of this PR) and will track with each release (i.e. will be 3.16 when 3.16 is released.
If testing against HHVM LST versions is desired follow this guide. https://docs.travis-ci.com/user/languages/php#HHVM-versions
Should be able to change to container based Trusty after Q1-17 https://blog.travis-ci.com/2016-11-08-trusty-container-public-beta/
* Try to create travis user for trusty hhvm and grant permissions
remove conditionals for apc and memcache
* more tweaks to grant privileges
* try 127.0.0.1 rather than localhost
* grant after db create
* try a different create user grant privileges form
* try to specify postgresql: "9.3" for hhvm
* need to look more into specifying postgresql: "9.3"
hhvm issues
* addon with no dash postgresql: "9.3"
* requested change && not ||
* redis-server isn't needed here
* Apply @cebe's patch for pgsql test failure
* Update .travis.yml
* Update CommandTest.php
* Update CommandTest.php
* Update CommandTest.php
try to fix hhvm tests
* Update CommandTest.php
8 years ago
Carsten Brandt
6caedd1ff6
added test for MySQL index hints, #10869
8 years ago
Carsten Brandt
24809c5d73
fixed group annotations for #12889
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
Boudewijn Vahrmeijer
560e3eb0a3
Unit tests created for ActiveQuery ( #12889 )
...
* setup ActiveQueryTest
* basic unit tests for ActiveQuery are created:
- all protected & public methods are covered
- method return types are tested
- some functions are already full tested, others are supplied with @todo
* fix driver for mssql
* fix ::class to className()
* remove OCI tests
8 years ago
p.chapl
3e1588b5b9
Added unit tests for #9561
...
canGetProperty and canSetProperty on ActiveRecord checks attributes
close #11087
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