Sha256: 6e66c964dfe8f18bdf5fb9b6411bc814c9c1a7284c98255889054839501afb37

Contents?: true

Size: 635 Bytes

Versions: 26

Compression:

Stored size: 635 Bytes

Contents

module Bmg
  module Relation
    class Materialized
      include Operator::Unary

      def initialize(operand)
        @operand = operand
      end

      def type
        operand.type
      end

      def type=(type)
        operand.type = type
      end
      protected :type=

    public

      def each(&bl)
        @operand = Relation::InMemory.new(operand.type, operand.to_a) unless @operand.is_a?(Relation::InMemory)
        @operand.each(&bl)
      end

      def to_ast
        [ :materizalized, operand ]
      end

      def args
        []
      end

    end # class Materialized
  end # module Relation
end # module Bmg

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
bmg-0.18.1 lib/bmg/relation/materialized.rb
bmg-0.18.0 lib/bmg/relation/materialized.rb
bmg-0.17.8 lib/bmg/relation/materialized.rb
bmg-0.17.7 lib/bmg/relation/materialized.rb
bmg-0.17.6 lib/bmg/relation/materialized.rb
bmg-0.17.5 lib/bmg/relation/materialized.rb
bmg-0.17.4 lib/bmg/relation/materialized.rb
bmg-0.17.3 lib/bmg/relation/materialized.rb
bmg-0.17.2 lib/bmg/relation/materialized.rb
bmg-0.16.7 lib/bmg/relation/materialized.rb
bmg-0.17.1 lib/bmg/relation/materialized.rb
bmg-0.17.0 lib/bmg/relation/materialized.rb
bmg-0.16.6 lib/bmg/relation/materialized.rb
bmg-0.16.5 lib/bmg/relation/materialized.rb
bmg-0.16.4 lib/bmg/relation/materialized.rb
bmg-0.16.3 lib/bmg/relation/materialized.rb
bmg-0.16.2 lib/bmg/relation/materialized.rb
bmg-0.16.1 lib/bmg/relation/materialized.rb
bmg-0.16.0 lib/bmg/relation/materialized.rb
bmg-0.16.0.pre.rc2 lib/bmg/relation/materialized.rb