Executing Mongo like Query (JSON)through Java

后端 未结 5 1629
执笔经年
执笔经年 2020-12-25 14:54

I was wondering if there is a way to execute mongo like query directly through Java i.e. we give mongoDB like query as a String to a function in Java driver for mongoDB as a

5条回答
  •  渐次进展
    2020-12-25 15:47

    Take a look at the Jongo library - it will allow you to run even pretty advanced queries using the command-line syntax.

    It also uses a very fast GSON mapper to return your own objects back to you as the result of the query, instead of a list of BasicDBObjects.

提交回复
热议问题