private void BodyMethod(IExecutable iexecutable, string returnVariable) { ReturnVariable = returnVariable; _innerObject = iexecutable as Chainer; if (iexecutable is Compilable) { Executable = new Executable((Compilable)iexecutable); } else if (iexecutable is DbProcedure) { var dbProc = (DbProcedure)iexecutable; dbProc.BuildProc(null); var cpass = new PassChainer(dbProc); Executable = cpass.Executable; _innerObject = cpass; } // PassChainer else { Executable = ((Chainer)iexecutable).Executable; } Executable.Inner = true; // important! Executable.ArgumentsCriticalCheck(false); TryThrow(Executable.Exception); }
// build the executable SQL code private new void Build() { // try throw the exception of the execution phase. TryThrow(); Executable.ArgumentsCriticalCheck(true); TryThrow(); var buildArgs = new BuildArgs(null); buildArgs.TestBody = _testBody; // executable is build by the context of its compilable object var execSql = Executable.Build( new BuildContext(Executable.Compilable), buildArgs); _sql = BuildOutputWrapper(execSql); }