Commit 170b65b3 authored by Dylan Griffith's avatar Dylan Griffith

Remove hyperbolic tone from SQL guideline on pluck

The statement "Never use" is already sufficiently clear and does not
need to be prefixed with another level of hyperbole. It makes me
uncomfortable when I link people to this line of the docs since it feels
like such a hostile way to give someone feedback. We can remove the
passion from these docs and still convey the same importance.
parent 726c3103
...@@ -218,9 +218,9 @@ Project.select(:id, :user_id).joins(:merge_requests) ...@@ -218,9 +218,9 @@ Project.select(:id, :user_id).joins(:merge_requests)
## Plucking IDs ## Plucking IDs
This can't be stressed enough: **never** use ActiveRecord's `pluck` to pluck a Never use ActiveRecord's `pluck` to pluck a set of values into memory only to
set of values into memory only to use them as an argument for another query. For use them as an argument for another query. For example, this will execute an
example, this will make the database **very** sad: extra unecessary database query and load a lot of unecessary data into memory:
```ruby ```ruby
projects = Project.all.pluck(:id) projects = Project.all.pluck(:id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment