using Ant.Common; using Ant.Utility; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Ant.DbExpressions { /// /// /// public class DbUpdateExpression : DbExpression { /// /// /// /// public DbUpdateExpression(DbTable table) : this(table, null) { } /// /// 获取解析更新SQL /// /// /// public DbUpdateExpression(DbTable table, DbExpression condition) : base(DbExpressionType.Update, UtilConstants.TypeOfVoid) { AntUtils.CheckNull(table); this._table = table; this._condition = condition; this.UpdateColumns = new Dictionary(); } DbTable _table; /// /// 表名 /// public DbTable Table { get { return this._table; } } /// /// 更新列 /// public Dictionary UpdateColumns { get; private set; } DbExpression _condition; /// /// 查询条件 /// public DbExpression Condition { get { return this._condition; } } /// /// 解析成SQL语句 /// /// /// /// public override T Accept(DbExpressionVisitor visitor) { return visitor.Visit(this); } } }