Re:A pure Go embedded SQL database
by benhoyt on Saturday January 29, 2022 @06:18PM
(#30131631)
The same author ("cznic") has also built a C-to-Go compiler/transpiler and used it to convert SQLite to pure Go source, so that it doesn't require CGo: https://gitlab.com/cznic/sqlite ... the converted Go code is pretty much unreadable and it's somewhat slower than SQLite via CGo. But a pretty neat idea! I use it in one of my projects and it works well.
[ Parent
| on HN ]
I saw that recently. I would be interested in using it but it wasn't clear what level of compatibility it has or how many tests it's passing/not passing.
Yeah, fair concern. I saw a while back (looks like Aug 2020) that he got all 928,000 SQLite tests passing -- search for "0 errors out of" on this page: https://pkg.go.dev/modernc.org/sqlite#section-readme
Wow! I'd almost trust it more if only 99% of tests were passing rather than 100% of tests passing. :)
Hehe. Well, if you look at the previous release it shows 99.7% percent of (a smaller number of) the tests passing. So you've got the best of both worlds. :-)
Nice. I'll have to give it a try.
I think there are many tests used for testing sqlite that are not public. Hipp said so in a podcast I recall.
Re:A pure Go embedded SQL database
by Beltalowda on Sunday January 30, 2022 @06:06AM
(#30135877)
There's TH3[1], and you indeed need to purchase a license for that. The price is listed as "call"[2], so I guess it's not cheap.
Nice. I tried to cross-compile a Go app using SQLite for darwin/arm64 a couple months back and couldn’t figure it out for the life of me. Ended up just shipping a darwin/amd64 binary and letting Rosetta handle it. Will give this a spin when I have time.
Re:A pure Go embedded SQL database
by preetamjinka on Sunday January 30, 2022 @12:02AM
(#30134196)
I should write a blog post this but here’s what I do in GitHub Actions for a Go binary that uses SQLite:
https://github.com/crossjoin-io/crossjoin/blob/main/.github/...