Deprecate QueryM2MWithCtx and QueryTableWithCtx
- Add methods with `WithCtx` suffix and remove ctx fileld from QueryStter and QueryM2M. - Deprecate QueryTableWithCtx and QueryM2MWithCtx. Signed-off-by: Penghui Liao <liaoishere@gmail.com>
This commit is contained in:
@@ -2836,7 +2836,7 @@ func TestContextCanceled(t *testing.T) {
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
cancel()
|
||||
|
||||
qs := dORM.QueryTable(user).WithContext(ctx)
|
||||
_, err = qs.Filter("UserName", "slene").Count()
|
||||
qs := dORM.QueryTable(user)
|
||||
_, err = qs.Filter("UserName", "slene").CountWithCtx(ctx)
|
||||
throwFail(t, AssertIs(err, context.Canceled))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user