trace_location 0.9.3 → 0.9.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4414 @@
1
+ Generated by [trace_location](https://github.com/yhirano55/trace_location) at 2019-06-08 01:37:49 +0900
2
+
3
+ <details open>
4
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/instrumentation.rb:43</summary>
5
+
6
+ ##### ActionController::Instrumentation#render
7
+
8
+ ```ruby
9
+ def render(*args)
10
+ render_output = nil
11
+ self.view_runtime = cleanup_view_runtime do
12
+ Benchmark.ms { render_output = super }
13
+ end
14
+ render_output
15
+ end
16
+ # called from app/controllers/books_controller.rb:9
17
+ ```
18
+ </details>
19
+ <details open>
20
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/railties/controller_runtime.rb:27</summary>
21
+
22
+ ##### ActiveRecord::Railties::ControllerRuntime#cleanup_view_runtime
23
+
24
+ ```ruby
25
+ def cleanup_view_runtime
26
+ if logger && logger.info? && ActiveRecord::Base.connected?
27
+ db_rt_before_render = ActiveRecord::LogSubscriber.reset_runtime
28
+ self.db_runtime = (db_runtime || 0) + db_rt_before_render
29
+ runtime = super
30
+ db_rt_after_render = ActiveRecord::LogSubscriber.reset_runtime
31
+ self.db_runtime += db_rt_after_render
32
+ runtime - db_rt_after_render
33
+ else
34
+ super
35
+ end
36
+ end
37
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/instrumentation.rb:45
38
+ ```
39
+ </details>
40
+ <details open>
41
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:122</summary>
42
+
43
+ ##### ActiveRecord::ConnectionHandling.connected?
44
+
45
+ ```ruby
46
+ def connected?
47
+ connection_handler.connected?(connection_specification_name)
48
+ end
49
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/railties/controller_runtime.rb:28
50
+ ```
51
+ </details>
52
+ <details open>
53
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/core.rb:130</summary>
54
+
55
+ ##### ActiveRecord::Base.connection_handler
56
+
57
+ ```ruby
58
+ def self.connection_handler
59
+ ActiveRecord::RuntimeRegistry.connection_handler || default_connection_handler
60
+ end
61
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:123
62
+ ```
63
+ </details>
64
+ <details open>
65
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:20</summary>
66
+
67
+ ##### ActiveRecord::RuntimeRegistry.connection_handler
68
+
69
+ ```ruby
70
+ class_eval %{ def self.#{val}; instance.#{val}; end }, __FILE__, __LINE__
71
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/core.rb:131
72
+ ```
73
+ </details>
74
+ <details open>
75
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:96</summary>
76
+
77
+ ##### ActiveRecord::ConnectionHandling.connection_specification_name
78
+
79
+ ```ruby
80
+ def connection_specification_name
81
+ if !defined?(@connection_specification_name) || @connection_specification_name.nil?
82
+ return self == Base ? "primary" : superclass.connection_specification_name
83
+ end
84
+ @connection_specification_name
85
+ end
86
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:123
87
+ ```
88
+ </details>
89
+ <details open>
90
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1019</summary>
91
+
92
+ ##### ActiveRecord::ConnectionAdapters::ConnectionHandler#connected?
93
+
94
+ ```ruby
95
+ def connected?(spec_name)
96
+ conn = retrieve_connection_pool(spec_name)
97
+ conn && conn.connected?
98
+ end
99
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:123
100
+ ```
101
+ </details>
102
+ <details open>
103
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1039</summary>
104
+
105
+ ##### ActiveRecord::ConnectionAdapters::ConnectionHandler#retrieve_connection_pool
106
+
107
+ ```ruby
108
+ def retrieve_connection_pool(spec_name)
109
+ owner_to_pool.fetch(spec_name) do
110
+ # Check if a connection was previously established in an ancestor process,
111
+ # which may have been forked.
112
+ if ancestor_pool = pool_from_any_process_for(spec_name)
113
+ # A connection was established in an ancestor process that must have
114
+ # subsequently forked. We can't reuse the connection, but we can copy
115
+ # the specification and establish a new connection with it.
116
+ establish_connection(ancestor_pool.spec.to_hash).tap do |pool|
117
+ pool.schema_cache = ancestor_pool.schema_cache if ancestor_pool.schema_cache
118
+ end
119
+ else
120
+ owner_to_pool[spec_name] = nil
121
+ end
122
+ end
123
+ end
124
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1020
125
+ ```
126
+ </details>
127
+ <details open>
128
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1058</summary>
129
+
130
+ ##### ActiveRecord::ConnectionAdapters::ConnectionHandler#owner_to_pool
131
+
132
+ ```ruby
133
+ def owner_to_pool
134
+ @owner_to_pool[Process.pid]
135
+ end
136
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1040
137
+ ```
138
+ </details>
139
+ <details open>
140
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:422</summary>
141
+
142
+ ##### ActiveRecord::ConnectionAdapters::ConnectionPool#connected?
143
+
144
+ ```ruby
145
+ def connected?
146
+ synchronize { @connections.any? }
147
+ end
148
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1021
149
+ ```
150
+ </details>
151
+ <details open>
152
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:15</summary>
153
+
154
+ ##### ActiveRecord::LogSubscriber.reset_runtime
155
+
156
+ ```ruby
157
+ def self.reset_runtime
158
+ rt, self.runtime = runtime, 0
159
+ rt
160
+ end
161
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/railties/controller_runtime.rb:29
162
+ ```
163
+ </details>
164
+ <details open>
165
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:11</summary>
166
+
167
+ ##### ActiveRecord::LogSubscriber.runtime
168
+
169
+ ```ruby
170
+ def self.runtime
171
+ ActiveRecord::RuntimeRegistry.sql_runtime ||= 0
172
+ end
173
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:16
174
+ ```
175
+ </details>
176
+ <details open>
177
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:20</summary>
178
+
179
+ ##### ActiveRecord::RuntimeRegistry.sql_runtime
180
+
181
+ ```ruby
182
+ class_eval %{ def self.#{val}; instance.#{val}; end }, __FILE__, __LINE__
183
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:12
184
+ ```
185
+ </details>
186
+ <details open>
187
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:7</summary>
188
+
189
+ ##### ActiveRecord::LogSubscriber.runtime=
190
+
191
+ ```ruby
192
+ def self.runtime=(value)
193
+ ActiveRecord::RuntimeRegistry.sql_runtime = value
194
+ end
195
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:16
196
+ ```
197
+ </details>
198
+ <details open>
199
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:21</summary>
200
+
201
+ ##### ActiveRecord::RuntimeRegistry.sql_runtime=
202
+
203
+ ```ruby
204
+ class_eval %{ def self.#{val}=(x); instance.#{val}=x; end }, __FILE__, __LINE__
205
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:8
206
+ ```
207
+ </details>
208
+ <details open>
209
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/instrumentation.rb:86</summary>
210
+
211
+ ##### ActiveRecord::Railties::ControllerRuntime#cleanup_view_runtime
212
+
213
+ ```ruby
214
+ def cleanup_view_runtime
215
+ if logger && logger.info? && ActiveRecord::Base.connected?
216
+ db_rt_before_render = ActiveRecord::LogSubscriber.reset_runtime
217
+ self.db_runtime = (db_runtime || 0) + db_rt_before_render
218
+ runtime = super
219
+ db_rt_after_render = ActiveRecord::LogSubscriber.reset_runtime
220
+ self.db_runtime += db_rt_after_render
221
+ runtime - db_rt_after_render
222
+ else
223
+ super
224
+ end
225
+ end
226
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/railties/controller_runtime.rb:31
227
+ ```
228
+ </details>
229
+ <details open>
230
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:34</summary>
231
+
232
+ ##### ActionController::Instrumentation#render
233
+
234
+ ```ruby
235
+ def render(*args)
236
+ render_output = nil
237
+ self.view_runtime = cleanup_view_runtime do
238
+ Benchmark.ms { render_output = super }
239
+ end
240
+ render_output
241
+ end
242
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/instrumentation.rb:46
243
+ ```
244
+ </details>
245
+ <details open>
246
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:23</summary>
247
+
248
+ ##### ActionController::Instrumentation#render
249
+
250
+ ```ruby
251
+ def render(*args)
252
+ render_output = nil
253
+ self.view_runtime = cleanup_view_runtime do
254
+ Benchmark.ms { render_output = super }
255
+ end
256
+ render_output
257
+ end
258
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:36
259
+ ```
260
+ </details>
261
+ <details open>
262
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:116</summary>
263
+
264
+ ##### AbstractController::Rendering#_normalize_render
265
+
266
+ ```ruby
267
+ def _normalize_render(*args, &block) # :nodoc:
268
+ options = _normalize_args(*args, &block)
269
+ _process_variant(options)
270
+ _normalize_options(options)
271
+ options
272
+ end
273
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:24
274
+ ```
275
+ </details>
276
+ <details open>
277
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:82</summary>
278
+
279
+ ##### ActionController::Rendering#_normalize_args
280
+
281
+ ```ruby
282
+ def _normalize_args(action = nil, options = {}, &blk)
283
+ options = super
284
+ options[:update] = blk if block_given?
285
+ options
286
+ end
287
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:117
288
+ ```
289
+ </details>
290
+ <details open>
291
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:78</summary>
292
+
293
+ ##### ActionController::Rendering#_normalize_args
294
+
295
+ ```ruby
296
+ def _normalize_args(action = nil, options = {}, &blk)
297
+ options = super
298
+ options[:update] = blk if block_given?
299
+ options
300
+ end
301
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:83
302
+ ```
303
+ </details>
304
+ <details open>
305
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:57</summary>
306
+
307
+ ##### ActionController::Rendering#_process_variant
308
+
309
+ ```ruby
310
+ def _process_variant(options)
311
+ if defined?(request) && !request.nil? && request.variant.present?
312
+ options[:variant] = request.variant
313
+ end
314
+ end
315
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:118
316
+ ```
317
+ </details>
318
+ <details open>
319
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_negotiation.rb:100</summary>
320
+
321
+ ##### ActionDispatch::Http::MimeNegotiation#variant
322
+
323
+ ```ruby
324
+ def variant
325
+ @variant ||= ActiveSupport::ArrayInquirer.new
326
+ end
327
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:58
328
+ ```
329
+ </details>
330
+ <details open>
331
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:89</summary>
332
+
333
+ ##### ActionController::Rendering#_normalize_options
334
+
335
+ ```ruby
336
+ def _normalize_options(options)
337
+ _normalize_text(options)
338
+
339
+ if options[:html]
340
+ options[:html] = ERB::Util.html_escape(options[:html])
341
+ end
342
+
343
+ if options[:status]
344
+ options[:status] = Rack::Utils.status_code(options[:status])
345
+ end
346
+
347
+ super
348
+ end
349
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:119
350
+ ```
351
+ </details>
352
+ <details open>
353
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:103</summary>
354
+
355
+ ##### ActionController::Rendering#_normalize_text
356
+
357
+ ```ruby
358
+ def _normalize_text(options)
359
+ RENDER_FORMATS_IN_PRIORITY.each do |format|
360
+ if options.key?(format) && options[format].respond_to?(:to_text)
361
+ options[format] = options[format].to_text
362
+ end
363
+ end
364
+ end
365
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:90
366
+ ```
367
+ </details>
368
+ <details open>
369
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:93</summary>
370
+
371
+ ##### ActionController::Rendering#_normalize_options
372
+
373
+ ```ruby
374
+ def _normalize_options(options)
375
+ _normalize_text(options)
376
+
377
+ if options[:html]
378
+ options[:html] = ERB::Util.html_escape(options[:html])
379
+ end
380
+
381
+ if options[:status]
382
+ options[:status] = Rack::Utils.status_code(options[:status])
383
+ end
384
+
385
+ super
386
+ end
387
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:100
388
+ ```
389
+ </details>
390
+ <details open>
391
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:141</summary>
392
+
393
+ ##### ActionController::Renderers#render_to_body
394
+
395
+ ```ruby
396
+ def render_to_body(options)
397
+ _render_to_body_with_renderer(options) || super
398
+ end
399
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:25
400
+ ```
401
+ </details>
402
+ <details open>
403
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:145</summary>
404
+
405
+ ##### ActionController::Renderers#_render_to_body_with_renderer
406
+
407
+ ```ruby
408
+ def _render_to_body_with_renderer(options)
409
+ _renderers.each do |name|
410
+ if options.key?(name)
411
+ _process_options(options)
412
+ method_name = Renderers._render_with_renderer_method_name(name)
413
+ return send(method_name, options.delete(name), options)
414
+ end
415
+ end
416
+ nil
417
+ end
418
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:142
419
+ ```
420
+ </details>
421
+ <details open>
422
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:112</summary>
423
+
424
+ ##### ActionController::Rendering#_process_options
425
+
426
+ ```ruby
427
+ def _process_options(options)
428
+ status, content_type, location = options.values_at(:status, :content_type, :location)
429
+
430
+ self.status = status if status
431
+ self.content_type = content_type if content_type
432
+ headers["Location"] = url_for(location) if location
433
+
434
+ super
435
+ end
436
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:148
437
+ ```
438
+ </details>
439
+ <details open>
440
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:98</summary>
441
+
442
+ ##### ActionController::Rendering#_process_options
443
+
444
+ ```ruby
445
+ def _process_options(options)
446
+ status, content_type, location = options.values_at(:status, :content_type, :location)
447
+
448
+ self.status = status if status
449
+ self.content_type = content_type if content_type
450
+ headers["Location"] = url_for(location) if location
451
+
452
+ super
453
+ end
454
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:119
455
+ ```
456
+ </details>
457
+ <details open>
458
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:91</summary>
459
+
460
+ ##### ActionController::Renderers._render_with_renderer_method_name
461
+
462
+ ```ruby
463
+ def self._render_with_renderer_method_name(key)
464
+ "_render_with_renderer_#{key}"
465
+ end
466
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:149
467
+ ```
468
+ </details>
469
+ <details open>
470
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:156</summary>
471
+
472
+ ##### ActionController::Renderers#_render_with_renderer_json
473
+
474
+ ```ruby
475
+ add :json do |json, options|
476
+ json = json.to_json(options) unless json.kind_of?(String)
477
+
478
+ if options[:callback].present?
479
+ if content_type.nil? || content_type == Mime[:json]
480
+ self.content_type = Mime[:js]
481
+ end
482
+
483
+ "/**/#{options[:callback]}(#{json})"
484
+ else
485
+ self.content_type ||= Mime[:json]
486
+ json
487
+ end
488
+ end
489
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:150
490
+ ```
491
+ </details>
492
+ <details open>
493
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/delegation.rb:71</summary>
494
+
495
+ ##### ActiveRecord::Delegation#as_json
496
+
497
+ ```ruby
498
+ delegate :to_xml, :encode_with, :length, :each, :uniq, :join,
499
+ :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
500
+ :to_sentence, :to_formatted_s, :as_json,
501
+ :shuffle, :split, :slice, :index, :rindex, to: :records
502
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/json/encoding.rb:35
503
+ ```
504
+ </details>
505
+ <details open>
506
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:199</summary>
507
+
508
+ ##### ActiveRecord::Relation#records
509
+
510
+ ```ruby
511
+ def records # :nodoc:
512
+ load
513
+ @records
514
+ end
515
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/delegation.rb:71
516
+ ```
517
+ </details>
518
+ <details open>
519
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:421</summary>
520
+
521
+ ##### ActiveRecord::Relation#load
522
+
523
+ ```ruby
524
+ def load(&block)
525
+ exec_queries(&block) unless loaded?
526
+
527
+ self
528
+ end
529
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:200
530
+ ```
531
+ </details>
532
+ <details open>
533
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:546</summary>
534
+
535
+ ##### ActiveRecord::Relation#exec_queries
536
+
537
+ ```ruby
538
+ def exec_queries(&block)
539
+ skip_query_cache_if_necessary do
540
+ @records =
541
+ if eager_loading?
542
+ apply_join_dependency do |relation, join_dependency|
543
+ if ActiveRecord::NullRelation === relation
544
+ []
545
+ else
546
+ relation = join_dependency.apply_column_aliases(relation)
547
+ rows = connection.select_all(relation.arel, "SQL")
548
+ join_dependency.instantiate(rows, &block)
549
+ end.freeze
550
+ end
551
+ else
552
+ klass.find_by_sql(arel, &block).freeze
553
+ end
554
+
555
+ preload = preload_values
556
+ preload += includes_values unless eager_loading?
557
+ preloader = nil
558
+ preload.each do |associations|
559
+ preloader ||= build_preloader
560
+ preloader.preload @records, associations
561
+ end
562
+
563
+ @records.each(&:readonly!) if readonly_value
564
+
565
+ @loaded = true
566
+ @records
567
+ end
568
+ end
569
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:422
570
+ ```
571
+ </details>
572
+ <details open>
573
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:578</summary>
574
+
575
+ ##### ActiveRecord::Relation#skip_query_cache_if_necessary
576
+
577
+ ```ruby
578
+ def skip_query_cache_if_necessary
579
+ if skip_query_cache_value
580
+ uncached do
581
+ yield
582
+ end
583
+ else
584
+ yield
585
+ end
586
+ end
587
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:547
588
+ ```
589
+ </details>
590
+ <details open>
591
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
592
+
593
+ ##### ActiveRecord::QueryMethods#skip_query_cache_value
594
+
595
+ ```ruby
596
+ def #{method_name} # def includes_values
597
+ get_value(#{name.inspect}) # get_value(:includes)
598
+ end # end
599
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:579
600
+ ```
601
+ </details>
602
+ <details open>
603
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
604
+
605
+ ##### ActiveRecord::QueryMethods#get_value
606
+
607
+ ```ruby
608
+ def get_value(name) # :nodoc:
609
+ @values.fetch(name, DEFAULT_VALUES[name])
610
+ end
611
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
612
+ ```
613
+ </details>
614
+ <details open>
615
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:472</summary>
616
+
617
+ ##### ActiveRecord::Relation#eager_loading?
618
+
619
+ ```ruby
620
+ def eager_loading?
621
+ @should_eager_load ||=
622
+ eager_load_values.any? ||
623
+ includes_values.any? && (joined_includes_values.any? || references_eager_loaded_tables?)
624
+ end
625
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:549
626
+ ```
627
+ </details>
628
+ <details open>
629
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
630
+
631
+ ##### ActiveRecord::QueryMethods#eager_load_values
632
+
633
+ ```ruby
634
+ def #{method_name} # def includes_values
635
+ get_value(#{name.inspect}) # get_value(:includes)
636
+ end # end
637
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:474
638
+ ```
639
+ </details>
640
+ <details open>
641
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
642
+
643
+ ##### ActiveRecord::QueryMethods#get_value
644
+
645
+ ```ruby
646
+ def get_value(name) # :nodoc:
647
+ @values.fetch(name, DEFAULT_VALUES[name])
648
+ end
649
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
650
+ ```
651
+ </details>
652
+ <details open>
653
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
654
+
655
+ ##### ActiveRecord::QueryMethods#includes_values
656
+
657
+ ```ruby
658
+ def #{method_name} # def includes_values
659
+ get_value(#{name.inspect}) # get_value(:includes)
660
+ end # end
661
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:475
662
+ ```
663
+ </details>
664
+ <details open>
665
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
666
+
667
+ ##### ActiveRecord::QueryMethods#get_value
668
+
669
+ ```ruby
670
+ def get_value(name) # :nodoc:
671
+ @values.fetch(name, DEFAULT_VALUES[name])
672
+ end
673
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
674
+ ```
675
+ </details>
676
+ <details open>
677
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:902</summary>
678
+
679
+ ##### ActiveRecord::QueryMethods#arel
680
+
681
+ ```ruby
682
+ def arel(aliases = nil) # :nodoc:
683
+ @arel ||= build_arel(aliases)
684
+ end
685
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:560
686
+ ```
687
+ </details>
688
+ <details open>
689
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:926</summary>
690
+
691
+ ##### ActiveRecord::QueryMethods#build_arel
692
+
693
+ ```ruby
694
+ def build_arel(aliases)
695
+ arel = Arel::SelectManager.new(table)
696
+
697
+ aliases = build_joins(arel, joins_values.flatten, aliases) unless joins_values.empty?
698
+ build_left_outer_joins(arel, left_outer_joins_values.flatten, aliases) unless left_outer_joins_values.empty?
699
+
700
+ arel.where(where_clause.ast) unless where_clause.empty?
701
+ arel.having(having_clause.ast) unless having_clause.empty?
702
+ if limit_value
703
+ limit_attribute = ActiveModel::Attribute.with_cast_value(
704
+ "LIMIT".freeze,
705
+ connection.sanitize_limit(limit_value),
706
+ Type.default_value,
707
+ )
708
+ arel.take(Arel::Nodes::BindParam.new(limit_attribute))
709
+ end
710
+ if offset_value
711
+ offset_attribute = ActiveModel::Attribute.with_cast_value(
712
+ "OFFSET".freeze,
713
+ offset_value.to_i,
714
+ Type.default_value,
715
+ )
716
+ arel.skip(Arel::Nodes::BindParam.new(offset_attribute))
717
+ end
718
+ arel.group(*arel_columns(group_values.uniq.reject(&:blank?))) unless group_values.empty?
719
+
720
+ build_order(arel)
721
+
722
+ build_select(arel)
723
+
724
+ arel.distinct(distinct_value)
725
+ arel.from(build_from) unless from_clause.empty?
726
+ arel.lock(lock_value) if lock_value
727
+
728
+ arel
729
+ end
730
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:903
731
+ ```
732
+ </details>
733
+ <details open>
734
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:10</summary>
735
+
736
+ ##### Arel::SelectManager#initialize
737
+
738
+ ```ruby
739
+ def initialize table = nil
740
+ super()
741
+ @ast = Nodes::SelectStatement.new
742
+ @ctx = @ast.cores.last
743
+ from table
744
+ end
745
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:927
746
+ ```
747
+ </details>
748
+ <details open>
749
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/tree_manager.rb:10</summary>
750
+
751
+ ##### Arel::SelectManager#initialize
752
+
753
+ ```ruby
754
+ def initialize table = nil
755
+ super()
756
+ @ast = Nodes::SelectStatement.new
757
+ @ctx = @ast.cores.last
758
+ from table
759
+ end
760
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:11
761
+ ```
762
+ </details>
763
+ <details open>
764
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/select_core.rb:8</summary>
765
+
766
+ ##### Arel::Nodes::SelectCore#initialize
767
+
768
+ ```ruby
769
+ def initialize
770
+ super()
771
+ @source = JoinSource.new nil
772
+ @top = nil
773
+
774
+ # http://savage.net.au/SQL/sql-92.bnf.html#set%20quantifier
775
+ @set_quantifier = nil
776
+ @projections = []
777
+ @wheres = []
778
+ @groups = []
779
+ @havings = []
780
+ @windows = []
781
+ end
782
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/select_statement.rb:8
783
+ ```
784
+ </details>
785
+ <details open>
786
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/join_source.rb:10</summary>
787
+
788
+ ##### Arel::Nodes::JoinSource#initialize
789
+
790
+ ```ruby
791
+ def initialize single_source, joinop = []
792
+ super
793
+ end
794
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/select_core.rb:10
795
+ ```
796
+ </details>
797
+ <details open>
798
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/binary.rb:7</summary>
799
+
800
+ ##### Arel::Nodes::JoinSource#initialize
801
+
802
+ ```ruby
803
+ def initialize single_source, joinop = []
804
+ super
805
+ end
806
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/join_source.rb:11
807
+ ```
808
+ </details>
809
+ <details open>
810
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/select_statement.rb:8</summary>
811
+
812
+ ##### Arel::Nodes::SelectStatement#initialize
813
+
814
+ ```ruby
815
+ def initialize cores = [SelectCore.new]
816
+ super()
817
+ @cores = cores
818
+ @orders = []
819
+ @limit = nil
820
+ @lock = nil
821
+ @offset = nil
822
+ @with = nil
823
+ end
824
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:12
825
+ ```
826
+ </details>
827
+ <details open>
828
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:88</summary>
829
+
830
+ ##### Arel::SelectManager#from
831
+
832
+ ```ruby
833
+ def from table
834
+ table = Nodes::SqlLiteral.new(table) if String === table
835
+
836
+ case table
837
+ when Nodes::Join
838
+ @ctx.source.right << table
839
+ else
840
+ @ctx.source.left = table
841
+ end
842
+
843
+ self
844
+ end
845
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:14
846
+ ```
847
+ </details>
848
+ <details open>
849
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
850
+
851
+ ##### ActiveRecord::QueryMethods#joins_values
852
+
853
+ ```ruby
854
+ def #{method_name} # def includes_values
855
+ get_value(#{name.inspect}) # get_value(:includes)
856
+ end # end
857
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:929
858
+ ```
859
+ </details>
860
+ <details open>
861
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
862
+
863
+ ##### ActiveRecord::QueryMethods#get_value
864
+
865
+ ```ruby
866
+ def get_value(name) # :nodoc:
867
+ @values.fetch(name, DEFAULT_VALUES[name])
868
+ end
869
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
870
+ ```
871
+ </details>
872
+ <details open>
873
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
874
+
875
+ ##### ActiveRecord::QueryMethods#left_outer_joins_values
876
+
877
+ ```ruby
878
+ def #{method_name} # def includes_values
879
+ get_value(#{name.inspect}) # get_value(:includes)
880
+ end # end
881
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:930
882
+ ```
883
+ </details>
884
+ <details open>
885
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
886
+
887
+ ##### ActiveRecord::QueryMethods#get_value
888
+
889
+ ```ruby
890
+ def get_value(name) # :nodoc:
891
+ @values.fetch(name, DEFAULT_VALUES[name])
892
+ end
893
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
894
+ ```
895
+ </details>
896
+ <details open>
897
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
898
+
899
+ ##### ActiveRecord::QueryMethods#where_clause
900
+
901
+ ```ruby
902
+ def #{method_name} # def includes_values
903
+ get_value(#{name.inspect}) # get_value(:includes)
904
+ end # end
905
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:932
906
+ ```
907
+ </details>
908
+ <details open>
909
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
910
+
911
+ ##### ActiveRecord::QueryMethods#get_value
912
+
913
+ ```ruby
914
+ def get_value(name) # :nodoc:
915
+ @values.fetch(name, DEFAULT_VALUES[name])
916
+ end
917
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
918
+ ```
919
+ </details>
920
+ <details open>
921
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/where_clause.rb:6</summary>
922
+
923
+ ##### ActiveRecord::Relation::WhereClause#empty?
924
+
925
+ ```ruby
926
+ delegate :any?, :empty?, to: :predicates
927
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:932
928
+ ```
929
+ </details>
930
+ <details open>
931
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
932
+
933
+ ##### ActiveRecord::QueryMethods#having_clause
934
+
935
+ ```ruby
936
+ def #{method_name} # def includes_values
937
+ get_value(#{name.inspect}) # get_value(:includes)
938
+ end # end
939
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:933
940
+ ```
941
+ </details>
942
+ <details open>
943
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
944
+
945
+ ##### ActiveRecord::QueryMethods#get_value
946
+
947
+ ```ruby
948
+ def get_value(name) # :nodoc:
949
+ @values.fetch(name, DEFAULT_VALUES[name])
950
+ end
951
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
952
+ ```
953
+ </details>
954
+ <details open>
955
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/where_clause.rb:6</summary>
956
+
957
+ ##### ActiveRecord::Relation::WhereClause#empty?
958
+
959
+ ```ruby
960
+ delegate :any?, :empty?, to: :predicates
961
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:933
962
+ ```
963
+ </details>
964
+ <details open>
965
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
966
+
967
+ ##### ActiveRecord::QueryMethods#limit_value
968
+
969
+ ```ruby
970
+ def #{method_name} # def includes_values
971
+ get_value(#{name.inspect}) # get_value(:includes)
972
+ end # end
973
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:934
974
+ ```
975
+ </details>
976
+ <details open>
977
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
978
+
979
+ ##### ActiveRecord::QueryMethods#get_value
980
+
981
+ ```ruby
982
+ def get_value(name) # :nodoc:
983
+ @values.fetch(name, DEFAULT_VALUES[name])
984
+ end
985
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
986
+ ```
987
+ </details>
988
+ <details open>
989
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
990
+
991
+ ##### ActiveRecord::QueryMethods#offset_value
992
+
993
+ ```ruby
994
+ def #{method_name} # def includes_values
995
+ get_value(#{name.inspect}) # get_value(:includes)
996
+ end # end
997
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:942
998
+ ```
999
+ </details>
1000
+ <details open>
1001
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
1002
+
1003
+ ##### ActiveRecord::QueryMethods#get_value
1004
+
1005
+ ```ruby
1006
+ def get_value(name) # :nodoc:
1007
+ @values.fetch(name, DEFAULT_VALUES[name])
1008
+ end
1009
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
1010
+ ```
1011
+ </details>
1012
+ <details open>
1013
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
1014
+
1015
+ ##### ActiveRecord::QueryMethods#group_values
1016
+
1017
+ ```ruby
1018
+ def #{method_name} # def includes_values
1019
+ get_value(#{name.inspect}) # get_value(:includes)
1020
+ end # end
1021
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:950
1022
+ ```
1023
+ </details>
1024
+ <details open>
1025
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
1026
+
1027
+ ##### ActiveRecord::QueryMethods#get_value
1028
+
1029
+ ```ruby
1030
+ def get_value(name) # :nodoc:
1031
+ @values.fetch(name, DEFAULT_VALUES[name])
1032
+ end
1033
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
1034
+ ```
1035
+ </details>
1036
+ <details open>
1037
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1121</summary>
1038
+
1039
+ ##### ActiveRecord::QueryMethods#build_order
1040
+
1041
+ ```ruby
1042
+ def build_order(arel)
1043
+ orders = order_values.uniq
1044
+ orders.reject!(&:blank?)
1045
+
1046
+ arel.order(*orders) unless orders.empty?
1047
+ end
1048
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:952
1049
+ ```
1050
+ </details>
1051
+ <details open>
1052
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
1053
+
1054
+ ##### ActiveRecord::QueryMethods#order_values
1055
+
1056
+ ```ruby
1057
+ def #{method_name} # def includes_values
1058
+ get_value(#{name.inspect}) # get_value(:includes)
1059
+ end # end
1060
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1122
1061
+ ```
1062
+ </details>
1063
+ <details open>
1064
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
1065
+
1066
+ ##### ActiveRecord::QueryMethods#get_value
1067
+
1068
+ ```ruby
1069
+ def get_value(name) # :nodoc:
1070
+ @values.fetch(name, DEFAULT_VALUES[name])
1071
+ end
1072
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
1073
+ ```
1074
+ </details>
1075
+ <details open>
1076
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1042</summary>
1077
+
1078
+ ##### ActiveRecord::QueryMethods#build_select
1079
+
1080
+ ```ruby
1081
+ def build_select(arel)
1082
+ if select_values.any?
1083
+ arel.project(*arel_columns(select_values.uniq))
1084
+ elsif klass.ignored_columns.any?
1085
+ arel.project(*klass.column_names.map { |field| arel_attribute(field) })
1086
+ else
1087
+ arel.project(table[Arel.star])
1088
+ end
1089
+ end
1090
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:954
1091
+ ```
1092
+ </details>
1093
+ <details open>
1094
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
1095
+
1096
+ ##### ActiveRecord::QueryMethods#select_values
1097
+
1098
+ ```ruby
1099
+ def #{method_name} # def includes_values
1100
+ get_value(#{name.inspect}) # get_value(:includes)
1101
+ end # end
1102
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1043
1103
+ ```
1104
+ </details>
1105
+ <details open>
1106
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
1107
+
1108
+ ##### ActiveRecord::QueryMethods#get_value
1109
+
1110
+ ```ruby
1111
+ def get_value(name) # :nodoc:
1112
+ @values.fetch(name, DEFAULT_VALUES[name])
1113
+ end
1114
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
1115
+ ```
1116
+ </details>
1117
+ <details open>
1118
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:264</summary>
1119
+
1120
+ ##### ActiveRecord::ModelSchema::ClassMethods.ignored_columns
1121
+
1122
+ ```ruby
1123
+ def ignored_columns
1124
+ if defined?(@ignored_columns)
1125
+ @ignored_columns
1126
+ else
1127
+ superclass.ignored_columns
1128
+ end
1129
+ end
1130
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1045
1131
+ ```
1132
+ </details>
1133
+ <details open>
1134
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:264</summary>
1135
+
1136
+ ##### ActiveRecord::ModelSchema::ClassMethods.ignored_columns
1137
+
1138
+ ```ruby
1139
+ def ignored_columns
1140
+ if defined?(@ignored_columns)
1141
+ @ignored_columns
1142
+ else
1143
+ superclass.ignored_columns
1144
+ end
1145
+ end
1146
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:268
1147
+ ```
1148
+ </details>
1149
+ <details open>
1150
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:264</summary>
1151
+
1152
+ ##### ActiveRecord::ModelSchema::ClassMethods.ignored_columns
1153
+
1154
+ ```ruby
1155
+ def ignored_columns
1156
+ if defined?(@ignored_columns)
1157
+ @ignored_columns
1158
+ else
1159
+ superclass.ignored_columns
1160
+ end
1161
+ end
1162
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:268
1163
+ ```
1164
+ </details>
1165
+ <details open>
1166
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel.rb:33</summary>
1167
+
1168
+ ##### Arel.star
1169
+
1170
+ ```ruby
1171
+ def self.star
1172
+ sql '*'
1173
+ end
1174
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1048
1175
+ ```
1176
+ </details>
1177
+ <details open>
1178
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel.rb:29</summary>
1179
+
1180
+ ##### Arel.sql
1181
+
1182
+ ```ruby
1183
+ def self.sql raw_sql
1184
+ Arel::Nodes::SqlLiteral.new raw_sql
1185
+ end
1186
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel.rb:34
1187
+ ```
1188
+ </details>
1189
+ <details open>
1190
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/table.rb:80</summary>
1191
+
1192
+ ##### Arel::Table#[]
1193
+
1194
+ ```ruby
1195
+ def [] name
1196
+ ::Arel::Attribute.new self, name
1197
+ end
1198
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1048
1199
+ ```
1200
+ </details>
1201
+ <details open>
1202
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:133</summary>
1203
+
1204
+ ##### Arel::SelectManager#project
1205
+
1206
+ ```ruby
1207
+ def project *projections
1208
+ # FIXME: converting these to SQLLiterals is probably not good, but
1209
+ # rails tests require it.
1210
+ @ctx.projections.concat projections.map { |x|
1211
+ STRING_OR_SYMBOL_CLASS.include?(x.class) ? Nodes::SqlLiteral.new(x.to_s) : x
1212
+ }
1213
+ self
1214
+ end
1215
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:1048
1216
+ ```
1217
+ </details>
1218
+ <details open>
1219
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
1220
+
1221
+ ##### ActiveRecord::QueryMethods#distinct_value
1222
+
1223
+ ```ruby
1224
+ def #{method_name} # def includes_values
1225
+ get_value(#{name.inspect}) # get_value(:includes)
1226
+ end # end
1227
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:956
1228
+ ```
1229
+ </details>
1230
+ <details open>
1231
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
1232
+
1233
+ ##### ActiveRecord::QueryMethods#get_value
1234
+
1235
+ ```ruby
1236
+ def get_value(name) # :nodoc:
1237
+ @values.fetch(name, DEFAULT_VALUES[name])
1238
+ end
1239
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
1240
+ ```
1241
+ </details>
1242
+ <details open>
1243
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:150</summary>
1244
+
1245
+ ##### Arel::SelectManager#distinct
1246
+
1247
+ ```ruby
1248
+ def distinct(value = true)
1249
+ if value
1250
+ @ctx.set_quantifier = Arel::Nodes::Distinct.new
1251
+ else
1252
+ @ctx.set_quantifier = nil
1253
+ end
1254
+ self
1255
+ end
1256
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:956
1257
+ ```
1258
+ </details>
1259
+ <details open>
1260
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
1261
+
1262
+ ##### ActiveRecord::QueryMethods#from_clause
1263
+
1264
+ ```ruby
1265
+ def #{method_name} # def includes_values
1266
+ get_value(#{name.inspect}) # get_value(:includes)
1267
+ end # end
1268
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:957
1269
+ ```
1270
+ </details>
1271
+ <details open>
1272
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
1273
+
1274
+ ##### ActiveRecord::QueryMethods#get_value
1275
+
1276
+ ```ruby
1277
+ def get_value(name) # :nodoc:
1278
+ @values.fetch(name, DEFAULT_VALUES[name])
1279
+ end
1280
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
1281
+ ```
1282
+ </details>
1283
+ <details open>
1284
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/from_clause.rb:17</summary>
1285
+
1286
+ ##### ActiveRecord::Relation::FromClause#empty?
1287
+
1288
+ ```ruby
1289
+ def empty?
1290
+ value.nil?
1291
+ end
1292
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:957
1293
+ ```
1294
+ </details>
1295
+ <details open>
1296
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
1297
+
1298
+ ##### ActiveRecord::QueryMethods#lock_value
1299
+
1300
+ ```ruby
1301
+ def #{method_name} # def includes_values
1302
+ get_value(#{name.inspect}) # get_value(:includes)
1303
+ end # end
1304
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:958
1305
+ ```
1306
+ </details>
1307
+ <details open>
1308
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
1309
+
1310
+ ##### ActiveRecord::QueryMethods#get_value
1311
+
1312
+ ```ruby
1313
+ def get_value(name) # :nodoc:
1314
+ @values.fetch(name, DEFAULT_VALUES[name])
1315
+ end
1316
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
1317
+ ```
1318
+ </details>
1319
+ <details open>
1320
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/querying.rb:40</summary>
1321
+
1322
+ ##### ActiveRecord::Querying.find_by_sql
1323
+
1324
+ ```ruby
1325
+ def find_by_sql(sql, binds = [], preparable: nil, &block)
1326
+ result_set = connection.select_all(sanitize_sql(sql), "#{name} Load", binds, preparable: preparable)
1327
+ column_types = result_set.column_types.dup
1328
+ attribute_types.each_key { |k| column_types.delete k }
1329
+ message_bus = ActiveSupport::Notifications.instrumenter
1330
+
1331
+ payload = {
1332
+ record_count: result_set.length,
1333
+ class_name: name
1334
+ }
1335
+
1336
+ message_bus.instrument("instantiation.active_record", payload) do
1337
+ result_set.map { |record| instantiate(record, column_types, &block) }
1338
+ end
1339
+ end
1340
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:560
1341
+ ```
1342
+ </details>
1343
+ <details open>
1344
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:89</summary>
1345
+
1346
+ ##### ActiveRecord::ConnectionHandling.connection
1347
+
1348
+ ```ruby
1349
+ def connection
1350
+ retrieve_connection
1351
+ end
1352
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/querying.rb:41
1353
+ ```
1354
+ </details>
1355
+ <details open>
1356
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:117</summary>
1357
+
1358
+ ##### ActiveRecord::ConnectionHandling.retrieve_connection
1359
+
1360
+ ```ruby
1361
+ def retrieve_connection
1362
+ connection_handler.retrieve_connection(connection_specification_name)
1363
+ end
1364
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:90
1365
+ ```
1366
+ </details>
1367
+ <details open>
1368
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/core.rb:130</summary>
1369
+
1370
+ ##### ActiveRecord::Base.connection_handler
1371
+
1372
+ ```ruby
1373
+ def self.connection_handler
1374
+ ActiveRecord::RuntimeRegistry.connection_handler || default_connection_handler
1375
+ end
1376
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:118
1377
+ ```
1378
+ </details>
1379
+ <details open>
1380
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:20</summary>
1381
+
1382
+ ##### ActiveRecord::RuntimeRegistry.connection_handler
1383
+
1384
+ ```ruby
1385
+ class_eval %{ def self.#{val}; instance.#{val}; end }, __FILE__, __LINE__
1386
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/core.rb:131
1387
+ ```
1388
+ </details>
1389
+ <details open>
1390
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:96</summary>
1391
+
1392
+ ##### ActiveRecord::ConnectionHandling.connection_specification_name
1393
+
1394
+ ```ruby
1395
+ def connection_specification_name
1396
+ if !defined?(@connection_specification_name) || @connection_specification_name.nil?
1397
+ return self == Base ? "primary" : superclass.connection_specification_name
1398
+ end
1399
+ @connection_specification_name
1400
+ end
1401
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:118
1402
+ ```
1403
+ </details>
1404
+ <details open>
1405
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:96</summary>
1406
+
1407
+ ##### ActiveRecord::ConnectionHandling.connection_specification_name
1408
+
1409
+ ```ruby
1410
+ def connection_specification_name
1411
+ if !defined?(@connection_specification_name) || @connection_specification_name.nil?
1412
+ return self == Base ? "primary" : superclass.connection_specification_name
1413
+ end
1414
+ @connection_specification_name
1415
+ end
1416
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:98
1417
+ ```
1418
+ </details>
1419
+ <details open>
1420
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:96</summary>
1421
+
1422
+ ##### ActiveRecord::ConnectionHandling.connection_specification_name
1423
+
1424
+ ```ruby
1425
+ def connection_specification_name
1426
+ if !defined?(@connection_specification_name) || @connection_specification_name.nil?
1427
+ return self == Base ? "primary" : superclass.connection_specification_name
1428
+ end
1429
+ @connection_specification_name
1430
+ end
1431
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:98
1432
+ ```
1433
+ </details>
1434
+ <details open>
1435
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1011</summary>
1436
+
1437
+ ##### ActiveRecord::ConnectionAdapters::ConnectionHandler#retrieve_connection
1438
+
1439
+ ```ruby
1440
+ def retrieve_connection(spec_name) #:nodoc:
1441
+ pool = retrieve_connection_pool(spec_name)
1442
+ raise ConnectionNotEstablished, "No connection pool with '#{spec_name}' found." unless pool
1443
+ pool.connection
1444
+ end
1445
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:118
1446
+ ```
1447
+ </details>
1448
+ <details open>
1449
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1039</summary>
1450
+
1451
+ ##### ActiveRecord::ConnectionAdapters::ConnectionHandler#retrieve_connection_pool
1452
+
1453
+ ```ruby
1454
+ def retrieve_connection_pool(spec_name)
1455
+ owner_to_pool.fetch(spec_name) do
1456
+ # Check if a connection was previously established in an ancestor process,
1457
+ # which may have been forked.
1458
+ if ancestor_pool = pool_from_any_process_for(spec_name)
1459
+ # A connection was established in an ancestor process that must have
1460
+ # subsequently forked. We can't reuse the connection, but we can copy
1461
+ # the specification and establish a new connection with it.
1462
+ establish_connection(ancestor_pool.spec.to_hash).tap do |pool|
1463
+ pool.schema_cache = ancestor_pool.schema_cache if ancestor_pool.schema_cache
1464
+ end
1465
+ else
1466
+ owner_to_pool[spec_name] = nil
1467
+ end
1468
+ end
1469
+ end
1470
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1012
1471
+ ```
1472
+ </details>
1473
+ <details open>
1474
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1058</summary>
1475
+
1476
+ ##### ActiveRecord::ConnectionAdapters::ConnectionHandler#owner_to_pool
1477
+
1478
+ ```ruby
1479
+ def owner_to_pool
1480
+ @owner_to_pool[Process.pid]
1481
+ end
1482
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1040
1483
+ ```
1484
+ </details>
1485
+ <details open>
1486
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:381</summary>
1487
+
1488
+ ##### ActiveRecord::ConnectionAdapters::ConnectionPool#connection
1489
+
1490
+ ```ruby
1491
+ def connection
1492
+ @thread_cached_conns[connection_cache_key(@lock_thread || Thread.current)] ||= checkout
1493
+ end
1494
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1014
1495
+ ```
1496
+ </details>
1497
+ <details open>
1498
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:667</summary>
1499
+
1500
+ ##### ActiveRecord::ConnectionAdapters::ConnectionPool#connection_cache_key
1501
+
1502
+ ```ruby
1503
+ def connection_cache_key(thread)
1504
+ thread
1505
+ end
1506
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382
1507
+ ```
1508
+ </details>
1509
+ <details open>
1510
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/sanitization.rb:22</summary>
1511
+
1512
+ ##### ActiveRecord::Sanitization::ClassMethods.sanitize_sql_for_conditions
1513
+
1514
+ ```ruby
1515
+ def sanitize_sql_for_conditions(condition)
1516
+ return nil if condition.blank?
1517
+
1518
+ case condition
1519
+ when Array; sanitize_sql_array(condition)
1520
+ else condition
1521
+ end
1522
+ end
1523
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/querying.rb:41
1524
+ ```
1525
+ </details>
1526
+ <details open>
1527
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:95</summary>
1528
+
1529
+ ##### ActiveRecord::ConnectionAdapters::QueryCache#select_all
1530
+
1531
+ ```ruby
1532
+ def select_all(arel, name = nil, binds = [], preparable: nil)
1533
+ if @query_cache_enabled && !locked?(arel)
1534
+ arel = arel_from_relation(arel)
1535
+ sql, binds = to_sql_and_binds(arel, binds)
1536
+
1537
+ if preparable.nil?
1538
+ preparable = prepared_statements ? visitor.preparable : false
1539
+ end
1540
+
1541
+ cache_sql(sql, name, binds) { super(sql, name, binds, preparable: preparable) }
1542
+ else
1543
+ super
1544
+ end
1545
+ end
1546
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/querying.rb:41
1547
+ ```
1548
+ </details>
1549
+ <details open>
1550
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:135</summary>
1551
+
1552
+ ##### ActiveRecord::ConnectionAdapters::QueryCache#locked?
1553
+
1554
+ ```ruby
1555
+ def locked?(arel)
1556
+ arel = arel.arel if arel.is_a?(Relation)
1557
+ arel.respond_to?(:locked) && arel.locked
1558
+ end
1559
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:96
1560
+ ```
1561
+ </details>
1562
+ <details open>
1563
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/select_manager.rb:68</summary>
1564
+
1565
+ ##### Arel::SelectManager#locked
1566
+
1567
+ ```ruby
1568
+ def locked
1569
+ @ast.lock
1570
+ end
1571
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:137
1572
+ ```
1573
+ </details>
1574
+ <details open>
1575
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:498</summary>
1576
+
1577
+ ##### ActiveRecord::ConnectionAdapters::DatabaseStatements#arel_from_relation
1578
+
1579
+ ```ruby
1580
+ def arel_from_relation(relation)
1581
+ if relation.is_a?(Relation)
1582
+ relation.arel
1583
+ else
1584
+ relation
1585
+ end
1586
+ end
1587
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:97
1588
+ ```
1589
+ </details>
1590
+ <details open>
1591
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:17</summary>
1592
+
1593
+ ##### ActiveRecord::ConnectionAdapters::DatabaseStatements#to_sql_and_binds
1594
+
1595
+ ```ruby
1596
+ def to_sql_and_binds(arel_or_sql_string, binds = []) # :nodoc:
1597
+ if arel_or_sql_string.respond_to?(:ast)
1598
+ unless binds.empty?
1599
+ raise "Passing bind parameters with an arel AST is forbidden. " \
1600
+ "The values must be stored on the AST directly"
1601
+ end
1602
+
1603
+ if prepared_statements
1604
+ sql, binds = visitor.accept(arel_or_sql_string.ast, collector).value
1605
+
1606
+ if binds.length > bind_params_length
1607
+ unprepared_statement do
1608
+ sql, binds = to_sql_and_binds(arel_or_sql_string)
1609
+ visitor.preparable = false
1610
+ end
1611
+ end
1612
+ else
1613
+ sql = visitor.accept(arel_or_sql_string.ast, collector).value
1614
+ end
1615
+ [sql.freeze, binds]
1616
+ else
1617
+ visitor.preparable = false if prepared_statements
1618
+ [arel_or_sql_string.dup.freeze, binds]
1619
+ end
1620
+ end
1621
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:98
1622
+ ```
1623
+ </details>
1624
+ <details open>
1625
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:609</summary>
1626
+
1627
+ ##### ActiveRecord::ConnectionAdapters::AbstractAdapter#collector
1628
+
1629
+ ```ruby
1630
+ def collector
1631
+ if prepared_statements
1632
+ Arel::Collectors::Composite.new(
1633
+ Arel::Collectors::SQLString.new,
1634
+ Arel::Collectors::Bind.new,
1635
+ )
1636
+ else
1637
+ Arel::Collectors::SubstituteBinds.new(
1638
+ self,
1639
+ Arel::Collectors::SQLString.new,
1640
+ )
1641
+ end
1642
+ end
1643
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:25
1644
+ ```
1645
+ </details>
1646
+ <details open>
1647
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/sql_string.rb:8</summary>
1648
+
1649
+ ##### Arel::Collectors::SQLString#initialize
1650
+
1651
+ ```ruby
1652
+ def initialize(*)
1653
+ super
1654
+ @bind_index = 1
1655
+ end
1656
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:612
1657
+ ```
1658
+ </details>
1659
+ <details open>
1660
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/plain_string.rb:5</summary>
1661
+
1662
+ ##### Arel::Collectors::SQLString#initialize
1663
+
1664
+ ```ruby
1665
+ def initialize(*)
1666
+ super
1667
+ @bind_index = 1
1668
+ end
1669
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/sql_string.rb:9
1670
+ ```
1671
+ </details>
1672
+ <details open>
1673
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/bind.rb:6</summary>
1674
+
1675
+ ##### Arel::Collectors::Bind#initialize
1676
+
1677
+ ```ruby
1678
+ def initialize
1679
+ @binds = []
1680
+ end
1681
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:613
1682
+ ```
1683
+ </details>
1684
+ <details open>
1685
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:6</summary>
1686
+
1687
+ ##### Arel::Collectors::Composite#initialize
1688
+
1689
+ ```ruby
1690
+ def initialize(left, right)
1691
+ @left = left
1692
+ @right = right
1693
+ end
1694
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:611
1695
+ ```
1696
+ </details>
1697
+ <details open>
1698
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb:8</summary>
1699
+
1700
+ ##### ActiveRecord::ConnectionAdapters::DetermineIfPreparableVisitor#accept
1701
+
1702
+ ```ruby
1703
+ def accept(*)
1704
+ @preparable = true
1705
+ super
1706
+ end
1707
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:25
1708
+ ```
1709
+ </details>
1710
+ <details open>
1711
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:7</summary>
1712
+
1713
+ ##### ActiveRecord::ConnectionAdapters::DetermineIfPreparableVisitor#accept
1714
+
1715
+ ```ruby
1716
+ def accept(*)
1717
+ @preparable = true
1718
+ super
1719
+ end
1720
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb:10
1721
+ ```
1722
+ </details>
1723
+ <details open>
1724
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:13</summary>
1725
+
1726
+ ##### Arel::Visitors::Reduce#visit
1727
+
1728
+ ```ruby
1729
+ def visit object, collector
1730
+ dispatch_method = dispatch[object.class]
1731
+ send dispatch_method, object, collector
1732
+ rescue NoMethodError => e
1733
+ raise e if respond_to?(dispatch_method, true)
1734
+ superklass = object.class.ancestors.find { |klass|
1735
+ respond_to?(dispatch[klass], true)
1736
+ }
1737
+ raise(TypeError, "Cannot visit #{object.class}") unless superklass
1738
+ dispatch[object.class] = dispatch[superklass]
1739
+ retry
1740
+ end
1741
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:8
1742
+ ```
1743
+ </details>
1744
+ <details open>
1745
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/visitor.rb:25</summary>
1746
+
1747
+ ##### Arel::Visitors::Visitor#dispatch
1748
+
1749
+ ```ruby
1750
+ def dispatch
1751
+ @dispatch
1752
+ end
1753
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:14
1754
+ ```
1755
+ </details>
1756
+ <details open>
1757
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/sqlite.rb:12</summary>
1758
+
1759
+ ##### Arel::Visitors::SQLite#visit_Arel_Nodes_SelectStatement
1760
+
1761
+ ```ruby
1762
+ def visit_Arel_Nodes_SelectStatement o, collector
1763
+ o.limit = Arel::Nodes::Limit.new(-1) if o.offset && !o.limit
1764
+ super
1765
+ end
1766
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:15
1767
+ ```
1768
+ </details>
1769
+ <details open>
1770
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:210</summary>
1771
+
1772
+ ##### Arel::Visitors::SQLite#visit_Arel_Nodes_SelectStatement
1773
+
1774
+ ```ruby
1775
+ def visit_Arel_Nodes_SelectStatement o, collector
1776
+ o.limit = Arel::Nodes::Limit.new(-1) if o.offset && !o.limit
1777
+ super
1778
+ end
1779
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/sqlite.rb:14
1780
+ ```
1781
+ </details>
1782
+ <details open>
1783
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:240</summary>
1784
+
1785
+ ##### Arel::Visitors::ToSql#visit_Arel_Nodes_SelectCore
1786
+
1787
+ ```ruby
1788
+ def visit_Arel_Nodes_SelectCore o, collector
1789
+ collector << "SELECT"
1790
+
1791
+ collector = maybe_visit o.top, collector
1792
+
1793
+ collector = maybe_visit o.set_quantifier, collector
1794
+
1795
+ collect_nodes_for o.projections, collector, SPACE
1796
+
1797
+ if o.source && !o.source.empty?
1798
+ collector << " FROM "
1799
+ collector = visit o.source, collector
1800
+ end
1801
+
1802
+ collect_nodes_for o.wheres, collector, WHERE, AND
1803
+ collect_nodes_for o.groups, collector, GROUP_BY
1804
+ unless o.havings.empty?
1805
+ collector << " HAVING "
1806
+ inject_join o.havings, collector, AND
1807
+ end
1808
+ collect_nodes_for o.windows, collector, WINDOW
1809
+
1810
+ collector
1811
+ end
1812
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:217
1813
+ ```
1814
+ </details>
1815
+ <details open>
1816
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:11</summary>
1817
+
1818
+ ##### Arel::Collectors::Composite#<<
1819
+
1820
+ ```ruby
1821
+ def << str
1822
+ left << str
1823
+ right << str
1824
+ self
1825
+ end
1826
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:241
1827
+ ```
1828
+ </details>
1829
+ <details open>
1830
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/plain_string.rb:13</summary>
1831
+
1832
+ ##### Arel::Collectors::PlainString#<<
1833
+
1834
+ ```ruby
1835
+ def << str
1836
+ @str << str
1837
+ self
1838
+ end
1839
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:12
1840
+ ```
1841
+ </details>
1842
+ <details open>
1843
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/bind.rb:10</summary>
1844
+
1845
+ ##### Arel::Collectors::Bind#<<
1846
+
1847
+ ```ruby
1848
+ def << str
1849
+ self
1850
+ end
1851
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:13
1852
+ ```
1853
+ </details>
1854
+ <details open>
1855
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:812</summary>
1856
+
1857
+ ##### Arel::Visitors::ToSql#maybe_visit
1858
+
1859
+ ```ruby
1860
+ def maybe_visit thing, collector
1861
+ return collector unless thing
1862
+ collector << " "
1863
+ visit thing, collector
1864
+ end
1865
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:243
1866
+ ```
1867
+ </details>
1868
+ <details open>
1869
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:812</summary>
1870
+
1871
+ ##### Arel::Visitors::ToSql#maybe_visit
1872
+
1873
+ ```ruby
1874
+ def maybe_visit thing, collector
1875
+ return collector unless thing
1876
+ collector << " "
1877
+ visit thing, collector
1878
+ end
1879
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:245
1880
+ ```
1881
+ </details>
1882
+ <details open>
1883
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:265</summary>
1884
+
1885
+ ##### Arel::Visitors::ToSql#collect_nodes_for
1886
+
1887
+ ```ruby
1888
+ def collect_nodes_for nodes, collector, spacer, connector = COMMA
1889
+ unless nodes.empty?
1890
+ collector << spacer
1891
+ len = nodes.length - 1
1892
+ nodes.each_with_index do |x, i|
1893
+ collector = visit(x, collector)
1894
+ collector << connector unless len == i
1895
+ end
1896
+ end
1897
+ end
1898
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:247
1899
+ ```
1900
+ </details>
1901
+ <details open>
1902
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:11</summary>
1903
+
1904
+ ##### Arel::Collectors::Composite#<<
1905
+
1906
+ ```ruby
1907
+ def << str
1908
+ left << str
1909
+ right << str
1910
+ self
1911
+ end
1912
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:267
1913
+ ```
1914
+ </details>
1915
+ <details open>
1916
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/plain_string.rb:13</summary>
1917
+
1918
+ ##### Arel::Collectors::PlainString#<<
1919
+
1920
+ ```ruby
1921
+ def << str
1922
+ @str << str
1923
+ self
1924
+ end
1925
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:12
1926
+ ```
1927
+ </details>
1928
+ <details open>
1929
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/bind.rb:10</summary>
1930
+
1931
+ ##### Arel::Collectors::Bind#<<
1932
+
1933
+ ```ruby
1934
+ def << str
1935
+ self
1936
+ end
1937
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:13
1938
+ ```
1939
+ </details>
1940
+ <details open>
1941
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:13</summary>
1942
+
1943
+ ##### Arel::Visitors::Reduce#visit
1944
+
1945
+ ```ruby
1946
+ def visit object, collector
1947
+ dispatch_method = dispatch[object.class]
1948
+ send dispatch_method, object, collector
1949
+ rescue NoMethodError => e
1950
+ raise e if respond_to?(dispatch_method, true)
1951
+ superklass = object.class.ancestors.find { |klass|
1952
+ respond_to?(dispatch[klass], true)
1953
+ }
1954
+ raise(TypeError, "Cannot visit #{object.class}") unless superklass
1955
+ dispatch[object.class] = dispatch[superklass]
1956
+ retry
1957
+ end
1958
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:270
1959
+ ```
1960
+ </details>
1961
+ <details open>
1962
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/visitor.rb:25</summary>
1963
+
1964
+ ##### Arel::Visitors::Visitor#dispatch
1965
+
1966
+ ```ruby
1967
+ def dispatch
1968
+ @dispatch
1969
+ end
1970
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:14
1971
+ ```
1972
+ </details>
1973
+ <details open>
1974
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:727</summary>
1975
+
1976
+ ##### Arel::Visitors::ToSql#visit_Arel_Attributes_Attribute
1977
+
1978
+ ```ruby
1979
+ def visit_Arel_Attributes_Attribute o, collector
1980
+ join_name = o.relation.table_alias || o.relation.name
1981
+ collector << "#{quote_table_name join_name}.#{quote_column_name o.name}"
1982
+ end
1983
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:15
1984
+ ```
1985
+ </details>
1986
+ <details open>
1987
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:802</summary>
1988
+
1989
+ ##### Arel::Visitors::ToSql#quote_table_name
1990
+
1991
+ ```ruby
1992
+ def quote_table_name name
1993
+ return name if Arel::Nodes::SqlLiteral === name
1994
+ @connection.quote_table_name(name)
1995
+ end
1996
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:729
1997
+ ```
1998
+ </details>
1999
+ <details open>
2000
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3/quoting.rb:15</summary>
2001
+
2002
+ ##### ActiveRecord::ConnectionAdapters::SQLite3::Quoting#quote_table_name
2003
+
2004
+ ```ruby
2005
+ def quote_table_name(name)
2006
+ @quoted_table_names[name] ||= super.gsub(".", "\".\"").freeze
2007
+ end
2008
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:804
2009
+ ```
2010
+ </details>
2011
+ <details open>
2012
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:807</summary>
2013
+
2014
+ ##### Arel::Visitors::ToSql#quote_column_name
2015
+
2016
+ ```ruby
2017
+ def quote_column_name name
2018
+ return name if Arel::Nodes::SqlLiteral === name
2019
+ @connection.quote_column_name(name)
2020
+ end
2021
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:729
2022
+ ```
2023
+ </details>
2024
+ <details open>
2025
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:11</summary>
2026
+
2027
+ ##### Arel::Collectors::Composite#<<
2028
+
2029
+ ```ruby
2030
+ def << str
2031
+ left << str
2032
+ right << str
2033
+ self
2034
+ end
2035
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:729
2036
+ ```
2037
+ </details>
2038
+ <details open>
2039
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/plain_string.rb:13</summary>
2040
+
2041
+ ##### Arel::Collectors::PlainString#<<
2042
+
2043
+ ```ruby
2044
+ def << str
2045
+ @str << str
2046
+ self
2047
+ end
2048
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:12
2049
+ ```
2050
+ </details>
2051
+ <details open>
2052
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/bind.rb:10</summary>
2053
+
2054
+ ##### Arel::Collectors::Bind#<<
2055
+
2056
+ ```ruby
2057
+ def << str
2058
+ self
2059
+ end
2060
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:13
2061
+ ```
2062
+ </details>
2063
+ <details open>
2064
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/join_source.rb:14</summary>
2065
+
2066
+ ##### Arel::Nodes::JoinSource#empty?
2067
+
2068
+ ```ruby
2069
+ def empty?
2070
+ !left && right.empty?
2071
+ end
2072
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:249
2073
+ ```
2074
+ </details>
2075
+ <details open>
2076
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:11</summary>
2077
+
2078
+ ##### Arel::Collectors::Composite#<<
2079
+
2080
+ ```ruby
2081
+ def << str
2082
+ left << str
2083
+ right << str
2084
+ self
2085
+ end
2086
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:250
2087
+ ```
2088
+ </details>
2089
+ <details open>
2090
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/plain_string.rb:13</summary>
2091
+
2092
+ ##### Arel::Collectors::PlainString#<<
2093
+
2094
+ ```ruby
2095
+ def << str
2096
+ @str << str
2097
+ self
2098
+ end
2099
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:12
2100
+ ```
2101
+ </details>
2102
+ <details open>
2103
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/bind.rb:10</summary>
2104
+
2105
+ ##### Arel::Collectors::Bind#<<
2106
+
2107
+ ```ruby
2108
+ def << str
2109
+ self
2110
+ end
2111
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:13
2112
+ ```
2113
+ </details>
2114
+ <details open>
2115
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:13</summary>
2116
+
2117
+ ##### Arel::Visitors::Reduce#visit
2118
+
2119
+ ```ruby
2120
+ def visit object, collector
2121
+ dispatch_method = dispatch[object.class]
2122
+ send dispatch_method, object, collector
2123
+ rescue NoMethodError => e
2124
+ raise e if respond_to?(dispatch_method, true)
2125
+ superklass = object.class.ancestors.find { |klass|
2126
+ respond_to?(dispatch[klass], true)
2127
+ }
2128
+ raise(TypeError, "Cannot visit #{object.class}") unless superklass
2129
+ dispatch[object.class] = dispatch[superklass]
2130
+ retry
2131
+ end
2132
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:251
2133
+ ```
2134
+ </details>
2135
+ <details open>
2136
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/visitor.rb:25</summary>
2137
+
2138
+ ##### Arel::Visitors::Visitor#dispatch
2139
+
2140
+ ```ruby
2141
+ def dispatch
2142
+ @dispatch
2143
+ end
2144
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:14
2145
+ ```
2146
+ </details>
2147
+ <details open>
2148
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:544</summary>
2149
+
2150
+ ##### Arel::Visitors::ToSql#visit_Arel_Nodes_JoinSource
2151
+
2152
+ ```ruby
2153
+ def visit_Arel_Nodes_JoinSource o, collector
2154
+ if o.left
2155
+ collector = visit o.left, collector
2156
+ end
2157
+ if o.right.any?
2158
+ collector << SPACE if o.left
2159
+ collector = inject_join o.right, collector, SPACE
2160
+ end
2161
+ collector
2162
+ end
2163
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:15
2164
+ ```
2165
+ </details>
2166
+ <details open>
2167
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:13</summary>
2168
+
2169
+ ##### Arel::Visitors::Reduce#visit
2170
+
2171
+ ```ruby
2172
+ def visit object, collector
2173
+ dispatch_method = dispatch[object.class]
2174
+ send dispatch_method, object, collector
2175
+ rescue NoMethodError => e
2176
+ raise e if respond_to?(dispatch_method, true)
2177
+ superklass = object.class.ancestors.find { |klass|
2178
+ respond_to?(dispatch[klass], true)
2179
+ }
2180
+ raise(TypeError, "Cannot visit #{object.class}") unless superklass
2181
+ dispatch[object.class] = dispatch[superklass]
2182
+ retry
2183
+ end
2184
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:546
2185
+ ```
2186
+ </details>
2187
+ <details open>
2188
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/visitor.rb:25</summary>
2189
+
2190
+ ##### Arel::Visitors::Visitor#dispatch
2191
+
2192
+ ```ruby
2193
+ def dispatch
2194
+ @dispatch
2195
+ end
2196
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:14
2197
+ ```
2198
+ </details>
2199
+ <details open>
2200
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:609</summary>
2201
+
2202
+ ##### Arel::Visitors::ToSql#visit_Arel_Table
2203
+
2204
+ ```ruby
2205
+ def visit_Arel_Table o, collector
2206
+ if o.table_alias
2207
+ collector << "#{quote_table_name o.name} #{quote_table_name o.table_alias}"
2208
+ else
2209
+ collector << quote_table_name(o.name)
2210
+ end
2211
+ end
2212
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/reduce.rb:15
2213
+ ```
2214
+ </details>
2215
+ <details open>
2216
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:802</summary>
2217
+
2218
+ ##### Arel::Visitors::ToSql#quote_table_name
2219
+
2220
+ ```ruby
2221
+ def quote_table_name name
2222
+ return name if Arel::Nodes::SqlLiteral === name
2223
+ @connection.quote_table_name(name)
2224
+ end
2225
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:613
2226
+ ```
2227
+ </details>
2228
+ <details open>
2229
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3/quoting.rb:15</summary>
2230
+
2231
+ ##### ActiveRecord::ConnectionAdapters::SQLite3::Quoting#quote_table_name
2232
+
2233
+ ```ruby
2234
+ def quote_table_name(name)
2235
+ @quoted_table_names[name] ||= super.gsub(".", "\".\"").freeze
2236
+ end
2237
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:804
2238
+ ```
2239
+ </details>
2240
+ <details open>
2241
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:11</summary>
2242
+
2243
+ ##### Arel::Collectors::Composite#<<
2244
+
2245
+ ```ruby
2246
+ def << str
2247
+ left << str
2248
+ right << str
2249
+ self
2250
+ end
2251
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:613
2252
+ ```
2253
+ </details>
2254
+ <details open>
2255
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/plain_string.rb:13</summary>
2256
+
2257
+ ##### Arel::Collectors::PlainString#<<
2258
+
2259
+ ```ruby
2260
+ def << str
2261
+ @str << str
2262
+ self
2263
+ end
2264
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:12
2265
+ ```
2266
+ </details>
2267
+ <details open>
2268
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/bind.rb:10</summary>
2269
+
2270
+ ##### Arel::Collectors::Bind#<<
2271
+
2272
+ ```ruby
2273
+ def << str
2274
+ self
2275
+ end
2276
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:13
2277
+ ```
2278
+ </details>
2279
+ <details open>
2280
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:265</summary>
2281
+
2282
+ ##### Arel::Visitors::ToSql#collect_nodes_for
2283
+
2284
+ ```ruby
2285
+ def collect_nodes_for nodes, collector, spacer, connector = COMMA
2286
+ unless nodes.empty?
2287
+ collector << spacer
2288
+ len = nodes.length - 1
2289
+ nodes.each_with_index do |x, i|
2290
+ collector = visit(x, collector)
2291
+ collector << connector unless len == i
2292
+ end
2293
+ end
2294
+ end
2295
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:254
2296
+ ```
2297
+ </details>
2298
+ <details open>
2299
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:265</summary>
2300
+
2301
+ ##### Arel::Visitors::ToSql#collect_nodes_for
2302
+
2303
+ ```ruby
2304
+ def collect_nodes_for nodes, collector, spacer, connector = COMMA
2305
+ unless nodes.empty?
2306
+ collector << spacer
2307
+ len = nodes.length - 1
2308
+ nodes.each_with_index do |x, i|
2309
+ collector = visit(x, collector)
2310
+ collector << connector unless len == i
2311
+ end
2312
+ end
2313
+ end
2314
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:255
2315
+ ```
2316
+ </details>
2317
+ <details open>
2318
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:265</summary>
2319
+
2320
+ ##### Arel::Visitors::ToSql#collect_nodes_for
2321
+
2322
+ ```ruby
2323
+ def collect_nodes_for nodes, collector, spacer, connector = COMMA
2324
+ unless nodes.empty?
2325
+ collector << spacer
2326
+ len = nodes.length - 1
2327
+ nodes.each_with_index do |x, i|
2328
+ collector = visit(x, collector)
2329
+ collector << connector unless len == i
2330
+ end
2331
+ end
2332
+ end
2333
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:260
2334
+ ```
2335
+ </details>
2336
+ <details open>
2337
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:234</summary>
2338
+
2339
+ ##### Arel::Visitors::ToSql#visit_Arel_Nodes_SelectOptions
2340
+
2341
+ ```ruby
2342
+ def visit_Arel_Nodes_SelectOptions o, collector
2343
+ collector = maybe_visit o.limit, collector
2344
+ collector = maybe_visit o.offset, collector
2345
+ collector = maybe_visit o.lock, collector
2346
+ end
2347
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:229
2348
+ ```
2349
+ </details>
2350
+ <details open>
2351
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:812</summary>
2352
+
2353
+ ##### Arel::Visitors::ToSql#maybe_visit
2354
+
2355
+ ```ruby
2356
+ def maybe_visit thing, collector
2357
+ return collector unless thing
2358
+ collector << " "
2359
+ visit thing, collector
2360
+ end
2361
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:235
2362
+ ```
2363
+ </details>
2364
+ <details open>
2365
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:812</summary>
2366
+
2367
+ ##### Arel::Visitors::ToSql#maybe_visit
2368
+
2369
+ ```ruby
2370
+ def maybe_visit thing, collector
2371
+ return collector unless thing
2372
+ collector << " "
2373
+ visit thing, collector
2374
+ end
2375
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:236
2376
+ ```
2377
+ </details>
2378
+ <details open>
2379
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:812</summary>
2380
+
2381
+ ##### Arel::Visitors::ToSql#maybe_visit
2382
+
2383
+ ```ruby
2384
+ def maybe_visit thing, collector
2385
+ return collector unless thing
2386
+ collector << " "
2387
+ visit thing, collector
2388
+ end
2389
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/visitors/to_sql.rb:237
2390
+ ```
2391
+ </details>
2392
+ <details open>
2393
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:23</summary>
2394
+
2395
+ ##### Arel::Collectors::Composite#value
2396
+
2397
+ ```ruby
2398
+ def value
2399
+ [left.value, right.value]
2400
+ end
2401
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:25
2402
+ ```
2403
+ </details>
2404
+ <details open>
2405
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/plain_string.rb:9</summary>
2406
+
2407
+ ##### Arel::Collectors::PlainString#value
2408
+
2409
+ ```ruby
2410
+ def value
2411
+ @str
2412
+ end
2413
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:24
2414
+ ```
2415
+ </details>
2416
+ <details open>
2417
+ <summary>vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/bind.rb:19</summary>
2418
+
2419
+ ##### Arel::Collectors::Bind#value
2420
+
2421
+ ```ruby
2422
+ def value
2423
+ @binds
2424
+ end
2425
+ # called from vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb:24
2426
+ ```
2427
+ </details>
2428
+ <details open>
2429
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_limits.rb:67</summary>
2430
+
2431
+ ##### ActiveRecord::ConnectionAdapters::DatabaseLimits#bind_params_length
2432
+
2433
+ ```ruby
2434
+ def bind_params_length
2435
+ 65535
2436
+ end
2437
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:27
2438
+ ```
2439
+ </details>
2440
+ <details open>
2441
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:112</summary>
2442
+
2443
+ ##### ActiveRecord::ConnectionAdapters::QueryCache#cache_sql
2444
+
2445
+ ```ruby
2446
+ def cache_sql(sql, name, binds)
2447
+ @lock.synchronize do
2448
+ result =
2449
+ if @query_cache[sql].key?(binds)
2450
+ ActiveSupport::Notifications.instrument(
2451
+ "sql.active_record",
2452
+ sql: sql,
2453
+ binds: binds,
2454
+ type_casted_binds: -> { type_casted_binds(binds) },
2455
+ name: name,
2456
+ connection_id: object_id,
2457
+ cached: true,
2458
+ )
2459
+ @query_cache[sql][binds]
2460
+ else
2461
+ @query_cache[sql][binds] = yield
2462
+ end
2463
+ result.dup
2464
+ end
2465
+ end
2466
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:104
2467
+ ```
2468
+ </details>
2469
+ <details open>
2470
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:59</summary>
2471
+
2472
+ ##### ActiveRecord::ConnectionAdapters::QueryCache#select_all
2473
+
2474
+ ```ruby
2475
+ def select_all(arel, name = nil, binds = [], preparable: nil)
2476
+ if @query_cache_enabled && !locked?(arel)
2477
+ arel = arel_from_relation(arel)
2478
+ sql, binds = to_sql_and_binds(arel, binds)
2479
+
2480
+ if preparable.nil?
2481
+ preparable = prepared_statements ? visitor.preparable : false
2482
+ end
2483
+
2484
+ cache_sql(sql, name, binds) { super(sql, name, binds, preparable: preparable) }
2485
+ else
2486
+ super
2487
+ end
2488
+ end
2489
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:104
2490
+ ```
2491
+ </details>
2492
+ <details open>
2493
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:498</summary>
2494
+
2495
+ ##### ActiveRecord::ConnectionAdapters::DatabaseStatements#arel_from_relation
2496
+
2497
+ ```ruby
2498
+ def arel_from_relation(relation)
2499
+ if relation.is_a?(Relation)
2500
+ relation.arel
2501
+ else
2502
+ relation
2503
+ end
2504
+ end
2505
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:60
2506
+ ```
2507
+ </details>
2508
+ <details open>
2509
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:17</summary>
2510
+
2511
+ ##### ActiveRecord::ConnectionAdapters::DatabaseStatements#to_sql_and_binds
2512
+
2513
+ ```ruby
2514
+ def to_sql_and_binds(arel_or_sql_string, binds = []) # :nodoc:
2515
+ if arel_or_sql_string.respond_to?(:ast)
2516
+ unless binds.empty?
2517
+ raise "Passing bind parameters with an arel AST is forbidden. " \
2518
+ "The values must be stored on the AST directly"
2519
+ end
2520
+
2521
+ if prepared_statements
2522
+ sql, binds = visitor.accept(arel_or_sql_string.ast, collector).value
2523
+
2524
+ if binds.length > bind_params_length
2525
+ unprepared_statement do
2526
+ sql, binds = to_sql_and_binds(arel_or_sql_string)
2527
+ visitor.preparable = false
2528
+ end
2529
+ end
2530
+ else
2531
+ sql = visitor.accept(arel_or_sql_string.ast, collector).value
2532
+ end
2533
+ [sql.freeze, binds]
2534
+ else
2535
+ visitor.preparable = false if prepared_statements
2536
+ [arel_or_sql_string.dup.freeze, binds]
2537
+ end
2538
+ end
2539
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:61
2540
+ ```
2541
+ </details>
2542
+ <details open>
2543
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:481</summary>
2544
+
2545
+ ##### ActiveRecord::ConnectionAdapters::DatabaseStatements#select_prepared
2546
+
2547
+ ```ruby
2548
+ def select_prepared(sql, name = nil, binds = [])
2549
+ exec_query(sql, name, binds, prepare: true)
2550
+ end
2551
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:68
2552
+ ```
2553
+ </details>
2554
+ <details open>
2555
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:209</summary>
2556
+
2557
+ ##### ActiveRecord::ConnectionAdapters::SQLite3Adapter#exec_query
2558
+
2559
+ ```ruby
2560
+ def exec_query(sql, name = nil, binds = [], prepare: false)
2561
+ type_casted_binds = type_casted_binds(binds)
2562
+
2563
+ log(sql, name, binds, type_casted_binds) do
2564
+ ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
2565
+ # Don't cache statements if they are not prepared
2566
+ unless prepare
2567
+ stmt = @connection.prepare(sql)
2568
+ begin
2569
+ cols = stmt.columns
2570
+ unless without_prepared_statement?(binds)
2571
+ stmt.bind_params(type_casted_binds)
2572
+ end
2573
+ records = stmt.to_a
2574
+ ensure
2575
+ stmt.close
2576
+ end
2577
+ else
2578
+ cache = @statements[sql] ||= {
2579
+ stmt: @connection.prepare(sql)
2580
+ }
2581
+ stmt = cache[:stmt]
2582
+ cols = cache[:cols] ||= stmt.columns
2583
+ stmt.reset!
2584
+ stmt.bind_params(type_casted_binds)
2585
+ records = stmt.to_a
2586
+ end
2587
+
2588
+ ActiveRecord::Result.new(cols, records)
2589
+ end
2590
+ end
2591
+ end
2592
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:482
2593
+ ```
2594
+ </details>
2595
+ <details open>
2596
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/quoting.rb:141</summary>
2597
+
2598
+ ##### ActiveRecord::ConnectionAdapters::Quoting#type_casted_binds
2599
+
2600
+ ```ruby
2601
+ def type_casted_binds(binds) # :nodoc:
2602
+ if binds.first.is_a?(Array)
2603
+ binds.map { |column, value| type_cast(value, column) }
2604
+ else
2605
+ binds.map { |attr| type_cast(attr.value_for_database) }
2606
+ end
2607
+ end
2608
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:210
2609
+ ```
2610
+ </details>
2611
+ <details open>
2612
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:570</summary>
2613
+
2614
+ ##### ActiveRecord::ConnectionAdapters::AbstractAdapter#log
2615
+
2616
+ ```ruby
2617
+ def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = nil) # :doc:
2618
+ @instrumenter.instrument(
2619
+ "sql.active_record",
2620
+ sql: sql,
2621
+ name: name,
2622
+ binds: binds,
2623
+ type_casted_binds: type_casted_binds,
2624
+ statement_name: statement_name,
2625
+ connection_id: object_id) do
2626
+ begin
2627
+ @lock.synchronize do
2628
+ yield
2629
+ end
2630
+ rescue => e
2631
+ raise translate_exception_class(e, sql)
2632
+ end
2633
+ end
2634
+ end
2635
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:212
2636
+ ```
2637
+ </details>
2638
+ <details open>
2639
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:90</summary>
2640
+
2641
+ ##### ActiveRecord::LogSubscriber#logger
2642
+
2643
+ ```ruby
2644
+ def logger
2645
+ ActiveRecord::Base.logger
2646
+ end
2647
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/log_subscriber.rb:80
2648
+ ```
2649
+ </details>
2650
+ <details open>
2651
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/explain_subscriber.rb:8</summary>
2652
+
2653
+ ##### ActiveRecord::ExplainSubscriber#start
2654
+
2655
+ ```ruby
2656
+ def start(name, id, payload)
2657
+ # unused
2658
+ end
2659
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/notifications/fanout.rb:100
2660
+ ```
2661
+ </details>
2662
+ <details open>
2663
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/statement_pool.rb:23</summary>
2664
+
2665
+ ##### ActiveRecord::ConnectionAdapters::StatementPool#[]
2666
+
2667
+ ```ruby
2668
+ def [](key)
2669
+ cache[key]
2670
+ end
2671
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:227
2672
+ ```
2673
+ </details>
2674
+ <details open>
2675
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/statement_pool.rb:52</summary>
2676
+
2677
+ ##### ActiveRecord::ConnectionAdapters::StatementPool#cache
2678
+
2679
+ ```ruby
2680
+ def cache
2681
+ @cache[Process.pid]
2682
+ end
2683
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/statement_pool.rb:24
2684
+ ```
2685
+ </details>
2686
+ <details open>
2687
+ <summary>vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/statement.rb:35</summary>
2688
+
2689
+ ##### SQLite3::Statement#bind_params
2690
+
2691
+ ```ruby
2692
+ def bind_params( *bind_vars )
2693
+ index = 1
2694
+ bind_vars.flatten.each do |var|
2695
+ if Hash === var
2696
+ var.each { |key, val| bind_param key, val }
2697
+ else
2698
+ bind_param index, var
2699
+ index += 1
2700
+ end
2701
+ end
2702
+ end
2703
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:233
2704
+ ```
2705
+ </details>
2706
+ <details open>
2707
+ <summary>vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/statement.rb:106</summary>
2708
+
2709
+ ##### SQLite3::Statement#each
2710
+
2711
+ ```ruby
2712
+ def each
2713
+ loop do
2714
+ val = step
2715
+ break self if done?
2716
+ yield val
2717
+ end
2718
+ end
2719
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:234
2720
+ ```
2721
+ </details>
2722
+ <details open>
2723
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/result.rb:39</summary>
2724
+
2725
+ ##### ActiveRecord::Result#initialize
2726
+
2727
+ ```ruby
2728
+ def initialize(columns, rows, column_types = {})
2729
+ @columns = columns
2730
+ @rows = rows
2731
+ @hash_rows = nil
2732
+ @column_types = column_types
2733
+ end
2734
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:237
2735
+ ```
2736
+ </details>
2737
+ <details open>
2738
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:90</summary>
2739
+
2740
+ ##### ActiveRecord::LogSubscriber#logger
2741
+
2742
+ ```ruby
2743
+ def logger
2744
+ ActiveRecord::Base.logger
2745
+ end
2746
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/log_subscriber.rb:84
2747
+ ```
2748
+ </details>
2749
+ <details open>
2750
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:20</summary>
2751
+
2752
+ ##### ActiveRecord::LogSubscriber#sql
2753
+
2754
+ ```ruby
2755
+ def sql(event)
2756
+ self.class.runtime += event.duration
2757
+ return unless logger.debug?
2758
+
2759
+ payload = event.payload
2760
+
2761
+ return if IGNORE_PAYLOAD_NAMES.include?(payload[:name])
2762
+
2763
+ name = "#{payload[:name]} (#{event.duration.round(1)}ms)"
2764
+ name = "CACHE #{name}" if payload[:cached]
2765
+ sql = payload[:sql]
2766
+ binds = nil
2767
+
2768
+ unless (payload[:binds] || []).empty?
2769
+ casted_params = type_casted_binds(payload[:type_casted_binds])
2770
+ binds = " " + payload[:binds].zip(casted_params).map { |attr, value|
2771
+ render_bind(attr, value)
2772
+ }.inspect
2773
+ end
2774
+
2775
+ name = colorize_payload_name(name, payload[:name])
2776
+ sql = color(sql, sql_color(sql), true)
2777
+
2778
+ debug " #{name} #{sql}#{binds}"
2779
+ end
2780
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/subscriber.rb:101
2781
+ ```
2782
+ </details>
2783
+ <details open>
2784
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:11</summary>
2785
+
2786
+ ##### ActiveRecord::LogSubscriber.runtime
2787
+
2788
+ ```ruby
2789
+ def self.runtime
2790
+ ActiveRecord::RuntimeRegistry.sql_runtime ||= 0
2791
+ end
2792
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:21
2793
+ ```
2794
+ </details>
2795
+ <details open>
2796
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:20</summary>
2797
+
2798
+ ##### ActiveRecord::RuntimeRegistry.sql_runtime
2799
+
2800
+ ```ruby
2801
+ class_eval %{ def self.#{val}; instance.#{val}; end }, __FILE__, __LINE__
2802
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:12
2803
+ ```
2804
+ </details>
2805
+ <details open>
2806
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:7</summary>
2807
+
2808
+ ##### ActiveRecord::LogSubscriber.runtime=
2809
+
2810
+ ```ruby
2811
+ def self.runtime=(value)
2812
+ ActiveRecord::RuntimeRegistry.sql_runtime = value
2813
+ end
2814
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:21
2815
+ ```
2816
+ </details>
2817
+ <details open>
2818
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:21</summary>
2819
+
2820
+ ##### ActiveRecord::RuntimeRegistry.sql_runtime=
2821
+
2822
+ ```ruby
2823
+ class_eval %{ def self.#{val}=(x); instance.#{val}=x; end }, __FILE__, __LINE__
2824
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:8
2825
+ ```
2826
+ </details>
2827
+ <details open>
2828
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:90</summary>
2829
+
2830
+ ##### ActiveRecord::LogSubscriber#logger
2831
+
2832
+ ```ruby
2833
+ def logger
2834
+ ActiveRecord::Base.logger
2835
+ end
2836
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:22
2837
+ ```
2838
+ </details>
2839
+ <details open>
2840
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:61</summary>
2841
+
2842
+ ##### ActiveRecord::LogSubscriber#colorize_payload_name
2843
+
2844
+ ```ruby
2845
+ def colorize_payload_name(name, payload_name)
2846
+ if payload_name.blank? || payload_name == "SQL" # SQL vs Model Load/Exists
2847
+ color(name, MAGENTA, true)
2848
+ else
2849
+ color(name, CYAN, true)
2850
+ end
2851
+ end
2852
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:40
2853
+ ```
2854
+ </details>
2855
+ <details open>
2856
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:69</summary>
2857
+
2858
+ ##### ActiveRecord::LogSubscriber#sql_color
2859
+
2860
+ ```ruby
2861
+ def sql_color(sql)
2862
+ case sql
2863
+ when /\A\s*rollback/mi
2864
+ RED
2865
+ when /select .*for update/mi, /\A\s*lock/mi
2866
+ WHITE
2867
+ when /\A\s*select/i
2868
+ BLUE
2869
+ when /\A\s*insert/i
2870
+ GREEN
2871
+ when /\A\s*update/i
2872
+ YELLOW
2873
+ when /\A\s*delete/i
2874
+ RED
2875
+ when /transaction\s*\Z/i
2876
+ CYAN
2877
+ else
2878
+ MAGENTA
2879
+ end
2880
+ end
2881
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:41
2882
+ ```
2883
+ </details>
2884
+ <details open>
2885
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:94</summary>
2886
+
2887
+ ##### ActiveRecord::LogSubscriber#debug
2888
+
2889
+ ```ruby
2890
+ def debug(progname = nil, &block)
2891
+ return unless super
2892
+
2893
+ if ActiveRecord::Base.verbose_query_logs
2894
+ log_query_source
2895
+ end
2896
+ end
2897
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:43
2898
+ ```
2899
+ </details>
2900
+ <details open>
2901
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:90</summary>
2902
+
2903
+ ##### ActiveRecord::LogSubscriber#logger
2904
+
2905
+ ```ruby
2906
+ def logger
2907
+ ActiveRecord::Base.logger
2908
+ end
2909
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/log_subscriber.rb:96
2910
+ ```
2911
+ </details>
2912
+ <details open>
2913
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:90</summary>
2914
+
2915
+ ##### ActiveRecord::LogSubscriber#logger
2916
+
2917
+ ```ruby
2918
+ def logger
2919
+ ActiveRecord::Base.logger
2920
+ end
2921
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/log_subscriber.rb:96
2922
+ ```
2923
+ </details>
2924
+ <details open>
2925
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:102</summary>
2926
+
2927
+ ##### ActiveRecord::LogSubscriber#log_query_source
2928
+
2929
+ ```ruby
2930
+ def log_query_source
2931
+ source_line, line_number = extract_callstack(caller_locations)
2932
+
2933
+ if source_line
2934
+ if defined?(::Rails.root)
2935
+ app_root = "#{::Rails.root.to_s}/".freeze
2936
+ source_line = source_line.sub(app_root, "")
2937
+ end
2938
+
2939
+ logger.debug(" ↳ #{ source_line }:#{ line_number }")
2940
+ end
2941
+ end
2942
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98
2943
+ ```
2944
+ </details>
2945
+ <details open>
2946
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:115</summary>
2947
+
2948
+ ##### ActiveRecord::LogSubscriber#extract_callstack
2949
+
2950
+ ```ruby
2951
+ def extract_callstack(callstack)
2952
+ line = callstack.find do |frame|
2953
+ frame.absolute_path && !ignored_callstack(frame.absolute_path)
2954
+ end
2955
+
2956
+ offending_line = line || callstack.first
2957
+
2958
+ [
2959
+ offending_line.path,
2960
+ offending_line.lineno
2961
+ ]
2962
+ end
2963
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:103
2964
+ ```
2965
+ </details>
2966
+ <details open>
2967
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
2968
+
2969
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
2970
+
2971
+ ```ruby
2972
+ def ignored_callstack(path)
2973
+ path.start_with?(RAILS_GEM_ROOT) ||
2974
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
2975
+ end
2976
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
2977
+ ```
2978
+ </details>
2979
+ <details open>
2980
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
2981
+
2982
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
2983
+
2984
+ ```ruby
2985
+ def ignored_callstack(path)
2986
+ path.start_with?(RAILS_GEM_ROOT) ||
2987
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
2988
+ end
2989
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
2990
+ ```
2991
+ </details>
2992
+ <details open>
2993
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
2994
+
2995
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
2996
+
2997
+ ```ruby
2998
+ def ignored_callstack(path)
2999
+ path.start_with?(RAILS_GEM_ROOT) ||
3000
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3001
+ end
3002
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3003
+ ```
3004
+ </details>
3005
+ <details open>
3006
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3007
+
3008
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3009
+
3010
+ ```ruby
3011
+ def ignored_callstack(path)
3012
+ path.start_with?(RAILS_GEM_ROOT) ||
3013
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3014
+ end
3015
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3016
+ ```
3017
+ </details>
3018
+ <details open>
3019
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3020
+
3021
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3022
+
3023
+ ```ruby
3024
+ def ignored_callstack(path)
3025
+ path.start_with?(RAILS_GEM_ROOT) ||
3026
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3027
+ end
3028
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3029
+ ```
3030
+ </details>
3031
+ <details open>
3032
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3033
+
3034
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3035
+
3036
+ ```ruby
3037
+ def ignored_callstack(path)
3038
+ path.start_with?(RAILS_GEM_ROOT) ||
3039
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3040
+ end
3041
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3042
+ ```
3043
+ </details>
3044
+ <details open>
3045
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3046
+
3047
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3048
+
3049
+ ```ruby
3050
+ def ignored_callstack(path)
3051
+ path.start_with?(RAILS_GEM_ROOT) ||
3052
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3053
+ end
3054
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3055
+ ```
3056
+ </details>
3057
+ <details open>
3058
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3059
+
3060
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3061
+
3062
+ ```ruby
3063
+ def ignored_callstack(path)
3064
+ path.start_with?(RAILS_GEM_ROOT) ||
3065
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3066
+ end
3067
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3068
+ ```
3069
+ </details>
3070
+ <details open>
3071
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3072
+
3073
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3074
+
3075
+ ```ruby
3076
+ def ignored_callstack(path)
3077
+ path.start_with?(RAILS_GEM_ROOT) ||
3078
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3079
+ end
3080
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3081
+ ```
3082
+ </details>
3083
+ <details open>
3084
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3085
+
3086
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3087
+
3088
+ ```ruby
3089
+ def ignored_callstack(path)
3090
+ path.start_with?(RAILS_GEM_ROOT) ||
3091
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3092
+ end
3093
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3094
+ ```
3095
+ </details>
3096
+ <details open>
3097
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3098
+
3099
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3100
+
3101
+ ```ruby
3102
+ def ignored_callstack(path)
3103
+ path.start_with?(RAILS_GEM_ROOT) ||
3104
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3105
+ end
3106
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3107
+ ```
3108
+ </details>
3109
+ <details open>
3110
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3111
+
3112
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3113
+
3114
+ ```ruby
3115
+ def ignored_callstack(path)
3116
+ path.start_with?(RAILS_GEM_ROOT) ||
3117
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3118
+ end
3119
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3120
+ ```
3121
+ </details>
3122
+ <details open>
3123
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3124
+
3125
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3126
+
3127
+ ```ruby
3128
+ def ignored_callstack(path)
3129
+ path.start_with?(RAILS_GEM_ROOT) ||
3130
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3131
+ end
3132
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3133
+ ```
3134
+ </details>
3135
+ <details open>
3136
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3137
+
3138
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3139
+
3140
+ ```ruby
3141
+ def ignored_callstack(path)
3142
+ path.start_with?(RAILS_GEM_ROOT) ||
3143
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3144
+ end
3145
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3146
+ ```
3147
+ </details>
3148
+ <details open>
3149
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3150
+
3151
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3152
+
3153
+ ```ruby
3154
+ def ignored_callstack(path)
3155
+ path.start_with?(RAILS_GEM_ROOT) ||
3156
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3157
+ end
3158
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3159
+ ```
3160
+ </details>
3161
+ <details open>
3162
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3163
+
3164
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3165
+
3166
+ ```ruby
3167
+ def ignored_callstack(path)
3168
+ path.start_with?(RAILS_GEM_ROOT) ||
3169
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3170
+ end
3171
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3172
+ ```
3173
+ </details>
3174
+ <details open>
3175
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3176
+
3177
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3178
+
3179
+ ```ruby
3180
+ def ignored_callstack(path)
3181
+ path.start_with?(RAILS_GEM_ROOT) ||
3182
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3183
+ end
3184
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3185
+ ```
3186
+ </details>
3187
+ <details open>
3188
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3189
+
3190
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3191
+
3192
+ ```ruby
3193
+ def ignored_callstack(path)
3194
+ path.start_with?(RAILS_GEM_ROOT) ||
3195
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3196
+ end
3197
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3198
+ ```
3199
+ </details>
3200
+ <details open>
3201
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3202
+
3203
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3204
+
3205
+ ```ruby
3206
+ def ignored_callstack(path)
3207
+ path.start_with?(RAILS_GEM_ROOT) ||
3208
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3209
+ end
3210
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3211
+ ```
3212
+ </details>
3213
+ <details open>
3214
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3215
+
3216
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3217
+
3218
+ ```ruby
3219
+ def ignored_callstack(path)
3220
+ path.start_with?(RAILS_GEM_ROOT) ||
3221
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3222
+ end
3223
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3224
+ ```
3225
+ </details>
3226
+ <details open>
3227
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3228
+
3229
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3230
+
3231
+ ```ruby
3232
+ def ignored_callstack(path)
3233
+ path.start_with?(RAILS_GEM_ROOT) ||
3234
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3235
+ end
3236
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3237
+ ```
3238
+ </details>
3239
+ <details open>
3240
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3241
+
3242
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3243
+
3244
+ ```ruby
3245
+ def ignored_callstack(path)
3246
+ path.start_with?(RAILS_GEM_ROOT) ||
3247
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3248
+ end
3249
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3250
+ ```
3251
+ </details>
3252
+ <details open>
3253
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3254
+
3255
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3256
+
3257
+ ```ruby
3258
+ def ignored_callstack(path)
3259
+ path.start_with?(RAILS_GEM_ROOT) ||
3260
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3261
+ end
3262
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3263
+ ```
3264
+ </details>
3265
+ <details open>
3266
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3267
+
3268
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3269
+
3270
+ ```ruby
3271
+ def ignored_callstack(path)
3272
+ path.start_with?(RAILS_GEM_ROOT) ||
3273
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3274
+ end
3275
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3276
+ ```
3277
+ </details>
3278
+ <details open>
3279
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3280
+
3281
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3282
+
3283
+ ```ruby
3284
+ def ignored_callstack(path)
3285
+ path.start_with?(RAILS_GEM_ROOT) ||
3286
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3287
+ end
3288
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3289
+ ```
3290
+ </details>
3291
+ <details open>
3292
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3293
+
3294
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3295
+
3296
+ ```ruby
3297
+ def ignored_callstack(path)
3298
+ path.start_with?(RAILS_GEM_ROOT) ||
3299
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3300
+ end
3301
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3302
+ ```
3303
+ </details>
3304
+ <details open>
3305
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3306
+
3307
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3308
+
3309
+ ```ruby
3310
+ def ignored_callstack(path)
3311
+ path.start_with?(RAILS_GEM_ROOT) ||
3312
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3313
+ end
3314
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3315
+ ```
3316
+ </details>
3317
+ <details open>
3318
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3319
+
3320
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3321
+
3322
+ ```ruby
3323
+ def ignored_callstack(path)
3324
+ path.start_with?(RAILS_GEM_ROOT) ||
3325
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3326
+ end
3327
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3328
+ ```
3329
+ </details>
3330
+ <details open>
3331
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3332
+
3333
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3334
+
3335
+ ```ruby
3336
+ def ignored_callstack(path)
3337
+ path.start_with?(RAILS_GEM_ROOT) ||
3338
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3339
+ end
3340
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3341
+ ```
3342
+ </details>
3343
+ <details open>
3344
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3345
+
3346
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3347
+
3348
+ ```ruby
3349
+ def ignored_callstack(path)
3350
+ path.start_with?(RAILS_GEM_ROOT) ||
3351
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3352
+ end
3353
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3354
+ ```
3355
+ </details>
3356
+ <details open>
3357
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3358
+
3359
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3360
+
3361
+ ```ruby
3362
+ def ignored_callstack(path)
3363
+ path.start_with?(RAILS_GEM_ROOT) ||
3364
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3365
+ end
3366
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3367
+ ```
3368
+ </details>
3369
+ <details open>
3370
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3371
+
3372
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3373
+
3374
+ ```ruby
3375
+ def ignored_callstack(path)
3376
+ path.start_with?(RAILS_GEM_ROOT) ||
3377
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3378
+ end
3379
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3380
+ ```
3381
+ </details>
3382
+ <details open>
3383
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3384
+
3385
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3386
+
3387
+ ```ruby
3388
+ def ignored_callstack(path)
3389
+ path.start_with?(RAILS_GEM_ROOT) ||
3390
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3391
+ end
3392
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3393
+ ```
3394
+ </details>
3395
+ <details open>
3396
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3397
+
3398
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3399
+
3400
+ ```ruby
3401
+ def ignored_callstack(path)
3402
+ path.start_with?(RAILS_GEM_ROOT) ||
3403
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3404
+ end
3405
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3406
+ ```
3407
+ </details>
3408
+ <details open>
3409
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3410
+
3411
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3412
+
3413
+ ```ruby
3414
+ def ignored_callstack(path)
3415
+ path.start_with?(RAILS_GEM_ROOT) ||
3416
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3417
+ end
3418
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3419
+ ```
3420
+ </details>
3421
+ <details open>
3422
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3423
+
3424
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3425
+
3426
+ ```ruby
3427
+ def ignored_callstack(path)
3428
+ path.start_with?(RAILS_GEM_ROOT) ||
3429
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3430
+ end
3431
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3432
+ ```
3433
+ </details>
3434
+ <details open>
3435
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3436
+
3437
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3438
+
3439
+ ```ruby
3440
+ def ignored_callstack(path)
3441
+ path.start_with?(RAILS_GEM_ROOT) ||
3442
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3443
+ end
3444
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3445
+ ```
3446
+ </details>
3447
+ <details open>
3448
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3449
+
3450
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3451
+
3452
+ ```ruby
3453
+ def ignored_callstack(path)
3454
+ path.start_with?(RAILS_GEM_ROOT) ||
3455
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3456
+ end
3457
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3458
+ ```
3459
+ </details>
3460
+ <details open>
3461
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3462
+
3463
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3464
+
3465
+ ```ruby
3466
+ def ignored_callstack(path)
3467
+ path.start_with?(RAILS_GEM_ROOT) ||
3468
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3469
+ end
3470
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3471
+ ```
3472
+ </details>
3473
+ <details open>
3474
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3475
+
3476
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3477
+
3478
+ ```ruby
3479
+ def ignored_callstack(path)
3480
+ path.start_with?(RAILS_GEM_ROOT) ||
3481
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3482
+ end
3483
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3484
+ ```
3485
+ </details>
3486
+ <details open>
3487
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3488
+
3489
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3490
+
3491
+ ```ruby
3492
+ def ignored_callstack(path)
3493
+ path.start_with?(RAILS_GEM_ROOT) ||
3494
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3495
+ end
3496
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3497
+ ```
3498
+ </details>
3499
+ <details open>
3500
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3501
+
3502
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3503
+
3504
+ ```ruby
3505
+ def ignored_callstack(path)
3506
+ path.start_with?(RAILS_GEM_ROOT) ||
3507
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3508
+ end
3509
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3510
+ ```
3511
+ </details>
3512
+ <details open>
3513
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3514
+
3515
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3516
+
3517
+ ```ruby
3518
+ def ignored_callstack(path)
3519
+ path.start_with?(RAILS_GEM_ROOT) ||
3520
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3521
+ end
3522
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3523
+ ```
3524
+ </details>
3525
+ <details open>
3526
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3527
+
3528
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3529
+
3530
+ ```ruby
3531
+ def ignored_callstack(path)
3532
+ path.start_with?(RAILS_GEM_ROOT) ||
3533
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3534
+ end
3535
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3536
+ ```
3537
+ </details>
3538
+ <details open>
3539
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3540
+
3541
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3542
+
3543
+ ```ruby
3544
+ def ignored_callstack(path)
3545
+ path.start_with?(RAILS_GEM_ROOT) ||
3546
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3547
+ end
3548
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3549
+ ```
3550
+ </details>
3551
+ <details open>
3552
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:130</summary>
3553
+
3554
+ ##### ActiveRecord::LogSubscriber#ignored_callstack
3555
+
3556
+ ```ruby
3557
+ def ignored_callstack(path)
3558
+ path.start_with?(RAILS_GEM_ROOT) ||
3559
+ path.start_with?(RbConfig::CONFIG["rubylibdir"])
3560
+ end
3561
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:117
3562
+ ```
3563
+ </details>
3564
+ <details open>
3565
+ <summary>vendor/bundle/gems/railties-5.2.3/lib/rails.rb:63</summary>
3566
+
3567
+ ##### Rails.root
3568
+
3569
+ ```ruby
3570
+ def root
3571
+ application && application.config.root
3572
+ end
3573
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:107
3574
+ ```
3575
+ </details>
3576
+ <details open>
3577
+ <summary>vendor/bundle/gems/railties-5.2.3/lib/rails.rb:39</summary>
3578
+
3579
+ ##### Rails.application
3580
+
3581
+ ```ruby
3582
+ def application
3583
+ @application ||= (app_class.instance if app_class)
3584
+ end
3585
+ # called from vendor/bundle/gems/railties-5.2.3/lib/rails.rb:64
3586
+ ```
3587
+ </details>
3588
+ <details open>
3589
+ <summary>vendor/bundle/gems/railties-5.2.3/lib/rails.rb:39</summary>
3590
+
3591
+ ##### Rails.application
3592
+
3593
+ ```ruby
3594
+ def application
3595
+ @application ||= (app_class.instance if app_class)
3596
+ end
3597
+ # called from vendor/bundle/gems/railties-5.2.3/lib/rails.rb:64
3598
+ ```
3599
+ </details>
3600
+ <details open>
3601
+ <summary>vendor/bundle/gems/railties-5.2.3/lib/rails/application.rb:372</summary>
3602
+
3603
+ ##### Rails::Application#config
3604
+
3605
+ ```ruby
3606
+ def config #:nodoc:
3607
+ @config ||= Application::Configuration.new(self.class.find_root(self.class.called_from))
3608
+ end
3609
+ # called from vendor/bundle/gems/railties-5.2.3/lib/rails.rb:64
3610
+ ```
3611
+ </details>
3612
+ <details open>
3613
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:90</summary>
3614
+
3615
+ ##### ActiveRecord::LogSubscriber#logger
3616
+
3617
+ ```ruby
3618
+ def logger
3619
+ ActiveRecord::Base.logger
3620
+ end
3621
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:111
3622
+ ```
3623
+ </details>
3624
+ <details open>
3625
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/explain_subscriber.rb:12</summary>
3626
+
3627
+ ##### ActiveRecord::ExplainSubscriber#finish
3628
+
3629
+ ```ruby
3630
+ def finish(name, id, payload)
3631
+ if ExplainRegistry.collect? && !ignore_payload?(payload)
3632
+ ExplainRegistry.queries << payload.values_at(:sql, :binds)
3633
+ end
3634
+ end
3635
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/notifications/fanout.rb:104
3636
+ ```
3637
+ </details>
3638
+ <details open>
3639
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/explain_registry.rb:23</summary>
3640
+
3641
+ ##### ActiveRecord::ExplainRegistry#collect?
3642
+
3643
+ ```ruby
3644
+ def collect?
3645
+ @collect
3646
+ end
3647
+ # called from vendor/bundle/gems/activesupport-5.2.3/lib/active_support/per_thread_registry.rb:55
3648
+ ```
3649
+ </details>
3650
+ <details open>
3651
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/result.rb:108</summary>
3652
+
3653
+ ##### ActiveRecord::Result#initialize_copy
3654
+
3655
+ ```ruby
3656
+ def initialize_copy(other)
3657
+ @columns = columns.dup
3658
+ @rows = rows.dup
3659
+ @column_types = column_types.dup
3660
+ @hash_rows = nil
3661
+ end
3662
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:129
3663
+ ```
3664
+ </details>
3665
+ <details open>
3666
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:345</summary>
3667
+
3668
+ ##### ActiveRecord::ModelSchema::ClassMethods.attribute_types
3669
+
3670
+ ```ruby
3671
+ def attribute_types # :nodoc:
3672
+ load_schema
3673
+ @attribute_types ||= Hash.new(Type.default_value)
3674
+ end
3675
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/querying.rb:43
3676
+ ```
3677
+ </details>
3678
+ <details open>
3679
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:454</summary>
3680
+
3681
+ ##### ActiveRecord::ModelSchema::ClassMethods.load_schema
3682
+
3683
+ ```ruby
3684
+ def load_schema
3685
+ return if schema_loaded?
3686
+ @load_schema_monitor.synchronize do
3687
+ return if defined?(@columns_hash) && @columns_hash
3688
+
3689
+ load_schema!
3690
+
3691
+ @schema_loaded = true
3692
+ end
3693
+ end
3694
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:346
3695
+ ```
3696
+ </details>
3697
+ <details open>
3698
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:450</summary>
3699
+
3700
+ ##### ActiveRecord::ModelSchema::ClassMethods.schema_loaded?
3701
+
3702
+ ```ruby
3703
+ def schema_loaded?
3704
+ defined?(@schema_loaded) && @schema_loaded
3705
+ end
3706
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/model_schema.rb:455
3707
+ ```
3708
+ </details>
3709
+ <details open>
3710
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/result.rb:47</summary>
3711
+
3712
+ ##### ActiveRecord::Result#length
3713
+
3714
+ ```ruby
3715
+ def length
3716
+ @rows.length
3717
+ end
3718
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/querying.rb:47
3719
+ ```
3720
+ </details>
3721
+ <details open>
3722
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/result.rb:55</summary>
3723
+
3724
+ ##### ActiveRecord::Result#each
3725
+
3726
+ ```ruby
3727
+ def each
3728
+ if block_given?
3729
+ hash_rows.each { |row| yield row }
3730
+ else
3731
+ hash_rows.to_enum { @rows.size }
3732
+ end
3733
+ end
3734
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/querying.rb:52
3735
+ ```
3736
+ </details>
3737
+ <details open>
3738
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/result.rb:123</summary>
3739
+
3740
+ ##### ActiveRecord::Result#hash_rows
3741
+
3742
+ ```ruby
3743
+ def hash_rows
3744
+ @hash_rows ||=
3745
+ begin
3746
+ # We freeze the strings to prevent them getting duped when
3747
+ # used as keys in ActiveRecord::Base's @attributes hash
3748
+ columns = @columns.map { |c| c.dup.freeze }
3749
+ @rows.map { |row|
3750
+ # In the past we used Hash[columns.zip(row)]
3751
+ # though elegant, the verbose way is much more efficient
3752
+ # both time and memory wise cause it avoids a big array allocation
3753
+ # this method is called a lot and needs to be micro optimised
3754
+ hash = {}
3755
+
3756
+ index = 0
3757
+ length = columns.length
3758
+
3759
+ while index < length
3760
+ hash[columns[index]] = row[index]
3761
+ index += 1
3762
+ end
3763
+
3764
+ hash
3765
+ }
3766
+ end
3767
+ end
3768
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/result.rb:57
3769
+ ```
3770
+ </details>
3771
+ <details open>
3772
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
3773
+
3774
+ ##### ActiveRecord::QueryMethods#preload_values
3775
+
3776
+ ```ruby
3777
+ def #{method_name} # def includes_values
3778
+ get_value(#{name.inspect}) # get_value(:includes)
3779
+ end # end
3780
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:563
3781
+ ```
3782
+ </details>
3783
+ <details open>
3784
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
3785
+
3786
+ ##### ActiveRecord::QueryMethods#get_value
3787
+
3788
+ ```ruby
3789
+ def get_value(name) # :nodoc:
3790
+ @values.fetch(name, DEFAULT_VALUES[name])
3791
+ end
3792
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
3793
+ ```
3794
+ </details>
3795
+ <details open>
3796
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:472</summary>
3797
+
3798
+ ##### ActiveRecord::Relation#eager_loading?
3799
+
3800
+ ```ruby
3801
+ def eager_loading?
3802
+ @should_eager_load ||=
3803
+ eager_load_values.any? ||
3804
+ includes_values.any? && (joined_includes_values.any? || references_eager_loaded_tables?)
3805
+ end
3806
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:564
3807
+ ```
3808
+ </details>
3809
+ <details open>
3810
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
3811
+
3812
+ ##### ActiveRecord::QueryMethods#eager_load_values
3813
+
3814
+ ```ruby
3815
+ def #{method_name} # def includes_values
3816
+ get_value(#{name.inspect}) # get_value(:includes)
3817
+ end # end
3818
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:474
3819
+ ```
3820
+ </details>
3821
+ <details open>
3822
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
3823
+
3824
+ ##### ActiveRecord::QueryMethods#get_value
3825
+
3826
+ ```ruby
3827
+ def get_value(name) # :nodoc:
3828
+ @values.fetch(name, DEFAULT_VALUES[name])
3829
+ end
3830
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
3831
+ ```
3832
+ </details>
3833
+ <details open>
3834
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
3835
+
3836
+ ##### ActiveRecord::QueryMethods#includes_values
3837
+
3838
+ ```ruby
3839
+ def #{method_name} # def includes_values
3840
+ get_value(#{name.inspect}) # get_value(:includes)
3841
+ end # end
3842
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:475
3843
+ ```
3844
+ </details>
3845
+ <details open>
3846
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
3847
+
3848
+ ##### ActiveRecord::QueryMethods#get_value
3849
+
3850
+ ```ruby
3851
+ def get_value(name) # :nodoc:
3852
+ @values.fetch(name, DEFAULT_VALUES[name])
3853
+ end
3854
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
3855
+ ```
3856
+ </details>
3857
+ <details open>
3858
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
3859
+
3860
+ ##### ActiveRecord::QueryMethods#includes_values
3861
+
3862
+ ```ruby
3863
+ def #{method_name} # def includes_values
3864
+ get_value(#{name.inspect}) # get_value(:includes)
3865
+ end # end
3866
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:564
3867
+ ```
3868
+ </details>
3869
+ <details open>
3870
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
3871
+
3872
+ ##### ActiveRecord::QueryMethods#get_value
3873
+
3874
+ ```ruby
3875
+ def get_value(name) # :nodoc:
3876
+ @values.fetch(name, DEFAULT_VALUES[name])
3877
+ end
3878
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
3879
+ ```
3880
+ </details>
3881
+ <details open>
3882
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:69</summary>
3883
+
3884
+ ##### ActiveRecord::QueryMethods#readonly_value
3885
+
3886
+ ```ruby
3887
+ def #{method_name} # def includes_values
3888
+ get_value(#{name.inspect}) # get_value(:includes)
3889
+ end # end
3890
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation.rb:571
3891
+ ```
3892
+ </details>
3893
+ <details open>
3894
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:907</summary>
3895
+
3896
+ ##### ActiveRecord::QueryMethods#get_value
3897
+
3898
+ ```ruby
3899
+ def get_value(name) # :nodoc:
3900
+ @values.fetch(name, DEFAULT_VALUES[name])
3901
+ end
3902
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/relation/query_methods.rb:70
3903
+ ```
3904
+ </details>
3905
+ <details open>
3906
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal.rb:150</summary>
3907
+
3908
+ ##### ActionController::Metal#content_type
3909
+
3910
+ ```ruby
3911
+ delegate :headers, :status=, :location=, :content_type=,
3912
+ :status, :location, :content_type, to: "@_response"
3913
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:166
3914
+ ```
3915
+ </details>
3916
+ <details open>
3917
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:247</summary>
3918
+
3919
+ ##### ActionDispatch::Response#content_type
3920
+
3921
+ ```ruby
3922
+ def content_type
3923
+ parsed_content_type_header.mime_type
3924
+ end
3925
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal.rb:150
3926
+ ```
3927
+ </details>
3928
+ <details open>
3929
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:422</summary>
3930
+
3931
+ ##### ActionDispatch::Response#parsed_content_type_header
3932
+
3933
+ ```ruby
3934
+ def parsed_content_type_header
3935
+ parse_content_type(get_header(CONTENT_TYPE))
3936
+ end
3937
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:248
3938
+ ```
3939
+ </details>
3940
+ <details open>
3941
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:182</summary>
3942
+
3943
+ ##### ActionDispatch::Response#get_header
3944
+
3945
+ ```ruby
3946
+ def get_header(key); headers[key]; end
3947
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:423
3948
+ ```
3949
+ </details>
3950
+ <details open>
3951
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:412</summary>
3952
+
3953
+ ##### ActionDispatch::Response#parse_content_type
3954
+
3955
+ ```ruby
3956
+ def parse_content_type(content_type)
3957
+ if content_type && match = CONTENT_TYPE_PARSER.match(content_type)
3958
+ ContentTypeHeader.new(match[:type], match[:charset])
3959
+ else
3960
+ NullContentTypeHeader
3961
+ end
3962
+ end
3963
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:423
3964
+ ```
3965
+ </details>
3966
+ <details open>
3967
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_type.rb:40</summary>
3968
+
3969
+ ##### Mime.[]
3970
+
3971
+ ```ruby
3972
+ def [](type)
3973
+ return type if type.is_a?(Type)
3974
+ Type.lookup_by_extension(type)
3975
+ end
3976
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:166
3977
+ ```
3978
+ </details>
3979
+ <details open>
3980
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_type.rb:148</summary>
3981
+
3982
+ ##### Mime::Type.lookup_by_extension
3983
+
3984
+ ```ruby
3985
+ def lookup_by_extension(extension)
3986
+ EXTENSION_LOOKUP[extension.to_s]
3987
+ end
3988
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_type.rb:42
3989
+ ```
3990
+ </details>
3991
+ <details open>
3992
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal.rb:150</summary>
3993
+
3994
+ ##### ActionController::Metal#content_type=
3995
+
3996
+ ```ruby
3997
+ delegate :headers, :status=, :location=, :content_type=,
3998
+ :status, :location, :content_type, to: "@_response"
3999
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/renderers.rb:166
4000
+ ```
4001
+ </details>
4002
+ <details open>
4003
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:229</summary>
4004
+
4005
+ ##### ActionDispatch::Response#content_type=
4006
+
4007
+ ```ruby
4008
+ def content_type=(content_type)
4009
+ return unless content_type
4010
+ new_header_info = parse_content_type(content_type.to_s)
4011
+ prev_header_info = parsed_content_type_header
4012
+ charset = new_header_info.charset || prev_header_info.charset
4013
+ charset ||= self.class.default_charset unless prev_header_info.mime_type
4014
+ set_content_type new_header_info.mime_type, charset
4015
+ end
4016
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal.rb:150
4017
+ ```
4018
+ </details>
4019
+ <details open>
4020
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_type.rb:232</summary>
4021
+
4022
+ ##### Mime::Type#to_s
4023
+
4024
+ ```ruby
4025
+ def to_s
4026
+ @string
4027
+ end
4028
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:231
4029
+ ```
4030
+ </details>
4031
+ <details open>
4032
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:412</summary>
4033
+
4034
+ ##### ActionDispatch::Response#parse_content_type
4035
+
4036
+ ```ruby
4037
+ def parse_content_type(content_type)
4038
+ if content_type && match = CONTENT_TYPE_PARSER.match(content_type)
4039
+ ContentTypeHeader.new(match[:type], match[:charset])
4040
+ else
4041
+ NullContentTypeHeader
4042
+ end
4043
+ end
4044
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:231
4045
+ ```
4046
+ </details>
4047
+ <details open>
4048
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:422</summary>
4049
+
4050
+ ##### ActionDispatch::Response#parsed_content_type_header
4051
+
4052
+ ```ruby
4053
+ def parsed_content_type_header
4054
+ parse_content_type(get_header(CONTENT_TYPE))
4055
+ end
4056
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:232
4057
+ ```
4058
+ </details>
4059
+ <details open>
4060
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:182</summary>
4061
+
4062
+ ##### ActionDispatch::Response#get_header
4063
+
4064
+ ```ruby
4065
+ def get_header(key); headers[key]; end
4066
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:423
4067
+ ```
4068
+ </details>
4069
+ <details open>
4070
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:412</summary>
4071
+
4072
+ ##### ActionDispatch::Response#parse_content_type
4073
+
4074
+ ```ruby
4075
+ def parse_content_type(content_type)
4076
+ if content_type && match = CONTENT_TYPE_PARSER.match(content_type)
4077
+ ContentTypeHeader.new(match[:type], match[:charset])
4078
+ else
4079
+ NullContentTypeHeader
4080
+ end
4081
+ end
4082
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:423
4083
+ ```
4084
+ </details>
4085
+ <details open>
4086
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:426</summary>
4087
+
4088
+ ##### ActionDispatch::Response#set_content_type
4089
+
4090
+ ```ruby
4091
+ def set_content_type(content_type, charset)
4092
+ type = (content_type || "").dup
4093
+ type << "; charset=#{charset.to_s.downcase}" if charset
4094
+ set_header CONTENT_TYPE, type
4095
+ end
4096
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:235
4097
+ ```
4098
+ </details>
4099
+ <details open>
4100
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:183</summary>
4101
+
4102
+ ##### ActionDispatch::Response#set_header
4103
+
4104
+ ```ruby
4105
+ def set_header(key, v); headers[key] = v; end
4106
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:429
4107
+ ```
4108
+ </details>
4109
+ <details open>
4110
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:44</summary>
4111
+
4112
+ ##### ActionDispatch::Response::Header#[]=
4113
+
4114
+ ```ruby
4115
+ def []=(k, v)
4116
+ if @response.sending? || @response.sent?
4117
+ raise ActionDispatch::IllegalStateError, "header already sent"
4118
+ end
4119
+
4120
+ super
4121
+ end
4122
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:183
4123
+ ```
4124
+ </details>
4125
+ <details open>
4126
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:219</summary>
4127
+
4128
+ ##### ActionDispatch::Response#sending?
4129
+
4130
+ ```ruby
4131
+ def sending?; synchronize { @sending }; end
4132
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:45
4133
+ ```
4134
+ </details>
4135
+ <details open>
4136
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:221</summary>
4137
+
4138
+ ##### ActionDispatch::Response#sent?
4139
+
4140
+ ```ruby
4141
+ def sent?; synchronize { @sent }; end
4142
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:45
4143
+ ```
4144
+ </details>
4145
+ <details open>
4146
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:54</summary>
4147
+
4148
+ ##### AbstractController::Rendering#rendered_format
4149
+
4150
+ ```ruby
4151
+ def rendered_format
4152
+ Mime[:text]
4153
+ end
4154
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:29
4155
+ ```
4156
+ </details>
4157
+ <details open>
4158
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_type.rb:40</summary>
4159
+
4160
+ ##### Mime.[]
4161
+
4162
+ ```ruby
4163
+ def [](type)
4164
+ return type if type.is_a?(Type)
4165
+ Type.lookup_by_extension(type)
4166
+ end
4167
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:55
4168
+ ```
4169
+ </details>
4170
+ <details open>
4171
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_type.rb:148</summary>
4172
+
4173
+ ##### Mime::Type.lookup_by_extension
4174
+
4175
+ ```ruby
4176
+ def lookup_by_extension(extension)
4177
+ EXTENSION_LOOKUP[extension.to_s]
4178
+ end
4179
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/mime_type.rb:42
4180
+ ```
4181
+ </details>
4182
+ <details open>
4183
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:75</summary>
4184
+
4185
+ ##### ActionController::Rendering#_set_rendered_content_type
4186
+
4187
+ ```ruby
4188
+ def _set_rendered_content_type(format)
4189
+ if format && !response.content_type
4190
+ self.content_type = format.to_s
4191
+ end
4192
+ end
4193
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:29
4194
+ ```
4195
+ </details>
4196
+ <details open>
4197
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:247</summary>
4198
+
4199
+ ##### ActionDispatch::Response#content_type
4200
+
4201
+ ```ruby
4202
+ def content_type
4203
+ parsed_content_type_header.mime_type
4204
+ end
4205
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:76
4206
+ ```
4207
+ </details>
4208
+ <details open>
4209
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:422</summary>
4210
+
4211
+ ##### ActionDispatch::Response#parsed_content_type_header
4212
+
4213
+ ```ruby
4214
+ def parsed_content_type_header
4215
+ parse_content_type(get_header(CONTENT_TYPE))
4216
+ end
4217
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:248
4218
+ ```
4219
+ </details>
4220
+ <details open>
4221
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:182</summary>
4222
+
4223
+ ##### ActionDispatch::Response#get_header
4224
+
4225
+ ```ruby
4226
+ def get_header(key); headers[key]; end
4227
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:423
4228
+ ```
4229
+ </details>
4230
+ <details open>
4231
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:412</summary>
4232
+
4233
+ ##### ActionDispatch::Response#parse_content_type
4234
+
4235
+ ```ruby
4236
+ def parse_content_type(content_type)
4237
+ if content_type && match = CONTENT_TYPE_PARSER.match(content_type)
4238
+ ContentTypeHeader.new(match[:type], match[:charset])
4239
+ else
4240
+ NullContentTypeHeader
4241
+ end
4242
+ end
4243
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:423
4244
+ ```
4245
+ </details>
4246
+ <details open>
4247
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal.rb:175</summary>
4248
+
4249
+ ##### ActionController::Metal#response_body=
4250
+
4251
+ ```ruby
4252
+ def response_body=(body)
4253
+ body = [body] unless body.nil? || body.respond_to?(:each)
4254
+ response.reset_body!
4255
+ return unless body
4256
+ response.body = body
4257
+ super
4258
+ end
4259
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/abstract_controller/rendering.rb:31
4260
+ ```
4261
+ </details>
4262
+ <details open>
4263
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:352</summary>
4264
+
4265
+ ##### ActionDispatch::Response#reset_body!
4266
+
4267
+ ```ruby
4268
+ def reset_body!
4269
+ @stream = build_buffer(self, [])
4270
+ end
4271
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal.rb:177
4272
+ ```
4273
+ </details>
4274
+ <details open>
4275
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:452</summary>
4276
+
4277
+ ##### ActionDispatch::Response#build_buffer
4278
+
4279
+ ```ruby
4280
+ def build_buffer(response, body)
4281
+ Buffer.new response, body
4282
+ end
4283
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:353
4284
+ ```
4285
+ </details>
4286
+ <details open>
4287
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:100</summary>
4288
+
4289
+ ##### ActionDispatch::Response::Buffer#initialize
4290
+
4291
+ ```ruby
4292
+ def initialize(response, buf)
4293
+ @response = response
4294
+ @buf = buf
4295
+ @closed = false
4296
+ @str_body = nil
4297
+ end
4298
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:453
4299
+ ```
4300
+ </details>
4301
+ <details open>
4302
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:312</summary>
4303
+
4304
+ ##### ActionDispatch::Response#body=
4305
+
4306
+ ```ruby
4307
+ def body=(body)
4308
+ if body.respond_to?(:to_path)
4309
+ @stream = body
4310
+ else
4311
+ synchronize do
4312
+ @stream = build_buffer self, munge_body_object(body)
4313
+ end
4314
+ end
4315
+ end
4316
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_controller/metal.rb:179
4317
+ ```
4318
+ </details>
4319
+ <details open>
4320
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:456</summary>
4321
+
4322
+ ##### ActionDispatch::Response#munge_body_object
4323
+
4324
+ ```ruby
4325
+ def munge_body_object(body)
4326
+ body.respond_to?(:each) ? body : [body]
4327
+ end
4328
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:317
4329
+ ```
4330
+ </details>
4331
+ <details open>
4332
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:452</summary>
4333
+
4334
+ ##### ActionDispatch::Response#build_buffer
4335
+
4336
+ ```ruby
4337
+ def build_buffer(response, body)
4338
+ Buffer.new response, body
4339
+ end
4340
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:317
4341
+ ```
4342
+ </details>
4343
+ <details open>
4344
+ <summary>vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:100</summary>
4345
+
4346
+ ##### ActionDispatch::Response::Buffer#initialize
4347
+
4348
+ ```ruby
4349
+ def initialize(response, buf)
4350
+ @response = response
4351
+ @buf = buf
4352
+ @closed = false
4353
+ @str_body = nil
4354
+ end
4355
+ # called from vendor/bundle/gems/actionpack-5.2.3/lib/action_dispatch/http/response.rb:453
4356
+ ```
4357
+ </details>
4358
+ <details open>
4359
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:15</summary>
4360
+
4361
+ ##### ActiveRecord::LogSubscriber.reset_runtime
4362
+
4363
+ ```ruby
4364
+ def self.reset_runtime
4365
+ rt, self.runtime = runtime, 0
4366
+ rt
4367
+ end
4368
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/railties/controller_runtime.rb:32
4369
+ ```
4370
+ </details>
4371
+ <details open>
4372
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:11</summary>
4373
+
4374
+ ##### ActiveRecord::LogSubscriber.runtime
4375
+
4376
+ ```ruby
4377
+ def self.runtime
4378
+ ActiveRecord::RuntimeRegistry.sql_runtime ||= 0
4379
+ end
4380
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:16
4381
+ ```
4382
+ </details>
4383
+ <details open>
4384
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:20</summary>
4385
+
4386
+ ##### ActiveRecord::RuntimeRegistry.sql_runtime
4387
+
4388
+ ```ruby
4389
+ class_eval %{ def self.#{val}; instance.#{val}; end }, __FILE__, __LINE__
4390
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:12
4391
+ ```
4392
+ </details>
4393
+ <details open>
4394
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:7</summary>
4395
+
4396
+ ##### ActiveRecord::LogSubscriber.runtime=
4397
+
4398
+ ```ruby
4399
+ def self.runtime=(value)
4400
+ ActiveRecord::RuntimeRegistry.sql_runtime = value
4401
+ end
4402
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:16
4403
+ ```
4404
+ </details>
4405
+ <details open>
4406
+ <summary>vendor/bundle/gems/activerecord-5.2.3/lib/active_record/runtime_registry.rb:21</summary>
4407
+
4408
+ ##### ActiveRecord::RuntimeRegistry.sql_runtime=
4409
+
4410
+ ```ruby
4411
+ class_eval %{ def self.#{val}=(x); instance.#{val}=x; end }, __FILE__, __LINE__
4412
+ # called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:8
4413
+ ```
4414
+ </details>