func NewSQLiteRepository(urn string) (*SQLiteRepository, error) {
	db, err := sql.Open("sqlite3", urn)
	if err != nil {
		return nil, errors.Wrap(err, "error opening DB")
	}
	if _, err := db.Query(`SELECT 1 FROM dna`); err != nil {
		if _, err := db.Exec(`CREATE TABLE dna (user STRING NOT NULL PRIMARY KEY, sequence STRING NOT NULL)`); err != nil {
			return nil, errors.Wrap(err, "error creating dna table")
		}
		for user, sequence := range map[string]string{
			"alice": "attcgtattattttttgatatttttccacaaaaatacagactaaatacaactgaatacag",
			"bob":   "tgcaaaattagatataaatgtaaacgaacataaaaacttttataagacaggattaagtta",
		} {
			if _, err := db.Exec(`INSERT INTO dna (user, sequence) VALUES (?, ?)`, user, sequence); err != nil {
				return nil, errors.Wrap(err, "error populating initial sequences")
			}
		}
	}
	return &SQLiteRepository{
		db: db,
	}, nil
}
NewSQLiteRepository connects to the DB represented by URN.
package dna
import (
	"context"
	"database/sql"
	_ "github.com/mattn/go-sqlite3"  
	"github.com/pkg/errors"
)
var ErrInvalidUser = errors.New("invalid user")
type SQLiteRepository struct {
	db *sql.DB
}