/** * Creates precomputed tables for the given query. * * @param q the Query for which to create the precomputed tables * @param indexes a Collection of QueryNodes for which to create indexes * @param allFields true if all fields of QueryClasses in the SELECT list should be included in * the precomputed table's SELECT list. If the indexes parameter is null, then indexes will * be created for every field as well * @param category a String describing the category of the precomputed tables * @return the names of the new precomputed tables * @throws ObjectStoreException if anything goes wrong */ public List<String> precompute(Query q, Collection<? extends QueryNode> indexes, boolean allFields, String category) throws ObjectStoreException { Connection c = null; try { c = getConnection(); return precomputeWithConnection(c, q, indexes, allFields, category); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
/** * Creates precomputed tables for the given query. * * @param q the Query for which to create the precomputed tables * @param indexes a Collection of QueryNodes for which to create indexes * @param allFields true if all fields of QueryClasses in the SELECT list should be included in * the precomputed table's SELECT list. If the indexes parameter is null, then indexes will * be created for every field as well * @param category a String describing the category of the precomputed tables * @return the names of the new precomputed tables * @throws ObjectStoreException if anything goes wrong */ public List<String> precompute(Query q, Collection<? extends QueryNode> indexes, boolean allFields, String category) throws ObjectStoreException { Connection c = null; try { c = getConnection(); return precomputeWithConnection(c, q, indexes, allFields, category); } catch (SQLException e) { throw new ObjectStoreException("Could not get connection to database", e); } finally { releaseConnection(c); } }
Query subQ = ((QueryCollectionPathExpression) qs).getQuery(null); if (subQ.getConstraint() != null) { retval.addAll(precomputeWithConnection(c, subQ, Collections.singleton((QueryNode) (subQ.getSelect().get(0))), allFields, category)); getSchema().isMissingNotXml()); if (subQ.getConstraint() != null) { retval.addAll(precomputeWithConnection(c, subQ, Collections.singleton((QueryNode) (subQ.getSelect().get(0))), allFields, category));
Query subQ = ((QueryCollectionPathExpression) qs).getQuery(null); if (subQ.getConstraint() != null) { retval.addAll(precomputeWithConnection(c, subQ, Collections.singleton((QueryNode) (subQ.getSelect().get(0))), allFields, category)); getSchema().isMissingNotXml()); if (subQ.getConstraint() != null) { retval.addAll(precomputeWithConnection(c, subQ, Collections.singleton((QueryNode) (subQ.getSelect().get(0))), allFields, category));