/** * Flush the statement buffers. The {@link BigdataSailConnection} heavily * buffers assertions and retractions. Either a {@link #flush()} or a * {@link #commit()} is required before executing any operations directly * against the backing {@link AbstractTripleStore} so that the buffered * assertions or retractions will be written onto the KB and become visible * to other methods. This is not a transaction issue -- just a buffer issue. * The public methods on the {@link BigdataSailConnection} all flush the * buffers before performing any queries against the underlying * {@link AbstractTripleStore}. * * @throws RepositoryException */ public void flush() throws RepositoryException { try { ((BigdataSailConnection) getSailConnection()).flush(); } catch (Exception ex) { throw new RepositoryException(ex); } }
/** * Flush the statement buffers. The {@link BigdataSailConnection} heavily * buffers assertions and retractions. Either a {@link #flush()} or a * {@link #commit()} is required before executing any operations directly * against the backing {@link AbstractTripleStore} so that the buffered * assertions or retractions will be written onto the KB and become visible * to other methods. This is not a transaction issue -- just a buffer issue. * The public methods on the {@link BigdataSailConnection} all flush the * buffers before performing any queries against the underlying * {@link AbstractTripleStore}. * * @throws RepositoryException */ public void flush() throws RepositoryException { try { ((BigdataSailConnection) getSailConnection()).flush(); } catch (Exception ex) { throw new RepositoryException(ex); } }
private CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(final String query, final SailConnection con, final BindingSet bs) throws Exception { // new pattern ((BigdataSailConnection) con).flush(); final AbstractTripleStore db = ((BigdataSailConnection) con).getTripleStore(); final ASTContainer astContainer = new Bigdata2ASTSPARQLParser().parseQuery2(query, null); final QueryRoot originalQuery = astContainer.getOriginalAST(); originalQuery.setIncludeInferred(false); final TupleQueryResult queryResult = ASTEvalHelper.evaluateTupleQuery( db, astContainer, new QueryBindingSet( bs), null /* dataset */); return queryResult; }
private CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(final String query, final SailConnection con, final BindingSet bs) throws Exception { // new pattern ((BigdataSailConnection) con).flush(); final AbstractTripleStore db = ((BigdataSailConnection) con).getTripleStore(); final ASTContainer astContainer = new Bigdata2ASTSPARQLParser().parseQuery2(query, null); final QueryRoot originalQuery = astContainer.getOriginalAST(); originalQuery.setIncludeInferred(false); final TupleQueryResult queryResult = ASTEvalHelper.evaluateTupleQuery( db, astContainer, new QueryBindingSet( bs), null /* dataset */); return queryResult; }