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

Method Total

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

Source from the content-addressed store, hash-verified

190}
191
192func (this *SQLiteFileListDB) Total() (int64, error) {
193 // 读取总数量
194 var row = this.readDB.QueryRow(`SELECT COUNT(*) FROM "` + this.itemsTableName + `"`)
195 if row.Err() != nil {
196 return 0, row.Err()
197 }
198 var total int64
199 err := row.Scan(&total)
200 return total, err
201}
202
203func (this *SQLiteFileListDB) AddSync(hash string, item *Item) error {
204 this.hashMap.Add(hash)

Callers 2

TestFileListDB_MemoryFunction · 0.80
CountMethod · 0.80

Calls 1

QueryRowMethod · 0.45

Tested by 1

TestFileListDB_MemoryFunction · 0.64