- 25 7月, 2017 1 次提交
-
-
由 Rafael França 提交于
Fix `COUNT(DISTINCT ...)` with `ORDER BY` and `LIMIT`
-
- 21 7月, 2017 1 次提交
-
-
由 Maxime Lapointe 提交于
Post.where(id: 1).or(Post.where(id: 2)).where(foo: 3).unscope(where: :foo).where_clause.binds.map(&:value) Would return [2, 3] instead of the expected [1,2]
-
- 30 5月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
Fix association with extension issues
-
- 27 5月, 2017 1 次提交
-
-
由 Rafael França 提交于
Doc updates for ActiveRecord::Batches
-
- 12 5月, 2017 1 次提交
-
-
由 Aaron Patterson 提交于
Don't eager loading if unneeded for `FinderMethods#exists?`
-
- 26 4月, 2017 1 次提交
-
-
由 Rafael França 提交于
Mixin `CollectionProxy::DelegateExtending` after `ClassSpecificRelation`
-
- 10 4月, 2017 2 次提交
-
-
由 Boris Slobodin 提交于
-
由 Rafael França 提交于
Extract `construct_relation_for_exists` in `FinderMethods`
-
- 21 3月, 2017 1 次提交
-
-
由 Andrew White 提交于
Fix where_clause#except with specific where value (cherry picked from commit 81b2cd11)
-
- 19 3月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Since b644964b `ActiveRecord::Relation` includes `Enumerable` so delegating `collect`, `all?`, and `include?` are also unneeded. `collect` without block returns `Enumerable` without preloading by that. We should use `load` rather than `collect` for force loading.
-
- 18 3月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
This fixes CI failure due to 48f3be8c. `Enumerable#uniq` was introduced since Ruby 2.4. We should delegate `uniq` to `records` explicitly. And since b644964b `ActiveRecord::Relation` includes `Enumerable` so delegating `map` is unneeded.
-
- 10 3月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Follow up of #24203. Since b644964b `ActiveRecord::Relation` includes `Enumerable` so it is enough to call `super` simply.
-
- 27 2月, 2017 1 次提交
-
-
由 Eugene Kenny 提交于
When `order` is given a hash, the keys are currently assumed to be attribute names and are quoted as such in the query, which makes it impossible to pass an expression instead: Post.order("LENGTH(title)" => :asc).last # SELECT `posts`.* FROM `posts` ORDER BY `posts`.`LENGTH(title)` DESC LIMIT 1 If the key is an `Arel::Nodes::SqlLiteral`, we now use it directly in the query. This provides a way to build a relation with a complex order clause that can still be reversed with `reverse_order` or `last`.
-
- 26 2月, 2017 5 次提交
-
-
由 Eugene Kenny 提交于
When a grouped calculation contains a having clause that references a selected value, we need to include that selected value in the query. Postgres doesn't support referencing a selected value in a having clause, but other databases do; we can skip the test on the pg adapter but run it for the others. This was fixed before in 9a298a16, but the test coverage was lost in 5a05207d. The fix regressed in 6311975f and was removed in 97d46c17.
-
由 Ryuta Kamizono 提交于
If the `index` exceeds a `limit`, simply return an empty result without querying the database.
-
由 Ryuta Kamizono 提交于
`select_values` is a local variable defined at previous line. `select_values += select_values` is totally useless.
-
由 kami-zh 提交于
-
由 Ryuta Kamizono 提交于
`DISTINCT` clause is applied inside aggregate function by `operation_over_aggregate_column` if needed. Unneeded outside aggregate function. ```ruby # Before author.unique_categorized_posts.count # => SELECT DISTINCT COUNT(DISTINCT "posts"."id") FROM "posts" INNER JOIN "categorizations" ON "posts"."id" = "categorizations"."post_id" WHERE "categorizations"."author_id" = ? [["author_id", 2]] # After author.unique_categorized_posts.count # => SELECT COUNT(DISTINCT "posts"."id") FROM "posts" INNER JOIN "categorizations" ON "posts"."id" = "categorizations"."post_id" WHERE "categorizations"."author_id" = ? [["author_id", 2]] ``` Closes #27615
-
- 13 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 07 2月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
This reverts commit 28977f1f.
-
由 Ryuta Kamizono 提交于
If select clause is specified and last column has a column alias, additional column alias causes a statement invalid. Add test coverage for counting a single column with NULL values. Fixes #27676, #27682, and #27705.
-
- 04 2月, 2017 1 次提交
-
-
由 kenta-s 提交于
-
- 31 1月, 2017 1 次提交
-
-
由 Kevin Huang 提交于
-
- 05 1月, 2017 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
-
- 04 1月, 2017 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
find and exists?
-
- 31 12月, 2016 1 次提交
-
-
由 Matthew Draper 提交于
Closes #14640
-
- 30 12月, 2016 5 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
- 29 12月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Some methods were added to public API in 5b14129d and they should be not part of the public API.
-
- 25 12月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Currently uniqueness validator is coupled with building Arel ASTs. This commit extracts `WhereClauseFactory#build_for_case_sensitive` for decouple the building Arel ASTs.
-
- 24 12月, 2016 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
- 23 12月, 2016 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 06 12月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Raise `ActiveRecord::RangeError` when values that executed are out of range.
-