MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / shouldRecover

Method shouldRecover

internal/caches/list_file_db_sqlite.go:578–593  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

576}
577
578func (this *SQLiteFileListDB) shouldRecover() bool {
579 result, err := this.writeDB.Query("pragma integrity_check;")
580 if err != nil {
581 logs.Println(result)
582 }
583 var errString = ""
584 var shouldRecover = false
585 if result.Next() {
586 _ = result.Scan(&errString)
587 if strings.TrimSpace(errString) != "ok" {
588 shouldRecover = true
589 }
590 }
591 _ = result.Close()
592 return shouldRecover
593}
594
595// 删除数据库文件
596func (this *SQLiteFileListDB) deleteDB() {

Callers 1

OpenMethod · 0.95

Calls 3

NextMethod · 0.80
CloseMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected