gpt4 book ai didi

mongodb - MongoDB oplog 操作字母是什么意思?

转载 作者:IT老高 更新时间:2023-10-28 13:32:35 29 4
gpt4 key购买 nike

MongoDB oplog“op”字段中的不同字母是什么意思?我可以猜到一些字母的含义,但我不确定。

"n"= ?

"i"= insert ,这样对吗?

"u"= 更新,这对吗?

"c"= count,这样对吗?

我猜“d”=删除?

还有哪些其他字母,它们的含义是什么?

最佳答案

来自 mongohq,这些是 op 字段可以包含的值及其含义。 “i”、“u”、“d”、“c”、“db”、“n”:

This is the “op” field which indicates what operation took place. Its values can be “i” for “insert”, “u” for “update”, and “d” for “delete”. For most oplog tailing applications, you will only be interested in these three values, but there is also a “c” for commands that affect databases at a high level, “db” which apparently announces the presence of a “database”, and “n” for “no-ops”, used for changes in the database or collections which don’t result in a change in the stored data.

Any of these operations will have been applied to a database or a collection so the next field, “ns” tells us the “namespace” for this operation.

http://blog.mongohq.com/the-mongodb-oplog-and-node-js/

关于mongodb - MongoDB oplog 操作字母是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23712541/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com