在气钉中,https://godoc.org/github.com/aerospike/aerospike-client-go#ListAppendOp操作可以与 client.Operate 方法一起使用来附加到列表。有没有办法添加到列表中?
http://www.aerospike.com/docs/guide/cdt-list.html#development-guidelines-and-tips确实提到插入可以发生在列表的任意一端。但找不到合适的 API 来执行相同的操作。有什么帮助吗?
最佳答案
不熟悉Go客户端,只是看看API,将索引指定为0会在前面加上它吗?
func ListInsertOp
func ListInsertOp(binName string, index int, values ...interface{}) *Operation
ListInsertOp creates a list insert operation. Server inserts value to specified index of list bin. Server returns list size on bin name. It will panic is no values have been passed.
关于go - 如何使用 golang 在 aerospike 中添加列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46441336/