示例#1
0
 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);
 }
示例#2
0
 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);
 }
示例#3
0
 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());
 }
示例#4
0
 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);
 }
示例#5
0
 public CompiledDelete(Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledDelete other)  : this()
 {
     AddQuery(other);
 }