gen
gen copied to clipboard
SetDefault support set timeout
Describe the feature
SetDefault support set timeout option
Motivation
I have to use .WithContext(timeoutCtx) every time query sql, I try to use SetDefault's opts ...gen.DOOption,but DOConfig is an empty struct.
Related Issues
SetDefault only needs to be initialized and called once, and the default timeout can be set by gorm initialization
@qqxhb thanks for your response, I mean SetDefault set a default timeout by ops could be an useful feature .
and I cannot find any option/config to set default timeout by gorm initialization, could you provide me more info?
@qqxhb FYI https://github.com/go-gorm/gorm/pull/7567