class ScoutApm::SqlList
Attributes
sqls[R]
Public Class Methods
new(sql=nil)
click to toggle source
# File lib/scout_apm/instruments/active_record.rb, line 7 def initialize(sql=nil) @sqls = [] if !sql.nil? push(sql) end end
Public Instance Methods
<<(sql)
click to toggle source
# File lib/scout_apm/instruments/active_record.rb, line 15 def <<(sql) push(sql) end
merge(other)
click to toggle source
All of this one, then all of the other.
# File lib/scout_apm/instruments/active_record.rb, line 27 def merge(other) @sqls += other.sqls end
push(sql)
click to toggle source
# File lib/scout_apm/instruments/active_record.rb, line 19 def push(sql) if !(Utils::SqlSanitizer === sql) sql = Utils::SqlSanitizer.new(sql) end @sqls << sql end
to_s()
click to toggle source
# File lib/scout_apm/instruments/active_record.rb, line 31 def to_s @sqls.map{|s| s.to_s }.join(";\n") end