Class: ROM::Cassandra::Commands::Delete

Inherits:
ROM::Commands::Delete
  • Object
show all
Includes:
ROM::Cassandra::Commands
Defined in:
lib/rom/cassandra/commands/delete.rb

Overview

Implements the cassandra-specific Delete command

Examples:

class DeleteColumns < ROM::Commands::Delete[:cassandra]
  dataset(:users)
  register_as(:delete_columns)

  def execute(id, *cols)
    super { delete(*cols).where(id: id).using(consistency: :quorum) }
  end
end

delete_columns = rom.command(:users).delete_columns
delete_columns.call(1, :text)

Method Summary

Methods included from ROM::Cassandra::Commands

#execute, included, #initialize

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ROM::Cassandra::Commands