I have written similar library for constructing queries based on string interpolator but yours have many interesting features. I think I'll use mix of the two with following features, I hope they will be useful to develop your own library:
- Scala 2.12
- outer {} are optional:
coll.findOne(m"name:$name")
- typechecking of field values
- hand-written recursive descent parser. It is not that difficult to create: https://gist.github.com/scf37/17caf87eacb82d097a06e292a0161f52
- mongodb scala drivers are not necessary - modern mongo java driver is good enough for Scala
I have written similar library for constructing queries based on string interpolator but yours have many interesting features. I think I'll use mix of the two with following features, I hope they will be useful to develop your own library:
coll.findOne(m"name:$name")