3 ms·
Unfortunately it relies on CGO for SQLite, which is a bummer
by CBarkleyU 2y ago
Unfortunately it relies on CGO for SQLite, which is a bummer
- ncruces 2y agoYeah, it'd be much nicer if libraries were designed to be driver agnostic, like redka which supports 4 different SQLite drivers: https://github.com/nalgeon/redka/tree/main/example https://github.com/nalgeon/redka/tree/main/example
- blipWER 2y agoLibrary is driver agnostic. Jet cli code generator indeed uses mattn/go-sqlite3, but you can run your queries using any driver you prefer. You can also customize jet generator and use any other driver for code generation.
- 0x_rs 2y agoGood point. The generator (and tests) do use mattn's SQLite driver, but you're free to choose any database/sql-compliant implementation in your program, so that means setting up the necessary toolchain only in your development machine, even just using a very simple zig setup. I think it should be fairly easy to make it use a pure-go driver, some of which are nearly drop-in replacements and have only minute differences like the string name being "sqlite" instead of "sqlite3", but of course that's extra stuff to test and maintain (but still only running when you're generating from a target database).