Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这里MongoDBObject解释了在调用 salat DAO 方法时如何封装特定于数据库的解决方案。现在,如果我使用find返回 a 的方法SalatMongoCursor,我的代码将再次依赖于特定的数据库。我在这里看到将光标更改为列表对性能不利。有没有更好的出路?
MongoDBObject
find
SalatMongoCursor
到目前为止,我的问题没有收到任何回应,我得出的结论是“否”。就个人而言,我决定转换为列表,因为无论如何我以后都需要遍历它几次。