module Sequel::Postgres::IntervalDatasetMethods
Private Instance Methods
auto_param_type_fallback(v)
click to toggle source
Allow auto parameterization of ActiveSupport::Duration instances.
Calls superclass method
# File lib/sequel/extensions/pg_interval.rb 201 def auto_param_type_fallback(v) 202 if defined?(super) && (type = super) 203 type 204 elsif ActiveSupport::Duration === v 205 "::interval" 206 end 207 end
literal_other_append(sql, v)
click to toggle source
Handle literalization of ActiveSupport::Duration objects, treating them as PostgreSQL intervals.
Calls superclass method
# File lib/sequel/extensions/pg_interval.rb 211 def literal_other_append(sql, v) 212 case v 213 when ActiveSupport::Duration 214 literal_append(sql, IntervalDatabaseMethods.literal_duration(v)) 215 sql << '::interval' 216 else 217 super 218 end 219 end