Skip to content

Commit

Permalink
Add sqlite.NewDB
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Krieger <ben.krieger@intel.com>
  • Loading branch information
ben-krieger committed Oct 7, 2024
1 parent 12846f8 commit 1c3ecf0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sqlite/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@ func Init(db *sql.DB) (*DB, error) {
}
}

return &DB{db: db}, nil
return NewDB(db), nil
}

// NewDB creates a new database from a standard connection. It is expected that
// all tables, pragma, and VFS have already been initialized.
func NewDB(db *sql.DB) *DB {
return &DB{db: db}
}

// Close closes the database connection.
Expand Down

0 comments on commit 1c3ecf0

Please sign in to comment.