25 Commits

Author SHA1 Message Date
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
2bd14098f9 Fix Expression parameter binding in 'And' clause 2016-03-13 19:19:48 +02:00
187c314d01 better fix for test break b9880f32474bf30bd7662ee7f3465a0e58a2be2b 2016-02-17 14:27:10 +01:00
b9880f3247 added test for custom index hints in FROM and JOIN
close #10869
2016-02-16 21:24:00 +01:00
4c6ecbe79c fixed wrong assertation in test 2016-01-28 20:13:10 +01:00
261b3fd39b added a test for QueryBuilder PK 2016-01-28 17:43:14 +01:00
f0a62cdbd3 allow expressions in GROUP BY 2016-01-27 16:53:20 +01:00
5a462dc5d2 added tests and documentation for #8824 2016-01-27 16:26:43 +01:00
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
615a29f04e More fixes for MSSQL tests 2015-12-09 03:07:32 +03:00
bea90e1228 Fixed yii\db\Query::where() does not add params from directly passed yii\db\Expression 2015-12-05 12:28:43 +02:00
decd45201c allow passing a single Expression object to select() and addSelect()
fixes #9883
2015-10-11 09:58:42 +02:00
989699614f fixed test break 2015-09-19 18:29:41 +02:00
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
316e95b81d Remove length from SchemaBuilderTrait::text.
close #9307
2015-08-05 22:50:46 +02:00
56902298b4 fixed wrong expectation in QueryBuilder test 2015-08-04 12:58:03 +02:00
0d778d0570 adjusted querybuilder tests to match implementation 2015-08-04 12:15:00 +02:00
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
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
8e1d982da4 Cleanup, added ->unique(), changelog 2015-07-08 15:55:09 +03:00
b456f699cc Implemented SchemaBuilder 2015-07-08 15:38:21 +03:00
2872365000 added test case for #8918 2015-07-04 03:08:34 +02:00
0858d0a834 added test for querybuilder select
close #8895
2015-06-26 00:13:08 +02:00
01345874a3 add working QueryBuilder test for Oracle 2015-05-16 11:31:52 +02:00
6949992246 Simplified tests directory structure a bit 2015-04-16 12:10:01 +03:00