Constructing queries from String or JSON for CBL

I have a REST API written in node that was previously using Ottoman v2 to communicate with Couchbase Server but have shifted to using Sync and Lite to enable offline devices. I’ve created a Java process that is running an instance of Lite, and can receive queries constructed by Ottoman as a string, but Lite doesn’t seem to be able to take strings as input for executing queries.

Is there a way to do this? Or some other way to construct queries that CBL on Java can accept? Hard coding every query using the query builder in Java is a lot less elegant than something that can build a query based on certain input and I’m reluctant to duplicate a lot of previously written work.

Any input would be great.

In what syntax?

Lite doesn’t seem to be able to take strings as input for executing queries.

Specifying queries as N1QL strings is something we’re working on for a future release, but it’s not yet possible.

Based on nothing more than glancing at them, the Ottoman queries seem to be N1Ql.

Is there a better way to construct queries based on criteria without hard-coding them in? The query builder in Java CBL is rather clunky and any mention of this topic I’ve come across is a couple years old, so I’m unsure if there is a more modern solution