Carsten Brandt
4411a74ebd
proper fix for #9425 , adjust changes from #11363
...
includes tests and fix that works in all cases.
9 years ago
SilverFire - Dmitry Naumenko
e2e4f76229
Updated SqliteQueryBuilderTest to work with Composite in conditions
...
Updated code style, CHANGELOG
9 years ago
Sam Mousa
baab8d6a68
QueryBuilder now supports `Traversable` objects for `IN` clauses.
9 years ago
SilverFire - Dmitry Naumenko
0fe27b9d3b
Refactored code in PR #9441
9 years ago
Alexander Makarov
2c325fbd48
Added `@since`, adjusted changelog #9425
9 years ago
PowerGamer1
73eb62a3cd
DBMS specific workarounds for unsupported SQL92 form of `SELECT EXISTS()` ( #11369 )
9 years ago
SilverFire - Dmitry Naumenko
7229b3aa7d
QueryBuilder::buildAndCondition() - added Expression value extraction
...
Updated CHANGELOG
Added test case for param binding in `or` condition
Closes #11093
9 years ago
CedricYii
2bd14098f9
Fix Expression parameter binding in 'And' clause
9 years ago
Chris Harris
51b99320bd
Sqlite specific schema builder class actually gets loaded now
9 years ago
Chris Harris
eaeb926768
Adds `char` datatype to framework
9 years ago
Carsten Brandt
e43c41c9ea
db layer phpdoc fixes
9 years ago
Carsten Brandt
8680f0f1d8
BC way of merging expression params of orderBy and groupBy
...
this logic should be moved to the sub methods in 2.1
9 years ago
Carsten Brandt
f0a62cdbd3
allow expressions in GROUP BY
9 years ago
Carsten Brandt
468886a77b
small refactoring for #9452
9 years ago
Klimov Paul
bea90e1228
Fixed `yii\db\Query::where()` does not add params from directly passed `yii\db\Expression`
9 years ago
SilverFire - Dmitry Naumenko
cd87d67f34
Global DOCS update: ~~~ replaced with ```
9 years ago
Alexander Makarov
1b3770fd21
Use === instead of == where possible
9 years ago
Alexander Makarov
5ab4f0f090
Better quotes usage in strings
...
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
9 years ago
Matvey Vasenin
ce6e92b736
add comment control methods
9 years ago
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(),
]);
```
9 years ago
╃巡洋艦㊣
586684b050
2.0.5 bf7edc5
9 years ago
Matvey Vasenin
b456f699cc
Implemented `SchemaBuilder`
9 years ago
Alexander Mohorev
ae42a054bb
PSR-2 spaces, commas, etc
9 years ago
Qiang Xue
5d4780da21
Fixes #8268 : Allow `QueryBuilder` to recognize more variations of `limit` and `offset` values
10 years ago
Carsten Brandt
21f51400ef
added information about quoting to batch insert
10 years ago
Carsten Brandt
1cfc40d6e5
link to the guide on quoting from query phpdoc
...
fixes #8141
10 years ago
Carsten Brandt
5306cac4b9
added support for subqueries to simple conditions
...
fixes #8027
10 years ago
Jan Waś
edf400df96
add missing space
10 years ago
Jan Waś
6e48ed05c7
allow calling Command::insert() without any columns
10 years ago
Qiang Xue
d9117a67b1
Fixes #7227 : Query builder should respect column alias setting when `yii\db\Expression` is being selected
10 years ago
Alexander Makarov
6481d13494
Optimized checks order in conditions
10 years ago
Qiang Xue
84b20d57e4
Fixes #7055 : composite IN condition was not generated correctly for certain DBMS
10 years ago
Jan Waś
1e5f159f78
override only mssql and sqlite QueryBuilder; throw an exception for composite in condition with a subquery
10 years ago
Jan Waś
f58d096920
fixes #6792 , use a simpler composite in condition implementation on dbs other than pgsql
10 years ago
╃巡洋艦㊣
1468bd4d3d
version 2.0.1 84b42ab
10 years ago
Carsten Brandt
cc8ffe364e
added support for yii\db\Expression to querybuilder BETWEEN and LIKE
...
fixes #6164
10 years ago
Qiang Xue
5bdf36d9c8
Fixes #5780 : `QueryBuilder::batchInsert()` may cause "undefined index" error
10 years ago
Alexander Mohorev
bb8550886e
PHP type casting
10 years ago
Qiang Xue
5829020eff
Fixes #5223 : Query builder now supports selecting sub-queries as columns
10 years ago
Carsten Brandt
292a9ff55b
Add support for yii\db\Expression to QueryBuiler simple conditions
...
fixes #5601
10 years ago
Qiang Xue
566ed3c594
Fixes #5147 : null is not handled correctly for arbitrary operator in SQL.
10 years ago
Qiang Xue
b9c97ff2aa
Fixes #4938 : When `yii\db\ActiveQuery` is used to build sub-queries, its WHERE clause is not correctly generated
10 years ago
Qiang Xue
212c5ee3ef
Fixes #4254 : `SqlDataProvider` does not work with Oracle and SQL Server
10 years ago
Arthur Khachaturov
7deb26f6c8
Fix PHPDoc
10 years ago
Carsten Brandt
25bf486b7f
save some function calls on AR insert
10 years ago
Alexander Makarov
2a8ca600c5
Simplified parameter check for buildSimpleCondition()
10 years ago
Alexander Makarov
b656137541
Added support for arbitrary operators to Query::filterWhere, added support for arbitrary operators to Sphinx extension
10 years ago
Alexander Makarov
c1cf48cf5b
Fixes #2315 : Any operator now could be used with `yii\db\Query::->where()` operand format
10 years ago
RichWeber
92cd13a913
pull origin
10 years ago
Carsten Brandt
3a1e0f3a5c
property codestyle framework
10 years ago