ncruces / go-sqlite3

Go bindings to SQLite using wazero
https://pkg.go.dev/github.com/ncruces/go-sqlite3
MIT License
500 stars 15 forks source link

gormlite: In-Memory DB does not work properly #150

Closed gpayer closed 1 month ago

gpayer commented 1 month ago

I switched from github.com/glebarez/sqlite to this sqlite implementation, because it supports the Backup API.

Unfortunately now the In-Memory DB does not work anymore. No other code was changed, all the tests worked before.

I'm using it like this:

db, err := gorm.Open(gormlite.Open("file::memory:?cache=shared"), &gorm.Config{})

The initial migrations work without an error, but afterwards it is not possible to use this database as no tables seem to exist anymore. If I use a database file, everything works fine.

I'll try to create a succinct test case tomorrow and add it to this issue.

ncruces commented 1 month ago

See: https://github.com/ncruces/go-sqlite3/discussions/97