public InCondtionInfo Parse(SelectAtomContext ctx) { var temp = Table_field.Parse(ctx); var condition = new InCondtionInfo(); condition.LeftValue = temp; if (In_keyword.keyworkd == "in") { condition.ConditionType = ConditionType.In; } else if (In_keyword.keyworkd == "not in") { condition.ConditionType = ConditionType.NotIn; } else { System.Diagnostics.Debug.Assert(false, "没有这种in条件"); } //if (temp != null) //{ // rslt.Condition.Conditions.Add(new ConditionComplexInfo()); // rslt.Condition.Conditions[0].Condition = condition; //} var listField = this.In_right_value.Parse(ctx); condition.RightValue = listField; return(condition); }
public CaseFieldWithTargetInfo Parse(SelectAtomContext ctx) { var rslt = new CaseFieldWithTargetInfo(); rslt.Target = Table_field.Parse(ctx); foreach (var expr in this.Case_have_target_when_expressions) { rslt.CaseHaveTargetWhenExpressions.Add(expr.Parse(ctx)); } if (Case_else_expression != null) { rslt.CaseElseExpression = Case_else_expression.Parse(ctx); } return(rslt); }