Ejemplo n.º 1
0
 /// <summary>
 /// 延迟执行数据库交互,并提交到队列
 /// </summary>
 /// <param name="act">要延迟操作的委托</param>
 /// <param name="map">字段映射</param>
 /// <param name="name">表名称</param>
 /// <param name="isExecute">是否立即执行</param>
 public override void AppendLazy(string name, FieldMap map, Action<Queue> act, bool isExecute)
 {
     try
     {
         CreateQueue(name, map);
         if (isExecute) { act(Queue); return; }
         Queue.LazyAct = act;
         if (Queue != null) { _groupQueueList.Add(Queue); }
     }
     finally
     {
         Clear();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 默认构造器
 /// </summary>
 /// <param name="dbProvider">数据库提供者(不同数据库的特性)</param>
 /// <param name="map">字段映射</param>
 /// <param name="paramList">SQL参数列表</param>
 public InsertVisitor(AbsDbProvider dbProvider, FieldMap map, List<DbParameter> paramList) : base(dbProvider, map, paramList) { }
Ejemplo n.º 3
0
 /// <summary>
 /// 获取当前队列(不存在,则创建)
 /// </summary>
 /// <param name="map">字段映射</param>
 /// <param name="name">表名称</param>
 public override Queue CreateQueue(string name, FieldMap map)
 {
     return Queue ?? (Queue = new Queue(_groupQueueList.Count, name, map, this));
 }