go-gorm / sqlite

GORM sqlite driver
MIT License
179 stars 184 forks source link

Make this package SQLite implementation agnostic #160

Open aymanbagabas opened 1 year ago

aymanbagabas commented 1 year ago

Describe the feature

It would be awesome if this package could be independent of go-sqlite3 and instead, use go-sqlite3 (sqlite3) when CGO_ENABLED=1 and use modernc.org/sqlite when not.

Motivation

This allows the user to choose between either go-sqlite3 (sqlite3) or modernc.org/sqlite (sqlite) pure-go implementation. go-sqlite3 is excellent, but CGO is a lot to deal with.

The https://github.com/glebarez/sqlite driver is behind on many commits, it would be much simpler to maintain one codebase for multiple drivers rather than two, especially since they are almost the same.

Related Issues

https://github.com/go-gorm/sqlite/issues/77 https://github.com/go-gorm/sqlite/issues/72 https://github.com/go-gorm/sqlite/pull/93 https://github.com/go-gorm/sqlite/issues/35