func (s *SqliteDB) AllCommits() (models.GitCommits, error) {
	commits := make(models.GitCommits, 0, 1000)
	if err := s.DB.Select(&commits, `SELECT * FROM git_commit;`); err != nil {
		return nil, err
	}
	return commits, nil
}
------------------------------------------------------------------
Methods to modify git-related tables (GitCommit, GitRepo, GitUser)
AllCommits returns all the commits.
package db
import (
	"database/sql"
	"fmt"
	"github.com/jmoiron/sqlx"
	_ "github.com/mattn/go-sqlite3"  
	"github.com/tunedmystic/commits.lol/app/models"
)
type SqliteDB struct {
	DB *sqlx.DB
}
func NewSqliteDB(name string) SqliteDB {
	sdb := SqliteDB{
		DB: sqlx.MustConnect("sqlite3", name),
	}
	return sdb
}
func (s *SqliteDB) Close() {
	s.DB.Close()
}
func (s *SqliteDB) AllBadWords() (models.BadWords, error) {
	values := []models.BadWord{}
	if err := s.DB.Select(&values, `SELECT * FROM config_badword;`); err != nil {
		return nil, err
	}
	return models.BadWords(values), nil
}
func (s *SqliteDB) AllGroupTerms() (models.GroupTerms, error) {
	values := []models.GroupTerm{}
	if err := s.DB.Select(&values, `SELECT * FROM config_groupterm;`); err != nil {
		return nil, err
	}
	return models.GroupTerms(values), nil
}
func (s *SqliteDB) randomSearchTermsByRank(rank, amount int) (models.SearchTerms, error) {
	terms := make(models.SearchTerms, 0, amount)
	query := `SELECT * FROM config_searchterm WHERE rank = ? ORDER BY random() LIMIT ?;`
	if err := s.DB.Select(&terms, query, rank, amount); err != nil {
		return nil, err
	}
	return terms, nil
}
func (s *SqliteDB) RandomSearchTerms() (models.SearchTerms, error) {
	rank1Amount := 8
	rank2Amount := 4
	rank3Amount := 4
	rank4Amount := 2
	totalTerms := rank1Amount + rank2Amount + rank3Amount + rank4Amount
	terms := make(models.SearchTerms, 0, totalTerms)
	t1, err := s.randomSearchTermsByRank(1, rank1Amount)
	if err != nil {
		return nil, fmt.Errorf("db:RandomSearchTerms: %v", err)
	}
	terms = append(terms, t1...)
	t2, err := s.randomSearchTermsByRank(2, rank2Amount)
	if err != nil {
		return nil, fmt.Errorf("db:RandomSearchTerms: %v", err)
	}
	terms = append(terms, t2...)
	t3, err := s.randomSearchTermsByRank(3, rank3Amount)
	if err != nil {
		return nil, fmt.Errorf("db:RandomSearchTerms: %v", err)
	}
	terms = append(terms, t3...)
	t4, err := s.randomSearchTermsByRank(4, rank4Amount)
	if err != nil {
		return nil, fmt.Errorf("db:RandomSearchTerms: %v", err)
	}
	terms = append(terms, t4...)
	return terms, nil
}