database

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrGetCommit

func CreateOrGetCommit(db *sqlx.DB, commit model.Commit) (*model.Commit, error)

func CreateUpload

func CreateUpload(db *sqlx.DB, upload model.Upload) (*model.Upload, error)

func InsertTests

func InsertTests(db *sqlx.DB, tests []model.TestResult, upload model.Upload) error

func New

func New(path string) *sqlx.DB

New creates a db instance.

Types

type FlakyTest

type FlakyTest struct {
	Name       string    `db:"name"`
	TotalFails int       `db:"total_fails"`
	LastFail   time.Time `db:"last_fail"`
}

func GetFlakyTests

func GetFlakyTests(db *sqlx.DB) ([]FlakyTest, error)

type TestFailure added in v0.0.7

type TestFailure struct {
	Date      time.Time `db:"last_fail"`
	Output    *string   `db:"output"`
	CommitSHA string    `db:"commit_sha"`
	URL       *string   `db:"url"`
}

func GetFailures added in v0.0.7

func GetFailures(db *sqlx.DB, name string) ([]TestFailure, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL