본문 바로가기

Bon Voyage

검색하기
Bon Voyage
프로필사진 nangkyeong

  • Bon Voyage (28)
    • 설치 (7)
    • 문제 해결 (2)
    • 개념 공부 (19)
      • 데이터베이스 (8)
      • 네트워크 (5)
      • 운영체제 (1)
      • 알고리즘 (5)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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 29 30 31
Tags
  • mongo-native
  • 파이썬3
  • mongodb nodejs driver
  • node.js 연동
  • homebrew
  • util.inspect
  • Installation
  • 맥
  • 맥에 파이썬 설치
  • Windows10
  • mongodb
  • [Object]
  • pip jupyter
  • query
  • node.js설치
  • Projection
  • MYSQL
  • nodejs mongodb
  • Jupyter notebook
  • mongoDB [Object]
  • Node.js
  • collection.find
  • python3
  • MacOS
  • console.log
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록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
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바