module ParamsReady::Pagination::Nulls::First
Public Class Methods
if_not_null_predicate(tendency, column, value, nested)
click to toggle source
# File lib/params_ready/pagination/nulls.rb, line 15 def self.if_not_null_predicate(tendency, column, value, nested) tendency.non_nullable_predicate(column, value, nested) end
if_null_predicate(column, nested)
click to toggle source
# File lib/params_ready/pagination/nulls.rb, line 8 def self.if_null_predicate(column, nested) is_null_and_all = column.eq(nil).and(nested) grouping = Arel::Nodes::Grouping.new(is_null_and_all) is_not_null = column.not_eq(nil) grouping.or(is_not_null) end