Versions in this module Expand all Collapse all v0 v0.106.0 Nov 15, 2021 Changes in this version + type Database struct + DB *gorm.DB + func New(dialect, connection string, log bool) (*Database, error) + func (d *Database) Close() error + func (d *Database) CountProjects() (uint, error) + func (d *Database) CountReports() (uint, error) + func (d *Database) CountReportsForProject(pid uint) (uint, error) + func (d *Database) CreateDetailsBatch(rid uint, s []*model.Detail) (uint, uint) + func (d *Database) CreateHistogram(h *model.Histogram) error + func (d *Database) CreateOptions(o *model.Options) error + func (d *Database) CreateProject(p *model.Project) error + func (d *Database) CreateReport(r *model.Report) error + func (d *Database) DeleteProject(p *model.Project) error + func (d *Database) DeleteReport(r *model.Report) error + func (d *Database) DeleteReportBulk(ids []uint) (int, error) + func (d *Database) FindLatestReportForProject(pid uint) (*model.Report, error) + func (d *Database) FindPreviousReport(rid uint) (*model.Report, error) + func (d *Database) FindProjectByID(id uint) (*model.Project, error) + func (d *Database) FindReportByID(id uint) (*model.Report, error) + func (d *Database) GetHistogramForReport(rid uint) (*model.Histogram, error) + func (d *Database) GetOptionsForReport(rid uint) (*model.Options, error) + func (d *Database) ListAllDetailsForReport(rid uint) ([]*model.Detail, error) + func (d *Database) ListProjects(limit, page uint, sortField, order string) ([]*model.Project, error) + func (d *Database) ListReports(limit, page uint, sortField, order string) ([]*model.Report, error) + func (d *Database) ListReportsForProject(pid, limit, page uint, sortField, order string) ([]*model.Report, error) + func (d *Database) UpdateProject(p *model.Project) error + func (d *Database) UpdateProjectStatus(pid uint, status model.Status) error