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

This commit is contained in:
GoEdgeLab
2023-07-04 14:42:14 +08:00
parent faf1289c8f
commit 0df40b8d98
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()