Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Installation
- Windows10
- 맥에 파이썬 설치
- Node.js
- mongo-native
- console.log
- Jupyter notebook
- query
- python3
- 파이썬3
- collection.find
- [Object]
- mongoDB [Object]
- nodejs mongodb
- util.inspect
- Projection
- MYSQL
- mongodb nodejs driver
- mongodb
- homebrew
- node.js설치
- MacOS
- node.js 연동
- pip jupyter
- 맥
Archives
- Today
- Total
목록query (1)
Bon Voyage
Node.js MongoDB 드라이버 : collection.find() option 사용법
mongoDB에 find 쿼리를 수행하던 중 projection이 적용되지 않는 문제가 발생했다. collection.find({id: id},{followmap:1}).toArray(function(err, followmaps) { ... }); id 값을 받아서, 해당 document의 내용 중 'followmap'이라는 필드의 값만 불러와야 하는데, 자꾸 전체 필드값이 리턴되는 것이 문제였다. MongoDB의 shell 쿼리에서는 맞는 문법이지만, node.js 드라이버에서는 그게 적용되지 않는 것 같았다. API docs를 찾아보니 안 되는 이유가 있었다. (참고: https://mongodb.github.io/node-mongodb-native/3.2/api/Collection.html#find..
개념정리/데이터베이스
2019. 7. 18. 20:37