pure-go implementation of sqlite

3,447 views
Skip to first unread message

Sebastien Binet

unread,
Jul 1, 2014, 8:27:34 AM7/1/14
to golang-nuts
hi there,

is there (or is somebody working on) a pure-go implementation of sqlite ?
or at least a subset of it, to be able to read sqlite files ?

-s

PS: I know about the (by now) canonical implementations
(mattn/go-sqlite and others) but a completely go-based solution would
facilitate deployment and development across devs machines...

Jesse McNelis

unread,
Jul 1, 2014, 8:34:41 AM7/1/14
to Sebastien Binet, golang-nuts
On Tue, Jul 1, 2014 at 10:27 PM, Sebastien Binet <seb....@gmail.com> wrote:
> hi there,
>
> is there (or is somebody working on) a pure-go implementation of sqlite ?
> or at least a subset of it, to be able to read sqlite files ?

https://github.com/feyeleanor/serendipity
is the only one I know of. I don't think it's working yet.

Sebastien Binet

unread,
Jul 1, 2014, 8:56:53 AM7/1/14
to Jesse McNelis, golang-nuts
hum... yeah, doesn't look like it even compiles...

thanks though.

-s

andrewc...@gmail.com

unread,
Jul 1, 2014, 9:26:46 AM7/1/14
to golan...@googlegroups.com, jes...@jessta.id.au
sqlite is a pretty large development effort, duplicating the work would be alot for little gain. They have some amazing test suites and harnesses simulating all sorts of situations including hardware failure, beating that would be a mission.

rjeczalik

unread,
Jul 1, 2014, 9:27:37 AM7/1/14
to Sebastien Binet, Jesse McNelis, golang-nuts



--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Carlos Castillo

unread,
Jul 2, 2014, 12:32:56 AM7/2/14
to golan...@googlegroups.com, seb....@gmail.com, jes...@jessta.id.au
The OP is looking for a package that can access sqlite databases, possibly created by non-go programs, not looking for a new pure-go database.

doug....@extreme-scale.com

unread,
Oct 18, 2019, 11:08:20 AM10/18/19
to golang-nuts
As of right now, all I've been able to find is this (incomplete) read-only implementation: https://github.com/alicebob/sqlittle

Mandolyte

unread,
Oct 18, 2019, 9:29:28 PM10/18/19
to golang-nuts
I have tested this one: https://godoc.org/modernc.org/sqlite -- but not extensively and it states it should not be used for production. (my testing was on the "archived" github version)

And this is the goal of https://github.com/elliotchance/c2go -- but can't tell if it is active or whether it actually has gotten to sqlite at all.

cvilsmeier

unread,
Jun 15, 2020, 12:31:07 PM6/15/20
to golang-nuts
Maybe Sqinn-Go can help you:
(I'm the author of it)

Douglas Manley

unread,
Jun 15, 2020, 12:57:54 PM6/15/20
to golang-nuts
No, unfortunately this just replaces the need for gcc for SQLite3 with the need for gcc for Sqinn.  My goal is to have a SQL database for use in Go that is 100% pure Go with zero outside dependencies.  My primary use case is for unit-testing large applications that rely on SQL databases such that no one on the project has to do anything other than install Go to build and test them.

a2800276

unread,
Jun 16, 2020, 6:35:07 AM6/16/20
to golang-nuts
sqlite is a bit of a special case, because the C implementation IS sqlite, they have a very stable development and testing setup and my trust in sqlite is basically trust in the developers of the C code. 
I don't see the advantage of having a Go implementation, expect for the sake of Go purity...
Can you elaborate a little bit on the motivation? I've been using go-sqlite on both amd64 and arm64 with absolutely no problem.

 

Harmen

unread,
Jun 16, 2020, 6:40:37 AM6/16/20
to a2800276, golang-nuts
> > is there (or is somebody working on) a pure-go implementation of sqlite ?
> > or at least a subset of it, to be able to read sqlite files ?
> >
> > -s
> >
> > PS: I know about the (by now) canonical implementations
> > (mattn/go-sqlite and others) but a completely go-based solution would
> > facilitate deployment and development across devs machines...

If you only need to read, and not write, sqlite files, have a look at
https://github.com/alicebob/sqlittle

Misha Gusarov

unread,
Jun 16, 2020, 7:11:35 AM6/16/20
to a2800276, golang-nuts
On 16 Jun 2020, at 12:35, a2800276 wrote:

> Can you elaborate a little bit on the motivation? I've been using go-sqlite
> on both amd64 and arm64 with absolutely no problem.

The biggest obstacle for me (I'm not the topic-starter) is a loss of
out-of-the-box cross-compilation.

Can be ameliorated somehow by using musl-based toolchain for Linux targets,
but it's still a hassle.

--
Misha

Mandolyte

unread,
Jun 16, 2020, 3:27:47 PM6/16/20
to golang-nuts
SQLite3 support is the stated goal of https://github.com/elliotchance/c2go

Also, I believe I tested this one a long time ago... but have lost track of it after they moved away from Github:

Dan Kortschak

unread,
Jun 16, 2020, 5:56:42 PM6/16/20
to golan...@googlegroups.com
This is at https://modernc.org/sqlite now, along with the rest of Jan's
amazing things, https://gitlab.com/cznic.
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/2c533170-33b5-4eb5-9f58-25c88f34710fo%40googlegroups.com
> .
>


Reply all
Reply to author
Forward
0 new messages