Browse Source

Modify the database table

pull/32/head
sunkaixuan 2 years ago
parent
commit
142285398c
  1. 6
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  2. 1
      Src/Asp.Net/SqlSugar/Interface/IQueryable.cs

6
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -1244,7 +1244,11 @@ namespace SqlSugar
}
return result;
}
public ISugarQueryable<T> SplitTable()
{
//all table
return this.SplitTable(tag => tag);
}
public ISugarQueryable<T> SplitTable(DateTime beginTime, DateTime endTime)
{
var splitColumn = this.EntityInfo.Columns.FirstOrDefault(it => it.PropertyInfo.GetCustomAttribute<SplitFieldAttribute>() != null);

1
Src/Asp.Net/SqlSugar/Interface/IQueryable.cs

@ -255,6 +255,7 @@ namespace SqlSugar
string ToPivotJson<TColumn, TRow, TData>(Func<T, TColumn> columnSelector, Expression<Func<T, TRow>> rowSelector, Func<IEnumerable<T>, TData> dataSelector);
ISugarQueryable<T> SplitTable(Func<List<SplitTableInfo>,IEnumerable<SplitTableInfo>> getTableNamesFunc);
ISugarQueryable<T> SplitTable(DateTime beginTime,DateTime endTime);
ISugarQueryable<T> SplitTable();
}
public partial interface ISugarQueryable<T, T2> : ISugarQueryable<T>
{

Loading…
Cancel
Save