models

package
v0.37.7 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SelectJoins = getJoins[*dialect.SelectQuery]()
	UpdateJoins = getJoins[*dialect.UpdateQuery]()
	DeleteJoins = getJoins[*dialect.DeleteQuery]()
)
View Source
var (
	SelectThenLoad = getThenLoaders[*dialect.SelectQuery]()
	InsertThenLoad = getThenLoaders[*dialect.InsertQuery]()
	UpdateThenLoad = getThenLoaders[*dialect.UpdateQuery]()
)
View Source
var (
	SelectWhere     = Where[*dialect.SelectQuery]()
	UpdateWhere     = Where[*dialect.UpdateQuery]()
	DeleteWhere     = Where[*dialect.DeleteQuery]()
	OnConflictWhere = Where[*clause.ConflictClause]() // Used in ON CONFLICT DO UPDATE
)
View Source
var AnalysisProtos = psql.NewTablex[*AnalysisProto, AnalysisProtoSlice, *AnalysisProtoSetter]("", "analysis_proto", buildAnalysisProtoColumns("analysis_proto"))

AnalysisProtos contains methods to work with the analysis_proto table

View Source
var CCarClasses = psql.NewTablex[*CCarClass, CCarClassSlice, *CCarClassSetter]("", "c_car_class", buildCCarClassColumns("c_car_class"))

CCarClasses contains methods to work with the c_car_class table

View Source
var CCarDrivers = psql.NewTablex[*CCarDriver, CCarDriverSlice, *CCarDriverSetter]("", "c_car_driver", buildCCarDriverColumns("c_car_driver"))

CCarDrivers contains methods to work with the c_car_driver table

View Source
var CCarEntries = psql.NewTablex[*CCarEntry, CCarEntrySlice, *CCarEntrySetter]("", "c_car_entry", buildCCarEntryColumns("c_car_entry"))

CCarEntries contains methods to work with the c_car_entry table

View Source
var CCarTeams = psql.NewTablex[*CCarTeam, CCarTeamSlice, *CCarTeamSetter]("", "c_car_team", buildCCarTeamColumns("c_car_team"))

CCarTeams contains methods to work with the c_car_team table

View Source
var CCars = psql.NewTablex[*CCar, CCarSlice, *CCarSetter]("", "c_car", buildCCarColumns("c_car"))

CCars contains methods to work with the c_car table

View Source
var CarStateProtos = psql.NewTablex[*CarStateProto, CarStateProtoSlice, *CarStateProtoSetter]("", "car_state_proto", buildCarStateProtoColumns("car_state_proto"))

CarStateProtos contains methods to work with the car_state_proto table

View Source
var EventExts = psql.NewTablex[*EventExt, EventExtSlice, *EventExtSetter]("", "event_ext", buildEventExtColumns("event_ext"))

EventExts contains methods to work with the event_ext table

View Source
var Events = psql.NewTablex[*Event, EventSlice, *EventSetter]("", "event", buildEventColumns("event"))

Events contains methods to work with the event table

View Source
var MSGStateProtos = psql.NewTablex[*MSGStateProto, MSGStateProtoSlice, *MSGStateProtoSetter]("", "msg_state_proto", buildMSGStateProtoColumns("msg_state_proto"))

MSGStateProtos contains methods to work with the msg_state_proto table

View Source
var Preload = getPreloaders()
View Source
var RSInfos = psql.NewTablex[*RSInfo, RSInfoSlice, *RSInfoSetter]("", "rs_info", buildRSInfoColumns("rs_info"))

RSInfos contains methods to work with the rs_info table

View Source
var RaceStateProtos = psql.NewTablex[*RaceStateProto, RaceStateProtoSlice, *RaceStateProtoSetter]("", "race_state_proto", buildRaceStateProtoColumns("race_state_proto"))

RaceStateProtos contains methods to work with the race_state_proto table

View Source
var SchemaMigrations = psql.NewTablex[*SchemaMigration, SchemaMigrationSlice, *SchemaMigrationSetter]("", "schema_migrations", buildSchemaMigrationColumns("schema_migrations"))

SchemaMigrations contains methods to work with the schema_migrations table

View Source
var SpeedmapProtos = psql.NewTablex[*SpeedmapProto, SpeedmapProtoSlice, *SpeedmapProtoSetter]("", "speedmap_proto", buildSpeedmapProtoColumns("speedmap_proto"))

SpeedmapProtos contains methods to work with the speedmap_proto table

View Source
var Tenants = psql.NewTablex[*Tenant, TenantSlice, *TenantSetter]("", "tenant", buildTenantColumns("tenant"))

Tenants contains methods to work with the tenant table

View Source
var Tracks = psql.NewTablex[*Track, TrackSlice, *TrackSetter]("", "track", buildTrackColumns("track"))

Tracks contains methods to work with the track table

Functions

func AnalysisProtoExists

func AnalysisProtoExists(ctx context.Context, exec bob.Executor, EventIDPK int32) (bool, error)

AnalysisProtoExists checks the presence of a single record by primary key

func CCarClassExists

func CCarClassExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

CCarClassExists checks the presence of a single record by primary key

func CCarDriverExists

func CCarDriverExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

CCarDriverExists checks the presence of a single record by primary key

func CCarEntryExists

func CCarEntryExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

CCarEntryExists checks the presence of a single record by primary key

func CCarExists

func CCarExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

CCarExists checks the presence of a single record by primary key

func CCarTeamExists

func CCarTeamExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

CCarTeamExists checks the presence of a single record by primary key

func CarStateProtoExists

func CarStateProtoExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

CarStateProtoExists checks the presence of a single record by primary key

func EventExists

func EventExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

EventExists checks the presence of a single record by primary key

func EventExtExists

func EventExtExists(ctx context.Context, exec bob.Executor, EventIDPK int32) (bool, error)

EventExtExists checks the presence of a single record by primary key

func MSGStateProtoExists

func MSGStateProtoExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

MSGStateProtoExists checks the presence of a single record by primary key

func RSInfoExists

func RSInfoExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

RSInfoExists checks the presence of a single record by primary key

func RaceStateProtoExists

func RaceStateProtoExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

RaceStateProtoExists checks the presence of a single record by primary key

func SchemaMigrationExists

func SchemaMigrationExists(ctx context.Context, exec bob.Executor, VersionPK int64) (bool, error)

SchemaMigrationExists checks the presence of a single record by primary key

func SpeedmapProtoExists

func SpeedmapProtoExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

SpeedmapProtoExists checks the presence of a single record by primary key

func TenantExists

func TenantExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

TenantExists checks the presence of a single record by primary key

func TrackExists

func TrackExists(ctx context.Context, exec bob.Executor, IDPK int32) (bool, error)

TrackExists checks the presence of a single record by primary key

func Where

func Where[Q psql.Filterable]() struct {
	AnalysisProtos   analysisProtoWhere[Q]
	CCars            cCarWhere[Q]
	CCarClasses      cCarClassWhere[Q]
	CCarDrivers      cCarDriverWhere[Q]
	CCarEntries      cCarEntryWhere[Q]
	CCarTeams        cCarTeamWhere[Q]
	CarStateProtos   carStateProtoWhere[Q]
	Events           eventWhere[Q]
	EventExts        eventExtWhere[Q]
	MSGStateProtos   msgStateProtoWhere[Q]
	RaceStateProtos  raceStateProtoWhere[Q]
	RSInfos          rsInfoWhere[Q]
	SchemaMigrations schemaMigrationWhere[Q]
	SpeedmapProtos   speedmapProtoWhere[Q]
	Tenants          tenantWhere[Q]
	Tracks           trackWhere[Q]
}

Types

type AnalysisProto

type AnalysisProto struct {
	EventID int32 `db:"event_id,pk" `
	// Timestamp when data was persisted
	RecordStamp time.Time `db:"record_stamp" `
	Protodata   []byte    `db:"protodata" `

	R analysisProtoR `db:"-" `
}

AnalysisProto is an object representing the database table.

func FindAnalysisProto

func FindAnalysisProto(ctx context.Context, exec bob.Executor, EventIDPK int32, cols ...string) (*AnalysisProto, error)

FindAnalysisProto retrieves a single record by primary key If cols is empty Find will return all columns.

func (*AnalysisProto) AfterQueryHook

func (o *AnalysisProto) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after AnalysisProto is retrieved from the database

func (*AnalysisProto) AttachEvent

func (analysisProto0 *AnalysisProto) AttachEvent(ctx context.Context, exec bob.Executor, event1 *Event) error

func (*AnalysisProto) Delete

func (o *AnalysisProto) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single AnalysisProto record with an executor

func (*AnalysisProto) Event

func (o *AnalysisProto) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Event starts a query for related objects on event

func (*AnalysisProto) InsertEvent

func (analysisProto0 *AnalysisProto) InsertEvent(ctx context.Context, exec bob.Executor, related *EventSetter) error

func (*AnalysisProto) LoadEvent

func (o *AnalysisProto) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the analysisProto's Event into the .R struct

func (*AnalysisProto) Preload

func (o *AnalysisProto) Preload(name string, retrieved any) error

func (*AnalysisProto) Reload

func (o *AnalysisProto) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the AnalysisProto using the executor

func (*AnalysisProto) Update

Update uses an executor to update the AnalysisProto

type AnalysisProtoSetter

type AnalysisProtoSetter struct {
	EventID     omit.Val[int32]     `db:"event_id,pk" `
	RecordStamp omit.Val[time.Time] `db:"record_stamp" `
	Protodata   omit.Val[[]byte]    `db:"protodata" `
}

AnalysisProtoSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*AnalysisProtoSetter) Apply

func (AnalysisProtoSetter) Expressions

func (s AnalysisProtoSetter) Expressions(prefix ...string) []bob.Expression

func (AnalysisProtoSetter) Overwrite

func (s AnalysisProtoSetter) Overwrite(t *AnalysisProto)

func (AnalysisProtoSetter) SetColumns

func (s AnalysisProtoSetter) SetColumns() []string

func (AnalysisProtoSetter) UpdateMod

func (s AnalysisProtoSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type AnalysisProtoSlice

type AnalysisProtoSlice []*AnalysisProto

AnalysisProtoSlice is an alias for a slice of pointers to AnalysisProto. This should almost always be used instead of []*AnalysisProto.

func (AnalysisProtoSlice) AfterQueryHook

func (o AnalysisProtoSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after AnalysisProtoSlice is retrieved from the database

func (AnalysisProtoSlice) DeleteAll

func (o AnalysisProtoSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (AnalysisProtoSlice) DeleteMod

func (o AnalysisProtoSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (AnalysisProtoSlice) Event

func (AnalysisProtoSlice) LoadEvent

func (os AnalysisProtoSlice) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the analysisProto's Event into the .R struct

func (AnalysisProtoSlice) ReloadAll

func (o AnalysisProtoSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (AnalysisProtoSlice) UpdateAll

func (AnalysisProtoSlice) UpdateMod

func (o AnalysisProtoSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type AnalysisProtosQuery

type AnalysisProtosQuery = *psql.ViewQuery[*AnalysisProto, AnalysisProtoSlice]

AnalysisProtosQuery is a query on the analysis_proto table

type CCar

type CCar struct {
	ID            int32           `db:"id,pk" `
	EventID       int32           `db:"event_id" `
	Name          string          `db:"name" `
	NameShort     string          `db:"name_short" `
	CarID         int32           `db:"car_id" `
	CCarClassID   int32           `db:"c_car_class_id" `
	FuelPCT       decimal.Decimal `db:"fuel_pct" `
	PowerAdjust   decimal.Decimal `db:"power_adjust" `
	WeightPenalty decimal.Decimal `db:"weight_penalty" `
	DryTireSets   int32           `db:"dry_tire_sets" `

	R cCarR `db:"-" `
}

CCar is an object representing the database table.

func FindCCar

func FindCCar(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*CCar, error)

FindCCar retrieves a single record by primary key If cols is empty Find will return all columns.

func (*CCar) AfterQueryHook

func (o *CCar) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCar is retrieved from the database

func (*CCar) AttachCCarClass

func (cCar0 *CCar) AttachCCarClass(ctx context.Context, exec bob.Executor, cCarClass1 *CCarClass) error

func (*CCar) AttachCCarEntries

func (cCar0 *CCar) AttachCCarEntries(ctx context.Context, exec bob.Executor, related ...*CCarEntry) error

func (*CCar) AttachEvent

func (cCar0 *CCar) AttachEvent(ctx context.Context, exec bob.Executor, event1 *Event) error

func (*CCar) CCarClass

func (o *CCar) CCarClass(mods ...bob.Mod[*dialect.SelectQuery]) CCarClassesQuery

CCarClass starts a query for related objects on c_car_class

func (*CCar) CCarEntries

func (o *CCar) CCarEntries(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

CCarEntries starts a query for related objects on c_car_entry

func (*CCar) Delete

func (o *CCar) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single CCar record with an executor

func (*CCar) Event

func (o *CCar) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Event starts a query for related objects on event

func (*CCar) InsertCCarClass

func (cCar0 *CCar) InsertCCarClass(ctx context.Context, exec bob.Executor, related *CCarClassSetter) error

func (*CCar) InsertCCarEntries

func (cCar0 *CCar) InsertCCarEntries(ctx context.Context, exec bob.Executor, related ...*CCarEntrySetter) error

func (*CCar) InsertEvent

func (cCar0 *CCar) InsertEvent(ctx context.Context, exec bob.Executor, related *EventSetter) error

func (*CCar) LoadCCarClass

func (o *CCar) LoadCCarClass(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarClass loads the cCar's CCarClass into the .R struct

func (*CCar) LoadCCarEntries

func (o *CCar) LoadCCarEntries(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntries loads the cCar's CCarEntries into the .R struct

func (*CCar) LoadEvent

func (o *CCar) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the cCar's Event into the .R struct

func (*CCar) Preload

func (o *CCar) Preload(name string, retrieved any) error

func (*CCar) Reload

func (o *CCar) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the CCar using the executor

func (*CCar) Update

func (o *CCar) Update(ctx context.Context, exec bob.Executor, s *CCarSetter) error

Update uses an executor to update the CCar

type CCarClass

type CCarClass struct {
	ID         int32  `db:"id,pk" `
	EventID    int32  `db:"event_id" `
	Name       string `db:"name" `
	CarClassID int32  `db:"car_class_id" `

	R cCarClassR `db:"-" `
}

CCarClass is an object representing the database table.

func FindCCarClass

func FindCCarClass(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*CCarClass, error)

FindCCarClass retrieves a single record by primary key If cols is empty Find will return all columns.

func (*CCarClass) AfterQueryHook

func (o *CCarClass) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarClass is retrieved from the database

func (*CCarClass) AttachCCars

func (cCarClass0 *CCarClass) AttachCCars(ctx context.Context, exec bob.Executor, related ...*CCar) error

func (*CCarClass) AttachEvent

func (cCarClass0 *CCarClass) AttachEvent(ctx context.Context, exec bob.Executor, event1 *Event) error

func (*CCarClass) CCars

func (o *CCarClass) CCars(mods ...bob.Mod[*dialect.SelectQuery]) CCarsQuery

CCars starts a query for related objects on c_car

func (*CCarClass) Delete

func (o *CCarClass) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single CCarClass record with an executor

func (*CCarClass) Event

func (o *CCarClass) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Event starts a query for related objects on event

func (*CCarClass) InsertCCars

func (cCarClass0 *CCarClass) InsertCCars(ctx context.Context, exec bob.Executor, related ...*CCarSetter) error

func (*CCarClass) InsertEvent

func (cCarClass0 *CCarClass) InsertEvent(ctx context.Context, exec bob.Executor, related *EventSetter) error

func (*CCarClass) LoadCCars

func (o *CCarClass) LoadCCars(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCars loads the cCarClass's CCars into the .R struct

func (*CCarClass) LoadEvent

func (o *CCarClass) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the cCarClass's Event into the .R struct

func (*CCarClass) Preload

func (o *CCarClass) Preload(name string, retrieved any) error

func (*CCarClass) Reload

func (o *CCarClass) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the CCarClass using the executor

func (*CCarClass) Update

func (o *CCarClass) Update(ctx context.Context, exec bob.Executor, s *CCarClassSetter) error

Update uses an executor to update the CCarClass

type CCarClassSetter

type CCarClassSetter struct {
	ID         omit.Val[int32]  `db:"id,pk" `
	EventID    omit.Val[int32]  `db:"event_id" `
	Name       omit.Val[string] `db:"name" `
	CarClassID omit.Val[int32]  `db:"car_class_id" `
}

CCarClassSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*CCarClassSetter) Apply

func (s *CCarClassSetter) Apply(q *dialect.InsertQuery)

func (CCarClassSetter) Expressions

func (s CCarClassSetter) Expressions(prefix ...string) []bob.Expression

func (CCarClassSetter) Overwrite

func (s CCarClassSetter) Overwrite(t *CCarClass)

func (CCarClassSetter) SetColumns

func (s CCarClassSetter) SetColumns() []string

func (CCarClassSetter) UpdateMod

func (s CCarClassSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type CCarClassSlice

type CCarClassSlice []*CCarClass

CCarClassSlice is an alias for a slice of pointers to CCarClass. This should almost always be used instead of []*CCarClass.

func (CCarClassSlice) AfterQueryHook

func (o CCarClassSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarClassSlice is retrieved from the database

func (CCarClassSlice) CCars

func (os CCarClassSlice) CCars(mods ...bob.Mod[*dialect.SelectQuery]) CCarsQuery

func (CCarClassSlice) DeleteAll

func (o CCarClassSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (CCarClassSlice) DeleteMod

func (o CCarClassSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (CCarClassSlice) Event

func (os CCarClassSlice) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

func (CCarClassSlice) LoadCCars

func (os CCarClassSlice) LoadCCars(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCars loads the cCarClass's CCars into the .R struct

func (CCarClassSlice) LoadEvent

func (os CCarClassSlice) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the cCarClass's Event into the .R struct

func (CCarClassSlice) ReloadAll

func (o CCarClassSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (CCarClassSlice) UpdateAll

func (o CCarClassSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals CCarClassSetter) error

func (CCarClassSlice) UpdateMod

func (o CCarClassSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type CCarClassesQuery

type CCarClassesQuery = *psql.ViewQuery[*CCarClass, CCarClassSlice]

CCarClassesQuery is a query on the c_car_class table

type CCarDriver

type CCarDriver struct {
	ID          int32  `db:"id,pk" `
	CCarEntryID int32  `db:"c_car_entry_id" `
	DriverID    int32  `db:"driver_id" `
	Name        string `db:"name" `
	Initials    string `db:"initials" `
	AbbrevName  string `db:"abbrev_name" `
	Irating     int32  `db:"irating" `
	LicLevel    int32  `db:"lic_level" `
	LicSubLevel int32  `db:"lic_sub_level" `
	LicString   string `db:"lic_string" `

	R cCarDriverR `db:"-" `
}

CCarDriver is an object representing the database table.

func FindCCarDriver

func FindCCarDriver(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*CCarDriver, error)

FindCCarDriver retrieves a single record by primary key If cols is empty Find will return all columns.

func (*CCarDriver) AfterQueryHook

func (o *CCarDriver) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarDriver is retrieved from the database

func (*CCarDriver) AttachCCarEntry

func (cCarDriver0 *CCarDriver) AttachCCarEntry(ctx context.Context, exec bob.Executor, cCarEntry1 *CCarEntry) error

func (*CCarDriver) CCarEntry

func (o *CCarDriver) CCarEntry(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

CCarEntry starts a query for related objects on c_car_entry

func (*CCarDriver) Delete

func (o *CCarDriver) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single CCarDriver record with an executor

func (*CCarDriver) InsertCCarEntry

func (cCarDriver0 *CCarDriver) InsertCCarEntry(ctx context.Context, exec bob.Executor, related *CCarEntrySetter) error

func (*CCarDriver) LoadCCarEntry

func (o *CCarDriver) LoadCCarEntry(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntry loads the cCarDriver's CCarEntry into the .R struct

func (*CCarDriver) Preload

func (o *CCarDriver) Preload(name string, retrieved any) error

func (*CCarDriver) Reload

func (o *CCarDriver) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the CCarDriver using the executor

func (*CCarDriver) Update

func (o *CCarDriver) Update(ctx context.Context, exec bob.Executor, s *CCarDriverSetter) error

Update uses an executor to update the CCarDriver

type CCarDriverSetter

type CCarDriverSetter struct {
	ID          omit.Val[int32]  `db:"id,pk" `
	CCarEntryID omit.Val[int32]  `db:"c_car_entry_id" `
	DriverID    omit.Val[int32]  `db:"driver_id" `
	Name        omit.Val[string] `db:"name" `
	Initials    omit.Val[string] `db:"initials" `
	AbbrevName  omit.Val[string] `db:"abbrev_name" `
	Irating     omit.Val[int32]  `db:"irating" `
	LicLevel    omit.Val[int32]  `db:"lic_level" `
	LicSubLevel omit.Val[int32]  `db:"lic_sub_level" `
	LicString   omit.Val[string] `db:"lic_string" `
}

CCarDriverSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*CCarDriverSetter) Apply

func (s *CCarDriverSetter) Apply(q *dialect.InsertQuery)

func (CCarDriverSetter) Expressions

func (s CCarDriverSetter) Expressions(prefix ...string) []bob.Expression

func (CCarDriverSetter) Overwrite

func (s CCarDriverSetter) Overwrite(t *CCarDriver)

func (CCarDriverSetter) SetColumns

func (s CCarDriverSetter) SetColumns() []string

func (CCarDriverSetter) UpdateMod

func (s CCarDriverSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type CCarDriverSlice

type CCarDriverSlice []*CCarDriver

CCarDriverSlice is an alias for a slice of pointers to CCarDriver. This should almost always be used instead of []*CCarDriver.

func (CCarDriverSlice) AfterQueryHook

func (o CCarDriverSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarDriverSlice is retrieved from the database

func (CCarDriverSlice) CCarEntry

func (os CCarDriverSlice) CCarEntry(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

func (CCarDriverSlice) DeleteAll

func (o CCarDriverSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (CCarDriverSlice) DeleteMod

func (o CCarDriverSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (CCarDriverSlice) LoadCCarEntry

func (os CCarDriverSlice) LoadCCarEntry(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntry loads the cCarDriver's CCarEntry into the .R struct

func (CCarDriverSlice) ReloadAll

func (o CCarDriverSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (CCarDriverSlice) UpdateAll

func (o CCarDriverSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals CCarDriverSetter) error

func (CCarDriverSlice) UpdateMod

func (o CCarDriverSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type CCarDriversQuery

type CCarDriversQuery = *psql.ViewQuery[*CCarDriver, CCarDriverSlice]

CCarDriversQuery is a query on the c_car_driver table

type CCarEntriesQuery

type CCarEntriesQuery = *psql.ViewQuery[*CCarEntry, CCarEntrySlice]

CCarEntriesQuery is a query on the c_car_entry table

type CCarEntry

type CCarEntry struct {
	ID           int32  `db:"id,pk" `
	EventID      int32  `db:"event_id" `
	CCarID       int32  `db:"c_car_id" `
	CarIdx       int32  `db:"car_idx" `
	CarNumber    string `db:"car_number" `
	CarNumberRaw int32  `db:"car_number_raw" `

	R cCarEntryR `db:"-" `
}

CCarEntry is an object representing the database table.

func FindCCarEntry

func FindCCarEntry(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*CCarEntry, error)

FindCCarEntry retrieves a single record by primary key If cols is empty Find will return all columns.

func (*CCarEntry) AfterQueryHook

func (o *CCarEntry) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarEntry is retrieved from the database

func (*CCarEntry) AttachCCar

func (cCarEntry0 *CCarEntry) AttachCCar(ctx context.Context, exec bob.Executor, cCar1 *CCar) error

func (*CCarEntry) AttachCCarDrivers

func (cCarEntry0 *CCarEntry) AttachCCarDrivers(ctx context.Context, exec bob.Executor, related ...*CCarDriver) error

func (*CCarEntry) AttachCCarTeams

func (cCarEntry0 *CCarEntry) AttachCCarTeams(ctx context.Context, exec bob.Executor, related ...*CCarTeam) error

func (*CCarEntry) AttachEvent

func (cCarEntry0 *CCarEntry) AttachEvent(ctx context.Context, exec bob.Executor, event1 *Event) error

func (*CCarEntry) CCar

func (o *CCarEntry) CCar(mods ...bob.Mod[*dialect.SelectQuery]) CCarsQuery

CCar starts a query for related objects on c_car

func (*CCarEntry) CCarDrivers

func (o *CCarEntry) CCarDrivers(mods ...bob.Mod[*dialect.SelectQuery]) CCarDriversQuery

CCarDrivers starts a query for related objects on c_car_driver

func (*CCarEntry) CCarTeams

func (o *CCarEntry) CCarTeams(mods ...bob.Mod[*dialect.SelectQuery]) CCarTeamsQuery

CCarTeams starts a query for related objects on c_car_team

func (*CCarEntry) Delete

func (o *CCarEntry) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single CCarEntry record with an executor

func (*CCarEntry) Event

func (o *CCarEntry) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Event starts a query for related objects on event

func (*CCarEntry) InsertCCar

func (cCarEntry0 *CCarEntry) InsertCCar(ctx context.Context, exec bob.Executor, related *CCarSetter) error

func (*CCarEntry) InsertCCarDrivers

func (cCarEntry0 *CCarEntry) InsertCCarDrivers(ctx context.Context, exec bob.Executor, related ...*CCarDriverSetter) error

func (*CCarEntry) InsertCCarTeams

func (cCarEntry0 *CCarEntry) InsertCCarTeams(ctx context.Context, exec bob.Executor, related ...*CCarTeamSetter) error

func (*CCarEntry) InsertEvent

func (cCarEntry0 *CCarEntry) InsertEvent(ctx context.Context, exec bob.Executor, related *EventSetter) error

func (*CCarEntry) LoadCCar

func (o *CCarEntry) LoadCCar(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCar loads the cCarEntry's CCar into the .R struct

func (*CCarEntry) LoadCCarDrivers

func (o *CCarEntry) LoadCCarDrivers(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarDrivers loads the cCarEntry's CCarDrivers into the .R struct

func (*CCarEntry) LoadCCarTeams

func (o *CCarEntry) LoadCCarTeams(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarTeams loads the cCarEntry's CCarTeams into the .R struct

func (*CCarEntry) LoadEvent

func (o *CCarEntry) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the cCarEntry's Event into the .R struct

func (*CCarEntry) Preload

func (o *CCarEntry) Preload(name string, retrieved any) error

func (*CCarEntry) Reload

func (o *CCarEntry) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the CCarEntry using the executor

func (*CCarEntry) Update

func (o *CCarEntry) Update(ctx context.Context, exec bob.Executor, s *CCarEntrySetter) error

Update uses an executor to update the CCarEntry

type CCarEntrySetter

type CCarEntrySetter struct {
	ID           omit.Val[int32]  `db:"id,pk" `
	EventID      omit.Val[int32]  `db:"event_id" `
	CCarID       omit.Val[int32]  `db:"c_car_id" `
	CarIdx       omit.Val[int32]  `db:"car_idx" `
	CarNumber    omit.Val[string] `db:"car_number" `
	CarNumberRaw omit.Val[int32]  `db:"car_number_raw" `
}

CCarEntrySetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*CCarEntrySetter) Apply

func (s *CCarEntrySetter) Apply(q *dialect.InsertQuery)

func (CCarEntrySetter) Expressions

func (s CCarEntrySetter) Expressions(prefix ...string) []bob.Expression

func (CCarEntrySetter) Overwrite

func (s CCarEntrySetter) Overwrite(t *CCarEntry)

func (CCarEntrySetter) SetColumns

func (s CCarEntrySetter) SetColumns() []string

func (CCarEntrySetter) UpdateMod

func (s CCarEntrySetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type CCarEntrySlice

type CCarEntrySlice []*CCarEntry

CCarEntrySlice is an alias for a slice of pointers to CCarEntry. This should almost always be used instead of []*CCarEntry.

func (CCarEntrySlice) AfterQueryHook

func (o CCarEntrySlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarEntrySlice is retrieved from the database

func (CCarEntrySlice) CCar

func (os CCarEntrySlice) CCar(mods ...bob.Mod[*dialect.SelectQuery]) CCarsQuery

func (CCarEntrySlice) CCarDrivers

func (os CCarEntrySlice) CCarDrivers(mods ...bob.Mod[*dialect.SelectQuery]) CCarDriversQuery

func (CCarEntrySlice) CCarTeams

func (os CCarEntrySlice) CCarTeams(mods ...bob.Mod[*dialect.SelectQuery]) CCarTeamsQuery

func (CCarEntrySlice) DeleteAll

func (o CCarEntrySlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (CCarEntrySlice) DeleteMod

func (o CCarEntrySlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (CCarEntrySlice) Event

func (os CCarEntrySlice) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

func (CCarEntrySlice) LoadCCar

func (os CCarEntrySlice) LoadCCar(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCar loads the cCarEntry's CCar into the .R struct

func (CCarEntrySlice) LoadCCarDrivers

func (os CCarEntrySlice) LoadCCarDrivers(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarDrivers loads the cCarEntry's CCarDrivers into the .R struct

func (CCarEntrySlice) LoadCCarTeams

func (os CCarEntrySlice) LoadCCarTeams(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarTeams loads the cCarEntry's CCarTeams into the .R struct

func (CCarEntrySlice) LoadEvent

func (os CCarEntrySlice) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the cCarEntry's Event into the .R struct

func (CCarEntrySlice) ReloadAll

func (o CCarEntrySlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (CCarEntrySlice) UpdateAll

func (o CCarEntrySlice) UpdateAll(ctx context.Context, exec bob.Executor, vals CCarEntrySetter) error

func (CCarEntrySlice) UpdateMod

func (o CCarEntrySlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type CCarSetter

type CCarSetter struct {
	ID            omit.Val[int32]           `db:"id,pk" `
	EventID       omit.Val[int32]           `db:"event_id" `
	Name          omit.Val[string]          `db:"name" `
	NameShort     omit.Val[string]          `db:"name_short" `
	CarID         omit.Val[int32]           `db:"car_id" `
	CCarClassID   omit.Val[int32]           `db:"c_car_class_id" `
	FuelPCT       omit.Val[decimal.Decimal] `db:"fuel_pct" `
	PowerAdjust   omit.Val[decimal.Decimal] `db:"power_adjust" `
	WeightPenalty omit.Val[decimal.Decimal] `db:"weight_penalty" `
	DryTireSets   omit.Val[int32]           `db:"dry_tire_sets" `
}

CCarSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*CCarSetter) Apply

func (s *CCarSetter) Apply(q *dialect.InsertQuery)

func (CCarSetter) Expressions

func (s CCarSetter) Expressions(prefix ...string) []bob.Expression

func (CCarSetter) Overwrite

func (s CCarSetter) Overwrite(t *CCar)

func (CCarSetter) SetColumns

func (s CCarSetter) SetColumns() []string

func (CCarSetter) UpdateMod

func (s CCarSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type CCarSlice

type CCarSlice []*CCar

CCarSlice is an alias for a slice of pointers to CCar. This should almost always be used instead of []*CCar.

func (CCarSlice) AfterQueryHook

func (o CCarSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarSlice is retrieved from the database

func (CCarSlice) CCarClass

func (os CCarSlice) CCarClass(mods ...bob.Mod[*dialect.SelectQuery]) CCarClassesQuery

func (CCarSlice) CCarEntries

func (os CCarSlice) CCarEntries(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

func (CCarSlice) DeleteAll

func (o CCarSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (CCarSlice) DeleteMod

func (o CCarSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (CCarSlice) Event

func (os CCarSlice) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

func (CCarSlice) LoadCCarClass

func (os CCarSlice) LoadCCarClass(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarClass loads the cCar's CCarClass into the .R struct

func (CCarSlice) LoadCCarEntries

func (os CCarSlice) LoadCCarEntries(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntries loads the cCar's CCarEntries into the .R struct

func (CCarSlice) LoadEvent

func (os CCarSlice) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the cCar's Event into the .R struct

func (CCarSlice) ReloadAll

func (o CCarSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (CCarSlice) UpdateAll

func (o CCarSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals CCarSetter) error

func (CCarSlice) UpdateMod

func (o CCarSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type CCarTeam

type CCarTeam struct {
	ID          int32  `db:"id,pk" `
	CCarEntryID int32  `db:"c_car_entry_id" `
	TeamID      int32  `db:"team_id" `
	Name        string `db:"name" `

	R cCarTeamR `db:"-" `
}

CCarTeam is an object representing the database table.

func FindCCarTeam

func FindCCarTeam(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*CCarTeam, error)

FindCCarTeam retrieves a single record by primary key If cols is empty Find will return all columns.

func (*CCarTeam) AfterQueryHook

func (o *CCarTeam) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarTeam is retrieved from the database

func (*CCarTeam) AttachCCarEntry

func (cCarTeam0 *CCarTeam) AttachCCarEntry(ctx context.Context, exec bob.Executor, cCarEntry1 *CCarEntry) error

func (*CCarTeam) CCarEntry

func (o *CCarTeam) CCarEntry(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

CCarEntry starts a query for related objects on c_car_entry

func (*CCarTeam) Delete

func (o *CCarTeam) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single CCarTeam record with an executor

func (*CCarTeam) InsertCCarEntry

func (cCarTeam0 *CCarTeam) InsertCCarEntry(ctx context.Context, exec bob.Executor, related *CCarEntrySetter) error

func (*CCarTeam) LoadCCarEntry

func (o *CCarTeam) LoadCCarEntry(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntry loads the cCarTeam's CCarEntry into the .R struct

func (*CCarTeam) Preload

func (o *CCarTeam) Preload(name string, retrieved any) error

func (*CCarTeam) Reload

func (o *CCarTeam) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the CCarTeam using the executor

func (*CCarTeam) Update

func (o *CCarTeam) Update(ctx context.Context, exec bob.Executor, s *CCarTeamSetter) error

Update uses an executor to update the CCarTeam

type CCarTeamSetter

type CCarTeamSetter struct {
	ID          omit.Val[int32]  `db:"id,pk" `
	CCarEntryID omit.Val[int32]  `db:"c_car_entry_id" `
	TeamID      omit.Val[int32]  `db:"team_id" `
	Name        omit.Val[string] `db:"name" `
}

CCarTeamSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*CCarTeamSetter) Apply

func (s *CCarTeamSetter) Apply(q *dialect.InsertQuery)

func (CCarTeamSetter) Expressions

func (s CCarTeamSetter) Expressions(prefix ...string) []bob.Expression

func (CCarTeamSetter) Overwrite

func (s CCarTeamSetter) Overwrite(t *CCarTeam)

func (CCarTeamSetter) SetColumns

func (s CCarTeamSetter) SetColumns() []string

func (CCarTeamSetter) UpdateMod

func (s CCarTeamSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type CCarTeamSlice

type CCarTeamSlice []*CCarTeam

CCarTeamSlice is an alias for a slice of pointers to CCarTeam. This should almost always be used instead of []*CCarTeam.

func (CCarTeamSlice) AfterQueryHook

func (o CCarTeamSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CCarTeamSlice is retrieved from the database

func (CCarTeamSlice) CCarEntry

func (os CCarTeamSlice) CCarEntry(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

func (CCarTeamSlice) DeleteAll

func (o CCarTeamSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (CCarTeamSlice) DeleteMod

func (o CCarTeamSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (CCarTeamSlice) LoadCCarEntry

func (os CCarTeamSlice) LoadCCarEntry(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntry loads the cCarTeam's CCarEntry into the .R struct

func (CCarTeamSlice) ReloadAll

func (o CCarTeamSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (CCarTeamSlice) UpdateAll

func (o CCarTeamSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals CCarTeamSetter) error

func (CCarTeamSlice) UpdateMod

func (o CCarTeamSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type CCarTeamsQuery

type CCarTeamsQuery = *psql.ViewQuery[*CCarTeam, CCarTeamSlice]

CCarTeamsQuery is a query on the c_car_team table

type CCarsQuery

type CCarsQuery = *psql.ViewQuery[*CCar, CCarSlice]

CCarsQuery is a query on the c_car table

type CarStateProto

type CarStateProto struct {
	ID        int32  `db:"id,pk" `
	RSInfoID  int32  `db:"rs_info_id" `
	Protodata []byte `db:"protodata" `

	R carStateProtoR `db:"-" `
}

CarStateProto is an object representing the database table.

func FindCarStateProto

func FindCarStateProto(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*CarStateProto, error)

FindCarStateProto retrieves a single record by primary key If cols is empty Find will return all columns.

func (*CarStateProto) AfterQueryHook

func (o *CarStateProto) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CarStateProto is retrieved from the database

func (*CarStateProto) AttachRSInfo

func (carStateProto0 *CarStateProto) AttachRSInfo(ctx context.Context, exec bob.Executor, rsInfo1 *RSInfo) error

func (*CarStateProto) Delete

func (o *CarStateProto) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single CarStateProto record with an executor

func (*CarStateProto) InsertRSInfo

func (carStateProto0 *CarStateProto) InsertRSInfo(ctx context.Context, exec bob.Executor, related *RSInfoSetter) error

func (*CarStateProto) LoadRSInfo

func (o *CarStateProto) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the carStateProto's RSInfo into the .R struct

func (*CarStateProto) Preload

func (o *CarStateProto) Preload(name string, retrieved any) error

func (*CarStateProto) RSInfo

func (o *CarStateProto) RSInfo(mods ...bob.Mod[*dialect.SelectQuery]) RSInfosQuery

RSInfo starts a query for related objects on rs_info

func (*CarStateProto) Reload

func (o *CarStateProto) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the CarStateProto using the executor

func (*CarStateProto) Update

Update uses an executor to update the CarStateProto

type CarStateProtoSetter

type CarStateProtoSetter struct {
	ID        omit.Val[int32]  `db:"id,pk" `
	RSInfoID  omit.Val[int32]  `db:"rs_info_id" `
	Protodata omit.Val[[]byte] `db:"protodata" `
}

CarStateProtoSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*CarStateProtoSetter) Apply

func (CarStateProtoSetter) Expressions

func (s CarStateProtoSetter) Expressions(prefix ...string) []bob.Expression

func (CarStateProtoSetter) Overwrite

func (s CarStateProtoSetter) Overwrite(t *CarStateProto)

func (CarStateProtoSetter) SetColumns

func (s CarStateProtoSetter) SetColumns() []string

func (CarStateProtoSetter) UpdateMod

func (s CarStateProtoSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type CarStateProtoSlice

type CarStateProtoSlice []*CarStateProto

CarStateProtoSlice is an alias for a slice of pointers to CarStateProto. This should almost always be used instead of []*CarStateProto.

func (CarStateProtoSlice) AfterQueryHook

func (o CarStateProtoSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after CarStateProtoSlice is retrieved from the database

func (CarStateProtoSlice) DeleteAll

func (o CarStateProtoSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (CarStateProtoSlice) DeleteMod

func (o CarStateProtoSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (CarStateProtoSlice) LoadRSInfo

func (os CarStateProtoSlice) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the carStateProto's RSInfo into the .R struct

func (CarStateProtoSlice) RSInfo

func (CarStateProtoSlice) ReloadAll

func (o CarStateProtoSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (CarStateProtoSlice) UpdateAll

func (CarStateProtoSlice) UpdateMod

func (o CarStateProtoSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type CarStateProtosQuery

type CarStateProtosQuery = *psql.ViewQuery[*CarStateProto, CarStateProtoSlice]

CarStateProtosQuery is a query on the car_state_proto table

type Event

type Event struct {
	ID                int32            `db:"id,pk" `
	EventKey          string           `db:"event_key" `
	Name              string           `db:"name" `
	Description       null.Val[string] `db:"description" `
	EventTime         time.Time        `db:"event_time" `
	RaceloggerVersion string           `db:"racelogger_version" `
	TeamRacing        bool             `db:"team_racing" `
	MultiClass        bool             `db:"multi_class" `
	NumCarTypes       int32            `db:"num_car_types" `
	NumCarClasses     int32            `db:"num_car_classes" `
	IrSessionID       null.Val[int32]  `db:"ir_session_id" `
	TrackID           int32            `db:"track_id" `
	PitSpeed          decimal.Decimal  `db:"pit_speed" `
	// timestamp of the race start
	ReplayMinTimestamp time.Time `db:"replay_min_timestamp" `
	// session time of the race start
	ReplayMinSessionTime decimal.Decimal `db:"replay_min_session_time" `
	// session time of the race end
	ReplayMaxSessionTime decimal.Decimal                 `db:"replay_max_session_time" `
	Sessions             mytypes.EventSessionSlice       `db:"sessions" `
	IrSubSessionID       int32                           `db:"ir_sub_session_id" `
	TenantID             int32                           `db:"tenant_id" `
	TireInfos            null.Val[mytypes.TireInfoSlice] `db:"tire_infos" `

	R eventR `db:"-" `
}

Event is an object representing the database table.

func FindEvent

func FindEvent(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*Event, error)

FindEvent retrieves a single record by primary key If cols is empty Find will return all columns.

func (*Event) AfterQueryHook

func (o *Event) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after Event is retrieved from the database

func (*Event) AnalysisProto

func (o *Event) AnalysisProto(mods ...bob.Mod[*dialect.SelectQuery]) AnalysisProtosQuery

AnalysisProto starts a query for related objects on analysis_proto

func (*Event) AttachAnalysisProto

func (event0 *Event) AttachAnalysisProto(ctx context.Context, exec bob.Executor, analysisProto1 *AnalysisProto) error

func (*Event) AttachCCarClasses

func (event0 *Event) AttachCCarClasses(ctx context.Context, exec bob.Executor, related ...*CCarClass) error

func (*Event) AttachCCarEntries

func (event0 *Event) AttachCCarEntries(ctx context.Context, exec bob.Executor, related ...*CCarEntry) error

func (*Event) AttachCCars

func (event0 *Event) AttachCCars(ctx context.Context, exec bob.Executor, related ...*CCar) error

func (*Event) AttachEventExt

func (event0 *Event) AttachEventExt(ctx context.Context, exec bob.Executor, eventExt1 *EventExt) error

func (*Event) AttachRSInfos

func (event0 *Event) AttachRSInfos(ctx context.Context, exec bob.Executor, related ...*RSInfo) error

func (*Event) AttachTenant

func (event0 *Event) AttachTenant(ctx context.Context, exec bob.Executor, tenant1 *Tenant) error

func (*Event) AttachTrack

func (event0 *Event) AttachTrack(ctx context.Context, exec bob.Executor, track1 *Track) error

func (*Event) CCarClasses

func (o *Event) CCarClasses(mods ...bob.Mod[*dialect.SelectQuery]) CCarClassesQuery

CCarClasses starts a query for related objects on c_car_class

func (*Event) CCarEntries

func (o *Event) CCarEntries(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

CCarEntries starts a query for related objects on c_car_entry

func (*Event) CCars

func (o *Event) CCars(mods ...bob.Mod[*dialect.SelectQuery]) CCarsQuery

CCars starts a query for related objects on c_car

func (*Event) Delete

func (o *Event) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single Event record with an executor

func (*Event) EventExt

func (o *Event) EventExt(mods ...bob.Mod[*dialect.SelectQuery]) EventExtsQuery

EventExt starts a query for related objects on event_ext

func (*Event) InsertAnalysisProto

func (event0 *Event) InsertAnalysisProto(ctx context.Context, exec bob.Executor, related *AnalysisProtoSetter) error

func (*Event) InsertCCarClasses

func (event0 *Event) InsertCCarClasses(ctx context.Context, exec bob.Executor, related ...*CCarClassSetter) error

func (*Event) InsertCCarEntries

func (event0 *Event) InsertCCarEntries(ctx context.Context, exec bob.Executor, related ...*CCarEntrySetter) error

func (*Event) InsertCCars

func (event0 *Event) InsertCCars(ctx context.Context, exec bob.Executor, related ...*CCarSetter) error

func (*Event) InsertEventExt

func (event0 *Event) InsertEventExt(ctx context.Context, exec bob.Executor, related *EventExtSetter) error

func (*Event) InsertRSInfos

func (event0 *Event) InsertRSInfos(ctx context.Context, exec bob.Executor, related ...*RSInfoSetter) error

func (*Event) InsertTenant

func (event0 *Event) InsertTenant(ctx context.Context, exec bob.Executor, related *TenantSetter) error

func (*Event) InsertTrack

func (event0 *Event) InsertTrack(ctx context.Context, exec bob.Executor, related *TrackSetter) error

func (*Event) LoadAnalysisProto

func (o *Event) LoadAnalysisProto(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAnalysisProto loads the event's AnalysisProto into the .R struct

func (*Event) LoadCCarClasses

func (o *Event) LoadCCarClasses(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarClasses loads the event's CCarClasses into the .R struct

func (*Event) LoadCCarEntries

func (o *Event) LoadCCarEntries(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntries loads the event's CCarEntries into the .R struct

func (*Event) LoadCCars

func (o *Event) LoadCCars(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCars loads the event's CCars into the .R struct

func (*Event) LoadEventExt

func (o *Event) LoadEventExt(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEventExt loads the event's EventExt into the .R struct

func (*Event) LoadRSInfos

func (o *Event) LoadRSInfos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfos loads the event's RSInfos into the .R struct

func (*Event) LoadTenant

func (o *Event) LoadTenant(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTenant loads the event's Tenant into the .R struct

func (*Event) LoadTrack

func (o *Event) LoadTrack(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTrack loads the event's Track into the .R struct

func (*Event) Preload

func (o *Event) Preload(name string, retrieved any) error

func (*Event) RSInfos

func (o *Event) RSInfos(mods ...bob.Mod[*dialect.SelectQuery]) RSInfosQuery

RSInfos starts a query for related objects on rs_info

func (*Event) Reload

func (o *Event) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the Event using the executor

func (*Event) Tenant

func (o *Event) Tenant(mods ...bob.Mod[*dialect.SelectQuery]) TenantsQuery

Tenant starts a query for related objects on tenant

func (*Event) Track

func (o *Event) Track(mods ...bob.Mod[*dialect.SelectQuery]) TracksQuery

Track starts a query for related objects on track

func (*Event) Update

func (o *Event) Update(ctx context.Context, exec bob.Executor, s *EventSetter) error

Update uses an executor to update the Event

type EventExt

type EventExt struct {
	EventID   int32                   `db:"event_id,pk" `
	ExtraInfo mytypes.CustomExtraInfo `db:"extra_info" `

	R eventExtR `db:"-" `
}

EventExt is an object representing the database table.

func FindEventExt

func FindEventExt(ctx context.Context, exec bob.Executor, EventIDPK int32, cols ...string) (*EventExt, error)

FindEventExt retrieves a single record by primary key If cols is empty Find will return all columns.

func (*EventExt) AfterQueryHook

func (o *EventExt) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after EventExt is retrieved from the database

func (*EventExt) AttachEvent

func (eventExt0 *EventExt) AttachEvent(ctx context.Context, exec bob.Executor, event1 *Event) error

func (*EventExt) Delete

func (o *EventExt) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single EventExt record with an executor

func (*EventExt) Event

func (o *EventExt) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Event starts a query for related objects on event

func (*EventExt) InsertEvent

func (eventExt0 *EventExt) InsertEvent(ctx context.Context, exec bob.Executor, related *EventSetter) error

func (*EventExt) LoadEvent

func (o *EventExt) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the eventExt's Event into the .R struct

func (*EventExt) Preload

func (o *EventExt) Preload(name string, retrieved any) error

func (*EventExt) Reload

func (o *EventExt) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the EventExt using the executor

func (*EventExt) Update

func (o *EventExt) Update(ctx context.Context, exec bob.Executor, s *EventExtSetter) error

Update uses an executor to update the EventExt

type EventExtSetter

type EventExtSetter struct {
	EventID   omit.Val[int32]                   `db:"event_id,pk" `
	ExtraInfo omit.Val[mytypes.CustomExtraInfo] `db:"extra_info" `
}

EventExtSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*EventExtSetter) Apply

func (s *EventExtSetter) Apply(q *dialect.InsertQuery)

func (EventExtSetter) Expressions

func (s EventExtSetter) Expressions(prefix ...string) []bob.Expression

func (EventExtSetter) Overwrite

func (s EventExtSetter) Overwrite(t *EventExt)

func (EventExtSetter) SetColumns

func (s EventExtSetter) SetColumns() []string

func (EventExtSetter) UpdateMod

func (s EventExtSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type EventExtSlice

type EventExtSlice []*EventExt

EventExtSlice is an alias for a slice of pointers to EventExt. This should almost always be used instead of []*EventExt.

func (EventExtSlice) AfterQueryHook

func (o EventExtSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after EventExtSlice is retrieved from the database

func (EventExtSlice) DeleteAll

func (o EventExtSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (EventExtSlice) DeleteMod

func (o EventExtSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (EventExtSlice) Event

func (os EventExtSlice) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

func (EventExtSlice) LoadEvent

func (os EventExtSlice) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the eventExt's Event into the .R struct

func (EventExtSlice) ReloadAll

func (o EventExtSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (EventExtSlice) UpdateAll

func (o EventExtSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals EventExtSetter) error

func (EventExtSlice) UpdateMod

func (o EventExtSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type EventExtsQuery

type EventExtsQuery = *psql.ViewQuery[*EventExt, EventExtSlice]

EventExtsQuery is a query on the event_ext table

type EventSetter

type EventSetter struct {
	ID                   omit.Val[int32]                     `db:"id,pk" `
	EventKey             omit.Val[string]                    `db:"event_key" `
	Name                 omit.Val[string]                    `db:"name" `
	Description          omitnull.Val[string]                `db:"description" `
	EventTime            omit.Val[time.Time]                 `db:"event_time" `
	RaceloggerVersion    omit.Val[string]                    `db:"racelogger_version" `
	TeamRacing           omit.Val[bool]                      `db:"team_racing" `
	MultiClass           omit.Val[bool]                      `db:"multi_class" `
	NumCarTypes          omit.Val[int32]                     `db:"num_car_types" `
	NumCarClasses        omit.Val[int32]                     `db:"num_car_classes" `
	IrSessionID          omitnull.Val[int32]                 `db:"ir_session_id" `
	TrackID              omit.Val[int32]                     `db:"track_id" `
	PitSpeed             omit.Val[decimal.Decimal]           `db:"pit_speed" `
	ReplayMinTimestamp   omit.Val[time.Time]                 `db:"replay_min_timestamp" `
	ReplayMinSessionTime omit.Val[decimal.Decimal]           `db:"replay_min_session_time" `
	ReplayMaxSessionTime omit.Val[decimal.Decimal]           `db:"replay_max_session_time" `
	Sessions             omit.Val[mytypes.EventSessionSlice] `db:"sessions" `
	IrSubSessionID       omit.Val[int32]                     `db:"ir_sub_session_id" `
	TenantID             omit.Val[int32]                     `db:"tenant_id" `
	TireInfos            omitnull.Val[mytypes.TireInfoSlice] `db:"tire_infos" `
}

EventSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*EventSetter) Apply

func (s *EventSetter) Apply(q *dialect.InsertQuery)

func (EventSetter) Expressions

func (s EventSetter) Expressions(prefix ...string) []bob.Expression

func (EventSetter) Overwrite

func (s EventSetter) Overwrite(t *Event)

func (EventSetter) SetColumns

func (s EventSetter) SetColumns() []string

func (EventSetter) UpdateMod

func (s EventSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type EventSlice

type EventSlice []*Event

EventSlice is an alias for a slice of pointers to Event. This should almost always be used instead of []*Event.

func (EventSlice) AfterQueryHook

func (o EventSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after EventSlice is retrieved from the database

func (EventSlice) AnalysisProto

func (os EventSlice) AnalysisProto(mods ...bob.Mod[*dialect.SelectQuery]) AnalysisProtosQuery

func (EventSlice) CCarClasses

func (os EventSlice) CCarClasses(mods ...bob.Mod[*dialect.SelectQuery]) CCarClassesQuery

func (EventSlice) CCarEntries

func (os EventSlice) CCarEntries(mods ...bob.Mod[*dialect.SelectQuery]) CCarEntriesQuery

func (EventSlice) CCars

func (os EventSlice) CCars(mods ...bob.Mod[*dialect.SelectQuery]) CCarsQuery

func (EventSlice) DeleteAll

func (o EventSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (EventSlice) DeleteMod

func (o EventSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (EventSlice) EventExt

func (os EventSlice) EventExt(mods ...bob.Mod[*dialect.SelectQuery]) EventExtsQuery

func (EventSlice) LoadAnalysisProto

func (os EventSlice) LoadAnalysisProto(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAnalysisProto loads the event's AnalysisProto into the .R struct

func (EventSlice) LoadCCarClasses

func (os EventSlice) LoadCCarClasses(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarClasses loads the event's CCarClasses into the .R struct

func (EventSlice) LoadCCarEntries

func (os EventSlice) LoadCCarEntries(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCarEntries loads the event's CCarEntries into the .R struct

func (EventSlice) LoadCCars

func (os EventSlice) LoadCCars(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCCars loads the event's CCars into the .R struct

func (EventSlice) LoadEventExt

func (os EventSlice) LoadEventExt(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEventExt loads the event's EventExt into the .R struct

func (EventSlice) LoadRSInfos

func (os EventSlice) LoadRSInfos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfos loads the event's RSInfos into the .R struct

func (EventSlice) LoadTenant

func (os EventSlice) LoadTenant(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTenant loads the event's Tenant into the .R struct

func (EventSlice) LoadTrack

func (os EventSlice) LoadTrack(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTrack loads the event's Track into the .R struct

func (EventSlice) RSInfos

func (os EventSlice) RSInfos(mods ...bob.Mod[*dialect.SelectQuery]) RSInfosQuery

func (EventSlice) ReloadAll

func (o EventSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (EventSlice) Tenant

func (os EventSlice) Tenant(mods ...bob.Mod[*dialect.SelectQuery]) TenantsQuery

func (EventSlice) Track

func (os EventSlice) Track(mods ...bob.Mod[*dialect.SelectQuery]) TracksQuery

func (EventSlice) UpdateAll

func (o EventSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals EventSetter) error

func (EventSlice) UpdateMod

func (o EventSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type EventsQuery

type EventsQuery = *psql.ViewQuery[*Event, EventSlice]

EventsQuery is a query on the event table

type MSGStateProto

type MSGStateProto struct {
	ID        int32  `db:"id,pk" `
	RSInfoID  int32  `db:"rs_info_id" `
	Protodata []byte `db:"protodata" `

	R msgStateProtoR `db:"-" `
}

MSGStateProto is an object representing the database table.

func FindMSGStateProto

func FindMSGStateProto(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*MSGStateProto, error)

FindMSGStateProto retrieves a single record by primary key If cols is empty Find will return all columns.

func (*MSGStateProto) AfterQueryHook

func (o *MSGStateProto) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after MSGStateProto is retrieved from the database

func (*MSGStateProto) AttachRSInfo

func (msgStateProto0 *MSGStateProto) AttachRSInfo(ctx context.Context, exec bob.Executor, rsInfo1 *RSInfo) error

func (*MSGStateProto) Delete

func (o *MSGStateProto) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single MSGStateProto record with an executor

func (*MSGStateProto) InsertRSInfo

func (msgStateProto0 *MSGStateProto) InsertRSInfo(ctx context.Context, exec bob.Executor, related *RSInfoSetter) error

func (*MSGStateProto) LoadRSInfo

func (o *MSGStateProto) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the msgStateProto's RSInfo into the .R struct

func (*MSGStateProto) Preload

func (o *MSGStateProto) Preload(name string, retrieved any) error

func (*MSGStateProto) RSInfo

func (o *MSGStateProto) RSInfo(mods ...bob.Mod[*dialect.SelectQuery]) RSInfosQuery

RSInfo starts a query for related objects on rs_info

func (*MSGStateProto) Reload

func (o *MSGStateProto) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the MSGStateProto using the executor

func (*MSGStateProto) Update

Update uses an executor to update the MSGStateProto

type MSGStateProtoSetter

type MSGStateProtoSetter struct {
	ID        omit.Val[int32]  `db:"id,pk" `
	RSInfoID  omit.Val[int32]  `db:"rs_info_id" `
	Protodata omit.Val[[]byte] `db:"protodata" `
}

MSGStateProtoSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*MSGStateProtoSetter) Apply

func (MSGStateProtoSetter) Expressions

func (s MSGStateProtoSetter) Expressions(prefix ...string) []bob.Expression

func (MSGStateProtoSetter) Overwrite

func (s MSGStateProtoSetter) Overwrite(t *MSGStateProto)

func (MSGStateProtoSetter) SetColumns

func (s MSGStateProtoSetter) SetColumns() []string

func (MSGStateProtoSetter) UpdateMod

func (s MSGStateProtoSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type MSGStateProtoSlice

type MSGStateProtoSlice []*MSGStateProto

MSGStateProtoSlice is an alias for a slice of pointers to MSGStateProto. This should almost always be used instead of []*MSGStateProto.

func (MSGStateProtoSlice) AfterQueryHook

func (o MSGStateProtoSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after MSGStateProtoSlice is retrieved from the database

func (MSGStateProtoSlice) DeleteAll

func (o MSGStateProtoSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (MSGStateProtoSlice) DeleteMod

func (o MSGStateProtoSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (MSGStateProtoSlice) LoadRSInfo

func (os MSGStateProtoSlice) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the msgStateProto's RSInfo into the .R struct

func (MSGStateProtoSlice) RSInfo

func (MSGStateProtoSlice) ReloadAll

func (o MSGStateProtoSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (MSGStateProtoSlice) UpdateAll

func (MSGStateProtoSlice) UpdateMod

func (o MSGStateProtoSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type MSGStateProtosQuery

type MSGStateProtosQuery = *psql.ViewQuery[*MSGStateProto, MSGStateProtoSlice]

MSGStateProtosQuery is a query on the msg_state_proto table

type RSInfo

type RSInfo struct {
	ID            int32           `db:"id,pk" `
	EventID       int32           `db:"event_id" `
	RecordStamp   time.Time       `db:"record_stamp" `
	SessionTime   decimal.Decimal `db:"session_time" `
	TimeOfDay     int32           `db:"time_of_day" `
	AirTemp       decimal.Decimal `db:"air_temp" `
	TrackTemp     decimal.Decimal `db:"track_temp" `
	TrackWetness  int32           `db:"track_wetness" `
	Precipitation decimal.Decimal `db:"precipitation" `
	SessionNum    int32           `db:"session_num" `

	R rsInfoR `db:"-" `
}

RSInfo is an object representing the database table.

func FindRSInfo

func FindRSInfo(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*RSInfo, error)

FindRSInfo retrieves a single record by primary key If cols is empty Find will return all columns.

func (*RSInfo) AfterQueryHook

func (o *RSInfo) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after RSInfo is retrieved from the database

func (*RSInfo) AttachCarStateProtos

func (rsInfo0 *RSInfo) AttachCarStateProtos(ctx context.Context, exec bob.Executor, related ...*CarStateProto) error

func (*RSInfo) AttachEvent

func (rsInfo0 *RSInfo) AttachEvent(ctx context.Context, exec bob.Executor, event1 *Event) error

func (*RSInfo) AttachMSGStateProtos

func (rsInfo0 *RSInfo) AttachMSGStateProtos(ctx context.Context, exec bob.Executor, related ...*MSGStateProto) error

func (*RSInfo) AttachRaceStateProtos

func (rsInfo0 *RSInfo) AttachRaceStateProtos(ctx context.Context, exec bob.Executor, related ...*RaceStateProto) error

func (*RSInfo) AttachSpeedmapProtos

func (rsInfo0 *RSInfo) AttachSpeedmapProtos(ctx context.Context, exec bob.Executor, related ...*SpeedmapProto) error

func (*RSInfo) CarStateProtos

func (o *RSInfo) CarStateProtos(mods ...bob.Mod[*dialect.SelectQuery]) CarStateProtosQuery

CarStateProtos starts a query for related objects on car_state_proto

func (*RSInfo) Delete

func (o *RSInfo) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single RSInfo record with an executor

func (*RSInfo) Event

func (o *RSInfo) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Event starts a query for related objects on event

func (*RSInfo) InsertCarStateProtos

func (rsInfo0 *RSInfo) InsertCarStateProtos(ctx context.Context, exec bob.Executor, related ...*CarStateProtoSetter) error

func (*RSInfo) InsertEvent

func (rsInfo0 *RSInfo) InsertEvent(ctx context.Context, exec bob.Executor, related *EventSetter) error

func (*RSInfo) InsertMSGStateProtos

func (rsInfo0 *RSInfo) InsertMSGStateProtos(ctx context.Context, exec bob.Executor, related ...*MSGStateProtoSetter) error

func (*RSInfo) InsertRaceStateProtos

func (rsInfo0 *RSInfo) InsertRaceStateProtos(ctx context.Context, exec bob.Executor, related ...*RaceStateProtoSetter) error

func (*RSInfo) InsertSpeedmapProtos

func (rsInfo0 *RSInfo) InsertSpeedmapProtos(ctx context.Context, exec bob.Executor, related ...*SpeedmapProtoSetter) error

func (*RSInfo) LoadCarStateProtos

func (o *RSInfo) LoadCarStateProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCarStateProtos loads the rsInfo's CarStateProtos into the .R struct

func (*RSInfo) LoadEvent

func (o *RSInfo) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the rsInfo's Event into the .R struct

func (*RSInfo) LoadMSGStateProtos

func (o *RSInfo) LoadMSGStateProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadMSGStateProtos loads the rsInfo's MSGStateProtos into the .R struct

func (*RSInfo) LoadRaceStateProtos

func (o *RSInfo) LoadRaceStateProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRaceStateProtos loads the rsInfo's RaceStateProtos into the .R struct

func (*RSInfo) LoadSpeedmapProtos

func (o *RSInfo) LoadSpeedmapProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadSpeedmapProtos loads the rsInfo's SpeedmapProtos into the .R struct

func (*RSInfo) MSGStateProtos

func (o *RSInfo) MSGStateProtos(mods ...bob.Mod[*dialect.SelectQuery]) MSGStateProtosQuery

MSGStateProtos starts a query for related objects on msg_state_proto

func (*RSInfo) Preload

func (o *RSInfo) Preload(name string, retrieved any) error

func (*RSInfo) RaceStateProtos

func (o *RSInfo) RaceStateProtos(mods ...bob.Mod[*dialect.SelectQuery]) RaceStateProtosQuery

RaceStateProtos starts a query for related objects on race_state_proto

func (*RSInfo) Reload

func (o *RSInfo) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the RSInfo using the executor

func (*RSInfo) SpeedmapProtos

func (o *RSInfo) SpeedmapProtos(mods ...bob.Mod[*dialect.SelectQuery]) SpeedmapProtosQuery

SpeedmapProtos starts a query for related objects on speedmap_proto

func (*RSInfo) Update

func (o *RSInfo) Update(ctx context.Context, exec bob.Executor, s *RSInfoSetter) error

Update uses an executor to update the RSInfo

type RSInfoSetter

type RSInfoSetter struct {
	ID            omit.Val[int32]           `db:"id,pk" `
	EventID       omit.Val[int32]           `db:"event_id" `
	RecordStamp   omit.Val[time.Time]       `db:"record_stamp" `
	SessionTime   omit.Val[decimal.Decimal] `db:"session_time" `
	TimeOfDay     omit.Val[int32]           `db:"time_of_day" `
	AirTemp       omit.Val[decimal.Decimal] `db:"air_temp" `
	TrackTemp     omit.Val[decimal.Decimal] `db:"track_temp" `
	TrackWetness  omit.Val[int32]           `db:"track_wetness" `
	Precipitation omit.Val[decimal.Decimal] `db:"precipitation" `
	SessionNum    omit.Val[int32]           `db:"session_num" `
}

RSInfoSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*RSInfoSetter) Apply

func (s *RSInfoSetter) Apply(q *dialect.InsertQuery)

func (RSInfoSetter) Expressions

func (s RSInfoSetter) Expressions(prefix ...string) []bob.Expression

func (RSInfoSetter) Overwrite

func (s RSInfoSetter) Overwrite(t *RSInfo)

func (RSInfoSetter) SetColumns

func (s RSInfoSetter) SetColumns() []string

func (RSInfoSetter) UpdateMod

func (s RSInfoSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type RSInfoSlice

type RSInfoSlice []*RSInfo

RSInfoSlice is an alias for a slice of pointers to RSInfo. This should almost always be used instead of []*RSInfo.

func (RSInfoSlice) AfterQueryHook

func (o RSInfoSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after RSInfoSlice is retrieved from the database

func (RSInfoSlice) CarStateProtos

func (os RSInfoSlice) CarStateProtos(mods ...bob.Mod[*dialect.SelectQuery]) CarStateProtosQuery

func (RSInfoSlice) DeleteAll

func (o RSInfoSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (RSInfoSlice) DeleteMod

func (o RSInfoSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (RSInfoSlice) Event

func (os RSInfoSlice) Event(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

func (RSInfoSlice) LoadCarStateProtos

func (os RSInfoSlice) LoadCarStateProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadCarStateProtos loads the rsInfo's CarStateProtos into the .R struct

func (RSInfoSlice) LoadEvent

func (os RSInfoSlice) LoadEvent(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvent loads the rsInfo's Event into the .R struct

func (RSInfoSlice) LoadMSGStateProtos

func (os RSInfoSlice) LoadMSGStateProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadMSGStateProtos loads the rsInfo's MSGStateProtos into the .R struct

func (RSInfoSlice) LoadRaceStateProtos

func (os RSInfoSlice) LoadRaceStateProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRaceStateProtos loads the rsInfo's RaceStateProtos into the .R struct

func (RSInfoSlice) LoadSpeedmapProtos

func (os RSInfoSlice) LoadSpeedmapProtos(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadSpeedmapProtos loads the rsInfo's SpeedmapProtos into the .R struct

func (RSInfoSlice) MSGStateProtos

func (os RSInfoSlice) MSGStateProtos(mods ...bob.Mod[*dialect.SelectQuery]) MSGStateProtosQuery

func (RSInfoSlice) RaceStateProtos

func (os RSInfoSlice) RaceStateProtos(mods ...bob.Mod[*dialect.SelectQuery]) RaceStateProtosQuery

func (RSInfoSlice) ReloadAll

func (o RSInfoSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (RSInfoSlice) SpeedmapProtos

func (os RSInfoSlice) SpeedmapProtos(mods ...bob.Mod[*dialect.SelectQuery]) SpeedmapProtosQuery

func (RSInfoSlice) UpdateAll

func (o RSInfoSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals RSInfoSetter) error

func (RSInfoSlice) UpdateMod

func (o RSInfoSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type RSInfosQuery

type RSInfosQuery = *psql.ViewQuery[*RSInfo, RSInfoSlice]

RSInfosQuery is a query on the rs_info table

type RaceStateProto

type RaceStateProto struct {
	ID        int32  `db:"id,pk" `
	RSInfoID  int32  `db:"rs_info_id" `
	Protodata []byte `db:"protodata" `

	R raceStateProtoR `db:"-" `
}

RaceStateProto is an object representing the database table.

func FindRaceStateProto

func FindRaceStateProto(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*RaceStateProto, error)

FindRaceStateProto retrieves a single record by primary key If cols is empty Find will return all columns.

func (*RaceStateProto) AfterQueryHook

func (o *RaceStateProto) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after RaceStateProto is retrieved from the database

func (*RaceStateProto) AttachRSInfo

func (raceStateProto0 *RaceStateProto) AttachRSInfo(ctx context.Context, exec bob.Executor, rsInfo1 *RSInfo) error

func (*RaceStateProto) Delete

func (o *RaceStateProto) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single RaceStateProto record with an executor

func (*RaceStateProto) InsertRSInfo

func (raceStateProto0 *RaceStateProto) InsertRSInfo(ctx context.Context, exec bob.Executor, related *RSInfoSetter) error

func (*RaceStateProto) LoadRSInfo

func (o *RaceStateProto) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the raceStateProto's RSInfo into the .R struct

func (*RaceStateProto) Preload

func (o *RaceStateProto) Preload(name string, retrieved any) error

func (*RaceStateProto) RSInfo

func (o *RaceStateProto) RSInfo(mods ...bob.Mod[*dialect.SelectQuery]) RSInfosQuery

RSInfo starts a query for related objects on rs_info

func (*RaceStateProto) Reload

func (o *RaceStateProto) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the RaceStateProto using the executor

func (*RaceStateProto) Update

Update uses an executor to update the RaceStateProto

type RaceStateProtoSetter

type RaceStateProtoSetter struct {
	ID        omit.Val[int32]  `db:"id,pk" `
	RSInfoID  omit.Val[int32]  `db:"rs_info_id" `
	Protodata omit.Val[[]byte] `db:"protodata" `
}

RaceStateProtoSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*RaceStateProtoSetter) Apply

func (RaceStateProtoSetter) Expressions

func (s RaceStateProtoSetter) Expressions(prefix ...string) []bob.Expression

func (RaceStateProtoSetter) Overwrite

func (s RaceStateProtoSetter) Overwrite(t *RaceStateProto)

func (RaceStateProtoSetter) SetColumns

func (s RaceStateProtoSetter) SetColumns() []string

func (RaceStateProtoSetter) UpdateMod

type RaceStateProtoSlice

type RaceStateProtoSlice []*RaceStateProto

RaceStateProtoSlice is an alias for a slice of pointers to RaceStateProto. This should almost always be used instead of []*RaceStateProto.

func (RaceStateProtoSlice) AfterQueryHook

func (o RaceStateProtoSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after RaceStateProtoSlice is retrieved from the database

func (RaceStateProtoSlice) DeleteAll

func (o RaceStateProtoSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (RaceStateProtoSlice) DeleteMod

func (o RaceStateProtoSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (RaceStateProtoSlice) LoadRSInfo

func (os RaceStateProtoSlice) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the raceStateProto's RSInfo into the .R struct

func (RaceStateProtoSlice) RSInfo

func (RaceStateProtoSlice) ReloadAll

func (o RaceStateProtoSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (RaceStateProtoSlice) UpdateAll

func (RaceStateProtoSlice) UpdateMod

func (o RaceStateProtoSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type RaceStateProtosQuery

type RaceStateProtosQuery = *psql.ViewQuery[*RaceStateProto, RaceStateProtoSlice]

RaceStateProtosQuery is a query on the race_state_proto table

type SchemaMigration

type SchemaMigration struct {
	Version int64 `db:"version,pk" `
	Dirty   bool  `db:"dirty" `
}

SchemaMigration is an object representing the database table.

func FindSchemaMigration

func FindSchemaMigration(ctx context.Context, exec bob.Executor, VersionPK int64, cols ...string) (*SchemaMigration, error)

FindSchemaMigration retrieves a single record by primary key If cols is empty Find will return all columns.

func (*SchemaMigration) AfterQueryHook

func (o *SchemaMigration) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after SchemaMigration is retrieved from the database

func (*SchemaMigration) Delete

func (o *SchemaMigration) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single SchemaMigration record with an executor

func (*SchemaMigration) Reload

func (o *SchemaMigration) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the SchemaMigration using the executor

func (*SchemaMigration) Update

Update uses an executor to update the SchemaMigration

type SchemaMigrationSetter

type SchemaMigrationSetter struct {
	Version omit.Val[int64] `db:"version,pk" `
	Dirty   omit.Val[bool]  `db:"dirty" `
}

SchemaMigrationSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*SchemaMigrationSetter) Apply

func (SchemaMigrationSetter) Expressions

func (s SchemaMigrationSetter) Expressions(prefix ...string) []bob.Expression

func (SchemaMigrationSetter) Overwrite

func (s SchemaMigrationSetter) Overwrite(t *SchemaMigration)

func (SchemaMigrationSetter) SetColumns

func (s SchemaMigrationSetter) SetColumns() []string

func (SchemaMigrationSetter) UpdateMod

type SchemaMigrationSlice

type SchemaMigrationSlice []*SchemaMigration

SchemaMigrationSlice is an alias for a slice of pointers to SchemaMigration. This should almost always be used instead of []*SchemaMigration.

func (SchemaMigrationSlice) AfterQueryHook

func (o SchemaMigrationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after SchemaMigrationSlice is retrieved from the database

func (SchemaMigrationSlice) DeleteAll

func (o SchemaMigrationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (SchemaMigrationSlice) DeleteMod

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (SchemaMigrationSlice) ReloadAll

func (o SchemaMigrationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (SchemaMigrationSlice) UpdateAll

func (SchemaMigrationSlice) UpdateMod

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type SchemaMigrationsQuery

type SchemaMigrationsQuery = *psql.ViewQuery[*SchemaMigration, SchemaMigrationSlice]

SchemaMigrationsQuery is a query on the schema_migrations table

type SpeedmapProto

type SpeedmapProto struct {
	ID        int32  `db:"id,pk" `
	RSInfoID  int32  `db:"rs_info_id" `
	Protodata []byte `db:"protodata" `

	R speedmapProtoR `db:"-" `
}

SpeedmapProto is an object representing the database table.

func FindSpeedmapProto

func FindSpeedmapProto(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*SpeedmapProto, error)

FindSpeedmapProto retrieves a single record by primary key If cols is empty Find will return all columns.

func (*SpeedmapProto) AfterQueryHook

func (o *SpeedmapProto) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after SpeedmapProto is retrieved from the database

func (*SpeedmapProto) AttachRSInfo

func (speedmapProto0 *SpeedmapProto) AttachRSInfo(ctx context.Context, exec bob.Executor, rsInfo1 *RSInfo) error

func (*SpeedmapProto) Delete

func (o *SpeedmapProto) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single SpeedmapProto record with an executor

func (*SpeedmapProto) InsertRSInfo

func (speedmapProto0 *SpeedmapProto) InsertRSInfo(ctx context.Context, exec bob.Executor, related *RSInfoSetter) error

func (*SpeedmapProto) LoadRSInfo

func (o *SpeedmapProto) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the speedmapProto's RSInfo into the .R struct

func (*SpeedmapProto) Preload

func (o *SpeedmapProto) Preload(name string, retrieved any) error

func (*SpeedmapProto) RSInfo

func (o *SpeedmapProto) RSInfo(mods ...bob.Mod[*dialect.SelectQuery]) RSInfosQuery

RSInfo starts a query for related objects on rs_info

func (*SpeedmapProto) Reload

func (o *SpeedmapProto) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the SpeedmapProto using the executor

func (*SpeedmapProto) Update

Update uses an executor to update the SpeedmapProto

type SpeedmapProtoSetter

type SpeedmapProtoSetter struct {
	ID        omit.Val[int32]  `db:"id,pk" `
	RSInfoID  omit.Val[int32]  `db:"rs_info_id" `
	Protodata omit.Val[[]byte] `db:"protodata" `
}

SpeedmapProtoSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*SpeedmapProtoSetter) Apply

func (SpeedmapProtoSetter) Expressions

func (s SpeedmapProtoSetter) Expressions(prefix ...string) []bob.Expression

func (SpeedmapProtoSetter) Overwrite

func (s SpeedmapProtoSetter) Overwrite(t *SpeedmapProto)

func (SpeedmapProtoSetter) SetColumns

func (s SpeedmapProtoSetter) SetColumns() []string

func (SpeedmapProtoSetter) UpdateMod

func (s SpeedmapProtoSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type SpeedmapProtoSlice

type SpeedmapProtoSlice []*SpeedmapProto

SpeedmapProtoSlice is an alias for a slice of pointers to SpeedmapProto. This should almost always be used instead of []*SpeedmapProto.

func (SpeedmapProtoSlice) AfterQueryHook

func (o SpeedmapProtoSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after SpeedmapProtoSlice is retrieved from the database

func (SpeedmapProtoSlice) DeleteAll

func (o SpeedmapProtoSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (SpeedmapProtoSlice) DeleteMod

func (o SpeedmapProtoSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (SpeedmapProtoSlice) LoadRSInfo

func (os SpeedmapProtoSlice) LoadRSInfo(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadRSInfo loads the speedmapProto's RSInfo into the .R struct

func (SpeedmapProtoSlice) RSInfo

func (SpeedmapProtoSlice) ReloadAll

func (o SpeedmapProtoSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (SpeedmapProtoSlice) UpdateAll

func (SpeedmapProtoSlice) UpdateMod

func (o SpeedmapProtoSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type SpeedmapProtosQuery

type SpeedmapProtosQuery = *psql.ViewQuery[*SpeedmapProto, SpeedmapProtoSlice]

SpeedmapProtosQuery is a query on the speedmap_proto table

type Tenant

type Tenant struct {
	ID int32 `db:"id,pk" `
	// for external use
	ExternalID uuid.UUID `db:"external_id" `
	Name       string    `db:"name" `
	APIKey     string    `db:"api_key" `
	Active     bool      `db:"active" `

	R tenantR `db:"-" `
}

Tenant is an object representing the database table.

func FindTenant

func FindTenant(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*Tenant, error)

FindTenant retrieves a single record by primary key If cols is empty Find will return all columns.

func (*Tenant) AfterQueryHook

func (o *Tenant) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after Tenant is retrieved from the database

func (*Tenant) AttachEvents

func (tenant0 *Tenant) AttachEvents(ctx context.Context, exec bob.Executor, related ...*Event) error

func (*Tenant) Delete

func (o *Tenant) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single Tenant record with an executor

func (*Tenant) Events

func (o *Tenant) Events(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Events starts a query for related objects on event

func (*Tenant) InsertEvents

func (tenant0 *Tenant) InsertEvents(ctx context.Context, exec bob.Executor, related ...*EventSetter) error

func (*Tenant) LoadEvents

func (o *Tenant) LoadEvents(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvents loads the tenant's Events into the .R struct

func (*Tenant) Preload

func (o *Tenant) Preload(name string, retrieved any) error

func (*Tenant) Reload

func (o *Tenant) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the Tenant using the executor

func (*Tenant) Update

func (o *Tenant) Update(ctx context.Context, exec bob.Executor, s *TenantSetter) error

Update uses an executor to update the Tenant

type TenantSetter

type TenantSetter struct {
	ID         omit.Val[int32]     `db:"id,pk" `
	ExternalID omit.Val[uuid.UUID] `db:"external_id" `
	Name       omit.Val[string]    `db:"name" `
	APIKey     omit.Val[string]    `db:"api_key" `
	Active     omit.Val[bool]      `db:"active" `
}

TenantSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*TenantSetter) Apply

func (s *TenantSetter) Apply(q *dialect.InsertQuery)

func (TenantSetter) Expressions

func (s TenantSetter) Expressions(prefix ...string) []bob.Expression

func (TenantSetter) Overwrite

func (s TenantSetter) Overwrite(t *Tenant)

func (TenantSetter) SetColumns

func (s TenantSetter) SetColumns() []string

func (TenantSetter) UpdateMod

func (s TenantSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type TenantSlice

type TenantSlice []*Tenant

TenantSlice is an alias for a slice of pointers to Tenant. This should almost always be used instead of []*Tenant.

func (TenantSlice) AfterQueryHook

func (o TenantSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after TenantSlice is retrieved from the database

func (TenantSlice) DeleteAll

func (o TenantSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (TenantSlice) DeleteMod

func (o TenantSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (TenantSlice) Events

func (os TenantSlice) Events(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

func (TenantSlice) LoadEvents

func (os TenantSlice) LoadEvents(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvents loads the tenant's Events into the .R struct

func (TenantSlice) ReloadAll

func (o TenantSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (TenantSlice) UpdateAll

func (o TenantSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals TenantSetter) error

func (TenantSlice) UpdateMod

func (o TenantSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type TenantsQuery

type TenantsQuery = *psql.ViewQuery[*Tenant, TenantSlice]

TenantsQuery is a query on the tenant table

type Track

type Track struct {
	ID            int32               `db:"id,pk" `
	Name          string              `db:"name" `
	ShortName     string              `db:"short_name" `
	Config        string              `db:"config" `
	TrackLength   decimal.Decimal     `db:"track_length" `
	Sectors       mytypes.SectorSlice `db:"sectors" `
	PitSpeed      decimal.Decimal     `db:"pit_speed" `
	PitEntry      decimal.Decimal     `db:"pit_entry" `
	PitExit       decimal.Decimal     `db:"pit_exit" `
	PitLaneLength decimal.Decimal     `db:"pit_lane_length" `

	R trackR `db:"-" `
}

Track is an object representing the database table.

func FindTrack

func FindTrack(ctx context.Context, exec bob.Executor, IDPK int32, cols ...string) (*Track, error)

FindTrack retrieves a single record by primary key If cols is empty Find will return all columns.

func (*Track) AfterQueryHook

func (o *Track) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after Track is retrieved from the database

func (*Track) AttachEvents

func (track0 *Track) AttachEvents(ctx context.Context, exec bob.Executor, related ...*Event) error

func (*Track) Delete

func (o *Track) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single Track record with an executor

func (*Track) Events

func (o *Track) Events(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

Events starts a query for related objects on event

func (*Track) InsertEvents

func (track0 *Track) InsertEvents(ctx context.Context, exec bob.Executor, related ...*EventSetter) error

func (*Track) LoadEvents

func (o *Track) LoadEvents(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvents loads the track's Events into the .R struct

func (*Track) Preload

func (o *Track) Preload(name string, retrieved any) error

func (*Track) Reload

func (o *Track) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the Track using the executor

func (*Track) Update

func (o *Track) Update(ctx context.Context, exec bob.Executor, s *TrackSetter) error

Update uses an executor to update the Track

type TrackSetter

type TrackSetter struct {
	ID            omit.Val[int32]               `db:"id,pk" `
	Name          omit.Val[string]              `db:"name" `
	ShortName     omit.Val[string]              `db:"short_name" `
	Config        omit.Val[string]              `db:"config" `
	TrackLength   omit.Val[decimal.Decimal]     `db:"track_length" `
	Sectors       omit.Val[mytypes.SectorSlice] `db:"sectors" `
	PitSpeed      omit.Val[decimal.Decimal]     `db:"pit_speed" `
	PitEntry      omit.Val[decimal.Decimal]     `db:"pit_entry" `
	PitExit       omit.Val[decimal.Decimal]     `db:"pit_exit" `
	PitLaneLength omit.Val[decimal.Decimal]     `db:"pit_lane_length" `
}

TrackSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (*TrackSetter) Apply

func (s *TrackSetter) Apply(q *dialect.InsertQuery)

func (TrackSetter) Expressions

func (s TrackSetter) Expressions(prefix ...string) []bob.Expression

func (TrackSetter) Overwrite

func (s TrackSetter) Overwrite(t *Track)

func (TrackSetter) SetColumns

func (s TrackSetter) SetColumns() []string

func (TrackSetter) UpdateMod

func (s TrackSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery]

type TrackSlice

type TrackSlice []*Track

TrackSlice is an alias for a slice of pointers to Track. This should almost always be used instead of []*Track.

func (TrackSlice) AfterQueryHook

func (o TrackSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error

AfterQueryHook is called after TrackSlice is retrieved from the database

func (TrackSlice) DeleteAll

func (o TrackSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (TrackSlice) DeleteMod

func (o TrackSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery]

DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"

func (TrackSlice) Events

func (os TrackSlice) Events(mods ...bob.Mod[*dialect.SelectQuery]) EventsQuery

func (TrackSlice) LoadEvents

func (os TrackSlice) LoadEvents(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadEvents loads the track's Events into the .R struct

func (TrackSlice) ReloadAll

func (o TrackSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (TrackSlice) UpdateAll

func (o TrackSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals TrackSetter) error

func (TrackSlice) UpdateMod

func (o TrackSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery]

UpdateMod modifies an update query with "WHERE primary_key IN (o...)"

type TracksQuery

type TracksQuery = *psql.ViewQuery[*Track, TrackSlice]

TracksQuery is a query on the track table

Jump to

Keyboard shortcuts

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