A miniature key-value database written in go, functions implemented so far include:
Open(loc tring)
- Opens a new database, files are stored under the folder specified vialoc
.Set(key []byte, value []byte) error
- Sets a new value, the value is immediately written to the database.Get(key []byte) ([]byte, error)
- Retrieves a value from the database.Stat() (*DataBaseStats, error)
- Returns statistical information about the current database, such as the size and amount of entries.RunGC() error
- Runs the garbage collector, compressing both the dictionary and the data file.
Things that are not yet implemented:
- In-memory mode.
- Transactions.
- Backups.
...and many possible performance improvements.