public void MergeOn(Constructor.dbCom comp, Expression keyDestiny, params Expression[] keyOrigin) { Constructor.Comparison whr = new Constructor.Comparison(); whr.comparator = keyDestiny.ToString(); whr.type = comp; whr.values = new List <string>(); foreach (Expression val in keyOrigin) { whr.values.Add(val.ToString()); } Keys.Add(whr); }
/// <summary>Agrega una condicion a una estructura de control case</summary> public Expression When(Expression then, Constructor.dbCom comp, Expression cond, params Expression[] values) { Comparison whr = new Comparison(); if (cond.IsComplex) { whr.expr = cond; } whr.comparator = cond.ToString(); whr.type = comp; whr.values = values.Select(v => v.ToString()).ToList(); return(this.Operate(whr, then)); }
/// <summary>Inicia una estructura de control de flujo case</summary> private static Expression CaseWhen(Expression then, bool isRoot, Constructor.dbCom comp, Expression cond, params Expression[] values) { Comparison whr = new Comparison(); if (cond.IsComplex) { whr.expr = cond; } whr.comparator = cond.ToString(); whr.type = comp; whr.values = values.Select(v => v.ToString()).ToList(); return(new Expression(whr, then, isRoot)); }
/// <summary>Adds a condition to the merge action</summary> public Query MergeWhen(Constructor.dbCom comp, Expression comparator, params Expression[] values) { Comparison whr = new Comparison(); whr.comparator = comparator.ToString(); whr.type = comp; whr.values = new List <string>(); foreach (Expression val in values) { whr.values.Add(val.ToString()); } merge.MergeWhen(whr); return(this); }
/// <summary>Inicia una estructura de control de flujo case</summary> public static Expression CaseWhen(Expression then, Constructor.dbCom comp, Expression cond, params Expression[] values) { return(CaseWhen(then, true, comp, cond, values)); }
/// <summary>Agrega una condiciĆ³n de union para el origen y el destino de la consulta merge</summary> public Query MergeOn(Constructor.dbCom comp, Expression keyDestiny, Expression keyOrigin) { merge.MergeOn(comp, keyDestiny, keyOrigin); return(this); }