class ROM::Memory::Relation
Relation
subclass for memory adapter
@example
class Users < ROM::Relation[:memory] end
@api public
Public Instance Methods
delete(*args)
click to toggle source
Delete tuples from the relation
@example
users.insert(name: 'Jane') users.delete(name: 'Jane')
@return [Relation]
@api public
# File lib/rom/memory/relation.rb, line 84 def delete(*args) dataset.delete(*args) self end
insert(*args)
click to toggle source
Insert tuples into the relation
@example
users.insert(name: 'Jane')
@return [Relation]
@api public
# File lib/rom/memory/relation.rb, line 69 def insert(*args) dataset.insert(*args) self end
Also aliased as: <<
project(*names)
click to toggle source
Project a relation with provided attribute names
@param [*Array] names A list with attribute names
@return [Memory::Relation]
@api public
# File lib/rom/memory/relation.rb, line 50 def project(*names) schema.project(*names).(self) end
rename(mapping)
click to toggle source
Rename attributes in a relation
@api public
# File lib/rom/memory/relation.rb, line 57 def rename(mapping) schema.rename(mapping).(self) end