aboutsummaryrefslogtreecommitdiff
path: root/README.mkd
blob: ca8eacd8b85ea6e8a9b1978d6a78fd750ce55d22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
go-sqlite3
==========

[![Build Status](https://travis-ci.org/mattn/go-sqlite3.png?branch=master)](https://travis-ci.org/mattn/go-sqlite3)
[![Coverage Status](https://coveralls.io/repos/mattn/go-sqlite3/badge.png?branch=master)](https://coveralls.io/r/mattn/go-sqlite3?branch=master)

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](http://mxcl.github.com/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