public virtual Net.Vpc.Upa.Expressions.Expression GetViewElementExpressionAt(int updatableTableIndex, Net.Vpc.Upa.Expressions.Expression expression) /* throws Net.Vpc.Upa.Exceptions.UPAException */ { System.Collections.Generic.IList <Net.Vpc.Upa.Field> pf = GetEntity().GetPrimaryFields(); System.Collections.Generic.IList <Net.Vpc.Upa.Field> pft = updatableTables[updatableTableIndex].GetPrimaryFields(); Net.Vpc.Upa.Expressions.Expression[] pfte = new Net.Vpc.Upa.Expressions.Expression[(pft).Count]; for (int i = 0; i < pfte.Length; i++) { Net.Vpc.Upa.Field f = pft[i]; pfte[i] = new Net.Vpc.Upa.Expressions.Var(f.GetName()); } Net.Vpc.Upa.Expressions.Uplet ut = new Net.Vpc.Upa.Expressions.Uplet(pfte); Net.Vpc.Upa.Expressions.Expression[] pfe = new Net.Vpc.Upa.Expressions.Expression[(pf).Count - 1]; for (int i = 0; i < pfe.Length; i++) { Net.Vpc.Upa.Field f = pf[i + 1]; pfe[i] = new Net.Vpc.Upa.Expressions.Var(f.GetName()); } Net.Vpc.Upa.Expressions.Expression w = new Net.Vpc.Upa.Expressions.Equals(new Net.Vpc.Upa.Expressions.Var(pf[0].GetName()), new Net.Vpc.Upa.Expressions.Literal(updatableTables[updatableTableIndex].GetName())); if (expression != null) { w = new Net.Vpc.Upa.Expressions.And(w, expression); } Net.Vpc.Upa.Expressions.Select q = new Net.Vpc.Upa.Expressions.Select().From(GetEntity().GetName()).Uplet(pfe).Where(w); return(new Net.Vpc.Upa.Expressions.InSelection(ut, q)); }
public override Net.Vpc.Upa.Expressions.Expression Copy() { Net.Vpc.Upa.Expressions.Expression[] expressions2 = new Net.Vpc.Upa.Expressions.Expression[expressions.Length]; for (int i = 0; i < expressions2.Length; i++) { expressions2[i] = expressions[i].Copy(); } Net.Vpc.Upa.Expressions.Uplet o = new Net.Vpc.Upa.Expressions.Uplet(expressions2); return(o); }
protected internal virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledUplet CompileUplet(Net.Vpc.Upa.Expressions.Uplet v, Net.Vpc.Upa.Impl.Uql.ExpressionTranslationManager manager, Net.Vpc.Upa.Impl.Uql.ExpressionDeclarationList declarations) { if (v == null) { return(null); } Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledUplet s = new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledUplet(manager.TranslateArray(v.GetExpressions(), declarations)); // s.setDeclarationList(declarations); return(s); }