Class: ROM::Cassandra::Commands::Create

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

Overview

Implements the cassandra-specific Create command

Examples:

class CreateName < ROM::Commands::Create[:cassandra]
  relation :items
  register_as :create

  def execute(id, name)
    super { insert(id: id, name: name).using(consistency: :quorum) }
  end
end

create = rom.command(:users).create
create.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