good morning!!!!

Skip to content
Snippets Groups Projects
Commit 095313db authored by Carlos Nieto's avatar Carlos Nieto
Browse files

Adding wrapper installation instructions.

parent e025aa73
Branches
Tags
No related merge requests found
# gosexy/db/sqlite # upper.io/db/sqlite
Please read the full docs, acknowledgements and examples at This is a wrapper of the [github.com/mattn/go-sqlite3][1] package by
[http://gosexy.org/db/wrappers/sqlite][1]. [Yasuhiro Matsumoto][2].
[1]: http://gosexy.org/db/wrappers/sqlite Some changes had to be made to the original driver in order to work with
`upper.io/db`, such as removing data conversion features, you can see and
contribute to the forked repository at [github.com/xiam/gosqlite3][3].
## Installation
First, make sure you can install [go-sqlite3][1]
```go
# OSX
brew install pkg-config sqlite3
# Debian
sudo apt-get install pkg-config libsqlite3-dev
# Getting the package
go get github.com/mattn/go-sqlite3
```
If you succeed, installing the wrapper won't be any difficult.
```go
go get upper.io/db/sqlite
```
## Usage
Import [db][4] and [sqlite][3].
```go
import (
"upper.io/db"
// Import the wrapper to the blank identifier.
_ "upper.io/db/sqlite"
)
```
Open a database file.
```go
settings := db.Settings{
Database: "./database.sqlite3",
}
sess, err := db.Open("sqlite", settings)
```
That's all! see the manual at [upper.io][4] for further documentation on
collections and how to create and query result sets.
[1]: https://github.com/mattn/go-sqlite3
[2]: http://mattn.kaoriya.net/
[3]: https://github.com/xiam/gosqlite3
[4]: https://upper.io
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment