2022-02-01 12:55:49 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SqlSugar.Access
|
|
|
|
|
{
|
2022-02-20 16:32:32 +08:00
|
|
|
|
public class AccessUpdateBuilder : UpdateBuilder
|
2022-02-01 12:55:49 +08:00
|
|
|
|
{
|
2022-02-21 01:03:03 +08:00
|
|
|
|
protected override string TomultipleSqlString(List<IGrouping<int, DbColumnInfo>> groupList)
|
|
|
|
|
{
|
2022-03-24 21:54:53 +08:00
|
|
|
|
if (groupList.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
else if (groupList.GroupBy(it => it.Key).Count() > 1)
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("access no support batch update");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return ToSingleSqlString(groupList);
|
|
|
|
|
}
|
2022-02-21 01:03:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-02-01 12:55:49 +08:00
|
|
|
|
}
|
|
|
|
|
}
|