Sha256: ba8ce455f20acbee8dd89b971b90334c8b4338fd78566b07107cd7862a7eff09

Contents?: true

Size: 630 Bytes

Versions: 10

Compression:

Stored size: 630 Bytes

Contents

# rubocop:disable Naming/MethodName
# rubocop:disable Naming/UncommunicativeMethodParamName

module Arel
  module Nodes
    # https://www.postgresql.org/docs/9.1/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
    class ExtractFrom < Arel::Nodes::Binary
    end
  end

  module Visitors
    class ToSql
      def visit_Arel_Nodes_ExtractFrom(o, collector)
        collector << 'extract('
        visit o.right, collector
        collector << ' from '
        visit o.left, collector
        collector << ')'
      end
    end
  end
end

# rubocop:enable Naming/MethodName
# rubocop:enable Naming/UncommunicativeMethodParamName

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arel_toolkit-0.4.9 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.8 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.7 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.6 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.5 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.4 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.3 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.2 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.1 lib/arel/extensions/extract_from.rb
arel_toolkit-0.4.0 lib/arel/extensions/extract_from.rb