Module: ParamsReady::Pagination::Nulls::Last

Defined in:
lib/params_ready/pagination/nulls.rb

Class Method Summary collapse

Class Method Details

.if_not_null_predicate(tendency, column, value, nested) ⇒ Object



25
26
27
# File 'lib/params_ready/pagination/nulls.rb', line 25

def self.if_not_null_predicate(tendency, column, value, nested)
  tendency.non_nullable_predicate(column, value, nested).or(column.eq(nil))
end

.if_null_predicate(column, nested) ⇒ Object



21
22
23
# File 'lib/params_ready/pagination/nulls.rb', line 21

def self.if_null_predicate(column, nested)
  Arel::Nodes::Grouping.new(column.eq(nil).and(nested))
end