| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch has two main portions:
1. Add SQL comment support to Arel via Arel::Nodes::Comment.
2. Implement a Relation#annotate method on top of that.
== Adding SQL comment support
Adds a new Arel::Nodes::Comment node that represents an optional SQL
comment and teachers the relevant visitors how to handle it.
Comment nodes may be added to the basic CRUD statement nodes and set
through any of the four (Select|Insert|Update|Delete)Manager objects.
For example:
manager = Arel::UpdateManager.new
manager.table table
manager.comment("annotation")
manager.to_sql # UPDATE "users" /* annotation */
This new node type will be used by ActiveRecord::Relation to enable
query annotation via SQL comments.
== Implementing the Relation#annotate method
Implements `ActiveRecord::Relation#annotate`, which accepts a comment
string that will be appeneded to any queries generated by the relation.
Some examples:
relation = Post.where(id: 123).annotate("metadata string")
relation.first
# SELECT "posts".* FROM "posts" WHERE "posts"."id" = 123
# LIMIT 1 /* metadata string */
class Tag < ActiveRecord::Base
scope :foo_annotated, -> { annotate("foo") }
end
Tag.foo_annotated.annotate("bar").first
# SELECT "tags".* FROM "tags" LIMIT 1 /* foo */ /* bar */
Also wires up the plumbing so this works with `#update_all` and
`#delete_all` as well.
This feature is useful for instrumentation and general analysis of
queries generated at runtime.
|
|
|
|
|
| |
We added ActiveSupport::Notifications instrumentation of the processing of each middleware in the stack,
See 04ae0b0b5e594e0bb99c5cd608921745977bcdcd.
|
|
|
|
| |
generators""
|
| |
|
|
|
| |
[Alex Kitchens, Prathamesh Sonpatki]
|
|
|
|
|
|
| |
These are introduced after Rails 6.0.0 beta2.
[ci skip]
|
|
|
|
| |
See #33912.
|
|\
| |
| |
| | |
v6.0.0.beta3 release
|
| |
| |
| |
| |
| |
| |
| | |
* Update RAILS_VERSION
* Bundle
* rake update_versions
* rake changelog:header
|
|\ \
| | |
| | | |
Fix warnings from Guides generation
|
| | |
| | |
| | |
| | |
| | |
| | | |
https://github.com/rails/rails/pull/35036 AV warns about not having the compiled container.
Use the suggested with_empty_template_cache to overcome warning
|
|\ \ \
| |/ /
|/| | |
Add note about has_many associations callbacks [ci skip]
|
| | |
| | |
| | |
| | | |
Add a note explaining when the has_many associations callbacks will be called or not.
|
|\ \ \
| | | |
| | | | |
Add `config.credentials.content_path` and `config.credentials.key_path` to the guide
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
the guide
- Fix some typos
Follow up #33962
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
[ci skip]
- Instead of the note at the end, added an example of how the output
looks by using the expanded switch.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
abhaynikam/35492-follow-up-to-updates-links-to-https
Updated links from http to https in guides, docs, etc
|
| | |/ /
| |/| | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Fix parent class of model test example
* include ActiveJob::TestHelper
[ci skip]
|
|/ / / |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Replace “can not” with “cannot”.
|
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
That is happened with `distinct`, and that is not only happened on MyS
L, but also on PostgreSQL, SQL Server, and Oracle.
[ci skip]
|
| | |
| | |
| | |
| | | |
supports it.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In e8546aba904fb6685ef2e61f1623c64e699a2c9c, the Getting Started guide
was updated to reflect the removal of CoffeeScript stubs being generated
by the controller generator. However, the comment above the table of
generated files wasn't updated, so it incorrectly remained "This creates
five files and one empty directory". This fixes it to now say "This
creates four files and one empty directory".
|
|\ \ \
| | | |
| | | | |
Add reselect method
|
| |\ \ \ |
|
| |\ \ \ \ |
|
| |\ \ \ \ \ |
|
| | | | | | | |
|
| |_|_|_|_|/
|/| | | | | |
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
abhaynikam/update-getting-started-doc-for-migration-version-in-rails-6
Update migration version to 6.0 in the getting started doc [ci skip]
|
| | | | | | | |
|
|/ / / / / / |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 6b69ae5149f03c2f81a795c085bce56ec18535ae, reversing
changes made to 84bd9adafde36d0192849649b86ffcd4e59e5e11.
Reason: We already use "happen" a lots for callbacks and validations.
https://github.com/rails/rails/pull/35324#issuecomment-465096483
[ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change 'happen' to a more technical term
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
(#35303)
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
[ci skip]
|