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 void AssertExactPredicate(object value) { ExactPredicate p = IndexQuery.Exact(_propId, value); assertTrue(Test(p, value)); AssertFalseForOtherThings(p); }
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)); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testExact_ComparingBigDoublesAndLongs() public virtual void TestExactComparingBigDoublesAndLongs() { ExactPredicate p = IndexQuery.Exact(_propId, 9007199254740993L); assertFalse(Test(p, 9007199254740992D)); }