mongodb find select specific fields

相關問題 & 資訊整理

mongodb find select specific fields

From the MongoDB docs: A projection can explicitly include several fields. In the following operation, find() method returns all documents that match the query. In the result set, only the item and qty fields and, by default, the _id field return in the ,For corresponding MongoDB driver API, refer to your specific MongoDB driver ... Specifies the fields to return in the documents that match the query filter. ,With the exception of the _id field, you cannot combine inclusion and exclusion statements in projection documents. Return Specific Fields in Embedded ... ,How Does the Compass Query Compare to MongoDB and SQL Queries?¶. $project corresponds to choosing specific fields to return in a SQL SELECT statement.

相關軟體 MongoDB 資訊

MongoDB
MongoDB 是一個免費且開放源碼的跨平檯面向文檔的數據庫程序。分類為 NoSQL 數據庫程序,MongoDB 使用類似 JSON 的文檔與模式。它為使用 MongoDB 包括數據庫開發人員和 DBA 的任何人提供了豐富的 GUI 工具。主要功能包括:全功能嵌入 MongoDB Shell,用戶友好的 Map-Reduce 操作編輯器,創建 / 刪除數據庫,管理集合及其索引的能力,用戶友好的 G... MongoDB 軟體介紹

mongodb find select specific fields 相關參考資料
How to select a single field for all documents in a MongoDB ...

From the MongoDB docs: A projection can explicitly include several fields. In the following operation, find() method returns all documents that match the query. In the result set, only the item and q...

https://stackoverflow.com

MongoDB db.collection.find() - MongoDB Documentation

For corresponding MongoDB driver API, refer to your specific MongoDB driver ... Specifies the fields to return in the documents that match the query filter.

https://docs.mongodb.com

Project Fields to Return from Query — MongoDB Manual

With the exception of the _id field, you cannot combine inclusion and exclusion statements in projection documents. Return Specific Fields in Embedded ...

https://docs.mongodb.com

Set Which Fields Are Returned — MongoDB Compass stable

How Does the Compass Query Compare to MongoDB and SQL Queries?¶. $project corresponds to choosing specific fields to return in a SQL SELECT statement.

https://docs.mongodb.com