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.
我将记录插入 MongoDB
var test = Entry.createRecord .name("Williams") .nr("1") .save
如何通过查询到命令行控制台来打印这些文档?
这取决于您是 mongo-java-driver api,还是使用 lift-json DSL 来构建查询。
对于 JSON,类似。
Entry.findAll(("name" -> "Williams"))
对于 API
val qry = QueryBuilder.start("name").is("Williams").get Entry.findAll(qry)