Class: Alf::Relvar::Fake
- Inherits:
-
Object
- Object
- Alf::Relvar::Fake
- Includes:
- Alf::Relvar
- Defined in:
- lib/alf/relvar/fake.rb
Instance Attribute Summary collapse
-
#delete_predicate ⇒ Object
readonly
Returns the value of attribute delete_predicate.
-
#heading ⇒ Object
readonly
Returns the value of attribute heading.
-
#inserted_tuples ⇒ Object
readonly
Returns the value of attribute inserted_tuples.
-
#update_predicate ⇒ Object
readonly
Returns the value of attribute update_predicate.
-
#updating ⇒ Object
readonly
Returns the value of attribute updating.
Attributes included from Alf::Relvar
Instance Method Summary collapse
- #delete(predicate = Predicate.tautology) ⇒ Object
-
#initialize(expr, heading) ⇒ Fake
constructor
A new instance of Fake.
- #insert(tuples) ⇒ Object
- #to_lispy ⇒ Object
- #update(updating, predicate = Predicate.tautology) ⇒ Object
Methods included from Alf::Relvar
#affect, #each, #empty!, #empty?, #lock, #not_empty!, #safe, #to_relation, #to_relvar, #type, #upsert, #value
Methods included from Lang::ObjectOriented
Methods included from Lang::ObjectOriented::RenderingMethods
def_renderer_method, #to_a, #to_array
Methods included from Lang::ObjectOriented::AlgebraMethods
#!~, #&, #*, #+, #-, #=~, def_operator_method, #tuple_extract
Methods included from Lang::ObjectOriented::AggregationMethods
Methods included from Algebra::Operand
#attr_list, coerce, #keys, #resulting_type, #to_ascii_tree, #to_cog, #to_relation, #type_check
Constructor Details
#initialize(expr, heading) ⇒ Fake
Returns a new instance of Fake.
6 7 8 9 10 |
# File 'lib/alf/relvar/fake.rb', line 6 def initialize(expr, heading) super(expr) @heading = Heading.coerce(heading) @connection = connection end |
Instance Attribute Details
#delete_predicate ⇒ Object (readonly)
Returns the value of attribute delete_predicate.
21 22 23 |
# File 'lib/alf/relvar/fake.rb', line 21 def delete_predicate @delete_predicate end |
#heading ⇒ Object (readonly)
Returns the value of attribute heading.
11 12 13 |
# File 'lib/alf/relvar/fake.rb', line 11 def heading @heading end |
#inserted_tuples ⇒ Object (readonly)
Returns the value of attribute inserted_tuples.
16 17 18 |
# File 'lib/alf/relvar/fake.rb', line 16 def inserted_tuples @inserted_tuples end |
#update_predicate ⇒ Object (readonly)
Returns the value of attribute update_predicate.
28 29 30 |
# File 'lib/alf/relvar/fake.rb', line 28 def update_predicate @update_predicate end |
#updating ⇒ Object (readonly)
Returns the value of attribute updating.
27 28 29 |
# File 'lib/alf/relvar/fake.rb', line 27 def updating @updating end |
Instance Method Details
#delete(predicate = Predicate.tautology) ⇒ Object
18 19 20 |
# File 'lib/alf/relvar/fake.rb', line 18 def delete(predicate = Predicate.tautology) @delete_predicate = predicate end |
#insert(tuples) ⇒ Object
13 14 15 |
# File 'lib/alf/relvar/fake.rb', line 13 def insert(tuples) @inserted_tuples = tuples.to_a end |
#to_lispy ⇒ Object
30 31 32 |
# File 'lib/alf/relvar/fake.rb', line 30 def to_lispy "Relvar::Fake(#{heading.to_lispy})" end |
#update(updating, predicate = Predicate.tautology) ⇒ Object
23 24 25 26 |
# File 'lib/alf/relvar/fake.rb', line 23 def update(updating, predicate = Predicate.tautology) @updating = updating.to_hash @update_predicate = predicate end |