mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-13 23:40:25 +08:00
数据库可以手工清理
This commit is contained in:
19
internal/rpc/services/service_db_test.go
Normal file
19
internal/rpc/services/service_db_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDBService_FindAllDBTables(t *testing.T) {
|
||||
db, err := dbs.Default()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
ones, _, err := db.FindOnes("SELECT * FROM information_schema.`TABLES` WHERE TABLE_SCHEMA=?", db.Name())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
logs.PrintAsJSON(ones, t)
|
||||
}
|
||||
Reference in New Issue
Block a user