Skip to content

fix: Migrate from mattn/go-sqlite3 to modernc.org/sqlite#103

Merged
nfebe merged 1 commit intomainfrom
fix/sqlite-pure-go-driver
Mar 24, 2026
Merged

fix: Migrate from mattn/go-sqlite3 to modernc.org/sqlite#103
nfebe merged 1 commit intomainfrom
fix/sqlite-pure-go-driver

Conversation

@nfebe
Copy link
Copy Markdown
Contributor

@nfebe nfebe commented Mar 24, 2026

Replace CGo-based SQLite driver with pure-Go implementation to fix cross-compilation builds. The release workflow produces binaries with CGO_ENABLED=0 which caused go-sqlite3 to register as a stub, breaking auth, traffic, scheduler, security, audit, and cluster databases.

Bump version to 0.1.55.

Replace CGo-based SQLite driver with pure-Go implementation to fix
cross-compilation builds. The release workflow produces binaries with
CGO_ENABLED=0 which caused go-sqlite3 to register as a stub, breaking
auth, traffic, scheduler, security, audit, and cluster databases.

Bump version to 0.1.55.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
@sourceant
Copy link
Copy Markdown

sourceant bot commented Mar 24, 2026

Code Review Summary

This PR migrates the SQLite driver from the CGO-dependent mattn/go-sqlite3 to the pure-Go modernc.org/sqlite. This facilitates easier cross-compilation and static linking.

🚀 Key Improvements

  • Removed CGO dependency for database access.
  • Fixed build issues in environments where CGO_ENABLED=0.
  • Standardized SQLite connection strings using _pragma parameters.

💡 Minor Suggestions

  • Add _mutex=full to connection strings for additional thread safety.
  • Centralize database connection logic to reduce code duplication.

Copy link
Copy Markdown

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. No specific code suggestions were generated. See the overview comment for a summary.

@nfebe nfebe merged commit 2e1d8fd into main Mar 24, 2026
5 checks passed
@nfebe nfebe deleted the fix/sqlite-pure-go-driver branch March 24, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant