Пример #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void accept(org.neo4j.bolt.runtime.BoltResult_Visitor visitor) throws Exception
            public override void Accept(Org.Neo4j.Bolt.runtime.BoltResult_Visitor visitor)
            {
                foreach (QueryResult_Record record in Records)
                {
                    visitor.Visit(record);
                }
            }
Пример #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void accept(final org.neo4j.bolt.runtime.BoltResult_Visitor visitor) throws Exception
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
        public override void Accept(Org.Neo4j.Bolt.runtime.BoltResult_Visitor visitor)
        {
            long start = _clock.millis();

            @delegate.Accept(row =>
            {
                visitor.Visit(row);
                return(true);
            });
            AddRecordStreamingTime(visitor, _clock.millis() - start);
            QueryExecutionType qt = @delegate.ExecutionType();

            visitor.AddMetadata("type", Values.stringValue(QueryTypeCode(qt.QueryType())));

            if (@delegate.QueryStatistics().containsUpdates())
            {
                MapValue stats = QueryStats(@delegate.QueryStatistics());
                visitor.AddMetadata("stats", stats);
            }
            if (qt.RequestedExecutionPlanDescription())
            {
                ExecutionPlanDescription rootPlanTreeNode = @delegate.ExecutionPlanDescription();
                string metadataFieldName = rootPlanTreeNode.HasProfilerStatistics() ? "profile" : "plan";
                visitor.AddMetadata(metadataFieldName, ExecutionPlanConverter.Convert(rootPlanTreeNode));
            }

            IEnumerable <Notification> notifications = @delegate.Notifications;

            if (notifications.GetEnumerator().hasNext())
            {
                visitor.AddMetadata("notifications", NotificationConverter.Convert(notifications));
            }
        }
Пример #3
0
 public override void Accept(Org.Neo4j.Bolt.runtime.BoltResult_Visitor visitor)
 {
     visitor.AddMetadata("bookmark", stringValue(_bookmark.ToString()));
 }
Пример #4
0
 protected internal override void AddRecordStreamingTime(Org.Neo4j.Bolt.runtime.BoltResult_Visitor visitor, long time)
 {
     visitor.AddMetadata(LAST_RESULT_CONSUMED_KEY, longValue(time));
 }
Пример #5
0
 protected internal virtual void AddRecordStreamingTime(Org.Neo4j.Bolt.runtime.BoltResult_Visitor visitor, long time)
 {
     visitor.AddMetadata("result_consumed_after", longValue(time));
 }