- 07 6月, 2018 4 次提交
-
-
由 Ryuta Kamizono 提交于
If `eager_loading` is true, `apply_join_dependency` force applies LIMIT/OFFSET before JOINs by `limited_ids_for` to keep parent records count. But for aggregation queries, LIMIT/OFFSET should be applied after aggregations the same as SQL semantics. And also, we could not replace SELECT list by `limited_ids_for` when a query has a GROUP BY clause. It had never been worked since it will causes generating invalid SQL for MySQL, PostgreSQL, and probably most backends. ``` % ARCONN=postgresql be ruby -w -Itest test/cases/calculations_test.rb -n test_group_by_with_limit Using postgresql Run options: -n test_group_by_with_limit --seed 20925 # Running: E Error: CalculationsTest#test_group_by_with_limit: ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "posts.id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT DISTINCT "posts"."id", "posts"."type" AS alias_0 FRO... ^ : SELECT DISTINCT "posts"."id", "posts"."type" AS alias_0 FROM "posts" LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" GROUP BY "posts"."type" ORDER BY "posts"."type" ASC LIMIT $1 ``` Fixes #8103. Closes #27249.
-
由 Ryuta Kamizono 提交于
In `_create_record`, explicit `transaction` block requires rollback handling manually when `insert_record` is failed. We need to handle it in `_create_record`, not in `insert_record`, since our test cases expect a record added to target and returned even if `insert_record` is failed, Closes #31488.
-
由 Ryuta Kamizono 提交于
Follow up of #32952.
-
由 Rafael França 提交于
Fix force equality checking not to break the serialized attribute with Array
-
- 06 6月, 2018 5 次提交
-
-
由 Ryuta Kamizono 提交于
Child joins should be aliased when merging relations
-
由 Chalo Fernandez 提交于
Rails 5.2 does not alias child joins, causing an error about duplicated table/fields: Example: Using some code like: `Post.joins(:author, :categorizations).merge(Author.select(:id)).merge(Categorization.joins(:author))` *Before this fix:* ` SELECT ... FROM "posts" INNER JOIN "authors" ON ... INNER JOIN "authors" ON ... ` *After this fix:* ` SELECT ... FROM "posts" INNER JOIN "authors" ON ... INNER JOIN "authors" "authors_categorizations" ON ... ` Before 5.2, Rails aliased the joins, but wrongfully transformed them into a LEFT OUTER JOIN. This fix will keep them as INNER JOINS, but make sure child joins are aliased, to avoid errors.
-
由 Matthew Draper 提交于
PERF: avoid allocating column names where possible
-
由 Sam 提交于
When requesting columns names from database adapters AR:Result would dup/freeze column names, this prefers using fstrings which cuts down on repeat allocations Attributes that are retained keep these fstrings around for the long term Note, this has the highest impact on "short" result sets, eg: Topic.first where you can void allocating the number of columns * String.
-
- 05 6月, 2018 4 次提交
-
-
由 Eileen M. Uchitelle 提交于
Migrations will raise an exception if there are multiple column defin…
-
由 Eileen M. Uchitelle 提交于
Fix testing guide typo
-
由 Ryuta Kamizono 提交于
Correct default value of `unknown_asset_fallback` [ci skip]
-
由 James Adam 提交于
`Rails.application.config.assets.unknown_asset_fallback` now defaults to `false` in an unmodified Rails application. [ci skip]
-
- 04 6月, 2018 4 次提交
-
-
由 Ryuta Kamizono 提交于
Should be done before `before_add` callbacks.
-
由 yuuji.yaginuma 提交于
`:nodoc:` is specified, but unfortunately, it is exposed in the API doc. http://edgeapi.rubyonrails.org/classes/Enumerable.html#method-i-_original_sum_with_required_identity If the method of the `alias` destination is public, the specification of `:nodoc:` does not seem to work.
-
由 George Claghorn 提交于
-
由 Ryuta Kamizono 提交于
Since a record is already persisted in `after_create_commit`, so `save` should invoke only `after_update_commit`. This bug is caused by depending on `@_start_transaction_state` for rollback to consider whether it was `new_record` before being committed. If after commit callbacks caused another commit, the state before last commit is no longer `new_record`. Fixes #32831. Closes #18367. Closes #31106.
-
- 03 6月, 2018 2 次提交
-
-
由 yuuji.yaginuma 提交于
Since #32289, `Spellchecker.suggest` returns only one value, multiple suggestions not output.
-
由 Ryuta Kamizono 提交于
Fixes #32806.
-
- 02 6月, 2018 4 次提交
-
-
由 Jon Evans 提交于
-
由 Prem Sichanugrist 提交于
Capitalize class name 'Product' in layouts and rendering guide.
-
由 Federico Martinez 提交于
-
由 Rafael França 提交于
ActiveStorage reflection
-
- 01 6月, 2018 9 次提交
-
-
由 George Claghorn 提交于
Remove 'Current.' prefix from example.
-
由 Ryuta Kamizono 提交于
CI against MariaDB 10.3
-
由 Ryuta Kamizono 提交于
[skip ci] Add changelog about bumping minimum SQLite version to 3.8
-
由 Yasuo Honda 提交于
Related to #32923
-
由 Yong Bakos 提交于
The prior sentence is referring just to an existing user object, so the sudden magical 'Current.' prefix doesn't make sense. Remove it.
-
由 Yong Bakos 提交于
In this context, the phrase 'product instance' refers to the Product class, so capitalize it.
-
由 Yasuo Honda 提交于
- MariaDB 10.3.7 is the first GA release https://mariadb.com/kb/en/library/mariadb-1037-release-notes/ - MariaDB 10.3 translates `LENGTH()` to `OCTET_LENGTH()` function https://mariadb.com/kb/en/library/sql_modeoracle-from-mariadb-103/ > MariaDB translates LENGTH() to OCTET_LENGTH() - MySQL does NOT translate `LENGTH()` to `OCTET_LENGTH()` However, it translates `OCTET_LENGTH()` to `LENGTH()` Here are generated schema dumps of this test to show the differences between MySQL and MariaDB: * MySQL 8.0 (Server version: 8.0.11 MySQL Community Server - GPL) ```ruby create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t| t.string \"name\" t.virtual \"upper_name\", type: :string, as: \"upper(`name`)\" t.virtual \"name_length\", type: :integer, as: \"length(`name`)\", stored: true t.virtual \"name_octet_length\", type: :integer, as: \"length(`name`)\", stored: true end ``` * Maria DB 10.3 (Server version: 10.3.7-MariaDB-1:10.3.7+maria~bionic-log mariadb.org binary distribution) ```ruby create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t| t.string \"name\" t.virtual \"upper_name\", type: :string, as: \"ucase(`name`)\" t.virtual \"name_length\", type: :integer, as: \"octet_length(`name`)\", stored: true t.virtual \"name_octet_length\", type: :integer, as: \"octet_length(`name`)\", stored: true end ```
-
由 Kevin Deisz 提交于
-
由 Rafael França 提交于
Remove mocha from action cable
-
- 31 5月, 2018 8 次提交
-
-
由 utilum 提交于
Q.E.D.
-
由 utilum 提交于
-
由 utilum 提交于
-
由 Kevin Deisz 提交于
-
由 Kasper Timm Hansen 提交于
"brethen" is misspelled and could be clearer
-
由 Michael Gee 提交于
-
由 George Claghorn 提交于
-
由 George Claghorn 提交于
-