We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9211043 commit 0912e3bCopy full SHA for 0912e3b
2 files changed
ruby/ql/test/query-tests/performance/DatabaseQueryInLoop/DatabaseQueryInLoop.qlref
@@ -1 +1,2 @@
1
-queries/performance/DatabaseQueryInLoop.ql
+query: queries/performance/DatabaseQueryInLoop.ql
2
+postprocess: utils/test/InlineExpectationsTestQuery.ql
ruby/ql/test/query-tests/performance/DatabaseQueryInLoop/DatabaseQueryInLoop.rb
@@ -8,15 +8,15 @@ def test
8
9
# simple query in loop
10
names.map do |name|
11
- User.where(login: name).pluck(:id).first
+ User.where(login: name).pluck(:id).first # $ Alert
12
end
13
14
# nested loop
15
16
- user = User.where(login: name).pluck(:id).first
+ user = User.where(login: name).pluck(:id).first # $ Alert
17
18
ids.map do |user_id|
19
- User.where(id: user_id).pluck(:id).first
+ User.where(id: user_id).pluck(:id).first # $ Alert
20
21
22
0 commit comments