sqlite3 driver for go using database/sql
Go to file
Gert-Jan Timmer cf26002960 fix: journal mode
Journal Mode should only be enforced when the user set it.

Fixes: #607
2018-08-02 11:45:39 +02:00
.github V2.0.0 2018-07-20 16:02:42 +02:00
_examples V2.0.0 2018-07-20 16:02:42 +02:00
cmd/upgrade Rewrite all errors to lowercase. 2018-07-22 22:32:19 +02:00
driver fix: journal mode 2018-08-02 11:45:39 +02:00
.gitignore V2.0.0 2018-07-20 16:02:42 +02:00
.travis.yml V2.0.0 2018-07-20 16:02:42 +02:00
AUTHORS V2.0.0 2018-07-20 16:02:42 +02:00
CHANGELOG.md V2.0.0 2018-07-20 16:02:42 +02:00
CONTRIBUTING.md Update CONTRIBUTING GUIDE 2018-07-22 22:32:36 +02:00
LICENSE Rewrite 2018-06-15 17:53:32 +02:00
README.md V2.0.0 2018-07-20 16:02:42 +02:00

README.md

Go-SQLite3

GoDoc Reference Build Status Coverage Status Go Report Card

Current Version: 2.0.0

Please note that version 2.0.0 is not backwards compatible

Documentation

More documentation is available in our Wiki

Description

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

Supported Golang version:

  • 1.9.x
  • 1.10.x

This package follows the official Golang Release Policy.

Requirements

  • Go: 1.9 or higher.
  • GCC (Go-SQLite3 is a CGO package)

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.

Important: because this is a CGO enabled package you are required to set the environment variable CGO_ENABLED=1 and have a gcc compile present within your path.

Installation

go get github.com/mattn/go-sqlite3/driver

Usage

`Go-SQLite3 is an implementation of Go's database/sql/driver interface. You only need to import the driver and can use the full database/sql API then.

Use sqlite3 as drivername and a valid DSN as dataSourceName:

import (
    "database/sql"
    _ "github.com/mattn/go-sqlite3/driver"
)

db, err := sql.Open("sqlite3", "file:test.db")

Examples are available in our Wiki

License

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

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.