Could we organise this code a bit differently? For me, classes ending with `*Helper` are often a code smell.

One option would be to extract a `PreparedStatementString` class which has a `toString` method to get the actual string. That way, we could also have a second class for building a prepared statement string for a function and get rid of the ugly boolean flag.