I wanted to use a list as a bin value in aerospike. So, http://www.aerospike.com/docs/guide/cdt-list.html seems like a good option. But the client examples in golang https://github.com/aerospike/aerospike-client-go/blob/master/examples/list_map.go only shows a get and a put.
key, _ := as.NewKey(*shared.Namespace, *shared.Set, "listkey1")
client.Delete(shared.WritePolicy, key)
list := []string{"string1", "string2", "string3"}
bin := as.NewBin("listbin1", list)
client.PutBins(shared.WritePolicy, key, bin)
record, err := client.Get(shared.Policy, key, bin.Name)
shared.PanicOnError(err)
receivedList := record.Bins[bin.Name].([]interface{})
validateSize(3, len(receivedList))
validate("string1", receivedList[0])
validate("string2", receivedList[1])
validate("string3", receivedList[2])
What about all other APIs mentioned ? Such as how do I append to the list or get count of objects in the list etc. ? Any reference to any documentation would be appreciated.
Thanks in advance.