Learn R Programming

RCassandra (version 0.1-3)

RC.insert: Update functions to insert data into Cassandra

Description

RC.insert updates or inserts new column/value pairs

RC.mutate batchwise updates or inserts a list of keys, column families and columns/values.

Usage

RC.insert(conn, c.family, key, column, value = NULL, comparator = NULL, validator = NULL) RC.mutate(conn, mutation)

Arguments

conn
connection handle obtained from RC.connect
c.family
name of the column family (string)
key
row key name (string) or a vector of (preferably contiguous) keys to use with the column names vector
column
column name - any vector supported by the comparator
value
optinally values to add into the columns - if specified, must be the same length as column. If NULL only the column is created
comparator
comparator (column name type) to be used - see RC.get for details
validator
validator (value type) to be used - see RC.get for details
mutation
a structure describing the desired mutation (see Cassandra documentation). In its simplest form it is a nested list: list(row.key1=list(c.family1=list(col1=val1, ...), ...), ...) so to add column "foo" with value "bar" to column family "table" and row "key" the mutation would be list(key=list(table=list(foo="bar"))). The innermost list can optionally be a character vector (if unnamed it specifies the column names, otherwise names are column names and elements are values). Only string keys and column names are supproted.

Value

conn

See Also

RC.connect, RC.use, RC.get