module Babik::QuerySet::SetOperations

Set operations over QuerySets

Public Instance Methods

difference(other_queryset) click to toggle source

Difference (minus) operation @param other_queryset [QuerySet] Other QuerySet @return [Babik::QuerySet::Except] Except set operation between this queryset and the other queryset.

# File lib/babik/queryset/mixins/set_operations.rb, line 11
def difference(other_queryset)
  Babik::QuerySet::Except.new(self.model, self, other_queryset)
end
intersection(other_queryset) click to toggle source

Intersection (except) operation @param other_queryset [QuerySet] Other QuerySet @return [Babik::QuerySet::Intersect] Intersection set operation between this queryset and the other queryset.

# File lib/babik/queryset/mixins/set_operations.rb, line 18
def intersection(other_queryset)
  Babik::QuerySet::Intersect.new(self.model, self, other_queryset)
end
union(other_queryset) click to toggle source

Union operation @param other_queryset [QuerySet] Other QuerySet @return [Babik::QuerySet::Union] Union set operation between this queryset and the other queryset.

# File lib/babik/queryset/mixins/set_operations.rb, line 25
def union(other_queryset)
  Babik::QuerySet::Union.new(self.model, self, other_queryset)
end