module Babik::QuerySet::Distinguishable

Distinguishable functionality for QuerySet

Public Instance Methods

distinct!() click to toggle source

Mark this QuerySet as distinguishable. Modify this object (i.e. DISTINCT keyword will be applied to the final SQL query). @return [QuerySet] Reference to this QuerySet.

# File lib/babik/queryset/mixins/distinguishable.rb, line 12
def distinct!
  @_distinct = true
  self
end
undistinct!() click to toggle source

Mark this QuerySet as not distinguishable (i.e. DISTINCT keyword will NOT be applied to query). @return [QuerySet] Reference to this QuerySet.

# File lib/babik/queryset/mixins/distinguishable.rb, line 20
def undistinct!
  @_distinct = false
  self
end