module Sequel::Postgres::IntervalDatasetMethods

Constants

CAST_INTERVAL

Public Instance Methods

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, line 180
def literal_other_append(sql, v)
  case v
  when ActiveSupport::Duration
    literal_append(sql, IntervalDatabaseMethods.literal_duration(v))
    sql << CAST_INTERVAL
  else
    super
  end
end