While revamping the database, consider a smaller query language. I built a GraphQL-based database query language in my GraphQL compiler project[1], and it's been a huge success at my company so far[2][3]. Here's a demo of cross-database querying with it, if you're curious [4].
[1]: https://github.com/kensho-technologies/graphql-compiler
[2]: https://blog.kensho.com/compiled-graphql-as-a-database-query...
[3]: https://blog.kensho.com/database-agnostic-querying-is-unavoi...
[4]: https://github.com/obi1kenobi/graphql-compiler-cross-db-exam...