github.com/sijibomii/docker@v0.0.0-20231230191044-5cf6ca554647/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  }