summaryrefslogtreecommitdiffstats
path: root/db/db.go
Commit message (Collapse)AuthorAgeFilesLines
* db: fix data racesiddharth ravikumar2022-12-251-9/+27
| | | | | | - Use a sync.RWMutex for mutex locks. - Use sync.RWMutex.RLock when reading from the downloaded map. - Use sync.RWMutex.Lock when writing to the downloaded map.
* db: add `defaultDBPath`siddharth ravikumar2022-12-251-2/+9
| | | | | | For storing the default db path. The `dbPath` gets changed during tests. The `defaultDBPath` can be used to reset `dbPath` back to the default db path through the `resetDBPath` function.
* db/db.go: add docssiddharth2021-12-131-0/+19
|
* db: update FernDB.Writesiddharth2021-11-281-1/+1
| | | | Always truncate file before writing.
* db: add FernDB.Writesiddharth2021-11-281-0/+25
| | | | Writes database to disk.
* db: add FernDB.Addsiddharth2021-11-281-0/+14
|
* db: add FernDB.Existssiddharth2021-11-281-0/+14
|
* db: update FernDBsiddharth2021-11-281-0/+4
| | | | Add `mutex` field to the FernDB struct.
* add db packagesiddharth2021-11-281-0/+66