github.com/wlan0/docker@v1.5.0/pkg/graphdb/conn_sqlite3.go (about)

     1  // +build cgo
     2  
     3  package graphdb
     4  
     5  import (
     6  	"database/sql"
     7  
     8  	_ "code.google.com/p/gosqlite/sqlite3" // registers sqlite
     9  )
    10  
    11  func NewSqliteConn(root string) (*Database, error) {
    12  	conn, err := sql.Open("sqlite3", root)
    13  	if err != nil {
    14  		return nil, err
    15  	}
    16  
    17  	return NewDatabase(conn)
    18  }