sqlite3 driver conforming to the built-in database/sql interface
This package can be installed with the go get command:
go get github.com/mattn/go-sqlite3
go-sqlite3 is cgo package.
If you want to build your app using go-sqlite3, you need gcc.
However, after you have built and installed go-sqlite3 with
go install github.com/mattn/go-sqlite3 (which requires gcc), you can build your app without relying on gcc in future.
API documentation can be found here: http://godoc.org/github.com/mattn/go-sqlite3
Examples can be found under the
Want to build go-sqlite3 with libsqlite3 on my linux.
go build --tags "libsqlite3 linux"
Want to build go-sqlite3 with libsqlite3 on OS X.
Install sqlite3 from homebrew:
brew install sqlite3
go build --tags "libsqlite3 darwin"
Want to build go-sqlite3 with icu extension.
go build --tags "icu"
Can't build go-sqlite3 on windows 64bit.
Probably, you are using go 1.0, go1.0 has a problem when it comes to compiling/linking on windows 64bit. See: #27
Getting insert error while query is opened.
You can pass some arguments into the connection string, for example, a URI. See: #39
Do you want to cross compile? mingw on Linux or Mac?
Want to get time.Time with current locale
_loc=autoin SQLite3 filename schema like
Can I use this in multiple routines concurrently?
Why is it racy if I use a
Each connection to :memory: opens a brand new in-memory sql database, so if the stdlib's sql engine happens to open another connection and you've only specified ":memory:", that connection will see a brand new database. A workaround is to use "file::memory:?mode=memory&cache=shared". Every connection to this string will point to the same in-memory database. See #204 for more info.
sqlite3-binding.c, sqlite3-binding.h, sqlite3ext.h
The -binding suffix was added to avoid build failures under gccgo.
In this repository, those files are an amalgamation of code that was copied from SQLite3. The license of that code is the same as the license of SQLite3.
Yasuhiro Matsumoto (a.k.a mattn)