class PostgresSchema {

    public static void getById(final QueryStatement statement, final CollectionName collection) throws QueryBuildException {
        try {
            Writer body = statement.getBodyWriter();
            body.write("SELECT ");
            body.write(DOCUMENT_COLUMN);
            body.write(" FROM ");
            body.write(collection.toString());
            body.write(" WHERE (");
            body.write(getIdFieldPath(collection).toSQL());
            body.write(") = to_json(?)::jsonb");
        } catch (IOException e) {
            throw new QueryBuildException("Failed to build getById body", e);
        }
    }

    private  PostgresSchema();

}