Sha256: 4fd81432ed07970c94ad74f7e9505941e8935a2214a07ede061cc3c14466c428
Contents?: true
Size: 835 Bytes
Versions: 20
Compression:
Stored size: 835 Bytes
Contents
module Bmg module Relation class Materialized include Operator::Unary def initialize(operand) @operand = operand @materialized = nil end def type operand.type end def type=(type) operand.type = type end protected :type= public def _count _materialize._count end public def each(&bl) return to_enum unless block_given? _materialize.each(&bl) end def to_ast [ :materizalized, operand ] end def args [] end private def _materialize return @materialized if @materialized @materialized = Relation::InMemory.new(operand.type, operand.to_a) end end # class Materialized end # module Relation end # module Bmg
Version data entries
20 entries across 20 versions & 1 rubygems