Iterate over large collection in MongoDB via spring-data

前端 未结 7 2043
误落风尘
误落风尘 2021-01-31 17:18

Friends!

I am using MongoDB in java project via spring-data. I use Repository interfaces to access data in collections. For some processing I need to iterate over all el

7条回答
  •  走了就别回头了
    2021-01-31 18:10

    Check new method to handle results per document basis.

    http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb/core/MongoTemplate.html#executeQuery-org.springframework.data.mongodb.core.query.Query-java.lang.String-org.springframework.data.mongodb.core.DocumentCallbackHandler-

提交回复
热议问题