models

package
v0.0.0-...-d4113f3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeviceKeyColumns = struct {
	ID       string
	Hash     string
	Password string
	Time     string
}{
	ID:       "id",
	Hash:     "hash",
	Password: "password",
	Time:     "time",
}
View Source
var DeviceKeyRels = struct {
}{}

DeviceKeyRels is where relationship names are stored.

View Source
var DeviceKeyWhere = struct {
	ID       whereHelperint
	Hash     whereHelperstring
	Password whereHelperstring
	Time     whereHelperint
}{
	ID:       whereHelperint{/* contains filtered or unexported fields */},
	Hash:     whereHelperstring{/* contains filtered or unexported fields */},
	Password: whereHelperstring{/* contains filtered or unexported fields */},
	Time:     whereHelperint{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var InfectedEncounterColumns = struct {
	ID                   string
	RandomPart           string
	PossibleInfectedHash string
	Rssi                 string
	Hits                 string
	Time                 string
	Duration             string
}{
	ID:                   "id",
	RandomPart:           "random_part",
	PossibleInfectedHash: "possible_infected_hash",
	Rssi:                 "rssi",
	Hits:                 "hits",
	Time:                 "time",
	Duration:             "duration",
}
View Source
var InfectedEncounterRels = struct {
}{}

InfectedEncounterRels is where relationship names are stored.

View Source
var InfectedEncounterWhere = struct {
	ID                   whereHelperint
	RandomPart           whereHelperstring
	PossibleInfectedHash whereHelperstring
	Rssi                 whereHelperint
	Hits                 whereHelperint
	Time                 whereHelperint
	Duration             whereHelperint
}{
	ID:                   whereHelperint{/* contains filtered or unexported fields */},
	RandomPart:           whereHelperstring{/* contains filtered or unexported fields */},
	PossibleInfectedHash: whereHelperstring{/* contains filtered or unexported fields */},
	Rssi:                 whereHelperint{/* contains filtered or unexported fields */},
	Hits:                 whereHelperint{/* contains filtered or unexported fields */},
	Time:                 whereHelperint{/* contains filtered or unexported fields */},
	Duration:             whereHelperint{/* contains filtered or unexported fields */},
}
View Source
var InfectionCreateKeyColumns = struct {
	ID       string
	Key      string
	Password string
	Time     string
}{
	ID:       "id",
	Key:      "key",
	Password: "password",
	Time:     "time",
}
View Source
var InfectionCreateKeyRels = struct {
}{}

InfectionCreateKeyRels is where relationship names are stored.

View Source
var InfectionCreateKeyWhere = struct {
	ID       whereHelperint
	Key      whereHelperstring
	Password whereHelperstring
	Time     whereHelperint
}{
	ID:       whereHelperint{/* contains filtered or unexported fields */},
	Key:      whereHelperstring{/* contains filtered or unexported fields */},
	Password: whereHelperstring{/* contains filtered or unexported fields */},
	Time:     whereHelperint{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	DeviceKey          string
	InfectedEncounter  string
	InfectionCreateKey string
}{
	DeviceKey:          "device_key",
	InfectedEncounter:  "infected_encounter",
	InfectionCreateKey: "infection_create_key",
}

Functions

func AddDeviceKeyHook

func AddDeviceKeyHook(hookPoint boil.HookPoint, deviceKeyHook DeviceKeyHook)

AddDeviceKeyHook registers your hook function for all future operations.

func AddInfectedEncounterHook

func AddInfectedEncounterHook(hookPoint boil.HookPoint, infectedEncounterHook InfectedEncounterHook)

AddInfectedEncounterHook registers your hook function for all future operations.

func AddInfectionCreateKeyHook

func AddInfectionCreateKeyHook(hookPoint boil.HookPoint, infectionCreateKeyHook InfectionCreateKeyHook)

AddInfectionCreateKeyHook registers your hook function for all future operations.

func DeviceKeyExists

func DeviceKeyExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

DeviceKeyExists checks if the DeviceKey row exists.

func DeviceKeys

func DeviceKeys(mods ...qm.QueryMod) deviceKeyQuery

DeviceKeys retrieves all the records using an executor.

func InfectedEncounterExists

func InfectedEncounterExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

InfectedEncounterExists checks if the InfectedEncounter row exists.

func InfectedEncounters

func InfectedEncounters(mods ...qm.QueryMod) infectedEncounterQuery

InfectedEncounters retrieves all the records using an executor.

func InfectionCreateKeyExists

func InfectionCreateKeyExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

InfectionCreateKeyExists checks if the InfectionCreateKey row exists.

func InfectionCreateKeys

func InfectionCreateKeys(mods ...qm.QueryMod) infectionCreateKeyQuery

InfectionCreateKeys retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

Types

type DeviceKey

type DeviceKey struct {
	ID       int    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Hash     string `boil:"hash" json:"hash" toml:"hash" yaml:"hash"`
	Password string `boil:"password" json:"password" toml:"password" yaml:"password"`
	Time     int    `boil:"time" json:"time" toml:"time" yaml:"time"`

	R *deviceKeyR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L deviceKeyL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DeviceKey is an object representing the database table.

func FindDeviceKey

func FindDeviceKey(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*DeviceKey, error)

FindDeviceKey retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*DeviceKey) Delete

func (o *DeviceKey) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single DeviceKey record with an executor. Delete will match against the primary key column to find the record to delete.

func (*DeviceKey) Insert

func (o *DeviceKey) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*DeviceKey) Reload

func (o *DeviceKey) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*DeviceKey) Update

func (o *DeviceKey) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the DeviceKey. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*DeviceKey) Upsert

func (o *DeviceKey) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type DeviceKeyHook

type DeviceKeyHook func(context.Context, boil.ContextExecutor, *DeviceKey) error

DeviceKeyHook is the signature for custom DeviceKey hook methods

type DeviceKeySlice

type DeviceKeySlice []*DeviceKey

DeviceKeySlice is an alias for a slice of pointers to DeviceKey. This should generally be used opposed to []DeviceKey.

func (DeviceKeySlice) DeleteAll

func (o DeviceKeySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*DeviceKeySlice) ReloadAll

func (o *DeviceKeySlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (DeviceKeySlice) UpdateAll

func (o DeviceKeySlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type InfectedEncounter

type InfectedEncounter struct {
	ID                   int    `boil:"id" json:"id" toml:"id" yaml:"id"`
	RandomPart           string `boil:"random_part" json:"random_part" toml:"random_part" yaml:"random_part"`
	PossibleInfectedHash string `boil:"possible_infected_hash" json:"possible_infected_hash" toml:"possible_infected_hash" yaml:"possible_infected_hash"`
	Rssi                 int    `boil:"rssi" json:"rssi" toml:"rssi" yaml:"rssi"`
	Hits                 int    `boil:"hits" json:"hits" toml:"hits" yaml:"hits"`
	Time                 int    `boil:"time" json:"time" toml:"time" yaml:"time"`
	Duration             int    `boil:"duration" json:"duration" toml:"duration" yaml:"duration"`

	R *infectedEncounterR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L infectedEncounterL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

InfectedEncounter is an object representing the database table.

func FindInfectedEncounter

func FindInfectedEncounter(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*InfectedEncounter, error)

FindInfectedEncounter retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*InfectedEncounter) Delete

Delete deletes a single InfectedEncounter record with an executor. Delete will match against the primary key column to find the record to delete.

func (*InfectedEncounter) Insert

func (o *InfectedEncounter) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*InfectedEncounter) Reload

Reload refetches the object from the database using the primary keys with an executor.

func (*InfectedEncounter) Update

func (o *InfectedEncounter) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the InfectedEncounter. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*InfectedEncounter) Upsert

func (o *InfectedEncounter) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type InfectedEncounterHook

type InfectedEncounterHook func(context.Context, boil.ContextExecutor, *InfectedEncounter) error

InfectedEncounterHook is the signature for custom InfectedEncounter hook methods

type InfectedEncounterSlice

type InfectedEncounterSlice []*InfectedEncounter

InfectedEncounterSlice is an alias for a slice of pointers to InfectedEncounter. This should generally be used opposed to []InfectedEncounter.

func (InfectedEncounterSlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (*InfectedEncounterSlice) ReloadAll

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (InfectedEncounterSlice) UpdateAll

func (o InfectedEncounterSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type InfectionCreateKey

type InfectionCreateKey struct {
	ID       int    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Key      string `boil:"key" json:"key" toml:"key" yaml:"key"`
	Password string `boil:"password" json:"password" toml:"password" yaml:"password"`
	Time     int    `boil:"time" json:"time" toml:"time" yaml:"time"`

	R *infectionCreateKeyR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L infectionCreateKeyL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

InfectionCreateKey is an object representing the database table.

func FindInfectionCreateKey

func FindInfectionCreateKey(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*InfectionCreateKey, error)

FindInfectionCreateKey retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*InfectionCreateKey) Delete

Delete deletes a single InfectionCreateKey record with an executor. Delete will match against the primary key column to find the record to delete.

func (*InfectionCreateKey) Insert

func (o *InfectionCreateKey) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*InfectionCreateKey) Reload

Reload refetches the object from the database using the primary keys with an executor.

func (*InfectionCreateKey) Update

func (o *InfectionCreateKey) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the InfectionCreateKey. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*InfectionCreateKey) Upsert

func (o *InfectionCreateKey) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type InfectionCreateKeyHook

type InfectionCreateKeyHook func(context.Context, boil.ContextExecutor, *InfectionCreateKey) error

InfectionCreateKeyHook is the signature for custom InfectionCreateKey hook methods

type InfectionCreateKeySlice

type InfectionCreateKeySlice []*InfectionCreateKey

InfectionCreateKeySlice is an alias for a slice of pointers to InfectionCreateKey. This should generally be used opposed to []InfectionCreateKey.

func (InfectionCreateKeySlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (*InfectionCreateKeySlice) ReloadAll

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (InfectionCreateKeySlice) UpdateAll

func (o InfectionCreateKeySlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

Jump to

Keyboard shortcuts

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