Class: Axiom::Attribute::Relation
- Inherits:
-
Object
- Object
- Axiom::Attribute
- Object
- Axiom::Attribute::Relation
- Defined in:
- lib/axiom/attribute/relation.rb
Overview
Represents a Relation value in a relation tuple
Constant Summary
Constants inherited from Axiom::Attribute
Instance Attribute Summary collapse
-
#header ⇒ Header
readonly
private
The tuple header.
Attributes inherited from Axiom::Attribute
Class Method Summary collapse
-
.type ⇒ Class<Types::Relation>
The attribute type.
Instance Method Summary collapse
-
#initialize(_name, options) ⇒ undefined
constructor
private
Initialize a Relation Attribute.
-
#new_relation(tuples) ⇒ Relation
Initialize a new relation with the tuples provided.
Methods included from Function::Predicate::Equality::Methods
Methods included from Function::Predicate::Exclusion::Methods
Methods included from Function::Predicate::Inequality::Methods
Methods included from Function::Predicate::Inclusion::Methods
Methods included from Axiom::Aggregate::Count::Methods
Methods inherited from Axiom::Attribute
#call, coerce, #include?, infer_type, name_from, #optional?, #rename, #required?
Methods included from Axiom::Aliasable
Methods included from Visitable
Constructor Details
#initialize(_name, options) ⇒ 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 Relation Attribute
31 32 33 34 |
# File 'lib/axiom/attribute/relation.rb', line 31 def initialize(_name, ) super @header = Axiom::Relation::Header.coerce(.fetch(:header)) end |
Instance Attribute Details
#header ⇒ Header (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 tuple header
15 16 17 |
# File 'lib/axiom/attribute/relation.rb', line 15 def header @header end |
Class Method Details
.type ⇒ Class<Types::Relation>
The attribute type
44 45 46 |
# File 'lib/axiom/attribute/relation.rb', line 44 def self.type Types::Relation end |
Instance Method Details
#new_relation(tuples) ⇒ Relation
Initialize a new relation with the tuples provided
58 59 60 |
# File 'lib/axiom/attribute/relation.rb', line 58 def new_relation(tuples) type.primitive.new(@header, tuples) end |