-
Notifications
You must be signed in to change notification settings - Fork 639
Basic Operations
roseduan edited this page May 8, 2022
·
3 revisions
Basic operations for RoseDB.
import (
"fmt"
"github.com/flower-corp/rosedb"
"path/filepath"
)
func main() {
path := filepath.Join("/tmp", "rosedb")
opts := rosedb.DefaultOptions(path)
db, err := rosedb.Open(opts)
if err != nil {
fmt.Printf("open rosedb err: %v", err)
return
}
defer db.Close()
}
You must specify a file path to open rosedb.
And you can set other options by otps.XXX
.