示例#1
0
文件: writer.go 项目: carloscm/gossie
func (w *writer) Delete(cf string, key []byte) Writer {
	tm := w.addWriter(cf, key)
	d := cassandra.NewDeletion()
	d.Timestamp = now()
	tm.Deletion = d
	return w
}
示例#2
0
文件: writer.go 项目: carloscm/gossie
func (w *writer) DeleteColumns(cf string, key []byte, columns [][]byte) Writer {
	tm := w.addWriter(cf, key)
	d := cassandra.NewDeletion()
	d.Timestamp = now()
	sp := cassandra.NewSlicePredicate()
	sp.ColumnNames = thrift.NewTList(thrift.BINARY, 1)
	for _, name := range columns {
		sp.ColumnNames.Push(name)
	}
	d.Predicate = sp
	tm.Deletion = d
	return w
}