Sha256: b34979ae800148e2fe7d2c89221834e16dec515cb14f58fd4ddb6002b5e0aa6c
Contents?: true
Size: 760 Bytes
Versions: 4
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true module RailsMiniProfiler class TraceSearch < BaseSearch option(:name) do |scope, value| scope.where(name: value) end option(:duration) do |scope, value| scope.where('duration > :duration', duration: value) end option(:allocations) do |scope, value| scope.where('allocations > :allocations', allocations: value) end option(:payload) do |scope, value| payload_column = DatabaseAdapter.cast_to_text(:payload) scope.where("#{payload_column} LIKE ?", "%#{value}%") end option(:backtrace) do |scope, value| backtrace_column = Adapters::DatabaseAdapter.cast_to_text(:backtrace) scope.where("#{backtrace_column} LIKE ?", "%#{value}%") end end end
Version data entries
4 entries across 4 versions & 1 rubygems