sqlite3 driver for go using database/sql
Go to file
Carlos Castillo 0dd71564e2 Changed extension support to load from a string list of extensions
By loading extensions this way, it's not possible to later load
extensions using db.Exec, which improves security, and makes it much
easier to load extensions correctly. The zero value for the slice
(the empty slice) loads no extensions by default.

The extension example has been updated to use this much simpler system.

The ConnectHook field is still in SQLiteDriver in case it's needed for
other driver-wide initialization.

Updates #71 of mattn/go-sqlite3.
2013-08-24 20:36:35 -07:00
example Changed extension support to load from a string list of extensions 2013-08-24 20:36:35 -07:00
.travis.yml Add goveralls for travis 2013-06-11 20:08:24 +09:00
README.mkd Fix a few grammatical errors. 2013-06-18 19:40:15 +08:00
sqlite3.go Changed extension support to load from a string list of extensions 2013-08-24 20:36:35 -07:00
sqlite3.h Upgrade amalgramation code 2013-08-13 21:44:05 +09:00
sqlite3_other.go Start work on introducing machine-readable error codes. 2013-08-13 21:45:05 +09:00
sqlite3_test.go Start work on introducing machine-readable error codes. 2013-08-13 21:45:05 +09:00
sqlite3_windows.c Rename, build c file only for windows 2013-08-13 22:29:54 +09:00
sqlite3_windows.go Start work on introducing machine-readable error codes. 2013-08-13 21:45:05 +09:00
sqlite3ext.h Upgrade amalgramation code 2013-08-13 21:44:05 +09:00

README.mkd

go-sqlite3

Build Status

DESCRIPTION

sqlite3 driver conforming to the built-in database/sql interface

INSTALLATION

It requires pkg-config. You can also confirm that permissions and dependancies are setup by running pkg-config --cflags --libs sqlite3.

If you are using Homebrew on Mac OS X, you can install with:

brew install pkgconfig
brew install sqlite3

If you are using Ubuntu, you can install with:

sudo apt-get install pkg-config sqlite3 libsqlite3-dev

If you are using Windows, you can get pkg-config from below.

http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/

Go does not support static linking for external C library; sqlite3 should be built as a shared library. If it runs on Windows, it needs dll.

Finally, this package can be installed with the go get command:

go get github.com/mattn/go-sqlite3

FAQ

  • 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: https://github.com/mattn/go-sqlite3/issues/27

  • Getting insert error while query is opened.

    You can pass some arguments into the connection string, for example, a URI. See: https://github.com/mattn/go-sqlite3/issues/39

  • Can't build go-sqlite3. I got error of pkg-config.

    Probably, you didn't set PKG_CONFIG_PATH environment variable. Add PKG_CONFIG_PATH=/path/to/pkgconfig into your bashrc (something for your shell), Or do export PKG_CONFIG_PATH=/path/to/pkgconfig in bash. See: https://github.com/mattn/go-sqlite3/issues/45

LICENSE

MIT: http://mattn.mit-license.org/2012