随笔分类 -  MongoDB

摘要:Mongoose has some hooks, for example: Before 'save' action, will trigger the function to generate the 'slug' JIT. 阅读全文
posted @ 2017-06-19 22:15 Zhentiw 阅读(239) 评论(0) 推荐(0) 编辑
摘要:Remove: remove the wand with the name of "Doom Bringer" from our wandscollection. db.wands.remove({name: "Doom Bringer"}) >> WriteResult({'ngRemoved': 阅读全文
posted @ 2016-02-09 00:26 Zhentiw 编辑
摘要:1. Use or create a database:use wandRecorderYou will use keyword to create or fetch a exicting database.2. Find all documents in the database.db.wands... 阅读全文
posted @ 2015-11-15 23:49 Zhentiw 编辑
摘要:/* 1. Query Operators*/db.posts.find({ viewsCount: {$get: 1000, $lte: 3000}}, {_id: 0, viewsCount: 1, title: 1})// $indb.posts.find({ categor... 阅读全文
posted @ 2014-12-14 18:09 Zhentiw 编辑
摘要:MongoDB is JSON Document:How to start MongoDB client:mongod //start the servermongo // start the cliHow to restore a database:mongorestorecan create a... 阅读全文
posted @ 2014-12-12 05:11 Zhentiw 编辑
摘要:Learn how to import data into your MongoDB and then use Express to serve a simple Node.js API.Import data into MongoDB:For exmaple, you have an data.j... 阅读全文
posted @ 2014-12-10 04:23 Zhentiw 编辑

点击右上角即可分享
微信分享提示