protected void UnprepareRootPlan() { if (_rootPlan != null) { _process.UnprepareExpression(_rootPlan); _rootParams = null; _rootPlan = null; } }
public void Unprepare() { if (_plan != null) { if (_cursor != null) { try { _process.CloseCursor(_cursor); } finally { _cursor = null; } } else { try { _process.UnprepareExpression(_plan); } finally { _plan = null; } } } }
/// <summary>Evaluates the given expression using the given process and returns the result.</summary> public DAE.Runtime.Data.IDataValue EvaluateRaw(IServerProcess process, string expression, DAE.Runtime.DataParams paramsValue) { CheckActive(); if (process == null) { process = UtilityProcess; } IServerExpressionPlan plan = process.PrepareExpression(expression, paramsValue); try { return(plan.Evaluate(paramsValue)); } finally { process.UnprepareExpression(plan); } }
/// <summary>Opens a cursor on the given expression using the given process.</summary> public IServerCursor OpenCursor(IServerProcess process, string expression, DAE.Runtime.DataParams paramsValue) { CheckActive(); if (process == null) { process = UtilityProcess; } IServerExpressionPlan plan = process.PrepareExpression(expression, paramsValue); try { return(plan.Open(paramsValue)); } catch { process.UnprepareExpression(plan); throw; } }
public DAE.Runtime.Data.Scalar EvaluateScalar(IServerProcess process, string expression, DAE.Runtime.DataParams paramsValue) { if (process == null) { process = DataSession.UtilityProcess; } DAE.IServerExpressionPlan plan = process.PrepareExpression(expression, paramsValue); try { ErrorList errors = new ErrorList(); errors.AddRange(plan.Messages); ReportErrors(null, errors); return((DAE.Runtime.Data.Scalar)plan.Evaluate(paramsValue)); } finally { process.UnprepareExpression(plan); } }
public void UnPrepare() { _preparedCommandText = String.Empty; _dAERuntimeParams = null; if (_plan != null) { IServerProcess planProcess = _plan.Process; if (planProcess != null) { if (_plan is IServerExpressionPlan) { planProcess.UnprepareExpression((IServerExpressionPlan)_plan); } else { planProcess.UnprepareStatement((IServerStatementPlan)_plan); } } _plan = null; } }