Class: Axiom::Relation::Materialized
- Inherits:
-
Axiom::Relation
- Object
- Axiom::Relation
- Axiom::Relation::Materialized
- Defined in:
- lib/axiom/relation/materialized.rb
Overview
A materialized relation
Direct Known Subclasses
Instance Attribute Summary collapse
-
#directions ⇒ Operation::Order::DirectionSet
readonly
private
The relation sort order.
Attributes inherited from Axiom::Relation
Instance Method Summary collapse
-
#initialize(header, tuples, directions = Operation::Order::DirectionSet::EMPTY) ⇒ undefined
constructor
private
Initialize a materialized Relation.
-
#materialize ⇒ self
A noop for Materialized relations.
-
#materialized? ⇒ true
Return true for a Materialized relation.
-
#size ⇒ Integer
Return the number of tuples.
Methods inherited from Axiom::Relation
#==, #[], #each, #empty?, #include?, new, #one, #replace
Methods included from Visitable
Constructor Details
#initialize(header, tuples, directions = Operation::Order::DirectionSet::EMPTY) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a materialized Relation
28 29 30 31 |
# File 'lib/axiom/relation/materialized.rb', line 28 def initialize(header, tuples, directions = Operation::Order::DirectionSet::EMPTY) super(header, tuples) @directions = Operation::Order::DirectionSet.coerce(directions) end |
Instance Attribute Details
#directions ⇒ Operation::Order::DirectionSet (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The relation sort order
14 15 16 |
# File 'lib/axiom/relation/materialized.rb', line 14 def directions @directions end |
Instance Method Details
#materialize ⇒ self
A noop for Materialized relations
41 42 43 |
# File 'lib/axiom/relation/materialized.rb', line 41 def materialize self end |
#materialized? ⇒ true
Return true for a Materialized relation
53 54 55 |
# File 'lib/axiom/relation/materialized.rb', line 53 def materialized? true end |
#size ⇒ Integer
Return the number of tuples
65 66 67 |
# File 'lib/axiom/relation/materialized.rb', line 65 def size tuples.size end |