public void setColumn(string keyspace, Object columnFamily, Object key, Object columnName, Object columnValue, int ttl) { client.set_keyspace(keyspace); byte[] binaryKey = key.ToByteArray(); ColumnParent cp = new ColumnParent() { Column_family = columnFamily.ToString() }; Column column = new Column(); column.Name = columnName.ToByteArray(); column.Value = columnValue.ToByteArray(); column.Timestamp = createTimestamp(); if (ttl != 0) { column.Ttl = ttl; } client.insert(binaryKey, cp, column, consistencyLevel); }
public override void Execute(Apache.Cassandra.Cassandra.Client cassandraClient) { cassandraClient.insert(PartitionKey, BuildColumnParent(), column.ToCassandraColumn(), consistencyLevel); }