Class: Alf::Relvar::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Alf::Relvar
Defined in:
lib/alf/relvar/base.rb

Instance Attribute Summary

Attributes included from Alf::Relvar

#expr

Instance Method Summary collapse

Methods included from Alf::Relvar

#affect, #each, #empty!, #empty?, #initialize, #not_empty!, #safe, #size, #to_relation, #to_relvar, #type, #upsert, #value

Methods included from Lang::ObjectOriented

new

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

def_aggregator_method

Methods included from Algebra::Operand

#attr_list, coerce, #heading, #keys, #resulting_type, #to_ascii_tree, #to_cog, #to_relation, #type_check

Instance Method Details

#delete(predicate = Predicate.tautology) ⇒ Object


21
22
23
# File 'lib/alf/relvar/base.rb', line 21

def delete(predicate = Predicate.tautology)
  connection!.delete(expr.name, predicate)
end

#insert(tuples) ⇒ Object


16
17
18
19
# File 'lib/alf/relvar/base.rb', line 16

def insert(tuples)
  tuples = [ tuples ] if TupleLike===tuples
  connection!.insert(expr.name, tuples)
end

#lock(mode = :exclusive, &bl) ⇒ Object

Update


12
13
14
# File 'lib/alf/relvar/base.rb', line 12

def lock(mode = :exclusive, &bl)
  connection!.lock(expr.name, mode, &bl)
end

#to_sObject


29
30
31
# File 'lib/alf/relvar/base.rb', line 29

def to_s
  "Relvar::Base(#{expr.name.inspect})"
end

#update(updating, predicate = Predicate.tautology) ⇒ Object


25
26
27
# File 'lib/alf/relvar/base.rb', line 25

def update(updating, predicate = Predicate.tautology)
  connection!.update(expr.name, updating, predicate)
end