发布于 2015-09-14 14:54:31 | 109 次阅读 | 评论: 0 | 来源: 网络整理

Introduction

In addition to the MongoDB Query Operators, there are a number of “meta” operators that you can modify the output or behavior of a query. On the server, MongoDB treats the query and the options as a single object. The mongo shell and driver interfaces may provide cursor methods that wrap these options. When possible, use these methods; otherwise, you can add these options using either of the following syntax:

db.collection.find( { <query> } )._addSpecial( <option> )
db.collection.find( { $query: { <query> }, <option> } )

Modifiers

Many of these operators have corresponding methods in the shell. These methods provide a straightforward and user-friendly interface and are the preferred way to add these options.

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务