You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.4 KiB

  1. go-sqlite3
  2. ==========
  3. [![Build Status](https://travis-ci.org/mattn/go-sqlite3.svg?branch=master)](https://travis-ci.org/mattn/go-sqlite3)
  4. [![Coverage Status](https://coveralls.io/repos/mattn/go-sqlite3/badge.svg?branch=master)](https://coveralls.io/r/mattn/go-sqlite3?branch=master)
  5. [![GoDoc](https://godoc.org/github.com/mattn/go-sqlite3?status.svg)](http://godoc.org/github.com/mattn/go-sqlite3)
  6. Description
  7. -----------
  8. sqlite3 driver conforming to the built-in database/sql interface
  9. Installation
  10. ------------
  11. This package can be installed with the go get command:
  12. go get github.com/mattn/go-sqlite3
  13. _go-sqlite3_ is *cgo* package.
  14. If you want to build your app using go-sqlite3, you need gcc.
  15. However, if you install _go-sqlite3_ with `go install github.com/mattn/go-sqlite3`, you don't need gcc to build your app anymore.
  16. Documentation
  17. -------------
  18. API documentation can be found here: http://godoc.org/github.com/mattn/go-sqlite3
  19. Examples can be found under the `./_example` directory
  20. FAQ
  21. ---
  22. * Want to build go-sqlite3 with libsqlite3 on my linux.
  23. Use `go build --tags "libsqlite3 linux"`
  24. * Want to build go-sqlite3 with libsqlite3 on OS X.
  25. Install sqlite3 from homebrew: `brew install sqlite3`
  26. Use `go build --tags "libsqlite3 darwin"`
  27. * Want to build go-sqlite3 with icu extension.
  28. Use `go build --tags "icu"`
  29. * Can't build go-sqlite3 on windows 64bit.
  30. > Probably, you are using go 1.0, go1.0 has a problem when it comes to compiling/linking on windows 64bit.
  31. > See: https://github.com/mattn/go-sqlite3/issues/27
  32. * Getting insert error while query is opened.
  33. > You can pass some arguments into the connection string, for example, a URI.
  34. > See: https://github.com/mattn/go-sqlite3/issues/39
  35. * Do you want to cross compile? mingw on Linux or Mac?
  36. > See: https://github.com/mattn/go-sqlite3/issues/106
  37. > See also: http://www.limitlessfx.com/cross-compile-golang-app-for-windows-from-linux.html
  38. * Want to get time.Time with current locale
  39. Use `loc=auto` in SQLite3 filename schema like `file:foo.db?loc=auto`.
  40. License
  41. -------
  42. MIT: http://mattn.mit-license.org/2012
  43. sqlite3-binding.c, sqlite3-binding.h, sqlite3ext.h
  44. The -binding suffix was added to avoid build failures under gccgo.
  45. 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.
  46. Author
  47. ------
  48. Yasuhiro Matsumoto (a.k.a mattn)