BTW, modernc.org/sqlite (by the same author) is a port of SQLite to native Go. I've used it with great success for a few personal projects. Before that, I used the go-sqlite package, which needs CGO, and makes it hard to build static executables.
A pure Go embedded SQL database
41–50 of 51 posts
Re: A pure Go embedded SQL database
#42What are the use cases for this? Is this a good fit for Memory based testing for db stores? Also, I can’t seem to find documentation for how this compares to SQLite
It’s literally SQLite transpiled to Go using cznic’s C to Go program.
Re: A pure Go embedded SQL database
#43The cardinal rule of databases: http://www.dbms2.com/2013/03/18/dbms-development-marklogic-h... Ignoring that leads to long postmortems about how your embedded db failed in a way you didn’t expect: https://blog.roblox.com/2022/01/roblox-return-to-service-10-... SQLite is good Rocksdb is good You don’t need pure go.
Keep in mind that this project isn’t creating a new SQL database from scratch. It’s literally ingesting SQLite’s C source code and spitting out Go. cznic’s done an absolutely incredible amount of work here. It’s not ready for prod yet, but it works and passes all of SQLite’s tests.
Re: A pure Go embedded SQL database
#44use go-sqlite3 to work with sqlite3 is one choice. https://github.com/etcd-io/bbolt is another pure go option. cznic seems like an alternative to bbolt. nice to have some options.
Re: A pure Go embedded SQL database
#45Re: A pure Go embedded SQL database
#46FIY. the author, CZNIC, is a CZ domain registry ( https://www.nic.cz/ ), the same guys who develop e.g. Turris routers.
Re: A pure Go embedded SQL database
#47use go-sqlite3 to work with sqlite3 is one choice. https://github.com/etcd-io/bbolt is another pure go option. cznic seems like an alternative to bbolt. nice to have some options.
bbolt is a key-value store and this package is a SQL database so they aren't really the same thing.
Re: A pure Go embedded SQL database
#48Earlier quoted context omitted.
go-sqlite3 is not pure Go. It is a Go wrapper around the SQLite amalgamation.
So why would you want pure Go? AFAIK Go is significantly slower than C. There's of course safety issues with C, but sqlite is one of the most rigorously tested sw packages out there.
for go-sqlite3 you still need native sqlite3 preinstalled on the OS, which is OK for developers but not for many ordinary users.
Re: A pure Go embedded SQL database
#49use go-sqlite3 to work with sqlite3 is one choice. https://github.com/etcd-io/bbolt is another pure go option. cznic seems like an alternative to bbolt. nice to have some options.
Bolt is great, here is similar option: https://github.com/genjidb/genji
as far as sqlite3 is concerned, pure-go option we indeed only have this cznic available, which is nice.
Re: A pure Go embedded SQL database
#50Earlier quoted context omitted.
Bolt is great, here is similar option: https://github.com/genjidb/genji
API not stable yet and it's a kv database, similar to bbolt/bolt. as far as sqlite3 is concerned, pure-go option we indeed only have this cznic available, which is nice.
Its pretty clear you dont know what youre talking about. It literally says its SQL in the title, you know that big bar at the top of your screen:
> Document-oriented, embedded SQL database