| Module | Sequel::Postgres::IntervalDatasetMethods |
| In: |
lib/sequel/extensions/pg_interval.rb
|
| CAST_INTERVAL | = | '::interval'.freeze |
Handle literalization of ActiveSupport::Duration objects, treating them as PostgreSQL intervals.
# File lib/sequel/extensions/pg_interval.rb, line 177
177: def literal_other_append(sql, v)
178: case v
179: when ActiveSupport::Duration
180: literal_append(sql, IntervalDatabaseMethods.literal_duration(v))
181: sql << CAST_INTERVAL
182: else
183: super
184: end
185: end