Beispiel #1
0
        public void Execute(Dictionary <string, Table> tables, SqlIfElseStatement ifElseStatement)
        {
            var rawData   = new RawData(_Command);
            var evaluator = new EvaluateBooleanExpression(rawData, _Database, _Command);
            var isTrue    = evaluator.Evaluate(new List <RawTableRow>( ), ifElseStatement.Condition);

            if (isTrue && ifElseStatement.TrueStatement != null)
            {
                _Database.ExecuteStatement(_Command, ifElseStatement.TrueStatement);
            }
            else if (isTrue == false && ifElseStatement.FalseStatement != null)
            {
                _Database.ExecuteStatement(_Command, ifElseStatement.FalseStatement);
            }
        }
Beispiel #2
0
 public override void Visit(SqlIfElseStatement codeObject)
 {
 }