87981df419
Avoid duplicate definitions of NewSqliteConn when cgo isn't enabled, so that we can at least build the daemon. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
15 lines
275 B
Go
15 lines
275 B
Go
// +build cgo
|
|
|
|
package graphdb
|
|
|
|
import "database/sql"
|
|
|
|
// 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)
|
|
}
|