github.com/reds/docker@v1.11.2-rc1/pkg/graphdb/conn_sqlite3.go (about)

     1  // +build cgo
     2  
     3  package graphdb
     4  
     5  import "database/sql"
     6  
     7  // NewSqliteConn opens a connection to a sqlite
     8  // database.
     9  func NewSqliteConn(root string) (*Database, error) {
    10  	conn, err := sql.Open("sqlite3", root)
    11  	if err != nil {
    12  		return nil, err
    13  	}
    14  	return NewDatabase(conn)
    15  }