[英]How to Prepend to a list in aerospike using golang?
在Aerospike中,可以将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.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.