Dmitry Naumenko
d16586334d
Fixes #7640 : Implemented custom data types support. Added JSON support for MySQL and PostgreSQL, array support for PostgreSQL
7 years ago
Pavel Dovlatov
6330a2b779
Small phpdoc fix in `\yii\db\QueryTrait::emulateExecution()` [skip ci] ( #15021 )
7 years ago
Carsten Brandt
98a71d8b0d
Adjust QueryInterface and QueryTrait types on where() ( #14714 )
...
these did never allow a string condition. Only SQL Query and AR implementation do.
fixes #14496
7 years ago
Robert Korulczyk
5a8c3d537b
Enable `phpdoc_summary` rule in php-cs-fixer config ( #14675 )
...
* Enable `phpdoc_summary` rule in php-cs-fixer config.
* Fix case in "PHPDoc".
7 years ago
Robert Korulczyk
1501c659ac
Add empty lines before return statements. ( #14682 ) [skip ci]
7 years ago
Robert Korulczyk
fe8a0a6a2e
Enable `no_useless_else` rule in php-cs-fixer ( #14420 )
7 years ago
Robert Korulczyk
ba0ab403b5
Added php-cs-fixer coding standards validation to Travis CI ( #14100 )
...
* php-cs-fixer: PSR2 rule.
* php-cs-fixer: PSR2 rule - fix views.
* Travis setup refactoring.
* Add php-cs-fixer to travis cs tests.
* Fix tests on hhvm-3.12
* improve travis config
* composer update
* revert composer update
* improve travis config
* Fix CS.
* Extract config to separate classes.
* Extract config to separate classes.
* Add file header.
* Force short array syntax.
* binary_operator_spaces fixer
* Fix broken tests
* cast_spaces fixer
* concat_space fixer
* dir_constant fixer
* ereg_to_preg fixer
* function_typehint_space fixer
* hash_to_slash_comment fixer
* is_null fixer
* linebreak_after_opening_tag fixer
* lowercase_cast fixer
* magic_constant_casing fixer
* modernize_types_casting fixer
* native_function_casing fixer
* new_with_braces fixer
* no_alias_functions fixer
* no_blank_lines_after_class_opening fixer
* no_blank_lines_after_phpdoc fixer
* no_empty_comment fixer
* no_empty_phpdoc fixer
* no_empty_statement fixer
* no_extra_consecutive_blank_lines fixer
* no_leading_import_slash fixer
* no_leading_namespace_whitespace fixer
* no_mixed_echo_print fixer
* no_multiline_whitespace_around_double_arrow fixer
* no_multiline_whitespace_before_semicolons fixer
* no_php4_constructor fixer
* no_short_bool_cast fixer
* no_singleline_whitespace_before_semicolons fixer
* no_spaces_around_offset fixer
* no_trailing_comma_in_list_call fixer
* no_trailing_comma_in_singleline_array fixer
* no_unneeded_control_parentheses fixer
* no_unused_imports fixer
* no_useless_return fixer
* no_whitespace_before_comma_in_array fixer
* no_whitespace_in_blank_line fixer
* not_operator_with_successor_space fixer
* object_operator_without_whitespace fixer
* ordered_imports fixer
* php_unit_construct fixer
* php_unit_dedicate_assert fixer
* php_unit_fqcn_annotation fixer
* phpdoc_indent fixer
* phpdoc_no_access fixer
* phpdoc_no_empty_return fixer
* phpdoc_no_package fixer
* phpdoc_no_useless_inheritdoc fixer
* Fix broken tests
* phpdoc_return_self_reference fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_to_comment fixer
* phpdoc_trim fixer
* phpdoc_var_without_name fixer
* psr4 fixer
* self_accessor fixer
* short_scalar_cast fixer
* single_blank_line_before_namespace fixer
* single_quote fixer
* standardize_not_equals fixer
* ternary_operator_spaces fixer
* trailing_comma_in_multiline_array fixer
* trim_array_spaces fixer
* protected_to_private fixer
* unary_operator_spaces fixer
* whitespace_after_comma_in_array fixer
* `parent::setRules()` -> `$this->setRules()`
* blank_line_after_opening_tag fixer
* Update finder config.
* Revert changes for YiiRequirementChecker.
* Fix array formatting.
* Add missing import.
* Fix CS for new code merged from master.
* Fix some indentation issues.
7 years ago
Nikolay Oleynikov
11761ac42a
Fix `\yii\db\QueryTrait` type hints ( #13956 ) [skip ci]
8 years ago
Carsten Brandt
c19b2f7dc8
release version 2.0.11
8 years ago
Brandon Kelly
5609e918de
Fixed some malformed @var tags ( #13468 ) [skip ci]
8 years ago
p.chapl
5488fc6e28
fixes #13221
...
Make \yii\db\QueryTrait::limit and \yii\db\QueryTrait::offset methods works with \yii\db\Expression
8 years ago
Klimov Paul
c17766181f
Added `QueryInterface::emulateExecution()`
...
Added `QueryInterface::emulateExecution()`, which allows preventing of
the actual query execution.
This allows to cancel `DataProvider` preventing search query execution
in case search model is invalid:
``` php
public function search($params)
{
$query = Item::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
$query->where('0=1');
$query->emulateExecution(); // No SQL execution will be done
return $dataProvider;
}
```
This also fix unecessary query in case of `via()` usage. See #12390 .
fixes #12390
fixes #6373
close #12708
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
Carsten Brandt
5a462dc5d2
added tests and documentation for #8824
9 years ago
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
9 years ago
SilverFire - Dmitry Naumenko
cd87d67f34
Global DOCS update: ~~~ replaced with ```
9 years ago
Alexander Makarov
67658cf57d
Replaced static with $this in phpdoc since current IDEs are finally able to handle it correctly
9 years ago
╃巡洋艦㊣
1468bd4d3d
version 2.0.1 84b42ab
10 years ago
Carsten Brandt
9df21d46f3
reverted addition of $where property
10 years ago
Carsten Brandt
222f9ddfad
added missing documentation about the NOT operator in Query
...
fixes #5147
10 years ago
Alexander Makarov
47ee0b87d4
Removed unnecessary code
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
RichWeber
92cd13a913
pull origin
10 years ago
Alexander Makarov
0edd8bc65a
Fixed missing and incorrect phpdoc
10 years ago
Carsten Brandt
2f4a09ef53
phpdoc
10 years ago
Carsten Brandt
6f7be5ee5c
filterWhere for postgres ILIKE
...
fixes #3252
11 years ago
Sergey Gonimar
322e9e2385
Fix BETWEEN and NOT BETWEEN conditions.
...
```
PHP Notice – yii\base\ErrorException
Undefined offset: 3
in .../yiisoft/yii2/db/QueryTrait.php at line 269
```
11 years ago
Qiang Xue
0fa19291f1
refactored filterWhere().
11 years ago
Qiang Xue
869d96ee0d
Fixed test break.
11 years ago
Carsten Brandt
e9e59483f4
removed unnecessary code duplication
11 years ago
Carsten Brandt
96f1c4c10b
renamed Query::filter() to Query::filterWhere()
11 years ago
Carsten Brandt
a35ef1ce7a
added andOnCondition and orOnCondition to ActiveQuery
...
fixes #2957
11 years ago
Alexander Makarov
8cd247730a
Query::filter() adjustments
11 years ago
Alexander Makarov
3c1a8141fd
fixes #2002
11 years ago
Carsten Brandt
bf3c75147d
reverted breaking PHPdoc codestyle changes
...
issue #2852
11 years ago
SonicGD
b5f8a4dc22
Reformat code te be PSR-2 compatible
11 years ago
Carsten Brandt
262189533a
huge amount of documentation link fixes
11 years ago
Carsten Brandt
e27c3872ed
doc improvements
11 years ago
Qiang Xue
0c38655217
psr-4 move
11 years ago
Qiang Xue
4f346f4be1
doc fix.
11 years ago
Carsten Brandt
65338972c7
refactored ActiveRecord classes to use Interfaces and traits
...
this allows us to implement other activerecord implementations based on
NoSQL dbms
11 years ago
Carsten Brandt
b8e31d50bb
renamed AR trait classes
11 years ago
Carsten Brandt
4653526262
moved common parts of db ActiveRelation and Query to traits
...
these parts can be reused in other ActiveRecord implementations
11 years ago