Exemple #1
0
        public static ExecutionPlan Deserialize(BinaryReader input, FastAccessList <object> referenceTracking)
        {
            var ep = new ExecutionPlan();

            var nbVars = input.ReadInt32();

            for (var i = 0; i < nbVars; i++)
            {
                var id = input.ReadInt32();
                ep.Variables.Add((SqlVariable)referenceTracking[id]);
            }

            var nbInsertSteps = input.ReadInt32();

            for (var i = 0; i < nbInsertSteps; i++)
            {
                var step = InsertStep.Deserialize(input, referenceTracking);
                ep.InsertSteps.Add(step);
            }

            var nbUpdateSteps = input.ReadInt32();

            for (var i = 0; i < nbUpdateSteps; i++)
            {
                var step = UpdateStep.Deserialize(input);
                ep.UpdateSteps.Add(step);
            }

            return(ep);
        }
Exemple #2
0
        public static UpdateStep Deserialize(BinaryReader input)
        {
            var step = new UpdateStep();

            step.StepId           = input.ReadInt32();
            step.DestinationTable = TableIdentifier.Deserialize(input);
            step.DestinationRow   = RowIdentifier.Deserialize(input);
            step.ForeignKey       = ColumnsWithValue.Deserialize(input);

            return(step);
        }