internal PlanDescriptor GetPlanDescriptor(IRemoteServerStatementPlan plan)
        {
            PlanDescriptor descriptor = new PlanDescriptor();

            descriptor.ID             = plan.ID;
            descriptor.CacheTimeStamp = plan.Process.Session.Server.CacheTimeStamp;
            descriptor.Statistics     = plan.PlanStatistics;
            descriptor.Messages       = DataphorFaultUtility.ExceptionsToFaults(plan.Messages);
            return(descriptor);
        }
        internal PlanDescriptor GetPlanDescriptor(RemoteServerExpressionPlan plan, RemoteParam[] paramsValue)
        {
            PlanDescriptor descriptor = new PlanDescriptor();

            descriptor.ID         = plan.ID;
            descriptor.Statistics = plan.PlanStatistics;
            descriptor.Messages   = DataphorFaultUtility.ExceptionsToFaults(plan.Messages);
            if (plan.ServerExpressionPlan.ActualDataType is Schema.ICursorType)
            {
                descriptor.Capabilities    = plan.Capabilities;
                descriptor.CursorIsolation = plan.Isolation;
                descriptor.CursorType      = plan.CursorType;
                if (((TableNode)plan.ServerExpressionPlan.Program.Code.Nodes[0]).Order != null)
                {
                    descriptor.Order = ((TableNode)plan.ServerExpressionPlan.Program.Code.Nodes[0]).Order.Name;
                }
                else
                {
                    descriptor.Order = String.Empty;
                }
            }
            descriptor.Catalog = plan.GetCatalog(paramsValue, out descriptor.ObjectName, out descriptor.CacheTimeStamp, out descriptor.ClientCacheTimeStamp, out descriptor.CacheChanged);
            return(descriptor);
        }