减少在自增锁中生成的sql statements

This commit is contained in:
刘祥超
2023-07-04 14:42:14 +08:00
parent 3f21b3148e
commit c20accbf58
2 changed files with 17 additions and 0 deletions

View File

@@ -26,6 +26,21 @@ func TestSysLockerDAO_Lock(t *testing.T) {
}
}
func TestSysLocker_Increase_SQL(t *testing.T) {
var dao = NewSysLockerDAO()
value, err := dao.Read(nil, "hello")
if err != nil {
t.Fatal(err)
}
t.Log("before:", value)
v, err := dao.Increase(nil, "hello", 0)
if err != nil {
t.Log("err:", err)
return
}
t.Log("after:", v)
}
func TestSysLocker_Increase(t *testing.T) {
dbs.NotifyReady()