Module: Babik::QuerySet::SetOperations
- Included in:
- AbstractBase
- Defined in:
- lib/babik/queryset/mixins/set_operations.rb
Overview
Set operations over QuerySets
Instance Method Summary collapse
-
#difference(other_queryset) ⇒ Babik::QuerySet::Except
Difference (minus) operation.
-
#intersection(other_queryset) ⇒ Babik::QuerySet::Intersect
Intersection (except) operation.
-
#union(other_queryset) ⇒ Babik::QuerySet::Union
Union operation.
Instance Method Details
#difference(other_queryset) ⇒ Babik::QuerySet::Except
Difference (minus) operation
11 12 13 |
# 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) ⇒ Babik::QuerySet::Intersect
Intersection (except) operation
18 19 20 |
# 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) ⇒ Babik::QuerySet::Union
Union operation
25 26 27 |
# File 'lib/babik/queryset/mixins/set_operations.rb', line 25 def union(other_queryset) Babik::QuerySet::Union.new(self.model, self, other_queryset) end |