private QueryExecution queryExec(Query query, String queryString) { checkQuery(); if ( query == null && queryString == null ) throw new InternalErrorException("Both query and query string are null"); if ( query == null ) { if ( parseCheckQueries ) QueryFactory.create(queryString); } // Use the query string as provided if possible, otherwise serialize the query. String queryStringToSend = ( queryString != null ) ? queryString : query.toString(); return exec(()-> createQueryExecution(query, queryStringToSend)); }
private QueryExecution queryExec(Query query, String queryString) { checkQuery(); if ( query == null && queryString == null ) throw new InternalErrorException("Both query and query string are null"); if ( query == null ) { if ( parseCheckQueries ) QueryFactory.create(queryString); } // Use the query string as provided if possible, otherwise serialize the query. String queryStringToSend = ( queryString != null ) ? queryString : query.toString(); return exec(()-> createQueryExecution(query, queryStringToSend)); }