InfiniDB is a fully native and persistent key/value store in Go.
To start using InfiniDB, install Go and run go get:
$ go get github.com/Zaire404/InfiniDBTo open your database, simply use the infinidb.Open() function:
package main
import (
"github.com/Zaire404/InfiniDB"
)
func main() {
opt := infinidb.DefaultOptions()
db := infinidb.Open(&opt)
defer db.Close()
...
}To get a value from the database, use the Get() function:
entry, err := db.Get([]byte("key"))
...To set a value in the database, use the Set() function:
import "github.com/Zaire404/InfiniDB/util"
err := db.Set(&util.Entry{Key: []byte("key"), ValueStruct: util.ValueStruct{Value: []byte("value")}})
...To delete a value from the database, use the Del() function:
err := db.Del([]byte("key"))
..