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

Conversion to a Pure Golang implementation of SQLite #77

Closed
Ahbrown41 opened this issue Jan 30, 2022 · 4 comments · May be fixed by #161
Closed

Conversion to a Pure Golang implementation of SQLite #77

Ahbrown41 opened this issue Jan 30, 2022 · 4 comments · May be fixed by #161
Assignees

Comments

@Ahbrown41
Copy link

Describe the feature

The feature which I am happy to do a PR for is to remove the use of the existing CGO based SQLite implementation with a pure Golang based implementation here.

Motivation

The CGO libraries are a HUGE pain with Windows machines and even other machines without the GCC binaries and specific settings. It does not compile well in many scenarios. This conversion appears to be solid and is a direct conversion of the C libraries of the original implementation.

Related Issues

@rittneje
Copy link

As I mentioned here, switching drivers is a breaking change. #72 (comment)

@WinXaito
Copy link

Maybe create a new driver ? Like sqlite-go or gosqlite.

Because the CGO requirement is really akward

@glebarez
Copy link
Contributor

glebarez commented Mar 7, 2022

have you tried https://github.com/glebarez/sqlite

@Elara6331
Copy link

This can be done relatively easily using Go's tags to switch between drivers. modernc.org/sqlite contains a near drop-in replacement of the current driver. I've done this locally and will submit a PR shortly, regardless of if it gets merged.

@Elara6331 Elara6331 mentioned this issue Apr 29, 2022
3 tasks
@jinzhu jinzhu closed this as completed in 1007940 Oct 9, 2022
aymanbagabas added a commit to aymanbagabas/sqlite that referenced this issue Jul 5, 2023
This implements a pure-go alternative driver whenever CGO_ENABLED=0

Related: go-gorm#93
Fixes: go-gorm#35
Fixes: go-gorm#72
Fixes: go-gorm#77
Fixes: go-gorm#160
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 a pull request may close this issue.

6 participants