Alexander Makarov
615a29f04e
More fixes for MSSQL tests
9 years ago
Klimov Paul
bea90e1228
Fixed `yii\db\Query::where()` does not add params from directly passed `yii\db\Expression`
9 years ago
Carsten Brandt
decd45201c
allow passing a single Expression object to select() and addSelect()
...
fixes #9883
9 years ago
Carsten Brandt
989699614f
fixed test break
9 years ago
Carsten Brandt
4e7adc13ea
adjusted docs about Query::from() and subqueries
...
also added a test to verify behavior
close #9720
close #9266
9 years ago
Nikola Kovacs
316e95b81d
Remove length from SchemaBuilderTrait::text.
...
close #9307
9 years ago
Carsten Brandt
56902298b4
fixed wrong expectation in QueryBuilder test
9 years ago
Carsten Brandt
0d778d0570
adjusted querybuilder tests to match implementation
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
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
9 years ago
Alexander Makarov
8e1d982da4
Cleanup, added ->unique(), changelog
9 years ago
Matvey Vasenin
b456f699cc
Implemented `SchemaBuilder`
9 years ago
Carsten Brandt
2872365000
added test case for #8918
9 years ago
Carsten Brandt
0858d0a834
added test for querybuilder select
...
close #8895
9 years ago
John Was
01345874a3
add working QueryBuilder test for Oracle
10 years ago
Alexander Makarov
6949992246
Simplified tests directory structure a bit
10 years ago
Carsten Brandt
5306cac4b9
added support for subqueries to simple conditions
...
fixes #8027
10 years ago
Alexander Makarov
5870a74672
Added Schema::DOUBLE to represent ANSI SQL Double Precision
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
Carsten Brandt
cc8ffe364e
added support for yii\db\Expression to querybuilder BETWEEN and LIKE
...
fixes #6164
10 years ago
Carsten Brandt
1feb09b6ff
refactored querybuilder test to reuse quote replacement
...
fixes #5652
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
Carsten Brandt
0df9a82a7f
updated documentation and tests
...
fixes #5331
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
Carsten Brandt
c6201fb5ca
fixed cubrid test case
11 years ago
Carsten Brandt
d1a3d40014
added test case to acually create cols with virtual type
...
verify issue #3473
11 years ago
Qiang Xue
3411504508
Revert "Fixed test break."
...
This reverts commit 70b57766b1
.
11 years ago
Qiang Xue
70b57766b1
Fixed test break.
11 years ago
Carsten Brandt
5c748ddb42
added case insensitve LIKE to PostgresQueryBuilder
...
fixes #3252
also improved unit tests for querybuilder buildLikeCondition
11 years ago
Alexander Makarov
ab799d8ea9
Fixes #2911 : Removed `tbl_` default for table prefix
11 years ago
SonicGD
b5f8a4dc22
Reformat code te be PSR-2 compatible
11 years ago
AlexGx
32d0768919
style fixes with phpcs:yii2
11 years ago
Alexander Makarov
dd26d39dd8
Removed unused namespace imports
11 years ago
Ivan Pomortsev
9d986daf4f
Update QueryBuilderTest.php
...
Comment test because it proceed an errors when tries to run at mssql and other DBMS.
11 years ago
Ivan Pomortsev
dd79325a0a
Update QueryBuilderTest.php
...
Add test for UNION/UNION ALL function.
It could be useful to use "phpunit --group=db --filter testBuildUnion" command for run it.
11 years ago
Qiang Xue
442393dac9
removed failing tests.
11 years ago
Qiang Xue
7d08a09620
Fixes #1809 : Added support for building "EXISTS" and "NOT EXISTS" query conditions
11 years ago
Alexander Makarov
1f6a823073
Short array syntax
11 years ago
Carsten Brandt
949dda5fdb
tagged tests with @group tags
11 years ago
Carsten Brandt
544e412af8
unit test cleanup
11 years ago
Carsten Brandt
825258efb8
cubrid unit tests WIP
11 years ago
Qiang Xue
6dba4da3ed
Fixes #828 : refactored QueryBuilder::build()
11 years ago
Alexander Makarov
0596fa82fd
code style fixes
11 years ago
Qiang Xue
f2e57b2eec
Fixed test breaks.
11 years ago
Carsten Brandt
1df859cfa1
typo: primarykey -> primaryKey
11 years ago
gevik
f667b5785b
- Added drop/add primary key methods to Command.php
...
- Added drop/add primary key methods to QueryBuilder.php
- Added mysql specific dropPrimarykey method
- Added sqlite specific dropPrimarykey and addPrimaryKey methods
- Added uint testing for dropPrimarykey and addPrimaryKey methods
- Corrected postgresql column types, by adding length and precision
11 years ago
Carsten Brandt
c28b0183a5
whitespace
11 years ago