class InfluxReporter::SqlSummarizer
@api private
Constants
- CACHE
- REGEXES
- TBL
Public Class Methods
new(config)
click to toggle source
# File lib/influx_reporter/sql_summarizer.rb, line 15 def initialize(config) @config = config end
Public Instance Methods
signature_for(sql)
click to toggle source
# File lib/influx_reporter/sql_summarizer.rb, line 19 def signature_for(sql) return CACHE[sql] if CACHE[sql] result = REGEXES.find do |regex, sig| if match = sql.match(regex) break sig + match[1] end end result || 'SQL' end