Sha256: 926d4841eaf2169f68c6b8d51a53d7e831d701a0549a901fcd45c77142c2b9e9

Contents?: true

Size: 317 Bytes

Versions: 4

Compression:

Stored size: 317 Bytes

Contents

require 'rom/sql/commands'
require 'rom/sql/commands/transaction'

module ROM
  module SQL
    module Commands
      class Delete < ROM::Commands::Delete
        include Transaction

        def execute
          deleted = target.to_a
          target.delete
          deleted
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rom-sql-0.4.0 lib/rom/sql/commands/delete.rb
rom-sql-0.4.0.rc1 lib/rom/sql/commands/delete.rb
rom-sql-0.4.0.beta2 lib/rom/sql/commands/delete.rb
rom-sql-0.4.0.beta1 lib/rom/sql/commands/delete.rb