database

package
v0.0.0-...-c29c143 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// table names
	PROJECT_TABLE_NAME = "projects"
	RECORDS_TABLE_NAME = "records"
)

Variables

View Source
var (
	ErrNoResults = errors.New("no results found")
)

Functions

func Close

func Close()

func DeleteProject

func DeleteProject(name string) error

func DeleteRecord

func DeleteRecord(id uuid.UUID) error

func GetActiveProject

func GetActiveProject() *models.Project

func GetAllProjects

func GetAllProjects() ([]models.Project, error)

func GetAllRecords

func GetAllRecords() ([]models.Record, error)

func GetProject

func GetProject(name string) (models.Project, error)

func GetRecord

func GetRecord(id uuid.UUID) (models.Record, error)

func GetReportRecords

func GetReportRecords(req models.ReportRequest) ([]models.Record, error)

func GetTodaysRecords

func GetTodaysRecords() ([]models.Record, error)

func InitializeDatabase

func InitializeDatabase() error

func SaveProject

func SaveProject(p *models.Project) error

func SaveRecord

func SaveRecord(r *models.Record) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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