Class: ROM::SQL::Commands::Delete
- Inherits:
-
Commands::Delete
- Object
- Commands::Delete
- ROM::SQL::Commands::Delete
- Includes:
- ErrorWrapper, Transaction
- Defined in:
- lib/rom/sql/commands/delete.rb
Overview
SQL delete command
Instance Method Summary collapse
-
#call(*args) ⇒ Object
(also: #[])
included
from ErrorWrapper
Handle Sequel errors and re-raise ROM-specific errors.
-
#execute ⇒ Array<Hash>
Deletes tuples from 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 ⇒ Array<Hash>
Deletes tuples from a relation
21 22 23 24 25 |
# File 'lib/rom/sql/commands/delete.rb', line 21 def execute deleted = relation.to_a relation.delete deleted end |
#transaction(options = {}, &block) ⇒ ROM::Commands::Result::Success, ROM::Commands::Result::Failure Originally defined in module Transaction
Start a transaction