Class: ROM::Cassandra::Commands::Update

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

Overview

Implements the cassandra-specific Update command

Examples:

class UpdateName < ROM::Commands::Update[:cassandra]
  relation :items
  register_as :update_name

  def execture(id, name)
    super { set(name: name).where(id: id).using(consistency: :quorum) }
  end
end

update_name = rom.command(:users).update_name
update_name.call(1, "Andrew")

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