Class: ROM::HTTP::Relation

Inherits:
Relation
  • Object
show all
Includes:
ROM::HTTP
Defined in:
lib/rom/http/relation.rb

Overview

HTTP-specific relation extensions

Constant Summary

Constants included from ROM::HTTP

Error, VERSION

Instance Method Summary collapse

Instance Method Details

#deleteObject

See Also:


57
58
59
# File 'lib/rom/http/relation.rb', line 57

def delete
  dataset.delete
end

#exclude(*names) ⇒ Object


33
34
35
# File 'lib/rom/http/relation.rb', line 33

def exclude(*names)
  with(schema: schema.exclude(*names))
end

#insert(*tuples) ⇒ Object Also known as: <<

See Also:


46
47
48
# File 'lib/rom/http/relation.rb', line 46

def insert(*tuples)
  dataset.insert(*tuples.map { |t| input_schema[t] })
end

#prefix(prefix) ⇒ Object


41
42
43
# File 'lib/rom/http/relation.rb', line 41

def prefix(prefix)
  with(schema: schema.prefix(prefix))
end

#primary_keyObject


25
26
27
# File 'lib/rom/http/relation.rb', line 25

def primary_key
  schema.primary_key_name
end

#project(*names) ⇒ Object


29
30
31
# File 'lib/rom/http/relation.rb', line 29

def project(*names)
  with(schema: schema.project(*names.flatten))
end

#rename(mapping) ⇒ Object


37
38
39
# File 'lib/rom/http/relation.rb', line 37

def rename(mapping)
  with(schema: schema.rename(mapping))
end

#update(*tuples) ⇒ Object

See Also:


52
53
54
# File 'lib/rom/http/relation.rb', line 52

def update(*tuples)
  dataset.update(*tuples.map { |t| input_schema[t] })
end