Exemplo n.º 1
0
func (w *writer) Delete(cf string, key []byte) Writer {
	tm := w.addWriter(cf, key)
	d := cassandra.NewDeletion()
	d.Timestamp = thrift.Int64Ptr(now())
	tm.Deletion = d
	return w
}
Exemplo n.º 2
0
func (w *writer) DeleteColumns(cf string, key []byte, columns [][]byte) Writer {
	tm := w.addWriter(cf, key)
	d := cassandra.NewDeletion()
	d.Timestamp = thrift.Int64Ptr(now())
	sp := cassandra.NewSlicePredicate()
	sp.ColumnNames = columns
	d.Predicate = sp
	tm.Deletion = d
	return w
}