refactor: 优化数据库查询构建链式调用
This commit is contained in:
@@ -440,7 +440,7 @@ func (d *dataBase) Model(ctx context.Context, tableNameOrStruct ...any) *model {
|
|||||||
m.Sharding(shardingConfig).ShardingValue(user.TenantId)
|
m.Sharding(shardingConfig).ShardingValue(user.TenantId)
|
||||||
}
|
}
|
||||||
|
|
||||||
m.OmitNilData().OmitNilWhere().Hook(catchSQLHook())
|
m.OmitNil().OmitEmpty().Hook(catchSQLHook())
|
||||||
return &model{
|
return &model{
|
||||||
Model: m,
|
Model: m,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user