Example #1
0
        /// <summary>
        /// Performs an index seek.
        /// </summary>
        /// <param name="read"> The Read instance to use for seeking </param>
        /// <param name="cursors"> Used for cursor allocation </param>
        /// <param name="index"> A reference to an index </param>
        /// <param name="value"> The value to seek for </param>
        /// <returns> A cursor positioned at the data found in index. </returns>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static org.neo4j.internal.kernel.api.NodeValueIndexCursor indexSeek(org.neo4j.internal.kernel.api.Read read, org.neo4j.internal.kernel.api.CursorFactory cursors, org.neo4j.internal.kernel.api.IndexReference index, Object value) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        public static NodeValueIndexCursor IndexSeek(Read read, CursorFactory cursors, IndexReference index, object value)
        {
            Debug.Assert(index.Properties().Length == 1);
            if (value == Values.NO_VALUE || value == null)
            {
                return([email protected]_Fields.Empty);
            }
            else
            {
                NodeValueIndexCursor      cursor = cursors.AllocateNodeValueIndexCursor();
                IndexQuery.ExactPredicate query  = exact(index.Properties()[0], makeValueNeoSafe(value));
                read.NodeIndexSeek(index, cursor, IndexOrder.NONE, false, query);
                return(cursor);
            }
        }