More Related Content
Similar to MongoDB Launchpad 2016: What’s New in the 3.4 Server (20)
MongoDB Launchpad 2016: What’s New in the 3.4 Server
- 16. #MongoDB
Extend: Read-Only Views
> db.rides.findOne()
{ "_id" : ObjectId("572bb8572b288919b6a47779"), "startStation" : 498,
"endStation" : 253, "bike" : 23691 }
> db.createView( "rides_safe", "rides", [{$project: {'user_ssn': 0}}] );
> db.rides_safe.findOne()
{ "_id" :ObjectId("572bb8572b288919b6a47779"), "startStation" : 498,
"endStation" : 253, "bike" : 23691, "user_ssn" : "123-45-6789" }