Class: AhoyCaptain::Stats::BaseQuery

Inherits:
ApplicationQuery show all
Includes:
ComparableQuery, LazyComparableQuery
Defined in:
app/queries/ahoy_captain/stats/base_query.rb

Instance Attribute Summary

Attributes inherited from ApplicationQuery

#params

Class Method Summary collapse

Methods included from LazyComparableQuery

#with_lazy_comparison

Methods included from ComparableQuery

#with_comparison

Methods inherited from ApplicationQuery

call, inherited, #initialize, #inspect

Constructor Details

This class inherits a constructor from AhoyCaptain::ApplicationQuery

Class Method Details

.cast_type(column) ⇒ Object



9
10
11
# File 'app/queries/ahoy_captain/stats/base_query.rb', line 9

def self.cast_type(column)
  ActiveRecord::Type.lookup(::Ahoy::Visit.columns_hash[column.to_s].type)
end

.cast_value(type, value) ⇒ Object



13
14
15
# File 'app/queries/ahoy_captain/stats/base_query.rb', line 13

def self.cast_value(type, value)
  type.cast(value)
end