mholt / caddy-sqlite-fs

MIT License
3 stars 0 forks source link

non cgo #2

Open gedw99 opened 2 months ago

gedw99 commented 2 months ago

this is useful for many use cases

I was wondering if anyone would consider non CGO Sqlite to be better since we get nice cross compile.

Here is a benchmark: https://github.com/cvilsmeier/go-sqlite-bench

I am using https://github.com/ncruces/go-sqlite3 because of the extended feature set as described here: https://github.com/ncruces/go-sqlite3/tree/main/embed

ncruces commented 2 weeks ago

If I was doing this, I'd probably use a rowid table, to at least allow using the blob streaming API.

For something this simple I'd also use the low level API, rather than database/sql. I do try to make blob streaming usable over database/sql, but the low level API is a better match.

I don't know much about Caddy to drive this, but if you ever want to port this to my bindings, ping me @mholt.

mholt commented 2 weeks ago

Thanks for chiming in, Nuno!

I don't have the bandwidth to work on this currently but I'd happily accept a PR that supports sqlite without cgo. :+1: (Using your lib with the low level API.)