You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, thanks in advance for your time. Looking at this part of the readme:
import (
"log"
"github.com/dgraph-io/badger/v4"
c "github.com/ostafen/clover"
badgerstore "github.com/ostafen/clover/v2/store/badger"
)
...
// by default, Bolt will be used internally
db, _ := c.Open("clover-db")
// use OpenWithStore() if you want to select a different storage backend
store, _ := badgerstore.Open(badger.DefaultOptions("").WithInMemory(true)) // opens a badger in memory database
db, _ := c.OpenWithStore(store)
defer db.Close() // remember to close the db when you have done
I have copy-pasted this exactly, but on this line: store, _ := badgerstore.Open(badger.DefaultOptions("").WithInMemory(true)) // opens a badger in memory database
I get this error:
"Cannot use 'badger.DefaultOptions("").WithInMemory(true)' (type "github.com/dgraph-io/badger/v4".Options) as the type "github.com/dgraph-io/badger/v3".Options"
It appears that if I use badger v3 it works; however, given that the readme example uses badger v4 I spent a while thinking I've done something wrong. Is badger v4 not supported?
The text was updated successfully, but these errors were encountered:
Hi there, thanks in advance for your time. Looking at this part of the readme:
I have copy-pasted this exactly, but on this line:
store, _ := badgerstore.Open(badger.DefaultOptions("").WithInMemory(true)) // opens a badger in memory database
I get this error:
"Cannot use 'badger.DefaultOptions("").WithInMemory(true)' (type "github.com/dgraph-io/badger/v4".Options) as the type "github.com/dgraph-io/badger/v3".Options"
It appears that if I use badger v3 it works; however, given that the readme example uses badger v4 I spent a while thinking I've done something wrong. Is badger v4 not supported?
The text was updated successfully, but these errors were encountered: