go - 如何使用 golang 在 aerospike 中添加列表?

标签 go 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.

关于go - 如何使用 golang 在 aerospike 中添加列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46441336/

相关文章:

go - 无法通过 golang 获取 Uname

performance - 大型 UTF-8 字符串的快速 fmt.Scanf()

aerospike - 看到 memory_used_index_bytes 有 4G 而没有索引

amazon-web-services - Aerospike 可以用作 S3 的替代品吗?

apache-kafka - 重置 Kafka Connect 接收器连接器偏移量

api - Go 不会立即响应 GET 请求,它会在 ticker 完成后响应

amazon-web-services - 如何模拟 *ec2.DescribeVolumes 输出的值

go - Apache Beam Golang Dataflow 运行暂停

node.js - 使用 dockerfile 进行 docker 构建时未找到 ./asinstall?

performance - Aerospike 的大型有序列表能否与排行榜的 Redis 排序集相匹配?