class Airbrake::Query
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/airbrake-ruby/query.rbs class Airbrake::Query def initialize: (method: String, route: String, query: String, func: String?, file: String, line: Integer, timing: Float, time: Float) -> void end
rubocop:disable Metrics/ParameterLists
@since v3.2.0
@api public
@see Airbrake.notify_query
Query holds SQL query data that powers SQL query collection.
def cargo
def cargo 'queries' end
def destination
def destination 'queries-stats' end
def initialize(
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (method: String, route: String, query: String, func: String?, file: String, line: Integer, timing: Float, time: Float) -> void
This signature was generated using 7 samples from 1 application.
def initialize( method:, route:, query:, func: nil, file: nil, line: nil, timing: nil, time: Time.now ) @time_utc = TimeTruncate.utc_truncate_minutes(time) @method = method @route = route @query = query @func = func @file = file @line = line @timing = timing @time = time end
def to_h
def to_h { 'method' => method, 'route' => route, 'query' => query, 'time' => @time_utc, 'function' => func, 'file' => file, 'line' => line, }.delete_if { |_key, val| val.nil? } end