Class: ROM::SQL::Commands::Update
- Inherits:
-
Commands::Update
- Object
- Commands::Update
- ROM::SQL::Commands::Update
- Includes:
- ErrorWrapper, Transaction
- Defined in:
- lib/rom/sql/commands/update.rb
Overview
Update command
Instance Method Summary collapse
-
#call(*args) ⇒ Object
(also: #[])
included
from ErrorWrapper
Handle Sequel errors and re-raise ROM-specific errors.
-
#execute(tuple) ⇒ Array<Hash>, Hash
Updates existing tuple in a relation.
-
#transaction(options = {}, &block) ⇒ ROM::Commands::Result::Success, ROM::Commands::Result::Failure
included
from Transaction
Start a transaction.
Instance Method Details
#call(*args) ⇒ Object Also known as: [] Originally defined in module ErrorWrapper
Handle Sequel errors and re-raise ROM-specific errors
#execute(tuple) ⇒ Array<Hash>, Hash
Updates existing tuple in a relation
26 27 28 |
# File 'lib/rom/sql/commands/update.rb', line 26 def execute(tuple) update(input[tuple].to_h) end |
#transaction(options = {}, &block) ⇒ ROM::Commands::Result::Success, ROM::Commands::Result::Failure Originally defined in module Transaction
Start a transaction