internal CursorWrappingRelationshipIndexHits(RelationshipExplicitIndexCursor cursor, GraphDatabaseService graphDatabaseService, KernelTransaction ktx, string name) : base(cursor.ExpectedTotalNumberOfResults(), cursor.Score()) { this.Cursor = cursor; this.GraphDatabaseService = graphDatabaseService; this.Ktx = ktx; this.Name = name; }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Relationship> get(org.neo4j.kernel.api.KernelTransaction ktx, String name, String key, Object value, org.neo4j.graphdb.GraphDatabaseService graphDatabaseService) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public IndexHits <Relationship> get(KernelTransaction ktx, string name, string key, object value, GraphDatabaseService graphDatabaseService) { RelationshipExplicitIndexCursor cursor = ktx.Cursors().allocateRelationshipExplicitIndexCursor(); ktx.IndexRead().relationshipExplicitIndexLookup(cursor, name, key, value, -1, -1); return(new CursorWrappingRelationshipIndexHits(cursor, graphDatabaseService, ktx, name)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Relationship> query(org.neo4j.kernel.api.KernelTransaction ktx, String name, Object queryOrQueryObject, org.neo4j.graphdb.GraphDatabaseService graphDatabaseService) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public IndexHits <Relationship> query(KernelTransaction ktx, string name, object queryOrQueryObject, GraphDatabaseService graphDatabaseService) { RelationshipExplicitIndexCursor cursor = ktx.Cursors().allocateRelationshipExplicitIndexCursor(); ktx.IndexRead().relationshipExplicitIndexQuery(cursor, name, queryOrQueryObject, -1, -1); return(new CursorWrappingRelationshipIndexHits(cursor, graphDatabaseService, ktx, name)); }
public override RelationshipExplicitIndexCursor AllocateRelationshipExplicitIndexCursor() { RelationshipExplicitIndexCursor n = _cursors.allocateRelationshipExplicitIndexCursor(); _allCursors.Add(n); return(n); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFindRelationshipByQuery() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFindRelationshipByQuery() { // given using (RelationshipExplicitIndexCursor cursor = cursors.allocateRelationshipExplicitIndexCursor(), ) { MutableLongSet relationships = new LongHashSet(); // when indexRead.relationshipExplicitIndexQuery(cursor, "rels", "alpha:betting*", -1, -1); // then assertFoundRelationships(cursor, 1, relationships); // when relationships.clear(); indexRead.relationshipExplicitIndexQuery(cursor, "rels", "alpha", "betting*", -1, -1); // then assertFoundRelationships(cursor, 1, relationships); // when indexRead.relationshipExplicitIndexQuery(cursor, "rels", "alpha:that*", -1, -1); // then assertFoundRelationships(cursor, 0, relationships); // when indexRead.relationshipExplicitIndexQuery(cursor, "rels", "alpha", "that*", -1, -1); // then assertFoundRelationships(cursor, 0, relationships); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFindRelationshipByLookup() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFindRelationshipByLookup() { // given using (RelationshipExplicitIndexCursor cursor = cursors.allocateRelationshipExplicitIndexCursor(), ) { MutableLongSet edges = new LongHashSet(); // when indexRead.relationshipExplicitIndexLookup(cursor, "rels", "alpha", "betting on the wrong string", -1, -1); // then assertFoundRelationships(cursor, 1, edges); // when indexRead.relationshipExplicitIndexLookup(cursor, "rels", "bar", "not that", -1, -1); // then assertFoundRelationships(cursor, 0, edges); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void relationshipExplicitIndexQuery(org.neo4j.internal.kernel.api.RelationshipExplicitIndexCursor cursor, String index, String key, Object query, long source, long target) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public override void RelationshipExplicitIndexQuery(RelationshipExplicitIndexCursor cursor, string index, string key, object query, long source, long target) { Ktx.assertOpen(); (( DefaultRelationshipExplicitIndexCursor )cursor).Read = this; ExplicitIndex(( DefaultRelationshipExplicitIndexCursor )cursor, ExplicitRelationshipIndex(index).query(key, query is Value ? (( Value )query).asObject() : query, source, target)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void relationshipExplicitIndexLookup(org.neo4j.internal.kernel.api.RelationshipExplicitIndexCursor cursor, String index, String key, Object value, long source, long target) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public override void RelationshipExplicitIndexLookup(RelationshipExplicitIndexCursor cursor, string index, string key, object value, long source, long target) { Ktx.assertOpen(); (( DefaultRelationshipExplicitIndexCursor )cursor).Read = this; ExplicitIndex(( DefaultRelationshipExplicitIndexCursor )cursor, ExplicitRelationshipIndex(index).get(key, value, source, target)); }