SilverFire - Dmitry Naumenko
7229b3aa7d
QueryBuilder::buildAndCondition() - added Expression value extraction
...
Updated CHANGELOG
Added test case for param binding in `or` condition
Closes #11093
2016-03-13 19:22:32 +02:00
CedricYii
2bd14098f9
Fix Expression parameter binding in 'And' clause
2016-03-13 19:19:48 +02:00
Carsten Brandt
187c314d01
better fix for test break b9880f3247
2016-02-17 14:27:10 +01:00
Carsten Brandt
b9880f3247
added test for custom index hints in FROM and JOIN
...
close #10869
2016-02-16 21:24:00 +01:00
Carsten Brandt
4c6ecbe79c
fixed wrong assertation in test
2016-01-28 20:13:10 +01:00
Carsten Brandt
261b3fd39b
added a test for QueryBuilder PK
2016-01-28 17:43:14 +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
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
Alexander Makarov
615a29f04e
More fixes for MSSQL tests
2015-12-09 03:07:32 +03: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
Carsten Brandt
decd45201c
allow passing a single Expression object to select() and addSelect()
...
fixes #9883
2015-10-11 09:58:42 +02:00
Carsten Brandt
989699614f
fixed test break
2015-09-19 18:29:41 +02: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
Nikola Kovacs
316e95b81d
Remove length from SchemaBuilderTrait::text.
...
close #9307
2015-08-05 22:50:46 +02:00
Carsten Brandt
56902298b4
fixed wrong expectation in QueryBuilder test
2015-08-04 12:58:03 +02:00
Carsten Brandt
0d778d0570
adjusted querybuilder tests to match implementation
2015-08-04 12:15:00 +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
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
Alexander Makarov
8e1d982da4
Cleanup, added ->unique(), changelog
2015-07-08 15:55:09 +03:00
Matvey Vasenin
b456f699cc
Implemented SchemaBuilder
2015-07-08 15:38:21 +03:00
Carsten Brandt
2872365000
added test case for #8918
2015-07-04 03:08:34 +02:00
Carsten Brandt
0858d0a834
added test for querybuilder select
...
close #8895
2015-06-26 00:13:08 +02:00
John Was
01345874a3
add working QueryBuilder test for Oracle
2015-05-16 11:31:52 +02:00
Alexander Makarov
6949992246
Simplified tests directory structure a bit
2015-04-16 12:10:01 +03:00