Session session = getSession(request, repositoryName, workspaceName);
Query query = createQuery(language, statement, session);
bindExtraVariables(uriInfo, session.getValueFactory(), query);
QueryResult result = query.execute();
RestQueryResult restQueryResult = new RestQueryResult();
String[] columnNames = result.getColumnNames();
setColumns(result, restQueryResult, columnNames);
String baseUrl = RestHelper.repositoryUrl(request);