Sha256: cb31fe21be7f4f6f6b1605d1d281cfaf6197836246b9f8bde1cb923f381bbfd2

Contents?: true

Size: 477 Bytes

Versions: 9

Compression:

Stored size: 477 Bytes

Contents

require 'rom/command'

module ROM
  module Commands
    # Delete command
    #
    # This command removes tuples from its target relation
    #
    # @abstract
    class Delete < Command
      attr_reader :target

      # @api private
      def initialize(relation, options = {})
        super
        @target = options[:target] || relation
      end

      # @see AbstractCommand#call
      def call(*args)
        assert_tuple_count
        super
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rom-0.7.1 lib/rom/commands/delete.rb
rom-0.7.0 lib/rom/commands/delete.rb
rom-0.6.2 lib/rom/commands/delete.rb
rom-0.6.1 lib/rom/commands/delete.rb
rom-0.6.0 lib/rom/commands/delete.rb
rom-0.6.0.rc1 lib/rom/commands/delete.rb
rom-0.6.0.beta3 lib/rom/commands/delete.rb
rom-0.6.0.beta2 lib/rom/commands/delete.rb
rom-0.6.0.beta1 lib/rom/commands/delete.rb