struct CQL::Performance::QueryData

Overview

Extension methods for QueryData to support to_h

Defined in:

performance/performance_metrics.cr
performance/query_profiler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(sql : String, params : Array(Bool | Float32 | Float64 | Int32 | Int64 | Slice(UInt8) | String | Time | Nil), execution_time : Time::Span, rows_affected : Int64 | Nil = nil, error : Nil | String = nil, normalized_sql : Nil | String = nil) #

[View source]

Instance Method Detail

def error : String | Nil #

[View source]
def execution_time : Time::Span #

[View source]
def normalized_sql : String #

[View source]
def params : Array(DB::Any) #

[View source]
def rows_affected : Int64 | Nil #

[View source]
def slow?(threshold : Time::Span) : Bool #

[View source]
def sql : String #

[View source]
def timestamp : Time #

[View source]
def to_h(include_params : Bool = false) : Hash(String, JSON::Any) #

Bound values often hold personal data, so #params is only included when asked for.


[View source]