104712103b
Fixes #11693 : Handle QueryBuilder::batchInsert() calls with no data to insert. ( #11812 )
2016-06-25 15:51:09 +03:00
4e3c9e4a98
fixed scalar value for IN condition
...
fixes regression from 2.0.8 #10961
fixes #11536
2016-06-20 15:20:21 +02:00
4411a74ebd
proper fix for #9425 , adjust changes from #11363
...
includes tests and fix that works in all cases.
2016-04-28 01:29:07 +02:00
e2e4f76229
Updated SqliteQueryBuilderTest to work with Composite in conditions
...
Updated code style, CHANGELOG
2016-04-25 23:36:41 +03:00
baab8d6a68
QueryBuilder now supports Traversable
objects for IN
clauses.
2016-04-25 23:36:32 +03:00
0fe27b9d3b
Refactored code in PR #9441
2016-04-19 17:48:25 +03:00
c9dfc90be0
Merge branch 'methods_for_schema_builder' of https://github.com/vaseninm/yii2 into vaseninm-methods_for_schema_builder
2016-04-19 12:21:33 +03:00
2c325fbd48
Added @since
, adjusted changelog #9425
2016-04-18 12:49:22 +03:00
73eb62a3cd
DBMS specific workarounds for unsupported SQL92 form of SELECT EXISTS()
( #11369 )
2016-04-17 17:44:52 +03:00
b8e44b2f47
Merge branch 'master' of git://github.com/yiisoft/yii2 into 9562-add-char-datatype
2016-03-14 05:33:41 -07:00
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
51b99320bd
Sqlite specific schema builder class actually gets loaded now
2016-02-20 06:53:31 -08:00
eaeb926768
Adds char
datatype to framework
2016-02-20 01:52:23 -08:00
e43c41c9ea
db layer phpdoc fixes
2016-02-07 16:33:26 +01:00
8680f0f1d8
BC way of merging expression params of orderBy and groupBy
...
this logic should be moved to the sub methods in 2.1
2016-01-28 17:01:16 +01:00
f0a62cdbd3
allow expressions in GROUP BY
2016-01-27 16:53:20 +01:00
468886a77b
small refactoring for #9452
2015-12-06 06:04:46 +01: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
cd87d67f34
Global DOCS update: ~~~ replaced with ```
2015-12-02 23:15:28 +02:00
1b3770fd21
Use === instead of == where possible
2015-10-10 01:04:35 +03:00
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
ce6e92b736
add comment control methods
2015-08-14 12:27:21 +03: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
b456f699cc
Implemented SchemaBuilder
2015-07-08 15:38:21 +03:00
ae42a054bb
PSR-2 spaces, commas, etc
2015-06-09 00:05:06 +03:00
57db031d1c
Merge branch 'master' into 7374-inserting-ar-without-values
2015-05-24 23:29:40 +02:00
5d4780da21
Fixes #8268 : Allow QueryBuilder
to recognize more variations of limit
and offset
values
2015-05-05 22:28:50 -04:00
21f51400ef
added information about quoting to batch insert
2015-04-27 10:22:56 +02:00
5f099b3f8d
Merge branch 'master' into 7374-inserting-ar-without-values
2015-04-21 09:49:46 +02:00
1cfc40d6e5
link to the guide on quoting from query phpdoc
...
fixes #8141
2015-04-20 23:24:01 +02:00
5306cac4b9
added support for subqueries to simple conditions
...
fixes #8027
2015-04-12 01:45:21 +02:00
edf400df96
add missing space
2015-04-11 02:25:26 +02:00
6e48ed05c7
allow calling Command::insert() without any columns
2015-04-11 02:20:13 +02:00
d9117a67b1
Fixes #7227 : Query builder should respect column alias setting when yii\db\Expression
is being selected
2015-02-14 10:36:19 -05:00
6481d13494
Optimized checks order in conditions
2015-02-08 17:56:36 +03:00
84b20d57e4
Fixes #7055 : composite IN condition was not generated correctly for certain DBMS
2015-01-31 22:26:51 -05:00
1e5f159f78
override only mssql and sqlite QueryBuilder; throw an exception for composite in condition with a subquery
2015-01-31 22:20:41 -05:00
f58d096920
fixes #6792 , use a simpler composite in condition implementation on dbs other than pgsql
2015-01-31 22:20:41 -05:00
cc8ffe364e
added support for yii\db\Expression to querybuilder BETWEEN and LIKE
...
fixes #6164
2014-11-23 01:41:15 +01:00
5bdf36d9c8
Fixes #5780 : QueryBuilder::batchInsert()
may cause "undefined index" error
2014-10-26 21:03:03 -04:00
bb8550886e
PHP type casting
2014-10-25 15:30:03 +03:00
5829020eff
Fixes #5223 : Query builder now supports selecting sub-queries as columns
2014-10-19 10:58:49 -04:00
292a9ff55b
Add support for yii\db\Expression to QueryBuiler simple conditions
...
fixes #5601
2014-10-17 13:32:54 +02:00
566ed3c594
Fixes #5147 : null is not handled correctly for arbitrary operator in SQL.
2014-09-24 08:48:44 -04:00
b9c97ff2aa
Fixes #4938 : When yii\db\ActiveQuery
is used to build sub-queries, its WHERE clause is not correctly generated
2014-09-12 16:46:12 -04:00
212c5ee3ef
Fixes #4254 : SqlDataProvider
does not work with Oracle and SQL Server
2014-09-03 14:42:09 -04:00
7deb26f6c8
Fix PHPDoc
2014-08-24 23:25:08 +04:00
25bf486b7f
save some function calls on AR insert
2014-08-12 18:13:49 +02:00
2a8ca600c5
Simplified parameter check for buildSimpleCondition()
2014-08-01 21:21:01 +04:00