Class: ROM::HTTP::Relation
- Inherits:
-
Relation
- Object
- Relation
- ROM::HTTP::Relation
- Includes:
- ROM::HTTP
- Defined in:
- lib/rom/http/relation.rb
Overview
HTTP-specific relation extensions
Constant Summary
Constants included from ROM::HTTP
Instance Method Summary collapse
- #delete ⇒ Object
- #exclude(*names) ⇒ Object
- #insert(*tuples) ⇒ Object (also: #<<)
- #prefix(prefix) ⇒ Object
- #primary_key ⇒ Object
- #project(*names) ⇒ Object
- #rename(mapping) ⇒ Object
- #update(*tuples) ⇒ Object
Instance Method Details
#delete ⇒ Object
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: <<
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_key ⇒ Object
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
57 58 59 |
# File 'lib/rom/http/relation.rb', line 57 def update(*tuples) dataset.update(*tuples.map { |t| input_schema[t] }) end |