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:



61
62
63
# File 'lib/rom/http/relation.rb', line 61

def delete
  dataset.delete
end

#exclude(*names) ⇒ Object



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

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

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

See Also:



50
51
52
# File 'lib/rom/http/relation.rb', line 50

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

#prefix(prefix) ⇒ Object



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

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

#primary_keyObject



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

def primary_key
  schema.primary_key_name
end

#project(*names) ⇒ Object



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

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

#rename(mapping) ⇒ Object



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

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

#update(*tuples) ⇒ Object

See Also:



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

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