Skip to content

Commit

Permalink
Get all the keys of a DB.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Gomez committed Jun 16, 2023
1 parent 9fbded8 commit bbbd684
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions adapters/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,11 @@ func (da Adapter) Sync() {
log.Fatalf("Error syncing database: %v", err)
}
}

func (da Adapter) GetKeys() ([][]byte, error) {
keys, err := da.db.Keys()
if err != nil {
return nil, err
}
return keys, nil
}

0 comments on commit bbbd684

Please sign in to comment.