Class: ROM::SQL::Commands::Update

Inherits:
Commands::Update
  • Object
show all
Includes:
ErrorWrapper
Defined in:
lib/rom/sql/commands/update.rb

Overview

Update command

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Hash+ Also known as: [] Originally defined in module ErrorWrapper

Handle Sequel errors and re-raise ROM-specific errors

Returns:

  • (Hash, Array<Hash>)

Raises:

  • SQL::Error

#execute(tuple) ⇒ Array<Hash>, Hash

Updates existing tuple in a relation

Returns:

  • (Array<Hash>, Hash)


26
27
28
# File 'lib/rom/sql/commands/update.rb', line 26

def execute(tuple)
  update(input[tuple].to_h)
end