Hi, just a quick suggestion, [parse-server](https://github.com/ParsePlatform/parse-server) is currently [implementing postgres](https://github.com/ParsePlatform/parse-server/commit/22c790f23cbbf8b290de5fe418fda3fcccc2b745) as an adapter to mongo - have a look at their code and maybe it may help. However, I'm not sure whether it also susceptible to SQL injections too.