Description Usage Arguments Value Note Author(s) See Also
RC.insert
updates or inserts new column/value pairs
RC.mutate
batchwise updates or inserts a list of keys, column
families and columns/values.
1 2 3 |
conn |
connection handle obtained from |
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 |
comparator |
comparator (column name type) to be used - see
|
validator |
validator (value type) to be used - see
|
mutation |
a structure describing the desired mutation (see
Cassandra documentation). In its simplest form it is a nested list:
|
conn
RC.insert
supports multi-column insertions where column
and value
are vectors. For the scalar case insert
message is used, for vector case batch_mutate
. If key
is
a scalar, all column
/value
pairs are added to that row
key. Alternatively, key
can be a vector of the same length as
column
in which case the mutation will consist of
key
/column
/value
triplets. Note that key
should be contiguous as the mutation will only group contiguous
sequences (see coalesce
from the fastmatch
package for a
fast way of obtaining contiguous sequences).
RC.insert
honors both the validator and comparator (the latter
is taken from the cache if not specified).
RC.mutate
currently only uses "UTF8Type" validator and
comparator as there is no way to specify either in the mutation
object.
Cassandra requires timestamps on all objects that specify columns/values for conflict resolution. All functions above generate such timestamps from the system time as POSIX time in milliseconds.
Simon Urbanek
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.