Sha256: 2267c47d86481a4ea581de499dce51af69618b822c77d3c71f9037fd56196222

Contents?: true

Size: 736 Bytes

Versions: 17

Compression:

Stored size: 736 Bytes

Contents

class Cassandra

  ## Counters

  # Add a value to the counter in cf:key:super column:column
  def add(column_family, key, value, *columns_and_options)
    column_family, column, sub_column, options = extract_and_validate_params(column_family, key, columns_and_options, WRITE_DEFAULTS)

    mutation_map = if is_super(column_family)
      {
        key => {
          column_family => [_super_counter_mutation(column_family, column, sub_column, value)]
        }
      }
    else
      {
        key => {
          column_family => [_standard_counter_mutation(column_family, column, value)]
        }
      }
    end

    @batch ? @batch << [mutation_map, options[:consistency]] : _mutate(mutation_map, options[:consistency])
  end
end

Version data entries

17 entries across 13 versions & 3 rubygems

Version Path
cassandra-0.23.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.22.0 lib/cassandra/0.8/cassandra.rb
cassandra-mavericks-0.21.1 lib/cassandra/0.8/cassandra.rb
cassandra-0.21.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.20.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.19.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.18.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.17.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.16.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.15.0 lib/cassandra/1.0/cassandra.rb
cassandra-0.15.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.14.0 lib/cassandra/1.0/cassandra.rb
cassandra-0.14.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.13.0 lib/cassandra/0.8/cassandra.rb
cassandra-0.13.0 lib/cassandra/1.0/cassandra.rb
hallelujah-cassandra-0.12.3 lib/cassandra/0.8/cassandra.rb
hallelujah-cassandra-0.12.3 lib/cassandra/1.0/cassandra.rb