简体   繁体   English

MongoDB文档令人困惑

[英]MongoDB documentation confusing

The MongoDB docs seem good overall, the only issue I have is that it uses the console syntax in the reference. MongoDB文档总体上看起来不错,我唯一的问题是它使用了参考中的控制台语法。

I do not understand why they chose to use that, because it's completely useless to every developer that needs to talk to the DB over the network. 我不明白他们为什么选择使用它,因为对于需要通过网络与数据库对话的每个开发人员来说,它完全没有用。 What I would need is how the commands are issued in their BSON/JSON form (eg db.collection.ensureIndex ). 我需要的是如何以其BSON / JSON格式(例如db.collection.ensureIndex )发出命令。

Are there any better references for that, except messing around with the driver source? 除了弄乱驱动程序源之外,还有其他更好的参考吗?

It's the only logical choice. 这是唯一合乎逻辑的选择。 The common denominator, so to say. 可以说是公分母。 Everyone is expected to be familiar with javascript api (shell language). 每个人都应该熟悉javascript api(shell语言)。

Documentation on how to use certain drivers is also provided in the drivers' section. 驱动程序部分中还提供了有关如何使用某些驱动程序的文档。 Here's one for Ruby , for example. 例如,这是Ruby的一个。

I, personally, find it annoying when people post questions on mongodb and provide code in PHP (or Java, or another language that I am not too familiar with). 当人们在mongodb上发布问题并以PHP(或Java或我不太熟悉的另一种语言)提供代码时,我个人觉得很烦。 In majority of cases, the question or problem is not driver related and can as easily be expressed with javascript api, which everybody can understand. 在大多数情况下,问题与驱动程序无关,可以使用人人都能理解的javascript API轻松表达。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM