db

package
v0.0.0-...-6417433 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() *sql.DB

Create Postgres connection

func DeleteCachedTrack

func DeleteCachedTrack(trackID string) error

func DeleteFix

func DeleteFix(f string) error

Delete a fix

func InsertCachedTrack

func InsertCachedTrack(track *models.Track) error

func InsertFix

func InsertFix(f *models.Fix) error

Insert a fix

func SelectCachedTMIs

func SelectCachedTMIs() ([]string, error)

func SelectCachedTrack

func SelectCachedTrack(tmi string, tk string) (models.Track, error)

func SelectCachedTracksByTMI

func SelectCachedTracksByTMI(tmi string, dir models.Direction) (map[string]models.Track, error)

func SelectConcordeFixes

func SelectConcordeFixes() (map[string]models.Fix, error)

func SelectConcordeTrack

func SelectConcordeTrack(tk string) (models.Track, error)

TODO efficiency as well

func SelectConcordeTracks

func SelectConcordeTracks() (map[string]models.Track, error)

TODO more efficient way of fetching fixes than iterating

func SelectEventTrack

func SelectEventTrack(event_tmi string, tk string) (models.Track, error)

func SelectEventTracks

func SelectEventTracks(event_tmi string) (map[string]models.Track, error)

func SelectFix

func SelectFix(f string) (models.Fix, error)

Return a single fix

func SelectFixes

func SelectFixes() (map[string]models.Fix, error)

Return a map of fixes

func UpdateFix

func UpdateFix(f *models.Fix) error

Update a fix

Types

type DbConfig

type DbConfig struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
}

Connection config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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