Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review other potential replacements for mattn/go-sqlite3 package #18

Open
atc0005 opened this issue Sep 26, 2020 · 6 comments
Open

Review other potential replacements for mattn/go-sqlite3 package #18

atc0005 opened this issue Sep 26, 2020 · 6 comments
Assignees
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Sep 26, 2020

Potential candidates:

Why?

The mattn/go-sqlite3 package seems to work well thus far, but it requires CGO for building and some Go developers like to avoid CGO where they can. I'm still new enough and have ready access to a CGO-compatible build environment that it's not an issue for me, but it's probably still worth exploring to see what benefits these other packages might provide.

@atc0005
Copy link
Owner Author

atc0005 commented Oct 9, 2020

Why?

The mattn/go-sqlite3 package seems to work well thus far, but it requires CGO for building and some Go developers like to avoid CGO where they can. I'm still new enough and have ready access to a CGO-compatible build environment that it's not an issue for me, but it's probably still worth exploring to see what benefits these other packages might provide.

#48 and #53 says that it definitely was an issue for me.

@atc0005 atc0005 pinned this issue Oct 9, 2020
@atc0005
Copy link
Owner Author

atc0005 commented Nov 17, 2020

FWIW: It takes about 10 minutes to build a new release using the docker Makefile recipe.

ubuntu@ubuntu-1804-virtual-machine:~/Desktop/mysql2sqlite$ time make docker
Removing object files and cached files ...
Removing any existing release assets
Building (static) release assets for windows x86 ...
Building mysql2sqlite 386 binaries
Generating mysql2sqlite x86 checksum files
Building check_mysql2sqlite 386 binaries
Generating check_mysql2sqlite x86 checksum files
Completed (static) release assets build tasks for windows x86
Building (static) release assets for linux x86 ...
Building mysql2sqlite 386 binaries
Generating mysql2sqlite checksum files
Building check_mysql2sqlite 386 binaries
Generating check_mysql2sqlite checksum files
Completed (static) release assets build tasks for linux x86
Building (static) release assets for windows x64 ...
Building mysql2sqlite amd64 binaries
Generating mysql2sqlite checksum files
Building check_mysql2sqlite amd64 binaries
Generating check_mysql2sqlite checksum files
Completed (static) release assets build tasks for windows x64
Building (static) release assets for linux x64 ...
Building mysql2sqlite amd64 binaries
Generating mysql2sqlite checksum files
Building check_mysql2sqlite amd64 binaries
Generating check_mysql2sqlite checksum files
Completed (static) release assets build tasks for linux x64
Completed all cross-platform builds via Docker containers ...

real	9m58.547s
user	0m0.157s
sys	0m0.224s

@atc0005
Copy link
Owner Author

atc0005 commented Nov 27, 2020

The docs indicate that Windows is not yet supported.

@atc0005
Copy link
Owner Author

atc0005 commented Nov 27, 2020

From the docs:

This is not a database/sql driver.

Sure enough, the API doesn't (appear to) match up, so I'd need to rework the current codebase appropriately.

@atc0005
Copy link
Owner Author

atc0005 commented Mar 18, 2022

The docs indicate that Windows is not yet supported.

Looks like official Windows support was added in v1.14.0 (2021-11-13).

@atc0005 atc0005 unpinned this issue Apr 14, 2023
@atc0005
Copy link
Owner Author

atc0005 commented Dec 13, 2023

https://github.com/zombiezen/go-sqlite recently hit 1.0 status.

From the README:

This package provides a low-level Go interface to SQLite 3. It is a fork of crawshaw.io/sqlite that uses modernc.org/sqlite, a CGo-free SQLite package. It aims to be a mostly drop-in replacement for crawshaw.io/sqlite.

This package deliberately does not provide a database/sql driver. See David Crawshaw's rationale for an in-depth explanation. If you want to use database/sql with SQLite without CGo, use modernc.org/sqlite directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant