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:



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

def delete
  dataset.delete
end

#exclude(*names) ⇒ Object



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

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

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

See Also:



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

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

#prefix(prefix) ⇒ Object



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

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

#primary_keyObject



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

def primary_key
  schema.primary_key_name
end

#project(*names) ⇒ Object



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

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

#rename(mapping) ⇒ Object



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

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

#update(*tuples) ⇒ Object

See Also:



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

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