/** * {@inheritDoc} * * This method is overridden in order to flush batches properly before the read. */ @Override public List<ResultsRow<Object>> execute(Query q, int start, int limit, boolean optimise, boolean explain, Map<Object, Integer> sequence) throws ObjectStoreException { Connection c = null; try { c = getConnection(); Set<String> readTables = SqlGenerator.findTableNames(q, getSchema()); batch.flush(c, readTables); return executeWithConnection(c, q, start, limit, optimise, explain, sequence); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * {@inheritDoc} * * This method is overridden in order to flush batches properly before the read. */ @Override public List<ResultsRow<Object>> execute(Query q, int start, int limit, boolean optimise, boolean explain, Map<Object, Integer> sequence) throws ObjectStoreException { Connection c = null; try { c = getConnection(); Set<String> readTables = SqlGenerator.findTableNames(q, getSchema()); batch.flush(c, readTables); return executeWithConnection(c, q, start, limit, optimise, explain, sequence); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }