package main

import "github.com/jmoiron/sqlx"

type Runner struct {
	db *sqlx.DB
}

func NewRunner() *Runner {
	db, err := sqlx.Connect("sqlite3", "data.db")
	checkErr(err)
	runner := &Runner{
		db,
	}
	return runner
}

func NewRunnerPath(path string) *Runner {
	db, err := sqlx.Connect("sqlite3", path)
	checkErr(err)
	runner := &Runner{
		db,
	}
	return runner
}
