@Override public double getCost(Filter filter, NodeState root) { // TODO don't call getCost for such queries if (filter.getFullTextConstraint() != null) { // not an appropriate index for full-text search return POSITIVE_INFINITY; } if (filter.containsNativeConstraint()) { // not an appropriate index for native search return Double.POSITIVE_INFINITY; } for (PropertyRestriction pr : filter.getPropertyRestrictions()) { if (isEqualityRestrictionOnType(pr, REFERENCE) || isEqualityRestrictionOnType(pr, WEAKREFERENCE)) { return COST; } } // not an appropriate index return POSITIVE_INFINITY; }
@Override public double getCost(Filter filter, NodeState root) { // TODO don't call getCost for such queries if (filter.getFullTextConstraint() != null) { // not an appropriate index for full-text search return POSITIVE_INFINITY; } if (filter.containsNativeConstraint()) { // not an appropriate index for native search return Double.POSITIVE_INFINITY; } for (PropertyRestriction pr : filter.getPropertyRestrictions()) { if (isEqualityRestrictionOnType(pr, REFERENCE) || isEqualityRestrictionOnType(pr, WEAKREFERENCE)) { return COST; } } // not an appropriate index return POSITIVE_INFINITY; }
@Override public double getCost(Filter filter, NodeState root) { // TODO don't call getCost for such queries if (filter.getFullTextConstraint() != null) { // not an appropriate index for full-text search return POSITIVE_INFINITY; } if (filter.containsNativeConstraint()) { // not an appropriate index for native search return Double.POSITIVE_INFINITY; } for (PropertyRestriction pr : filter.getPropertyRestrictions()) { if (isEqualityRestrictionOnType(pr, REFERENCE) || isEqualityRestrictionOnType(pr, WEAKREFERENCE)) { return COST; } } // not an appropriate index return POSITIVE_INFINITY; }
@Override public Cursor query(Filter filter, NodeState root) { for (PropertyRestriction pr : filter.getPropertyRestrictions()) { if (isEqualityRestrictionOnType(pr, REFERENCE)) { String uuid = pr.first.getValue(STRING); String name = pr.propertyName; return lookup(root, uuid, name, REF_NAME, filter); } if (isEqualityRestrictionOnType(pr, WEAKREFERENCE)) { String uuid = pr.first.getValue(STRING); String name = pr.propertyName; return lookup(root, uuid, name, WEAK_REF_NAME, filter); } } return newPathCursor(new ArrayList<String>(), filter.getQueryLimits()); }
@Override public Cursor query(Filter filter, NodeState root) { for (PropertyRestriction pr : filter.getPropertyRestrictions()) { if (isEqualityRestrictionOnType(pr, REFERENCE)) { String uuid = pr.first.getValue(STRING); String name = pr.propertyName; return lookup(root, uuid, name, REF_NAME, filter); } if (isEqualityRestrictionOnType(pr, WEAKREFERENCE)) { String uuid = pr.first.getValue(STRING); String name = pr.propertyName; return lookup(root, uuid, name, WEAK_REF_NAME, filter); } } return newPathCursor(new ArrayList<String>(), filter.getQueryLimits()); }
@Override public Cursor query(Filter filter, NodeState root) { for (PropertyRestriction pr : filter.getPropertyRestrictions()) { if (isEqualityRestrictionOnType(pr, REFERENCE)) { String uuid = pr.first.getValue(STRING); String name = pr.propertyName; return lookup(root, uuid, name, REF_NAME, filter); } if (isEqualityRestrictionOnType(pr, WEAKREFERENCE)) { String uuid = pr.first.getValue(STRING); String name = pr.propertyName; return lookup(root, uuid, name, WEAK_REF_NAME, filter); } } return newPathCursor(new ArrayList<String>(), filter.getQueryLimits()); }