Bnei-Baruch/mdb

View on GitHub
storage/missing_sha1.go

Summary

Maintainability
A
35 mins
Test Coverage

Function loadFilesByKMID has 5 return statements (exceeds 4 allowed).
Open

func loadFilesByKMID(db *sql.DB) (map[int64]string, error) {
    fileMap := make(map[int64]string, 500000)

    rows, err := queries.Raw(`SELECT (properties->>'kmedia_id')::int, encode(sha1, 'hex') FROM files WHERE sha1 IS NOT NULL AND properties ? 'kmedia_id'`).
        Query(db)
Severity: Major
Found in storage/missing_sha1.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status