Sha256: 0d7ac9600ef418b64a8978f43e521ad66ae2c4575bf37410b553ab9d6db256e9
Contents?: true
Size: 761 Bytes
Versions: 9
Compression:
Stored size: 761 Bytes
Contents
# rubocop:disable Naming/MethodName # rubocop:disable Naming/UncommunicativeMethodParamName module Arel module Nodes # Postgres: https://www.postgresql.org/docs/9.4/sql-select.html class RangeFunction < Arel::Nodes::Unary attr_reader :is_rowsfrom def initialize(*args, is_rowsfrom:, **kwargs) @is_rowsfrom = is_rowsfrom super(*args, **kwargs) end end end module Visitors class ToSql def visit_Arel_Nodes_RangeFunction(o, collector) collector << 'ROWS FROM (' if o.is_rowsfrom visit o.expr, collector collector << ')' if o.is_rowsfrom collector end end end end # rubocop:enable Naming/MethodName # rubocop:enable Naming/UncommunicativeMethodParamName
Version data entries
9 entries across 9 versions & 1 rubygems