Carsten Brandt
173108b5b0
Move getTablesUsedInFrom() from ActiveQuery to Query
...
enable this feature on the Query level
close #14431
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
Carsten Brandt
be658f82bf
release version 2.0.12
7 years ago
Alexander Makarov
9b8b965fcb
Fixes #14211 : Fixed regression in Unique and Exist validators
7 years ago
Alexander Makarov
625d554e3a
Additional edge case for #14150
7 years ago
Alexander Makarov
8a087c8537
#14150 : Added {{ and }} to getTablesUsedInFrom() output
7 years ago
Alexander Makarov
b151b1cdb2
Fixes #14150
7 years ago
Alexander Makarov
23cc4bf4fe
Further changes for unique and exist validators
...
- Combined methods for getting names and aliases of from tables
- Normalized names and aliases
- Added MSSQL syntax
- Added support for spaces in aliases and table names
7 years ago
Alexander Makarov
37fc6c5afb
Alternative names
8 years ago
Dmitry Naumenko
63253ceafc
PHPDocs and code style fixed
8 years ago
Alexander Makarov
7db93fc33d
Refactored solution to be contained within ActiveQuery instead of helper
8 years ago
Alex-Code
13de76714b
Refactored `yii\db\Query::queryScalar()` method
8 years ago
Boudewijn Vahrmeijer
92eee10ae1
Change the name of method getQueryTableName and remove its $query argument ( #12893 )
...
* refactores getQueryTableName:
* replaces the $query argument with a $this implementation
* exposes getQueryTableName to be public instead of private. Fixes #12878
* added unit tests for exposed method
* updated changelog
* - methodname changed to 'getTableNameAndAlias'
- scope back to private
- added @internal tag to emphasize that the method is used purely for the internal workings of this piece of software.
- removed changelog (as the API has not changed)
* update tests
8 years ago
Robert Korulczyk
7a3a342127
Fix errors reported by apidoc extension. ( #12986 )
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
Laszlovl
0f640c7138
Make sure inverseOf relations are also populated during dynamic relational queries
...
Refs #6347
8 years ago
Nikola Kovacs
9d327baa8b
coding style fixes
8 years ago
Carsten Brandt
4411a74ebd
proper fix for #9425 , adjust changes from #11363
...
includes tests and fix that works in all cases.
9 years ago
Alexander Makarov
df6cdf7ad5
Fixed code style
9 years ago
PowerGamer1
806eb57990
Fixes #9425 : ActiveQuery::exists() should generate SELECT EXISTS() ( #11363 )
9 years ago
Klimov Paul
e4d9ed5182
code style fix
9 years ago
Carsten Brandt
ce35739469
joinWith implementation cleanup
9 years ago
Carsten Brandt
3f8df39f45
more tests for joinWith alias
...
also test on joining the same relation twice
9 years ago
Carsten Brandt
5f19e7aa41
Added Alias Syntax for joinWith()
...
Add alias syntax to joinWith(), e.g. joinWith('author a').
No need to know the table name for defining an alias for the relation.
fixes #2377 , alternative to #8788 , which allows later implementation of
getting alias and column name ambiguation.
depends on #10813 to be merged first.
9 years ago
Carsten Brandt
157d6c79cc
fixes #4972 by adding and `alias()` to `ActiveQuery`
...
allows defining an alias without knowing the model table name.
9 years ago
githubjeka
2b6ceb1eb7
phpDoc updated
9 years ago
Carsten Brandt
ad69b0f8cb
added note about fields that can be used in onCondition
9 years ago
Carsten Brandt
7c7ed48c4c
cleanup docs and duplicate code in query
9 years ago
Alexander Mohorev
68c30c1034
Replace aliases of functions
9 years ago
Carsten Brandt
d0c6cb7700
abort removing duplicate records when pk is not in result set
...
in this cases it does not make sense to remove duplicates as the result is not on record level anymore.
This could be the case after GROUP BY has been applied.
fixes #8772
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
Klimov Paul
a849e815df
Fixed `yii\db\ActiveQuery` produces incorrect SQL for aggregations, when `sql` field is set
9 years ago
Klimov Paul
68351e7d8f
`yii\db\ActiveQuery::removeDuplicatedModels()` throws exception if model primary key is empty
10 years ago
Alexander Kochetov
f42cd49833
yii\db\ActiveQuery phpDoc fix
10 years ago
Alexander Kochetov
ee85dba92e
yii\db\ActiveQuery phpDoc fix
...
close #6779
10 years ago
Veaceslav Medvedev
89406502ad
Fixed typo in phpdoc
10 years ago
Alexander Mohorev
bb8550886e
PHP type casting
10 years ago
Alexander Makarov
cba52e3c5e
Fixes #5382 : renamed "pivot table" to "junction table" since it's correct term to use
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
2150fa3239
Fixes #4970 : `joinWith()` called by a relation was ignored by `yii\db\ActiveQuery`
10 years ago
Stephen Seliuk
35b54345b5
Handling $query->joinWith called inside of other $query->joinWith within Closure (called inside Closure). Ex.: ```php $query->joinWith( [ 'rel1' => function($query) { $query->joinWith( [ 'rel2' => function($query) { // ... } ] ); } ] ); ```
10 years ago
RichWeber
92cd13a913
pull origin
10 years ago
slavcodev
fa8e576251
Refactored ActiveQuery::one() to be consistent with all() creation
10 years ago
Qiang Xue
e8c6bb516f
Fixes #4048 : Added `init` event to `ActiveQuery` classes
10 years ago
Alexander Makarov
593b478f2b
Added extra callable typehints
10 years ago
Alexander Makarov
0c14f47f9a
Fixes #3793 : Changed inline autocomplete hints style to get more IDEs support
10 years ago
Alexander Kochetov
ce1e469751
ActiveQuery::one() slight refactoring
10 years ago
Thiago Talma
563e7e0174
Update ActiveQuery.php
...
PHPDoc comment does not match function or method signature
Update PHPDoc Comment
Adjust code standard
11 years ago
Carsten Brandt
3c400dbca8
fixed file PHPdoc
...
issue #3026
11 years ago