module Axiom::Algebra::Projection::Methods
Public Instance Methods
project(attributes)
click to toggle source
Return a relation with only the attributes specified
@example
projection = relation.project([:a, :b, :c])
@param [#to_ary] attributes
the attributes to keep in the header
@return [Projection]
@api public
# File lib/axiom/algebra/projection.rb, line 169 def project(attributes) Projection.new(self, attributes) end
remove(attributes)
click to toggle source
Return a relation with attributes not specified
@example
projection = relation.remove([:a, b, c])
@param [#to_ary] attributes
the attributes to remove from the header
@return [Projection]
@api public
# File lib/axiom/algebra/projection.rb, line 184 def remove(attributes) project(header - attributes) end