MongoDB - Document Query(조회) 2
Document Query(조회) 2 find() 메소드 활용 sort(), limit(), skip() orders 라는 데이터 추가 db.orders.insert[ ... { "_id": 1, "item": { "category": "cake", "type": "chiffon" }, "amount": 10 }, ... { "_id": 2, "item": { "category": "cookies", "type": "chocolate chip" }, "amount": 50 }, ... { "_id": 3, "item": { "category": "cookies", "type": "chocolate chip" }, "amount": 15 }, ... { "_id": 4, "item": { "category..
2021. 1. 18.
MongoDB - Document Query(조회)
Document Query(조회) find() 메소드 articles라는 데이터 베이스 추가 db.articles.insert([ { "title" : "article01", "content" : "content01", "writer" : "Velopert", "likes" : 0, "comments" : [ ] }, { "title" : "article02", "content" : "content02", "writer" : "Alpha", "likes" : 23, "comments" : [ { "name" : "Bravo", "message" : "Hey Man!" } ] }, { "title" : "article03", "content" : "content03", "writer" : "Bravo", ..
2021. 1. 18.