Sha256: e54fc1b6c39f22eb2800a46cc29f8a438c7f4a4c709b4c45ac35d0c401387586
Contents?: true
Size: 1.51 KB
Versions: 8
Compression:
Stored size: 1.51 KB
Contents
require_relative 'base_scalar_comparison_input_type' require 'arel' module GraphQL module Filters module InputTypes class NumericComparisonInputType include CachedClass resolve_cache_miss do |value_type, klass| klass.new BaseScalarComparisonInputType[value_type] do argument :greater_than, value_type, prepare: lambda { |value, _context| lambda { |scope, column_name| scope.where.not(column_name => (..value)) } } argument :greater_than_or_equals_to, value_type, prepare: lambda { |value, _context| lambda { |scope, column_name| scope.where(column_name => (value..)) } } argument :less_than, value_type, prepare: lambda { |value, _context| lambda { |scope, column_name| scope.where(column_name => (...value)) } } argument :less_than_or_equals_to, value_type, prepare: lambda { |value, _context| lambda { |scope, column_name| scope.where(column_name => (..value)) } } end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems