mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
FreeSql ISelect/IUpdate/IInsert/IDelete 增加 AsTable 方法,实现分表
This commit is contained in:
@ -39,6 +39,12 @@ namespace FreeSql {
|
||||
/// <returns></returns>
|
||||
IDelete<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class;
|
||||
|
||||
/// <summary>
|
||||
/// 设置表名规则,可用于分库/分表,参数1:默认表名;返回值:新表名;
|
||||
/// </summary>
|
||||
/// <param name="dataTable"></param>
|
||||
/// <returns></returns>
|
||||
IDelete<T1> AsTable(Func<string, string> tableRule);
|
||||
/// <summary>
|
||||
/// 返回即将执行的SQL语句
|
||||
/// </summary>
|
||||
|
@ -32,6 +32,12 @@ namespace FreeSql {
|
||||
/// <returns></returns>
|
||||
IInsert<T1> IgnoreColumns(Expression<Func<T1, object>> columns);
|
||||
|
||||
/// <summary>
|
||||
/// 设置表名规则,可用于分库/分表,参数1:默认表名;返回值:新表名;
|
||||
/// </summary>
|
||||
/// <param name="dataTable"></param>
|
||||
/// <returns></returns>
|
||||
IInsert<T1> AsTable(Func<string, string> tableRule);
|
||||
/// <summary>
|
||||
/// 返回即将执行的SQL语句
|
||||
/// </summary>
|
||||
|
@ -35,6 +35,12 @@ namespace FreeSql {
|
||||
T1 First();
|
||||
Task<T1> FirstAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 设置表名规则,可用于分库/分表,参数1:实体类型;参数2:默认表名;返回值:新表名;
|
||||
/// </summary>
|
||||
/// <param name="dataTable"></param>
|
||||
/// <returns></returns>
|
||||
TSelect AsTable(Func<Type, string, string> tableRule);
|
||||
/// <summary>
|
||||
/// 返回即将执行的SQL语句
|
||||
/// </summary>
|
||||
|
@ -82,6 +82,12 @@ namespace FreeSql {
|
||||
/// <returns></returns>
|
||||
IUpdate<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class;
|
||||
|
||||
/// <summary>
|
||||
/// 设置表名规则,可用于分库/分表,参数1:默认表名;返回值:新表名;
|
||||
/// </summary>
|
||||
/// <param name="dataTable"></param>
|
||||
/// <returns></returns>
|
||||
IUpdate<T1> AsTable(Func<string, string> tableRule);
|
||||
/// <summary>
|
||||
/// 返回即将执行的SQL语句
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user