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

Method ListHashes

internal/caches/list_file_db_sqlite.go:284–303  ·  view source on GitHub ↗
(lastId int64)

Source from the content-addressed store, hash-verified

282}
283
284func (this *SQLiteFileListDB) ListHashes(lastId int64) (hashList []string, maxId int64, err error) {
285 rows, err := this.selectHashListStmt.Query(lastId)
286 if err != nil {
287 return nil, 0, err
288 }
289 var id int64
290 var hash string
291 for rows.Next() {
292 err = rows.Scan(&id, &hash)
293 if err != nil {
294 _ = rows.Close()
295 return
296 }
297 maxId = id
298 hashList = append(hashList, hash)
299 }
300
301 _ = rows.Close()
302 return
303}
304
305func (this *SQLiteFileListDB) IncreaseHitAsync(hash string) error {
306 // do nothing

Callers 2

LoadMethod · 0.80
TestFileListDB_MemoryFunction · 0.80

Calls 3

NextMethod · 0.80
CloseMethod · 0.65
QueryMethod · 0.45

Tested by 1

TestFileListDB_MemoryFunction · 0.64