Sha256: 9627f6501ef74422ba514d1c15576118efcb3349bf623a1f3c537c7863838453
Contents?: true
Size: 711 Bytes
Versions: 1
Compression:
Stored size: 711 Bytes
Contents
# rubocop:disable Naming/MethodName # rubocop:disable Naming/UncommunicativeMethodParamName module Arel module Nodes # https://www.postgresql.org/docs/9.2/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT class AtTimeZone < Arel::Nodes::Unary attr_reader :timezone def initialize(expr, timezone) super(expr) @timezone = timezone end end end module Visitors class ToSql def visit_Arel_Nodes_AtTimeZone(o, collector) visit o.expr, collector collector << ' AT TIME ZONE ' visit o.timezone, collector end end end end # rubocop:enable Naming/MethodName # rubocop:enable Naming/UncommunicativeMethodParamName
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arel_toolkit-0.3.0 | lib/arel/extensions/at_time_zone.rb |