protected internal override bool InitializeRangeForQuery(KEY treeKeyFrom, KEY treeKeyTo, IndexQuery[] predicates) { IndexQuery predicate = predicates[0]; switch (predicate.Type()) { case exists: treeKeyFrom.initValueAsLowest(ValueGroup.UNKNOWN); treeKeyTo.initValueAsHighest(ValueGroup.UNKNOWN); break; case exact: IndexQuery.ExactPredicate exactPredicate = (IndexQuery.ExactPredicate)predicate; treeKeyFrom.from(exactPredicate.Value()); treeKeyTo.from(exactPredicate.Value()); break; case range: //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.neo4j.internal.kernel.api.IndexQuery.RangePredicate<?> rangePredicate = (org.neo4j.internal.kernel.api.IndexQuery.RangePredicate<?>) predicate; IndexQuery.RangePredicate <object> rangePredicate = (IndexQuery.RangePredicate <object>)predicate; InitFromForRange(rangePredicate, treeKeyFrom); InitToForRange(rangePredicate, treeKeyTo); break; default: throw new System.ArgumentException("IndexQuery of type " + predicate.Type() + " is not supported."); } return(false); // no filtering }
private static bool IsNumericOrGeometricPredicate(IndexQuery predicate) { if (predicate.Type() == IndexQuery.IndexQueryType.exact) { IndexQuery.ExactPredicate exactPredicate = (IndexQuery.ExactPredicate)predicate; return(IsNumberGeometryOrArray(exactPredicate.Value())); } else { return(predicate.Type() == IndexQuery.IndexQueryType.range && (predicate.ValueGroup() == ValueGroup.NUMBER || predicate.ValueGroup() == ValueGroup.GEOMETRY)); } }
internal override bool InitializeRangeForQuery(StringIndexKey treeKeyFrom, StringIndexKey treeKeyTo, IndexQuery[] predicates) { IndexQuery predicate = predicates[0]; switch (predicate.Type()) { case exists: treeKeyFrom.InitValueAsLowest(ValueGroup.TEXT); treeKeyTo.InitValueAsHighest(ValueGroup.TEXT); return(false); case exact: IndexQuery.ExactPredicate exactPredicate = (IndexQuery.ExactPredicate)predicate; treeKeyFrom.From(exactPredicate.Value()); treeKeyTo.From(exactPredicate.Value()); return(false); case range: //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.neo4j.internal.kernel.api.IndexQuery.RangePredicate<?> rangePredicate = (org.neo4j.internal.kernel.api.IndexQuery.RangePredicate<?>)predicate; IndexQuery.RangePredicate <object> rangePredicate = (IndexQuery.RangePredicate <object>)predicate; InitFromForRange(rangePredicate, treeKeyFrom); InitToForRange(rangePredicate, treeKeyTo); return(false); case stringPrefix: StringPrefixPredicate prefixPredicate = ( StringPrefixPredicate )predicate; treeKeyFrom.InitAsPrefixLow(prefixPredicate.prefix()); treeKeyTo.InitAsPrefixHigh(prefixPredicate.prefix()); return(false); case stringSuffix: case stringContains: treeKeyFrom.InitValueAsLowest(ValueGroup.TEXT); treeKeyTo.InitValueAsHighest(ValueGroup.TEXT); return(true); default: throw new System.ArgumentException("IndexQuery of type " + predicate.Type() + " is not supported."); } }