Sha256: 2baf3b56829fb56ccb9f38d808807f2c0b66a7dd10b5f5a15cc3337ef496628d
Contents?: true
Size: 870 Bytes
Versions: 10
Compression:
Stored size: 870 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::Node attr_reader :timezone attr_reader :expr def initialize(expr, timezone) @expr = 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 class Dot def visit_Arel_Nodes_AtTimeZone(o) visit_edge o, 'expr' visit_edge o, 'timezone' end end end end # rubocop:enable Naming/MethodName # rubocop:enable Naming/UncommunicativeMethodParamName
Version data entries
10 entries across 10 versions & 1 rubygems