mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
2f6e4fdb29
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
20 lines
342 B
Go
20 lines
342 B
Go
// +build cgo
|
|
|
|
package graphdb
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
_ "code.google.com/p/gosqlite/sqlite3" // registers sqlite
|
|
)
|
|
|
|
// NewSqliteConn opens a connection to a sqlite
|
|
// database.
|
|
func NewSqliteConn(root string) (*Database, error) {
|
|
conn, err := sql.Open("sqlite3", root)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return NewDatabase(conn)
|
|
}
|