dbrepo

package
v0.0.0-...-66b15f9 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package dbrepo contains an implementation of the domain.Repos interface that stores data in a database via the database/sql package. The only jraceman package on which it depends is the domain package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRowRepo

func NewRowRepo(dbrepos *Repos) *dbRowRepo

func NewRowRepoWithTx

func NewRowRepoWithTx(dbrepos *Repos) (*dbRowRepo, error)

Types

type DBAreaRepo

type DBAreaRepo struct {
	// contains filtered or unexported fields
}

func (*DBAreaRepo) CreateTable

func (r *DBAreaRepo) CreateTable() error

func (*DBAreaRepo) DeleteByID

func (r *DBAreaRepo) DeleteByID(ID string) error

func (*DBAreaRepo) Export

func (r *DBAreaRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBAreaRepo) FindByID

func (r *DBAreaRepo) FindByID(ID string) (*domain.Area, error)

func (*DBAreaRepo) List

func (r *DBAreaRepo) List(offset, limit int) ([]*domain.Area, error)

func (*DBAreaRepo) New

func (r *DBAreaRepo) New() interface{}

func (*DBAreaRepo) Save

func (r *DBAreaRepo) Save(area *domain.Area) (string, error)

func (*DBAreaRepo) UpdateByID

func (r *DBAreaRepo) UpdateByID(ID string, oldArea, newArea *domain.Area, diffs domain.Diffs) error

func (*DBAreaRepo) UpgradeTable

func (r *DBAreaRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBChallengeRepo

type DBChallengeRepo struct {
	// contains filtered or unexported fields
}

func (*DBChallengeRepo) CreateTable

func (r *DBChallengeRepo) CreateTable() error

func (*DBChallengeRepo) DeleteByID

func (r *DBChallengeRepo) DeleteByID(ID string) error

func (*DBChallengeRepo) Export

func (r *DBChallengeRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBChallengeRepo) FindByID

func (r *DBChallengeRepo) FindByID(ID string) (*domain.Challenge, error)

func (*DBChallengeRepo) List

func (r *DBChallengeRepo) List(offset, limit int) ([]*domain.Challenge, error)

func (*DBChallengeRepo) New

func (r *DBChallengeRepo) New() interface{}

func (*DBChallengeRepo) Save

func (r *DBChallengeRepo) Save(challenge *domain.Challenge) (string, error)

func (*DBChallengeRepo) UpdateByID

func (r *DBChallengeRepo) UpdateByID(ID string, oldChallenge, newChallenge *domain.Challenge, diffs domain.Diffs) error

func (*DBChallengeRepo) UpgradeTable

func (r *DBChallengeRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBCompetitionRepo

type DBCompetitionRepo struct {
	// contains filtered or unexported fields
}

func (*DBCompetitionRepo) CreateTable

func (r *DBCompetitionRepo) CreateTable() error

func (*DBCompetitionRepo) DeleteByID

func (r *DBCompetitionRepo) DeleteByID(ID string) error

func (*DBCompetitionRepo) Export

func (r *DBCompetitionRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBCompetitionRepo) FindByID

func (r *DBCompetitionRepo) FindByID(ID string) (*domain.Competition, error)

func (*DBCompetitionRepo) List

func (r *DBCompetitionRepo) List(offset, limit int) ([]*domain.Competition, error)

func (*DBCompetitionRepo) New

func (r *DBCompetitionRepo) New() interface{}

func (*DBCompetitionRepo) Save

func (r *DBCompetitionRepo) Save(competition *domain.Competition) (string, error)

func (*DBCompetitionRepo) UpdateByID

func (r *DBCompetitionRepo) UpdateByID(ID string, oldCompetition, newCompetition *domain.Competition, diffs domain.Diffs) error

func (*DBCompetitionRepo) UpgradeTable

func (r *DBCompetitionRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBComplanRepo

type DBComplanRepo struct {
	// contains filtered or unexported fields
}

func (*DBComplanRepo) CreateTable

func (r *DBComplanRepo) CreateTable() error

func (*DBComplanRepo) DeleteByID

func (r *DBComplanRepo) DeleteByID(ID string) error

func (*DBComplanRepo) Export

func (r *DBComplanRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBComplanRepo) FindByID

func (r *DBComplanRepo) FindByID(ID string) (*domain.Complan, error)

func (*DBComplanRepo) List

func (r *DBComplanRepo) List(offset, limit int) ([]*domain.Complan, error)

func (*DBComplanRepo) New

func (r *DBComplanRepo) New() interface{}

func (*DBComplanRepo) Save

func (r *DBComplanRepo) Save(complan *domain.Complan) (string, error)

func (*DBComplanRepo) UpdateByID

func (r *DBComplanRepo) UpdateByID(ID string, oldComplan, newComplan *domain.Complan, diffs domain.Diffs) error

func (*DBComplanRepo) UpgradeTable

func (r *DBComplanRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBComplanRuleRepo

type DBComplanRuleRepo struct {
	// contains filtered or unexported fields
}

func (*DBComplanRuleRepo) CreateTable

func (r *DBComplanRuleRepo) CreateTable() error

func (*DBComplanRuleRepo) DeleteByID

func (r *DBComplanRuleRepo) DeleteByID(ID string) error

func (*DBComplanRuleRepo) Export

func (r *DBComplanRuleRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBComplanRuleRepo) FindByID

func (r *DBComplanRuleRepo) FindByID(ID string) (*domain.ComplanRule, error)

func (*DBComplanRuleRepo) List

func (r *DBComplanRuleRepo) List(offset, limit int) ([]*domain.ComplanRule, error)

func (*DBComplanRuleRepo) New

func (r *DBComplanRuleRepo) New() interface{}

func (*DBComplanRuleRepo) Save

func (r *DBComplanRuleRepo) Save(complanrule *domain.ComplanRule) (string, error)

func (*DBComplanRuleRepo) UpdateByID

func (r *DBComplanRuleRepo) UpdateByID(ID string, oldComplanRule, newComplanRule *domain.ComplanRule, diffs domain.Diffs) error

func (*DBComplanRuleRepo) UpgradeTable

func (r *DBComplanRuleRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBComplanStageRepo

type DBComplanStageRepo struct {
	// contains filtered or unexported fields
}

func (*DBComplanStageRepo) CreateTable

func (r *DBComplanStageRepo) CreateTable() error

func (*DBComplanStageRepo) DeleteByID

func (r *DBComplanStageRepo) DeleteByID(ID string) error

func (*DBComplanStageRepo) Export

func (r *DBComplanStageRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBComplanStageRepo) FindByID

func (r *DBComplanStageRepo) FindByID(ID string) (*domain.ComplanStage, error)

func (*DBComplanStageRepo) List

func (r *DBComplanStageRepo) List(offset, limit int) ([]*domain.ComplanStage, error)

func (*DBComplanStageRepo) New

func (r *DBComplanStageRepo) New() interface{}

func (*DBComplanStageRepo) Save

func (r *DBComplanStageRepo) Save(complanstage *domain.ComplanStage) (string, error)

func (*DBComplanStageRepo) UpdateByID

func (r *DBComplanStageRepo) UpdateByID(ID string, oldComplanStage, newComplanStage *domain.ComplanStage, diffs domain.Diffs) error

func (*DBComplanStageRepo) UpgradeTable

func (r *DBComplanStageRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBContextOptionRepo

type DBContextOptionRepo struct {
	// contains filtered or unexported fields
}

func (*DBContextOptionRepo) CreateTable

func (r *DBContextOptionRepo) CreateTable() error

func (*DBContextOptionRepo) DeleteByID

func (r *DBContextOptionRepo) DeleteByID(ID string) error

func (*DBContextOptionRepo) Export

func (r *DBContextOptionRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBContextOptionRepo) FindByID

func (r *DBContextOptionRepo) FindByID(ID string) (*domain.ContextOption, error)

func (*DBContextOptionRepo) List

func (r *DBContextOptionRepo) List(offset, limit int) ([]*domain.ContextOption, error)

func (*DBContextOptionRepo) New

func (r *DBContextOptionRepo) New() interface{}

func (*DBContextOptionRepo) Save

func (r *DBContextOptionRepo) Save(contextoption *domain.ContextOption) (string, error)

func (*DBContextOptionRepo) UpdateByID

func (r *DBContextOptionRepo) UpdateByID(ID string, oldContextOption, newContextOption *domain.ContextOption, diffs domain.Diffs) error

func (*DBContextOptionRepo) UpgradeTable

func (r *DBContextOptionRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBEntryRepo

type DBEntryRepo struct {
	// contains filtered or unexported fields
}

func (*DBEntryRepo) CreateTable

func (r *DBEntryRepo) CreateTable() error

func (*DBEntryRepo) DeleteByID

func (r *DBEntryRepo) DeleteByID(ID string) error

func (*DBEntryRepo) Export

func (r *DBEntryRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBEntryRepo) FindByID

func (r *DBEntryRepo) FindByID(ID string) (*domain.Entry, error)

func (*DBEntryRepo) List

func (r *DBEntryRepo) List(offset, limit int) ([]*domain.Entry, error)

func (*DBEntryRepo) New

func (r *DBEntryRepo) New() interface{}

func (*DBEntryRepo) Save

func (r *DBEntryRepo) Save(entry *domain.Entry) (string, error)

func (*DBEntryRepo) UpdateByID

func (r *DBEntryRepo) UpdateByID(ID string, oldEntry, newEntry *domain.Entry, diffs domain.Diffs) error

func (*DBEntryRepo) UpgradeTable

func (r *DBEntryRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBEventRacesRepo

type DBEventRacesRepo struct {
	// contains filtered or unexported fields
}

func (*DBEventRacesRepo) EventRaceInfo

func (r *DBEventRacesRepo) EventRaceInfo(eventId string) (*domain.EventRaces, error)

func (*DBEventRacesRepo) RequireTx

func (r *DBEventRacesRepo) RequireTx(ctx context.Context) (commit func() error, rollback func(), rr *DBEventRacesRepo, err error)

func (*DBEventRacesRepo) UpdateRaceInfo

func (r *DBEventRacesRepo) UpdateRaceInfo(ctx context.Context, eventRaces *domain.EventRaces,
	racesToCreate, racesToDelete, racesToModFrom, racesToModTo []*domain.RaceInfo) error

UpdateRaceInfo updates the database to create, delete, and modify races according to the given data.

type DBEventRepo

type DBEventRepo struct {
	// contains filtered or unexported fields
}

func (*DBEventRepo) CreateTable

func (r *DBEventRepo) CreateTable() error

func (*DBEventRepo) DeleteByID

func (r *DBEventRepo) DeleteByID(ID string) error

func (*DBEventRepo) Export

func (r *DBEventRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBEventRepo) FindByID

func (r *DBEventRepo) FindByID(ID string) (*domain.Event, error)

func (*DBEventRepo) List

func (r *DBEventRepo) List(offset, limit int) ([]*domain.Event, error)

func (*DBEventRepo) New

func (r *DBEventRepo) New() interface{}

func (*DBEventRepo) Save

func (r *DBEventRepo) Save(event *domain.Event) (string, error)

func (*DBEventRepo) UpdateByID

func (r *DBEventRepo) UpdateByID(ID string, oldEvent, newEvent *domain.Event, diffs domain.Diffs) error

func (*DBEventRepo) UpgradeTable

func (r *DBEventRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBExceptionRepo

type DBExceptionRepo struct {
	// contains filtered or unexported fields
}

func (*DBExceptionRepo) CreateTable

func (r *DBExceptionRepo) CreateTable() error

func (*DBExceptionRepo) DeleteByID

func (r *DBExceptionRepo) DeleteByID(ID string) error

func (*DBExceptionRepo) Export

func (r *DBExceptionRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBExceptionRepo) FindByID

func (r *DBExceptionRepo) FindByID(ID string) (*domain.Exception, error)

func (*DBExceptionRepo) List

func (r *DBExceptionRepo) List(offset, limit int) ([]*domain.Exception, error)

func (*DBExceptionRepo) New

func (r *DBExceptionRepo) New() interface{}

func (*DBExceptionRepo) Save

func (r *DBExceptionRepo) Save(exception *domain.Exception) (string, error)

func (*DBExceptionRepo) UpdateByID

func (r *DBExceptionRepo) UpdateByID(ID string, oldException, newException *domain.Exception, diffs domain.Diffs) error

func (*DBExceptionRepo) UpgradeTable

func (r *DBExceptionRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBGenderRepo

type DBGenderRepo struct {
	// contains filtered or unexported fields
}

func (*DBGenderRepo) CreateTable

func (r *DBGenderRepo) CreateTable() error

func (*DBGenderRepo) DeleteByID

func (r *DBGenderRepo) DeleteByID(ID string) error

func (*DBGenderRepo) Export

func (r *DBGenderRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBGenderRepo) FindByID

func (r *DBGenderRepo) FindByID(ID string) (*domain.Gender, error)

func (*DBGenderRepo) List

func (r *DBGenderRepo) List(offset, limit int) ([]*domain.Gender, error)

func (*DBGenderRepo) New

func (r *DBGenderRepo) New() interface{}

func (*DBGenderRepo) Save

func (r *DBGenderRepo) Save(gender *domain.Gender) (string, error)

func (*DBGenderRepo) UpdateByID

func (r *DBGenderRepo) UpdateByID(ID string, oldGender, newGender *domain.Gender, diffs domain.Diffs) error

func (*DBGenderRepo) UpgradeTable

func (r *DBGenderRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBLaneOrderRepo

type DBLaneOrderRepo struct {
	// contains filtered or unexported fields
}

func (*DBLaneOrderRepo) CreateTable

func (r *DBLaneOrderRepo) CreateTable() error

func (*DBLaneOrderRepo) DeleteByID

func (r *DBLaneOrderRepo) DeleteByID(ID string) error

func (*DBLaneOrderRepo) Export

func (r *DBLaneOrderRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBLaneOrderRepo) FindByID

func (r *DBLaneOrderRepo) FindByID(ID string) (*domain.LaneOrder, error)

func (*DBLaneOrderRepo) List

func (r *DBLaneOrderRepo) List(offset, limit int) ([]*domain.LaneOrder, error)

func (*DBLaneOrderRepo) New

func (r *DBLaneOrderRepo) New() interface{}

func (*DBLaneOrderRepo) Save

func (r *DBLaneOrderRepo) Save(laneorder *domain.LaneOrder) (string, error)

func (*DBLaneOrderRepo) UpdateByID

func (r *DBLaneOrderRepo) UpdateByID(ID string, oldLaneOrder, newLaneOrder *domain.LaneOrder, diffs domain.Diffs) error

func (*DBLaneOrderRepo) UpgradeTable

func (r *DBLaneOrderRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBLaneRepo

type DBLaneRepo struct {
	// contains filtered or unexported fields
}

func (*DBLaneRepo) CreateTable

func (r *DBLaneRepo) CreateTable() error

func (*DBLaneRepo) DeleteByID

func (r *DBLaneRepo) DeleteByID(ID string) error

func (*DBLaneRepo) Export

func (r *DBLaneRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBLaneRepo) FindByID

func (r *DBLaneRepo) FindByID(ID string) (*domain.Lane, error)

func (*DBLaneRepo) List

func (r *DBLaneRepo) List(offset, limit int) ([]*domain.Lane, error)

func (*DBLaneRepo) New

func (r *DBLaneRepo) New() interface{}

func (*DBLaneRepo) Save

func (r *DBLaneRepo) Save(lane *domain.Lane) (string, error)

func (*DBLaneRepo) UpdateByID

func (r *DBLaneRepo) UpdateByID(ID string, oldLane, newLane *domain.Lane, diffs domain.Diffs) error

func (*DBLaneRepo) UpgradeTable

func (r *DBLaneRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBLevelRepo

type DBLevelRepo struct {
	// contains filtered or unexported fields
}

func (*DBLevelRepo) CreateTable

func (r *DBLevelRepo) CreateTable() error

func (*DBLevelRepo) DeleteByID

func (r *DBLevelRepo) DeleteByID(ID string) error

func (*DBLevelRepo) Export

func (r *DBLevelRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBLevelRepo) FindByID

func (r *DBLevelRepo) FindByID(ID string) (*domain.Level, error)

func (*DBLevelRepo) List

func (r *DBLevelRepo) List(offset, limit int) ([]*domain.Level, error)

func (*DBLevelRepo) New

func (r *DBLevelRepo) New() interface{}

func (*DBLevelRepo) Save

func (r *DBLevelRepo) Save(level *domain.Level) (string, error)

func (*DBLevelRepo) UpdateByID

func (r *DBLevelRepo) UpdateByID(ID string, oldLevel, newLevel *domain.Level, diffs domain.Diffs) error

func (*DBLevelRepo) UpgradeTable

func (r *DBLevelRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBMeetRepo

type DBMeetRepo struct {
	// contains filtered or unexported fields
}

func (*DBMeetRepo) CreateTable

func (r *DBMeetRepo) CreateTable() error

func (*DBMeetRepo) DeleteByID

func (r *DBMeetRepo) DeleteByID(ID string) error

func (*DBMeetRepo) Export

func (r *DBMeetRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBMeetRepo) FindByID

func (r *DBMeetRepo) FindByID(ID string) (*domain.Meet, error)

func (*DBMeetRepo) List

func (r *DBMeetRepo) List(offset, limit int) ([]*domain.Meet, error)

func (*DBMeetRepo) New

func (r *DBMeetRepo) New() interface{}

func (*DBMeetRepo) Save

func (r *DBMeetRepo) Save(meet *domain.Meet) (string, error)

func (*DBMeetRepo) UpdateByID

func (r *DBMeetRepo) UpdateByID(ID string, oldMeet, newMeet *domain.Meet, diffs domain.Diffs) error

func (*DBMeetRepo) UpgradeTable

func (r *DBMeetRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBOptionRepo

type DBOptionRepo struct {
	// contains filtered or unexported fields
}

func (*DBOptionRepo) CreateTable

func (r *DBOptionRepo) CreateTable() error

func (*DBOptionRepo) DeleteByID

func (r *DBOptionRepo) DeleteByID(ID string) error

func (*DBOptionRepo) Export

func (r *DBOptionRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBOptionRepo) FindByID

func (r *DBOptionRepo) FindByID(ID string) (*domain.Option, error)

func (*DBOptionRepo) List

func (r *DBOptionRepo) List(offset, limit int) ([]*domain.Option, error)

func (*DBOptionRepo) New

func (r *DBOptionRepo) New() interface{}

func (*DBOptionRepo) Save

func (r *DBOptionRepo) Save(option *domain.Option) (string, error)

func (*DBOptionRepo) UpdateByID

func (r *DBOptionRepo) UpdateByID(ID string, oldOption, newOption *domain.Option, diffs domain.Diffs) error

func (*DBOptionRepo) UpgradeTable

func (r *DBOptionRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBPermissionRepo

type DBPermissionRepo struct {
	// contains filtered or unexported fields
}

func (*DBPermissionRepo) CreateTable

func (r *DBPermissionRepo) CreateTable() error

func (*DBPermissionRepo) DeleteByID

func (r *DBPermissionRepo) DeleteByID(ID string) error

func (*DBPermissionRepo) Export

func (r *DBPermissionRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBPermissionRepo) FindByID

func (r *DBPermissionRepo) FindByID(ID string) (*domain.Permission, error)

func (*DBPermissionRepo) List

func (r *DBPermissionRepo) List(offset, limit int) ([]*domain.Permission, error)

func (*DBPermissionRepo) New

func (r *DBPermissionRepo) New() interface{}

func (*DBPermissionRepo) Save

func (r *DBPermissionRepo) Save(permission *domain.Permission) (string, error)

func (*DBPermissionRepo) UpdateByID

func (r *DBPermissionRepo) UpdateByID(ID string, oldPermission, newPermission *domain.Permission, diffs domain.Diffs) error

func (*DBPermissionRepo) UpgradeTable

func (r *DBPermissionRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBPersonRepo

type DBPersonRepo struct {
	// contains filtered or unexported fields
}

func (*DBPersonRepo) CreateTable

func (r *DBPersonRepo) CreateTable() error

func (*DBPersonRepo) DeleteByID

func (r *DBPersonRepo) DeleteByID(ID string) error

func (*DBPersonRepo) Export

func (r *DBPersonRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBPersonRepo) FindByID

func (r *DBPersonRepo) FindByID(ID string) (*domain.Person, error)

func (*DBPersonRepo) List

func (r *DBPersonRepo) List(offset, limit int) ([]*domain.Person, error)

func (*DBPersonRepo) New

func (r *DBPersonRepo) New() interface{}

func (*DBPersonRepo) Save

func (r *DBPersonRepo) Save(person *domain.Person) (string, error)

func (*DBPersonRepo) UpdateByID

func (r *DBPersonRepo) UpdateByID(ID string, oldPerson, newPerson *domain.Person, diffs domain.Diffs) error

func (*DBPersonRepo) UpgradeTable

func (r *DBPersonRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBProgressionRepo

type DBProgressionRepo struct {
	// contains filtered or unexported fields
}

func (*DBProgressionRepo) CreateTable

func (r *DBProgressionRepo) CreateTable() error

func (*DBProgressionRepo) DeleteByID

func (r *DBProgressionRepo) DeleteByID(ID string) error

func (*DBProgressionRepo) Export

func (r *DBProgressionRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBProgressionRepo) FindByID

func (r *DBProgressionRepo) FindByID(ID string) (*domain.Progression, error)

func (*DBProgressionRepo) List

func (r *DBProgressionRepo) List(offset, limit int) ([]*domain.Progression, error)

func (*DBProgressionRepo) New

func (r *DBProgressionRepo) New() interface{}

func (*DBProgressionRepo) Save

func (r *DBProgressionRepo) Save(progression *domain.Progression) (string, error)

func (*DBProgressionRepo) UpdateByID

func (r *DBProgressionRepo) UpdateByID(ID string, oldProgression, newProgression *domain.Progression, diffs domain.Diffs) error

func (*DBProgressionRepo) UpgradeTable

func (r *DBProgressionRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBRaceRepo

type DBRaceRepo struct {
	// contains filtered or unexported fields
}

func (*DBRaceRepo) CreateTable

func (r *DBRaceRepo) CreateTable() error

func (*DBRaceRepo) DeleteByID

func (r *DBRaceRepo) DeleteByID(ID string) error

func (*DBRaceRepo) Export

func (r *DBRaceRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBRaceRepo) FindByID

func (r *DBRaceRepo) FindByID(ID string) (*domain.Race, error)

func (*DBRaceRepo) List

func (r *DBRaceRepo) List(offset, limit int) ([]*domain.Race, error)

func (*DBRaceRepo) New

func (r *DBRaceRepo) New() interface{}

func (*DBRaceRepo) Save

func (r *DBRaceRepo) Save(race *domain.Race) (string, error)

func (*DBRaceRepo) UpdateByID

func (r *DBRaceRepo) UpdateByID(ID string, oldRace, newRace *domain.Race, diffs domain.Diffs) error

func (*DBRaceRepo) UpgradeTable

func (r *DBRaceRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBRegistrationFeeRepo

type DBRegistrationFeeRepo struct {
	// contains filtered or unexported fields
}

func (*DBRegistrationFeeRepo) CreateTable

func (r *DBRegistrationFeeRepo) CreateTable() error

func (*DBRegistrationFeeRepo) DeleteByID

func (r *DBRegistrationFeeRepo) DeleteByID(ID string) error

func (*DBRegistrationFeeRepo) Export

func (*DBRegistrationFeeRepo) FindByID

func (*DBRegistrationFeeRepo) List

func (r *DBRegistrationFeeRepo) List(offset, limit int) ([]*domain.RegistrationFee, error)

func (*DBRegistrationFeeRepo) New

func (r *DBRegistrationFeeRepo) New() interface{}

func (*DBRegistrationFeeRepo) Save

func (r *DBRegistrationFeeRepo) Save(registrationfee *domain.RegistrationFee) (string, error)

func (*DBRegistrationFeeRepo) UpdateByID

func (r *DBRegistrationFeeRepo) UpdateByID(ID string, oldRegistrationFee, newRegistrationFee *domain.RegistrationFee, diffs domain.Diffs) error

func (*DBRegistrationFeeRepo) UpgradeTable

func (r *DBRegistrationFeeRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBRegistrationRepo

type DBRegistrationRepo struct {
	// contains filtered or unexported fields
}

func (*DBRegistrationRepo) CreateTable

func (r *DBRegistrationRepo) CreateTable() error

func (*DBRegistrationRepo) DeleteByID

func (r *DBRegistrationRepo) DeleteByID(ID string) error

func (*DBRegistrationRepo) Export

func (r *DBRegistrationRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBRegistrationRepo) FindByID

func (r *DBRegistrationRepo) FindByID(ID string) (*domain.Registration, error)

func (*DBRegistrationRepo) List

func (r *DBRegistrationRepo) List(offset, limit int) ([]*domain.Registration, error)

func (*DBRegistrationRepo) New

func (r *DBRegistrationRepo) New() interface{}

func (*DBRegistrationRepo) Save

func (r *DBRegistrationRepo) Save(registration *domain.Registration) (string, error)

func (*DBRegistrationRepo) UpdateByID

func (r *DBRegistrationRepo) UpdateByID(ID string, oldRegistration, newRegistration *domain.Registration, diffs domain.Diffs) error

func (*DBRegistrationRepo) UpgradeTable

func (r *DBRegistrationRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBRolePermissionRepo

type DBRolePermissionRepo struct {
	// contains filtered or unexported fields
}

func (*DBRolePermissionRepo) CreateTable

func (r *DBRolePermissionRepo) CreateTable() error

func (*DBRolePermissionRepo) DeleteByID

func (r *DBRolePermissionRepo) DeleteByID(ID string) error

func (*DBRolePermissionRepo) Export

func (*DBRolePermissionRepo) FindByID

func (*DBRolePermissionRepo) List

func (r *DBRolePermissionRepo) List(offset, limit int) ([]*domain.RolePermission, error)

func (*DBRolePermissionRepo) New

func (r *DBRolePermissionRepo) New() interface{}

func (*DBRolePermissionRepo) Save

func (r *DBRolePermissionRepo) Save(rolepermission *domain.RolePermission) (string, error)

func (*DBRolePermissionRepo) UpdateByID

func (r *DBRolePermissionRepo) UpdateByID(ID string, oldRolePermission, newRolePermission *domain.RolePermission, diffs domain.Diffs) error

func (*DBRolePermissionRepo) UpgradeTable

func (r *DBRolePermissionRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBRoleRepo

type DBRoleRepo struct {
	// contains filtered or unexported fields
}

func (*DBRoleRepo) CreateTable

func (r *DBRoleRepo) CreateTable() error

func (*DBRoleRepo) DeleteByID

func (r *DBRoleRepo) DeleteByID(ID string) error

func (*DBRoleRepo) Export

func (r *DBRoleRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBRoleRepo) FindByID

func (r *DBRoleRepo) FindByID(ID string) (*domain.Role, error)

func (*DBRoleRepo) List

func (r *DBRoleRepo) List(offset, limit int) ([]*domain.Role, error)

func (*DBRoleRepo) New

func (r *DBRoleRepo) New() interface{}

func (*DBRoleRepo) Save

func (r *DBRoleRepo) Save(role *domain.Role) (string, error)

func (*DBRoleRepo) UpdateByID

func (r *DBRoleRepo) UpdateByID(ID string, oldRole, newRole *domain.Role, diffs domain.Diffs) error

func (*DBRoleRepo) UpgradeTable

func (r *DBRoleRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBRoleRoleRepo

type DBRoleRoleRepo struct {
	// contains filtered or unexported fields
}

func (*DBRoleRoleRepo) CreateTable

func (r *DBRoleRoleRepo) CreateTable() error

func (*DBRoleRoleRepo) DeleteByID

func (r *DBRoleRoleRepo) DeleteByID(ID string) error

func (*DBRoleRoleRepo) Export

func (r *DBRoleRoleRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBRoleRoleRepo) FindByID

func (r *DBRoleRoleRepo) FindByID(ID string) (*domain.RoleRole, error)

func (*DBRoleRoleRepo) List

func (r *DBRoleRoleRepo) List(offset, limit int) ([]*domain.RoleRole, error)

func (*DBRoleRoleRepo) New

func (r *DBRoleRoleRepo) New() interface{}

func (*DBRoleRoleRepo) Save

func (r *DBRoleRoleRepo) Save(rolerole *domain.RoleRole) (string, error)

func (*DBRoleRoleRepo) UpdateByID

func (r *DBRoleRoleRepo) UpdateByID(ID string, oldRoleRole, newRoleRole *domain.RoleRole, diffs domain.Diffs) error

func (*DBRoleRoleRepo) UpdateColumnInfos

func (r *DBRoleRoleRepo) UpdateColumnInfos(columnInfos []structsql.ColumnInfo) []structsql.ColumnInfo

func (*DBRoleRoleRepo) UpgradeTable

func (r *DBRoleRoleRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBScoringRuleRepo

type DBScoringRuleRepo struct {
	// contains filtered or unexported fields
}

func (*DBScoringRuleRepo) CreateTable

func (r *DBScoringRuleRepo) CreateTable() error

func (*DBScoringRuleRepo) DeleteByID

func (r *DBScoringRuleRepo) DeleteByID(ID string) error

func (*DBScoringRuleRepo) Export

func (r *DBScoringRuleRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBScoringRuleRepo) FindByID

func (r *DBScoringRuleRepo) FindByID(ID string) (*domain.ScoringRule, error)

func (*DBScoringRuleRepo) List

func (r *DBScoringRuleRepo) List(offset, limit int) ([]*domain.ScoringRule, error)

func (*DBScoringRuleRepo) New

func (r *DBScoringRuleRepo) New() interface{}

func (*DBScoringRuleRepo) Save

func (r *DBScoringRuleRepo) Save(scoringrule *domain.ScoringRule) (string, error)

func (*DBScoringRuleRepo) UpdateByID

func (r *DBScoringRuleRepo) UpdateByID(ID string, oldScoringRule, newScoringRule *domain.ScoringRule, diffs domain.Diffs) error

func (*DBScoringRuleRepo) UpgradeTable

func (r *DBScoringRuleRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBScoringSystemRepo

type DBScoringSystemRepo struct {
	// contains filtered or unexported fields
}

func (*DBScoringSystemRepo) CreateTable

func (r *DBScoringSystemRepo) CreateTable() error

func (*DBScoringSystemRepo) DeleteByID

func (r *DBScoringSystemRepo) DeleteByID(ID string) error

func (*DBScoringSystemRepo) Export

func (r *DBScoringSystemRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBScoringSystemRepo) FindByID

func (r *DBScoringSystemRepo) FindByID(ID string) (*domain.ScoringSystem, error)

func (*DBScoringSystemRepo) List

func (r *DBScoringSystemRepo) List(offset, limit int) ([]*domain.ScoringSystem, error)

func (*DBScoringSystemRepo) New

func (r *DBScoringSystemRepo) New() interface{}

func (*DBScoringSystemRepo) Save

func (r *DBScoringSystemRepo) Save(scoringsystem *domain.ScoringSystem) (string, error)

func (*DBScoringSystemRepo) UpdateByID

func (r *DBScoringSystemRepo) UpdateByID(ID string, oldScoringSystem, newScoringSystem *domain.ScoringSystem, diffs domain.Diffs) error

func (*DBScoringSystemRepo) UpgradeTable

func (r *DBScoringSystemRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBSeedingListRepo

type DBSeedingListRepo struct {
	// contains filtered or unexported fields
}

func (*DBSeedingListRepo) CreateTable

func (r *DBSeedingListRepo) CreateTable() error

func (*DBSeedingListRepo) DeleteByID

func (r *DBSeedingListRepo) DeleteByID(ID string) error

func (*DBSeedingListRepo) Export

func (r *DBSeedingListRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBSeedingListRepo) FindByID

func (r *DBSeedingListRepo) FindByID(ID string) (*domain.SeedingList, error)

func (*DBSeedingListRepo) List

func (r *DBSeedingListRepo) List(offset, limit int) ([]*domain.SeedingList, error)

func (*DBSeedingListRepo) New

func (r *DBSeedingListRepo) New() interface{}

func (*DBSeedingListRepo) Save

func (r *DBSeedingListRepo) Save(seedinglist *domain.SeedingList) (string, error)

func (*DBSeedingListRepo) UpdateByID

func (r *DBSeedingListRepo) UpdateByID(ID string, oldSeedingList, newSeedingList *domain.SeedingList, diffs domain.Diffs) error

func (*DBSeedingListRepo) UpgradeTable

func (r *DBSeedingListRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBSeedingPlanRepo

type DBSeedingPlanRepo struct {
	// contains filtered or unexported fields
}

func (*DBSeedingPlanRepo) CreateTable

func (r *DBSeedingPlanRepo) CreateTable() error

func (*DBSeedingPlanRepo) DeleteByID

func (r *DBSeedingPlanRepo) DeleteByID(ID string) error

func (*DBSeedingPlanRepo) Export

func (r *DBSeedingPlanRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBSeedingPlanRepo) FindByID

func (r *DBSeedingPlanRepo) FindByID(ID string) (*domain.SeedingPlan, error)

func (*DBSeedingPlanRepo) List

func (r *DBSeedingPlanRepo) List(offset, limit int) ([]*domain.SeedingPlan, error)

func (*DBSeedingPlanRepo) New

func (r *DBSeedingPlanRepo) New() interface{}

func (*DBSeedingPlanRepo) Save

func (r *DBSeedingPlanRepo) Save(seedingplan *domain.SeedingPlan) (string, error)

func (*DBSeedingPlanRepo) UpdateByID

func (r *DBSeedingPlanRepo) UpdateByID(ID string, oldSeedingPlan, newSeedingPlan *domain.SeedingPlan, diffs domain.Diffs) error

func (*DBSeedingPlanRepo) UpgradeTable

func (r *DBSeedingPlanRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBSimplanRepo

type DBSimplanRepo struct {
	// contains filtered or unexported fields
}

func (*DBSimplanRepo) CreateTable

func (r *DBSimplanRepo) CreateTable() error

func (*DBSimplanRepo) DeleteByID

func (r *DBSimplanRepo) DeleteByID(ID string) error

func (*DBSimplanRepo) Export

func (r *DBSimplanRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBSimplanRepo) FindByID

func (r *DBSimplanRepo) FindByID(ID string) (*domain.Simplan, error)

func (*DBSimplanRepo) List

func (r *DBSimplanRepo) List(offset, limit int) ([]*domain.Simplan, error)

func (*DBSimplanRepo) New

func (r *DBSimplanRepo) New() interface{}

func (*DBSimplanRepo) Save

func (r *DBSimplanRepo) Save(simplan *domain.Simplan) (string, error)

func (*DBSimplanRepo) UpdateByID

func (r *DBSimplanRepo) UpdateByID(ID string, oldSimplan, newSimplan *domain.Simplan, diffs domain.Diffs) error

func (*DBSimplanRepo) UpgradeTable

func (r *DBSimplanRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBSimplanRuleRepo

type DBSimplanRuleRepo struct {
	// contains filtered or unexported fields
}

func (*DBSimplanRuleRepo) CreateTable

func (r *DBSimplanRuleRepo) CreateTable() error

func (*DBSimplanRuleRepo) DeleteByID

func (r *DBSimplanRuleRepo) DeleteByID(ID string) error

func (*DBSimplanRuleRepo) Export

func (r *DBSimplanRuleRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBSimplanRuleRepo) FindByID

func (r *DBSimplanRuleRepo) FindByID(ID string) (*domain.SimplanRule, error)

func (*DBSimplanRuleRepo) List

func (r *DBSimplanRuleRepo) List(offset, limit int) ([]*domain.SimplanRule, error)

func (*DBSimplanRuleRepo) New

func (r *DBSimplanRuleRepo) New() interface{}

func (*DBSimplanRuleRepo) Save

func (r *DBSimplanRuleRepo) Save(simplanrule *domain.SimplanRule) (string, error)

func (*DBSimplanRuleRepo) UpdateByID

func (r *DBSimplanRuleRepo) UpdateByID(ID string, oldSimplanRule, newSimplanRule *domain.SimplanRule, diffs domain.Diffs) error

func (*DBSimplanRuleRepo) UpdateColumnInfos

func (r *DBSimplanRuleRepo) UpdateColumnInfos(columnInfos []structsql.ColumnInfo) []structsql.ColumnInfo

func (*DBSimplanRuleRepo) UpgradeTable

func (r *DBSimplanRuleRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBSimplanStageRepo

type DBSimplanStageRepo struct {
	// contains filtered or unexported fields
}

func (*DBSimplanStageRepo) CreateTable

func (r *DBSimplanStageRepo) CreateTable() error

func (*DBSimplanStageRepo) DeleteByID

func (r *DBSimplanStageRepo) DeleteByID(ID string) error

func (*DBSimplanStageRepo) Export

func (r *DBSimplanStageRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBSimplanStageRepo) FindByID

func (r *DBSimplanStageRepo) FindByID(ID string) (*domain.SimplanStage, error)

func (*DBSimplanStageRepo) List

func (r *DBSimplanStageRepo) List(offset, limit int) ([]*domain.SimplanStage, error)

func (*DBSimplanStageRepo) New

func (r *DBSimplanStageRepo) New() interface{}

func (*DBSimplanStageRepo) Save

func (r *DBSimplanStageRepo) Save(simplanstage *domain.SimplanStage) (string, error)

func (*DBSimplanStageRepo) UpdateByID

func (r *DBSimplanStageRepo) UpdateByID(ID string, oldSimplanStage, newSimplanStage *domain.SimplanStage, diffs domain.Diffs) error

func (*DBSimplanStageRepo) UpgradeTable

func (r *DBSimplanStageRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBSimplanSysRepo

type DBSimplanSysRepo struct {
	// contains filtered or unexported fields
}

func (*DBSimplanSysRepo) LoadSimplanSys

func (r *DBSimplanSysRepo) LoadSimplanSys(progression *domain.Progression) (*domain.SimplanSys, error)

type DBSiteRepo

type DBSiteRepo struct {
	// contains filtered or unexported fields
}

func (*DBSiteRepo) CreateTable

func (r *DBSiteRepo) CreateTable() error

func (*DBSiteRepo) DeleteByID

func (r *DBSiteRepo) DeleteByID(ID string) error

func (*DBSiteRepo) Export

func (r *DBSiteRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBSiteRepo) FindByID

func (r *DBSiteRepo) FindByID(ID string) (*domain.Site, error)

func (*DBSiteRepo) List

func (r *DBSiteRepo) List(offset, limit int) ([]*domain.Site, error)

func (*DBSiteRepo) New

func (r *DBSiteRepo) New() interface{}

func (*DBSiteRepo) Save

func (r *DBSiteRepo) Save(site *domain.Site) (string, error)

func (*DBSiteRepo) UpdateByID

func (r *DBSiteRepo) UpdateByID(ID string, oldSite, newSite *domain.Site, diffs domain.Diffs) error

func (*DBSiteRepo) UpgradeTable

func (r *DBSiteRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBStageRepo

type DBStageRepo struct {
	// contains filtered or unexported fields
}

func (*DBStageRepo) CreateTable

func (r *DBStageRepo) CreateTable() error

func (*DBStageRepo) DeleteByID

func (r *DBStageRepo) DeleteByID(ID string) error

func (*DBStageRepo) Export

func (r *DBStageRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBStageRepo) FindByID

func (r *DBStageRepo) FindByID(ID string) (*domain.Stage, error)

func (*DBStageRepo) List

func (r *DBStageRepo) List(offset, limit int) ([]*domain.Stage, error)

func (*DBStageRepo) New

func (r *DBStageRepo) New() interface{}

func (*DBStageRepo) Save

func (r *DBStageRepo) Save(stage *domain.Stage) (string, error)

func (*DBStageRepo) UpdateByID

func (r *DBStageRepo) UpdateByID(ID string, oldStage, newStage *domain.Stage, diffs domain.Diffs) error

func (*DBStageRepo) UpgradeTable

func (r *DBStageRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBTeamRepo

type DBTeamRepo struct {
	// contains filtered or unexported fields
}

func (*DBTeamRepo) CreateTable

func (r *DBTeamRepo) CreateTable() error

func (*DBTeamRepo) DeleteByID

func (r *DBTeamRepo) DeleteByID(ID string) error

func (*DBTeamRepo) Export

func (r *DBTeamRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBTeamRepo) FindByID

func (r *DBTeamRepo) FindByID(ID string) (*domain.Team, error)

func (*DBTeamRepo) List

func (r *DBTeamRepo) List(offset, limit int) ([]*domain.Team, error)

func (*DBTeamRepo) New

func (r *DBTeamRepo) New() interface{}

func (*DBTeamRepo) Save

func (r *DBTeamRepo) Save(team *domain.Team) (string, error)

func (*DBTeamRepo) UpdateByID

func (r *DBTeamRepo) UpdateByID(ID string, oldTeam, newTeam *domain.Team, diffs domain.Diffs) error

func (*DBTeamRepo) UpgradeTable

func (r *DBTeamRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBUserRepo

type DBUserRepo struct {
	// contains filtered or unexported fields
}

func (*DBUserRepo) CreateTable

func (r *DBUserRepo) CreateTable() error

func (*DBUserRepo) DeleteByID

func (r *DBUserRepo) DeleteByID(ID string) error

func (*DBUserRepo) Export

func (r *DBUserRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBUserRepo) FindByID

func (r *DBUserRepo) FindByID(ID string) (*domain.User, error)

func (*DBUserRepo) List

func (r *DBUserRepo) List(offset, limit int) ([]*domain.User, error)

func (*DBUserRepo) New

func (r *DBUserRepo) New() interface{}

func (*DBUserRepo) Save

func (r *DBUserRepo) Save(user *domain.User) (string, error)

func (*DBUserRepo) UpdateByID

func (r *DBUserRepo) UpdateByID(ID string, oldUser, newUser *domain.User, diffs domain.Diffs) error

func (*DBUserRepo) UpdateColumnInfos

func (r *DBUserRepo) UpdateColumnInfos(columnInfos []structsql.ColumnInfo) []structsql.ColumnInfo

func (*DBUserRepo) UpgradeTable

func (r *DBUserRepo) UpgradeTable(dryrun bool) (bool, string, error)

type DBUserRoleRepo

type DBUserRoleRepo struct {
	// contains filtered or unexported fields
}

func (*DBUserRoleRepo) CreateTable

func (r *DBUserRoleRepo) CreateTable() error

func (*DBUserRoleRepo) DeleteByID

func (r *DBUserRoleRepo) DeleteByID(ID string) error

func (*DBUserRoleRepo) Export

func (r *DBUserRoleRepo) Export(e *ixport.Exporter, w io.Writer) error

func (*DBUserRoleRepo) FindByID

func (r *DBUserRoleRepo) FindByID(ID string) (*domain.UserRole, error)

func (*DBUserRoleRepo) List

func (r *DBUserRoleRepo) List(offset, limit int) ([]*domain.UserRole, error)

func (*DBUserRoleRepo) New

func (r *DBUserRoleRepo) New() interface{}

func (*DBUserRoleRepo) Save

func (r *DBUserRoleRepo) Save(userrole *domain.UserRole) (string, error)

func (*DBUserRoleRepo) UpdateByID

func (r *DBUserRoleRepo) UpdateByID(ID string, oldUserRole, newUserRole *domain.UserRole, diffs domain.Diffs) error

func (*DBUserRoleRepo) UpgradeTable

func (r *DBUserRoleRepo) UpgradeTable(dryrun bool) (bool, string, error)

type Repos

type Repos struct {
	// contains filtered or unexported fields
}

Repos implements the domain.Repos interface.

func Open

func Open(repoPath string) (*Repos, error)

Open opens a database repository. The repoPath argument is of the form dbtype:dbinfo, such as "sqlite3:/foo/bar" or "mysql:user:password@tcp(...)/hello". Note, however, that the dbrepo package does not import any sql drivers; the main program should import whatever drivers it wants to use.

func OpenDB

func OpenDB(db *sql.DB) (*Repos, error)

OpenDB opens a Repos on an already-opened database.

func ReopenDB

func ReopenDB(db conn.DB) (*Repos, error)

Reopen a database with a DBorTx (typically a Tx).

func (*Repos) Area

func (r *Repos) Area() domain.AreaRepo

Table types

func (*Repos) Challenge

func (r *Repos) Challenge() domain.ChallengeRepo

func (*Repos) Close

func (r *Repos) Close()

Close closes the database.

func (*Repos) Competition

func (r *Repos) Competition() domain.CompetitionRepo

func (*Repos) Complan

func (r *Repos) Complan() domain.ComplanRepo

func (*Repos) ComplanRule

func (r *Repos) ComplanRule() domain.ComplanRuleRepo

func (*Repos) ComplanStage

func (r *Repos) ComplanStage() domain.ComplanStageRepo

func (*Repos) ContextOption

func (r *Repos) ContextOption() domain.ContextOptionRepo

func (*Repos) CreateTables

func (r *Repos) CreateTables() error

CreateTables creates all of the tables in a new database. This method is not idempotent, it will fail if any of the tables already exist.

func (*Repos) DB

func (r *Repos) DB() conn.DB

func (*Repos) Entry

func (r *Repos) Entry() domain.EntryRepo

func (*Repos) Event

func (r *Repos) Event() domain.EventRepo

func (*Repos) EventRaces

func (r *Repos) EventRaces() domain.EventRacesRepo

Composite types

func (*Repos) Exception

func (r *Repos) Exception() domain.ExceptionRepo

func (*Repos) Export

func (r *Repos) Export(w io.Writer) error

Export writes out all of our tables to a text file that can be loaded back in later using Import.

func (*Repos) Gender

func (r *Repos) Gender() domain.GenderRepo

func (*Repos) ImportFile

func (r *Repos) ImportFile(fileName string) (ixport.ImporterCounts, error)

Import reads in the specified text file by filename and loads our tables.

func (*Repos) Lane

func (r *Repos) Lane() domain.LaneRepo

func (*Repos) LaneOrder

func (r *Repos) LaneOrder() domain.LaneOrderRepo

func (*Repos) Level

func (r *Repos) Level() domain.LevelRepo

func (*Repos) Meet

func (r *Repos) Meet() domain.MeetRepo

func (*Repos) NewExporter

func (r *Repos) NewExporter() (*ixport.Exporter, error)

NewExporter returns an Exporter suitable for exporting one table from our database.

func (*Repos) Option

func (r *Repos) Option() domain.OptionRepo

func (*Repos) Permission

func (r *Repos) Permission() domain.PermissionRepo

func (*Repos) Person

func (r *Repos) Person() domain.PersonRepo

func (*Repos) Progression

func (r *Repos) Progression() domain.ProgressionRepo

func (*Repos) Race

func (r *Repos) Race() domain.RaceRepo

func (*Repos) Registration

func (r *Repos) Registration() domain.RegistrationRepo

func (*Repos) RegistrationFee

func (r *Repos) RegistrationFee() domain.RegistrationFeeRepo

func (*Repos) RequireTx

func (r *Repos) RequireTx(ctx context.Context) (commit func() error, rollback func(), rrepos *Repos, errr error)

RequireTx ensures thata our Repos is using a transaction. If we already have a transaction, then the commit and rollback funcs are no-ops and the returned Repos is the same as the receiver. If we don't have a transactions, it creates one, returns commit and rollback funcs that operate on that transaction, and returns a new Repos containing the transaction.

func (*Repos) Role

func (r *Repos) Role() domain.RoleRepo

func (*Repos) RolePermission

func (r *Repos) RolePermission() domain.RolePermissionRepo

func (*Repos) RoleRole

func (r *Repos) RoleRole() domain.RoleRoleRepo

func (*Repos) ScoringRule

func (r *Repos) ScoringRule() domain.ScoringRuleRepo

func (*Repos) ScoringSystem

func (r *Repos) ScoringSystem() domain.ScoringSystemRepo

func (*Repos) SeedingList

func (r *Repos) SeedingList() domain.SeedingListRepo

func (*Repos) SeedingPlan

func (r *Repos) SeedingPlan() domain.SeedingPlanRepo

func (*Repos) Simplan

func (r *Repos) Simplan() domain.SimplanRepo

func (*Repos) SimplanRule

func (r *Repos) SimplanRule() domain.SimplanRuleRepo

func (*Repos) SimplanStage

func (r *Repos) SimplanStage() domain.SimplanStageRepo

func (*Repos) SimplanSys

func (r *Repos) SimplanSys() domain.SimplanSysRepo

func (*Repos) Site

func (r *Repos) Site() domain.SiteRepo

func (*Repos) Stage

func (r *Repos) Stage() domain.StageRepo

func (*Repos) TableEntries

func (r *Repos) TableEntries() []TableEntry

func (*Repos) TableNames

func (r *Repos) TableNames() []string

func (*Repos) TableRepo

func (r *Repos) TableRepo(name string) (TableRepo, error)

func (*Repos) Team

func (r *Repos) Team() domain.TeamRepo

func (*Repos) UpgradeTable

func (r *Repos) UpgradeTable(tableName string, dryrun bool) (bool, string, error)

UpgradeTable performs a database upgrade on the named table. Table names are defined in TableEntries(). If dryrun is true, then upgrade is not performed.

func (*Repos) UpgradeTables

func (r *Repos) UpgradeTables(dryrun bool) error

UpgradeTables upgrades all of the tables in a new database. If dryrun is true, it reports which tables would be upgraded, but does not take any action.

func (*Repos) User

func (r *Repos) User() domain.UserRepo

func (*Repos) UserRole

func (r *Repos) UserRole() domain.UserRoleRepo

type TableEntry

type TableEntry struct {
	Name  string
	Table TableRepo
}

type TableRepo

type TableRepo interface {
	New() interface{} // Returns a new instance of the domain struct for this table.
	CreateTable() error
	UpgradeTable(dryrun bool) (bool, string, error)
	Export(e *ixport.Exporter, w io.Writer) error
}

Directories

Path Synopsis
The conn package provides a database connector that can be either a direct connection to a database, or a transaction.
The conn package provides a database connector that can be either a direct connection to a database, or a transaction.
Package ixport has text-file import and export functionality.
Package ixport has text-file import and export functionality.
Package strsql contains support functions that deal with SQL strings.
Package strsql contains support functions that deal with SQL strings.
Package structsql contains functions to read and write the database to instances of structs, using reflection.
Package structsql contains functions to read and write the database to instances of structs, using reflection.
Package test contains test helper functions dealing with a database.
Package test contains test helper functions dealing with a database.

Jump to

Keyboard shortcuts

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