public override Net.Vpc.Upa.Impl.Uql.Compiledexpression.DefaultCompiledExpression Copy() { Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete o = new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete(); o.SetDescription(GetDescription()); o.GetClientParameters().SetAll(GetClientParameters()); o.AddQuery(this); return(o); }
protected internal virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete CompileDelete(Net.Vpc.Upa.Expressions.Delete 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.CompiledDelete s = new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete(); s.From(v.GetEntity().GetName()); s.Where(manager.TranslateAny(v.GetCondition(), declarations)); return(s); }
public override string GetSQL(object oo, Net.Vpc.Upa.Persistence.EntityExecutionContext context, Net.Vpc.Upa.Impl.Persistence.SQLManager sqlManager, Net.Vpc.Upa.Impl.Uql.ExpressionDeclarationList declarations) /* throws Net.Vpc.Upa.Exceptions.UPAException */ { Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete o = (Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete)oo; Net.Vpc.Upa.Entity entityManager = context.GetPersistenceUnit().GetEntity(o.GetEntity().GetName()); System.Text.StringBuilder sb = new System.Text.StringBuilder("Delete From " + sqlManager.GetSQL(new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledEntityName(o.GetEntity().GetName()), context, declarations)); if (o.GetEntityAlias() != null) { sb.Append(" ").Append(sqlManager.GetSQL(new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledVar(o.GetEntityAlias()), context, declarations)); } if (o.GetCondition() != null && o.GetCondition().IsValid()) { sb.Append(" Where ").Append(sqlManager.GetSQL(o.GetCondition(), context, declarations)); } return(sb.ToString()); }
public virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete AddQuery(Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete other) { if (other == null) { return(this); } if (other.entity != null) { From(other.entity.GetName(), other.entityAlias); } if (other.condition != null) { if (condition == null) { Where(other.condition.Copy()); } else { Where(new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledAnd(condition, other.condition.Copy())); } } return(this); }
public CompiledDelete(Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete other) : this() { AddQuery(other); }