mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 优化 AsTable 自动分表,提供超始小时的设置;
This commit is contained in:
parent
e489ec3c64
commit
533a472adb
@ -113,7 +113,7 @@ namespace base_entity
|
|||||||
public B B { get; set; }
|
public B B { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Table(Name = "as_table_log_{yyyyMM}", AsTable = "createtime=2022-1-1 11(1 month)")]
|
[Table(Name = "as_table_log_{yyyyMMddHH}", AsTable = "createtime=2022-1-1 11(1 month)")]
|
||||||
class AsTableLog
|
class AsTableLog
|
||||||
{
|
{
|
||||||
public Guid id { get; set; }
|
public Guid id { get; set; }
|
||||||
@ -521,7 +521,7 @@ namespace base_entity
|
|||||||
.UseAutoSyncStructure(true)
|
.UseAutoSyncStructure(true)
|
||||||
.UseNoneCommandParameter(true)
|
.UseNoneCommandParameter(true)
|
||||||
.UseNameConvert(NameConvertType.ToLower)
|
.UseNameConvert(NameConvertType.ToLower)
|
||||||
.UseMappingPriority(MappingPriorityType.Attribute, MappingPriorityType.FluentApi, MappingPriorityType.Aop)
|
//.UseMappingPriority(MappingPriorityType.Attribute, MappingPriorityType.FluentApi, MappingPriorityType.Aop)
|
||||||
|
|
||||||
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, "data source=:memory:")
|
.UseConnectionString(FreeSql.DataType.Sqlite, "data source=:memory:")
|
||||||
|
@ -104,7 +104,7 @@ namespace FreeSql.DataAnnotations
|
|||||||
public DateTimeAsTableImpl(string tableName, DateTime beginTime, Func<DateTime, DateTime> nextTimeFunc)
|
public DateTimeAsTableImpl(string tableName, DateTime beginTime, Func<DateTime, DateTime> nextTimeFunc)
|
||||||
{
|
{
|
||||||
if (nextTimeFunc == null) throw new ArgumentException(CoreStrings.Cannot_Be_NULL_Name("nextTimeFunc"));
|
if (nextTimeFunc == null) throw new ArgumentException(CoreStrings.Cannot_Be_NULL_Name("nextTimeFunc"));
|
||||||
beginTime = beginTime.Date; //日期部分作为开始
|
//beginTime = beginTime.Date; //日期部分作为开始
|
||||||
_beginTime = beginTime;
|
_beginTime = beginTime;
|
||||||
_nextTimeFunc = nextTimeFunc;
|
_nextTimeFunc = nextTimeFunc;
|
||||||
_tableName = tableName;
|
_tableName = tableName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user