Earlier quoted context omitted.
Well its a different access pattern. As the underlying library points out: > It is used in programming environments that do not allow calling C API functions. Also I guess which one is easier will be subjective. The steps are sorta similar: Step 1) install sqlite or squinn on the base system (the latter might be harder) Step 2) if sqllite use cgo, if squinn just use go (the former might be harder but more performant)
Which programming environments that do not allow calling C API functions also let you build/ship arbitrary C executables, though? (Genuinely curious what scenarios this unlocks.)
Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
61–66 of 66 posts
Re: Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
#62Earlier quoted context omitted.
Can you say more, like name your project? I'm building https://github.com/ncruces/go-sqlite3 and am a community maintainer of https://wazero.io I can cross compile SQLite into all platforms that Go OOB compiles too, with the caveat that any that aren't linux/windows/darwin/freebsd/illumos (CPU architecture doesn't matter) need a build flag because of file locking: https://github.com/ncruces/go-sqlite3/blob/main/vfs/R…
Sorry, just seen this. It is https://murex.rocks sqlite3 only needs to run from one thread in my use case. Which might explain why I have fewer problems than most.
Re: Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
#63Earlier quoted context omitted.
Sorry, just seen this. It is https://murex.rocks sqlite3 only needs to run from one thread in my use case. Which might explain why I have fewer problems than most.
Just reread your comment and realised I was confusing your library with mattm’s library of the same name.
My SQLite bindings should build/work fine for all your supported platforms, with the caveat that BSDs other than FreeBSD need a build tag, because my locking protocol is not compatible with SQLite's default (if you access your database concurrently with my wrapper and other SQLite processes, you may corrupt data).
Solaris and Plan9 don't have working file locking, so you can't use concurrency at all. This could be change if there was interest in it.
Re: Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
#64Earlier quoted context omitted.
Just reread your comment and realised I was confusing your library with mattm’s library of the same name.
Interesting project, thanks for getting back! My SQLite bindings should build/work fine for all your supported platforms, with the caveat that BSDs other than FreeBSD need a build tag, because my locking protocol is not compatible with SQLite's default (if you access your database concurrently with my wrapper and other SQLite processes, you may corrupt data). Solaris and Plan9 don't have working file locking, so you…
Plus I also have the additional risk that I’m using someone’s hobby project that, and I say this with the greatest of respect for yourself, might get abandoned tomorrow for all I know.
Cgo might have its issues but for sqlite3 it offers far better assurances than anything else available for Go at this point in time.
Given that sqlite3 is a supporting library rather than the differentiator of my project, I want to spend as little time as I have to supporting it. At this point in time, only the cgo library seems to offer that convenience (though if anyone else wants to maintain a fork of my project using a different sqlite library then I’m more than happy with that).
Good luck with your project though. Hopefully the Go community can rally around one of these native solutions so it gains enough traction to become the new de facto standard.
Re: Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
#65Earlier quoted context omitted.
Interesting project, thanks for getting back! My SQLite bindings should build/work fine for all your supported platforms, with the caveat that BSDs other than FreeBSD need a build tag, because my locking protocol is not compatible with SQLite's default (if you access your database concurrently with my wrapper and other SQLite processes, you may corrupt data). Solaris and Plan9 don't have working file locking, so you…
Here lies the problem. I now need to instruct users that different build flags are required for different platforms. Whereas that problem doesn’t exist with the cgo bindings. Plus I also have the additional risk that I’m using someone’s hobby project that, and I say this with the greatest of respect for yourself, might get abandoned tomorrow for all I know. Cgo might have its issues but for sqlite3 it offers far bett…
I could easily build on all platforms without tags… I just want to avoid accidental data corruption if users unwittingly access databases without proper synchronization.
The MVCC-WAL-VFS I'm designing now may potentially fix this, as the brokenness of POSIX advisory locks is more manageable there.
Re: Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
#66Earlier quoted context omitted.
Here lies the problem. I now need to instruct users that different build flags are required for different platforms. Whereas that problem doesn’t exist with the cgo bindings. Plus I also have the additional risk that I’m using someone’s hobby project that, and I say this with the greatest of respect for yourself, might get abandoned tomorrow for all I know. Cgo might have its issues but for sqlite3 it offers far bett…
Thanks for the feedback! I get it. I could easily build on all platforms without tags… I just want to avoid accidental data corruption if users unwittingly access databases without proper synchronization. The MVCC-WAL-VFS I'm designing now may potentially fix this, as the brokenness of POSIX advisory locks is more manageable there. https://www.sqlite.org/src/artifact/2e8b12?ln=1073-1161