StaticConfig.SplitTableCreateTableFunc 方法存在bug? 返回

SqlSugar 沟通中
6 425
该叫什么 Liang 发布于1周前
悬赏:0 飞吻
StaticConfig.SplitTableCreateTableFunc = (type,insertObjs)=>
  {
    //如果插入频繁可以根据 insertObjs 有没有今天时间来验证是否清空缓存

    

  };


新增的这个方法是不是有bug?只要调用Insertable方法就会触发这个事件,我的理解是只有创建表才触发;

比如:下面示例代码,会触发两次SplitTableCreateTableFunc,这样是不是就跟“CompleteInsertableFunc”这个一样了啊

 var s1 = await this._dbClient.Insertable<ServerLogs>(new ServerLogs
 {
     Message = "test1",
 }).SplitTable().ExecuteReturnSnowflakeIdAsync();
 Console.WriteLine(s1);
 var s2 = await this._dbClient.Insertable<ServerLogs>(new ServerLogs
 {
     Message = "test2",
 }).SplitTable().ExecuteReturnSnowflakeIdAsync();
 Console.WriteLine(s2);


热忱回答6