models

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AftermarketDeviceColumns = struct {
	ID             string
	Address        string
	Owner          string
	Serial         string
	Imei           string
	MintedAt       string
	VehicleID      string
	Beneficiary    string
	ManufacturerID string
	ClaimedAt      string
	DevEui         string
}{
	ID:             "id",
	Address:        "address",
	Owner:          "owner",
	Serial:         "serial",
	Imei:           "imei",
	MintedAt:       "minted_at",
	VehicleID:      "vehicle_id",
	Beneficiary:    "beneficiary",
	ManufacturerID: "manufacturer_id",
	ClaimedAt:      "claimed_at",
	DevEui:         "dev_eui",
}
View Source
var AftermarketDeviceRels = struct {
	Manufacturer            string
	Vehicle                 string
	AftermarketTokenRewards string
}{
	Manufacturer:            "Manufacturer",
	Vehicle:                 "Vehicle",
	AftermarketTokenRewards: "AftermarketTokenRewards",
}

AftermarketDeviceRels is where relationship names are stored.

View Source
var AftermarketDeviceTableColumns = struct {
	ID             string
	Address        string
	Owner          string
	Serial         string
	Imei           string
	MintedAt       string
	VehicleID      string
	Beneficiary    string
	ManufacturerID string
	ClaimedAt      string
	DevEui         string
}{
	ID:             "aftermarket_devices.id",
	Address:        "aftermarket_devices.address",
	Owner:          "aftermarket_devices.owner",
	Serial:         "aftermarket_devices.serial",
	Imei:           "aftermarket_devices.imei",
	MintedAt:       "aftermarket_devices.minted_at",
	VehicleID:      "aftermarket_devices.vehicle_id",
	Beneficiary:    "aftermarket_devices.beneficiary",
	ManufacturerID: "aftermarket_devices.manufacturer_id",
	ClaimedAt:      "aftermarket_devices.claimed_at",
	DevEui:         "aftermarket_devices.dev_eui",
}
View Source
var AftermarketDeviceWhere = struct {
	ID             whereHelperint
	Address        whereHelper__byte
	Owner          whereHelper__byte
	Serial         whereHelpernull_String
	Imei           whereHelpernull_String
	MintedAt       whereHelpertime_Time
	VehicleID      whereHelpernull_Int
	Beneficiary    whereHelper__byte
	ManufacturerID whereHelpernull_Int
	ClaimedAt      whereHelpernull_Time
	DevEui         whereHelpernull_String
}{
	ID:             whereHelperint{/* contains filtered or unexported fields */},
	Address:        whereHelper__byte{/* contains filtered or unexported fields */},
	Owner:          whereHelper__byte{/* contains filtered or unexported fields */},
	Serial:         whereHelpernull_String{/* contains filtered or unexported fields */},
	Imei:           whereHelpernull_String{/* contains filtered or unexported fields */},
	MintedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	VehicleID:      whereHelpernull_Int{/* contains filtered or unexported fields */},
	Beneficiary:    whereHelper__byte{/* contains filtered or unexported fields */},
	ManufacturerID: whereHelpernull_Int{/* contains filtered or unexported fields */},
	ClaimedAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
	DevEui:         whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var DCNColumns = struct {
	Node         string
	OwnerAddress string
	Expiration   string
	Name         string
	VehicleID    string
	MintedAt     string
}{
	Node:         "node",
	OwnerAddress: "owner_address",
	Expiration:   "expiration",
	Name:         "name",
	VehicleID:    "vehicle_id",
	MintedAt:     "minted_at",
}
View Source
var DCNRels = struct {
	Vehicle string
}{
	Vehicle: "Vehicle",
}

DCNRels is where relationship names are stored.

View Source
var DCNTableColumns = struct {
	Node         string
	OwnerAddress string
	Expiration   string
	Name         string
	VehicleID    string
	MintedAt     string
}{
	Node:         "dcns.node",
	OwnerAddress: "dcns.owner_address",
	Expiration:   "dcns.expiration",
	Name:         "dcns.name",
	VehicleID:    "dcns.vehicle_id",
	MintedAt:     "dcns.minted_at",
}
View Source
var DCNWhere = struct {
	Node         whereHelper__byte
	OwnerAddress whereHelper__byte
	Expiration   whereHelpernull_Time
	Name         whereHelpernull_String
	VehicleID    whereHelpernull_Int
	MintedAt     whereHelpertime_Time
}{
	Node:         whereHelper__byte{/* contains filtered or unexported fields */},
	OwnerAddress: whereHelper__byte{/* contains filtered or unexported fields */},
	Expiration:   whereHelpernull_Time{/* contains filtered or unexported fields */},
	Name:         whereHelpernull_String{/* contains filtered or unexported fields */},
	VehicleID:    whereHelpernull_Int{/* contains filtered or unexported fields */},
	MintedAt:     whereHelpertime_Time{/* 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 ManufacturerColumns = struct {
	ID       string
	Name     string
	Owner    string
	MintedAt string
}{
	ID:       "id",
	Name:     "name",
	Owner:    "owner",
	MintedAt: "minted_at",
}
View Source
var ManufacturerRels = struct {
	AftermarketDevices string
	Vehicles           string
}{
	AftermarketDevices: "AftermarketDevices",
	Vehicles:           "Vehicles",
}

ManufacturerRels is where relationship names are stored.

View Source
var ManufacturerTableColumns = struct {
	ID       string
	Name     string
	Owner    string
	MintedAt string
}{
	ID:       "manufacturers.id",
	Name:     "manufacturers.name",
	Owner:    "manufacturers.owner",
	MintedAt: "manufacturers.minted_at",
}
View Source
var ManufacturerWhere = struct {
	ID       whereHelperint
	Name     whereHelperstring
	Owner    whereHelper__byte
	MintedAt whereHelpertime_Time
}{
	ID:       whereHelperint{/* contains filtered or unexported fields */},
	Name:     whereHelperstring{/* contains filtered or unexported fields */},
	Owner:    whereHelper__byte{/* contains filtered or unexported fields */},
	MintedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var PrivilegeColumns = struct {
	TokenID     string
	PrivilegeID string
	UserAddress string
	SetAt       string
	ExpiresAt   string
}{
	TokenID:     "token_id",
	PrivilegeID: "privilege_id",
	UserAddress: "user_address",
	SetAt:       "set_at",
	ExpiresAt:   "expires_at",
}
View Source
var PrivilegeRels = struct {
	Token string
}{
	Token: "Token",
}

PrivilegeRels is where relationship names are stored.

View Source
var PrivilegeTableColumns = struct {
	TokenID     string
	PrivilegeID string
	UserAddress string
	SetAt       string
	ExpiresAt   string
}{
	TokenID:     "privileges.token_id",
	PrivilegeID: "privileges.privilege_id",
	UserAddress: "privileges.user_address",
	SetAt:       "privileges.set_at",
	ExpiresAt:   "privileges.expires_at",
}
View Source
var PrivilegeWhere = struct {
	TokenID     whereHelperint
	PrivilegeID whereHelperint
	UserAddress whereHelper__byte
	SetAt       whereHelpertime_Time
	ExpiresAt   whereHelpertime_Time
}{
	TokenID:     whereHelperint{/* contains filtered or unexported fields */},
	PrivilegeID: whereHelperint{/* contains filtered or unexported fields */},
	UserAddress: whereHelper__byte{/* contains filtered or unexported fields */},
	SetAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	ExpiresAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var RewardColumns = struct {
	IssuanceWeek        string
	VehicleID           string
	ConnectionStreak    string
	StreakEarnings      string
	AftermarketTokenID  string
	AftermarketEarnings string
	SyntheticTokenID    string
	SyntheticEarnings   string
	ReceivedByAddress   string
	EarnedAt            string
}{
	IssuanceWeek:        "issuance_week",
	VehicleID:           "vehicle_id",
	ConnectionStreak:    "connection_streak",
	StreakEarnings:      "streak_earnings",
	AftermarketTokenID:  "aftermarket_token_id",
	AftermarketEarnings: "aftermarket_earnings",
	SyntheticTokenID:    "synthetic_token_id",
	SyntheticEarnings:   "synthetic_earnings",
	ReceivedByAddress:   "received_by_address",
	EarnedAt:            "earned_at",
}
View Source
var RewardRels = struct {
	AftermarketToken string
	SyntheticToken   string
	Vehicle          string
}{
	AftermarketToken: "AftermarketToken",
	SyntheticToken:   "SyntheticToken",
	Vehicle:          "Vehicle",
}

RewardRels is where relationship names are stored.

View Source
var RewardTableColumns = struct {
	IssuanceWeek        string
	VehicleID           string
	ConnectionStreak    string
	StreakEarnings      string
	AftermarketTokenID  string
	AftermarketEarnings string
	SyntheticTokenID    string
	SyntheticEarnings   string
	ReceivedByAddress   string
	EarnedAt            string
}{
	IssuanceWeek:        "rewards.issuance_week",
	VehicleID:           "rewards.vehicle_id",
	ConnectionStreak:    "rewards.connection_streak",
	StreakEarnings:      "rewards.streak_earnings",
	AftermarketTokenID:  "rewards.aftermarket_token_id",
	AftermarketEarnings: "rewards.aftermarket_earnings",
	SyntheticTokenID:    "rewards.synthetic_token_id",
	SyntheticEarnings:   "rewards.synthetic_earnings",
	ReceivedByAddress:   "rewards.received_by_address",
	EarnedAt:            "rewards.earned_at",
}
View Source
var RewardWhere = struct {
	IssuanceWeek        whereHelperint
	VehicleID           whereHelperint
	ConnectionStreak    whereHelpernull_Int
	StreakEarnings      whereHelpertypes_Decimal
	AftermarketTokenID  whereHelpernull_Int
	AftermarketEarnings whereHelpertypes_Decimal
	SyntheticTokenID    whereHelpernull_Int
	SyntheticEarnings   whereHelpertypes_Decimal
	ReceivedByAddress   whereHelpernull_Bytes
	EarnedAt            whereHelpertime_Time
}{
	IssuanceWeek:        whereHelperint{/* contains filtered or unexported fields */},
	VehicleID:           whereHelperint{/* contains filtered or unexported fields */},
	ConnectionStreak:    whereHelpernull_Int{/* contains filtered or unexported fields */},
	StreakEarnings:      whereHelpertypes_Decimal{/* contains filtered or unexported fields */},
	AftermarketTokenID:  whereHelpernull_Int{/* contains filtered or unexported fields */},
	AftermarketEarnings: whereHelpertypes_Decimal{/* contains filtered or unexported fields */},
	SyntheticTokenID:    whereHelpernull_Int{/* contains filtered or unexported fields */},
	SyntheticEarnings:   whereHelpertypes_Decimal{/* contains filtered or unexported fields */},
	ReceivedByAddress:   whereHelpernull_Bytes{/* contains filtered or unexported fields */},
	EarnedAt:            whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var SyntheticDeviceColumns = struct {
	ID            string
	IntegrationID string
	VehicleID     string
	DeviceAddress string
	MintedAt      string
}{
	ID:            "id",
	IntegrationID: "integration_id",
	VehicleID:     "vehicle_id",
	DeviceAddress: "device_address",
	MintedAt:      "minted_at",
}
View Source
var SyntheticDeviceRels = struct {
	Vehicle               string
	SyntheticTokenRewards string
}{
	Vehicle:               "Vehicle",
	SyntheticTokenRewards: "SyntheticTokenRewards",
}

SyntheticDeviceRels is where relationship names are stored.

View Source
var SyntheticDeviceTableColumns = struct {
	ID            string
	IntegrationID string
	VehicleID     string
	DeviceAddress string
	MintedAt      string
}{
	ID:            "synthetic_devices.id",
	IntegrationID: "synthetic_devices.integration_id",
	VehicleID:     "synthetic_devices.vehicle_id",
	DeviceAddress: "synthetic_devices.device_address",
	MintedAt:      "synthetic_devices.minted_at",
}
View Source
var SyntheticDeviceWhere = struct {
	ID            whereHelperint
	IntegrationID whereHelperint
	VehicleID     whereHelperint
	DeviceAddress whereHelper__byte
	MintedAt      whereHelpertime_Time
}{
	ID:            whereHelperint{/* contains filtered or unexported fields */},
	IntegrationID: whereHelperint{/* contains filtered or unexported fields */},
	VehicleID:     whereHelperint{/* contains filtered or unexported fields */},
	DeviceAddress: whereHelper__byte{/* contains filtered or unexported fields */},
	MintedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	AftermarketDevices string
	DCNS               string
	Manufacturers      string
	Privileges         string
	Rewards            string
	SyntheticDevices   string
	Vehicles           string
}{
	AftermarketDevices: "aftermarket_devices",
	DCNS:               "dcns",
	Manufacturers:      "manufacturers",
	Privileges:         "privileges",
	Rewards:            "rewards",
	SyntheticDevices:   "synthetic_devices",
	Vehicles:           "vehicles",
}
View Source
var VehicleColumns = struct {
	ID             string
	OwnerAddress   string
	Make           string
	Model          string
	Year           string
	MintedAt       string
	DefinitionURI  string
	ManufacturerID string
}{
	ID:             "id",
	OwnerAddress:   "owner_address",
	Make:           "make",
	Model:          "model",
	Year:           "year",
	MintedAt:       "minted_at",
	DefinitionURI:  "definition_uri",
	ManufacturerID: "manufacturer_id",
}
View Source
var VehicleRels = struct {
	Manufacturer      string
	AftermarketDevice string
	DCNS              string
	TokenPrivileges   string
	Rewards           string
	SyntheticDevices  string
}{
	Manufacturer:      "Manufacturer",
	AftermarketDevice: "AftermarketDevice",
	DCNS:              "DCNS",
	TokenPrivileges:   "TokenPrivileges",
	Rewards:           "Rewards",
	SyntheticDevices:  "SyntheticDevices",
}

VehicleRels is where relationship names are stored.

View Source
var VehicleTableColumns = struct {
	ID             string
	OwnerAddress   string
	Make           string
	Model          string
	Year           string
	MintedAt       string
	DefinitionURI  string
	ManufacturerID string
}{
	ID:             "vehicles.id",
	OwnerAddress:   "vehicles.owner_address",
	Make:           "vehicles.make",
	Model:          "vehicles.model",
	Year:           "vehicles.year",
	MintedAt:       "vehicles.minted_at",
	DefinitionURI:  "vehicles.definition_uri",
	ManufacturerID: "vehicles.manufacturer_id",
}
View Source
var VehicleWhere = struct {
	ID             whereHelperint
	OwnerAddress   whereHelper__byte
	Make           whereHelpernull_String
	Model          whereHelpernull_String
	Year           whereHelpernull_Int
	MintedAt       whereHelpertime_Time
	DefinitionURI  whereHelpernull_String
	ManufacturerID whereHelpernull_Int
}{
	ID:             whereHelperint{/* contains filtered or unexported fields */},
	OwnerAddress:   whereHelper__byte{/* contains filtered or unexported fields */},
	Make:           whereHelpernull_String{/* contains filtered or unexported fields */},
	Model:          whereHelpernull_String{/* contains filtered or unexported fields */},
	Year:           whereHelpernull_Int{/* contains filtered or unexported fields */},
	MintedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	DefinitionURI:  whereHelpernull_String{/* contains filtered or unexported fields */},
	ManufacturerID: whereHelpernull_Int{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddAftermarketDeviceHook

func AddAftermarketDeviceHook(hookPoint boil.HookPoint, aftermarketDeviceHook AftermarketDeviceHook)

AddAftermarketDeviceHook registers your hook function for all future operations.

func AddDCNHook

func AddDCNHook(hookPoint boil.HookPoint, dcnHook DCNHook)

AddDCNHook registers your hook function for all future operations.

func AddManufacturerHook

func AddManufacturerHook(hookPoint boil.HookPoint, manufacturerHook ManufacturerHook)

AddManufacturerHook registers your hook function for all future operations.

func AddPrivilegeHook

func AddPrivilegeHook(hookPoint boil.HookPoint, privilegeHook PrivilegeHook)

AddPrivilegeHook registers your hook function for all future operations.

func AddRewardHook added in v0.1.5

func AddRewardHook(hookPoint boil.HookPoint, rewardHook RewardHook)

AddRewardHook registers your hook function for all future operations.

func AddSyntheticDeviceHook

func AddSyntheticDeviceHook(hookPoint boil.HookPoint, syntheticDeviceHook SyntheticDeviceHook)

AddSyntheticDeviceHook registers your hook function for all future operations.

func AddVehicleHook

func AddVehicleHook(hookPoint boil.HookPoint, vehicleHook VehicleHook)

AddVehicleHook registers your hook function for all future operations.

func AftermarketDeviceExists

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

AftermarketDeviceExists checks if the AftermarketDevice row exists.

func AftermarketDevices

func AftermarketDevices(mods ...qm.QueryMod) aftermarketDeviceQuery

AftermarketDevices retrieves all the records using an executor.

func DCNExists

func DCNExists(ctx context.Context, exec boil.ContextExecutor, node []byte) (bool, error)

DCNExists checks if the DCN row exists.

func DCNS

func DCNS(mods ...qm.QueryMod) dcnQuery

DCNS retrieves all the records using an executor.

func ManufacturerExists

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

ManufacturerExists checks if the Manufacturer row exists.

func Manufacturers

func Manufacturers(mods ...qm.QueryMod) manufacturerQuery

Manufacturers 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

func PrivilegeExists

func PrivilegeExists(ctx context.Context, exec boil.ContextExecutor, tokenID int, privilegeID int, userAddress []byte) (bool, error)

PrivilegeExists checks if the Privilege row exists.

func Privileges

func Privileges(mods ...qm.QueryMod) privilegeQuery

Privileges retrieves all the records using an executor.

func RewardExists added in v0.1.5

func RewardExists(ctx context.Context, exec boil.ContextExecutor, issuanceWeek int, vehicleID int) (bool, error)

RewardExists checks if the Reward row exists.

func Rewards added in v0.1.5

func Rewards(mods ...qm.QueryMod) rewardQuery

Rewards retrieves all the records using an executor.

func SyntheticDeviceExists

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

SyntheticDeviceExists checks if the SyntheticDevice row exists.

func SyntheticDevices

func SyntheticDevices(mods ...qm.QueryMod) syntheticDeviceQuery

SyntheticDevices retrieves all the records using an executor.

func VehicleExists

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

VehicleExists checks if the Vehicle row exists.

func Vehicles

func Vehicles(mods ...qm.QueryMod) vehicleQuery

Vehicles retrieves all the records using an executor.

Types

type AftermarketDevice

type AftermarketDevice struct {
	ID             int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	Address        []byte      `boil:"address" json:"address" toml:"address" yaml:"address"`
	Owner          []byte      `boil:"owner" json:"owner" toml:"owner" yaml:"owner"`
	Serial         null.String `boil:"serial" json:"serial,omitempty" toml:"serial" yaml:"serial,omitempty"`
	Imei           null.String `boil:"imei" json:"imei,omitempty" toml:"imei" yaml:"imei,omitempty"`
	MintedAt       time.Time   `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`
	VehicleID      null.Int    `boil:"vehicle_id" json:"vehicle_id,omitempty" toml:"vehicle_id" yaml:"vehicle_id,omitempty"`
	Beneficiary    []byte      `boil:"beneficiary" json:"beneficiary" toml:"beneficiary" yaml:"beneficiary"`
	ManufacturerID null.Int    `boil:"manufacturer_id" json:"manufacturer_id,omitempty" toml:"manufacturer_id" yaml:"manufacturer_id,omitempty"`
	ClaimedAt      null.Time   `boil:"claimed_at" json:"claimed_at,omitempty" toml:"claimed_at" yaml:"claimed_at,omitempty"`
	DevEui         null.String `boil:"dev_eui" json:"dev_eui,omitempty" toml:"dev_eui" yaml:"dev_eui,omitempty"`

	R *aftermarketDeviceR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L aftermarketDeviceL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AftermarketDevice is an object representing the database table.

func FindAftermarketDevice

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

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

func (*AftermarketDevice) AddAftermarketTokenRewards added in v0.1.5

func (o *AftermarketDevice) AddAftermarketTokenRewards(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Reward) error

AddAftermarketTokenRewards adds the given related objects to the existing relationships of the aftermarket_device, optionally inserting them as new records. Appends related to o.R.AftermarketTokenRewards. Sets related.R.AftermarketToken appropriately.

func (*AftermarketDevice) AftermarketTokenRewards added in v0.1.5

func (o *AftermarketDevice) AftermarketTokenRewards(mods ...qm.QueryMod) rewardQuery

AftermarketTokenRewards retrieves all the reward's Rewards with an executor via aftermarket_token_id column.

func (*AftermarketDevice) Delete

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

func (*AftermarketDevice) Exists

Exists checks if the AftermarketDevice row exists.

func (*AftermarketDevice) Insert

func (o *AftermarketDevice) 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 (*AftermarketDevice) Manufacturer

func (o *AftermarketDevice) Manufacturer(mods ...qm.QueryMod) manufacturerQuery

Manufacturer pointed to by the foreign key.

func (*AftermarketDevice) Reload

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

func (*AftermarketDevice) RemoveAftermarketTokenRewards added in v0.1.5

func (o *AftermarketDevice) RemoveAftermarketTokenRewards(ctx context.Context, exec boil.ContextExecutor, related ...*Reward) error

RemoveAftermarketTokenRewards relationships from objects passed in. Removes related items from R.AftermarketTokenRewards (uses pointer comparison, removal does not keep order) Sets related.R.AftermarketToken.

func (*AftermarketDevice) RemoveManufacturer

func (o *AftermarketDevice) RemoveManufacturer(ctx context.Context, exec boil.ContextExecutor, related *Manufacturer) error

RemoveManufacturer relationship. Sets o.R.Manufacturer to nil. Removes o from all passed in related items' relationships struct.

func (*AftermarketDevice) RemoveVehicle

func (o *AftermarketDevice) RemoveVehicle(ctx context.Context, exec boil.ContextExecutor, related *Vehicle) error

RemoveVehicle relationship. Sets o.R.Vehicle to nil. Removes o from all passed in related items' relationships struct.

func (*AftermarketDevice) SetAftermarketTokenRewards added in v0.1.5

func (o *AftermarketDevice) SetAftermarketTokenRewards(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Reward) error

SetAftermarketTokenRewards removes all previously related items of the aftermarket_device replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.AftermarketToken's AftermarketTokenRewards accordingly. Replaces o.R.AftermarketTokenRewards with related. Sets related.R.AftermarketToken's AftermarketTokenRewards accordingly.

func (*AftermarketDevice) SetManufacturer

func (o *AftermarketDevice) SetManufacturer(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Manufacturer) error

SetManufacturer of the aftermarketDevice to the related item. Sets o.R.Manufacturer to related. Adds o to related.R.AftermarketDevices.

func (*AftermarketDevice) SetVehicle

func (o *AftermarketDevice) SetVehicle(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetVehicle of the aftermarketDevice to the related item. Sets o.R.Vehicle to related. Adds o to related.R.AftermarketDevice.

func (*AftermarketDevice) Update

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

Update uses an executor to update the AftermarketDevice. 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 (*AftermarketDevice) Upsert

func (o *AftermarketDevice) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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.

func (*AftermarketDevice) Vehicle

func (o *AftermarketDevice) Vehicle(mods ...qm.QueryMod) vehicleQuery

Vehicle pointed to by the foreign key.

type AftermarketDeviceHook

type AftermarketDeviceHook func(context.Context, boil.ContextExecutor, *AftermarketDevice) error

AftermarketDeviceHook is the signature for custom AftermarketDevice hook methods

type AftermarketDeviceSlice

type AftermarketDeviceSlice []*AftermarketDevice

AftermarketDeviceSlice is an alias for a slice of pointers to AftermarketDevice. This should almost always be used instead of []AftermarketDevice.

func (AftermarketDeviceSlice) DeleteAll

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

func (*AftermarketDeviceSlice) ReloadAll

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

func (AftermarketDeviceSlice) UpdateAll

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

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

type DCN

type DCN struct {
	Node         []byte      `boil:"node" json:"node" toml:"node" yaml:"node"`
	OwnerAddress []byte      `boil:"owner_address" json:"owner_address" toml:"owner_address" yaml:"owner_address"`
	Expiration   null.Time   `boil:"expiration" json:"expiration,omitempty" toml:"expiration" yaml:"expiration,omitempty"`
	Name         null.String `boil:"name" json:"name,omitempty" toml:"name" yaml:"name,omitempty"`
	VehicleID    null.Int    `boil:"vehicle_id" json:"vehicle_id,omitempty" toml:"vehicle_id" yaml:"vehicle_id,omitempty"`
	MintedAt     time.Time   `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`

	R *dcnR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L dcnL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DCN is an object representing the database table.

func FindDCN

func FindDCN(ctx context.Context, exec boil.ContextExecutor, node []byte, selectCols ...string) (*DCN, error)

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

func (*DCN) Delete

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

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

func (*DCN) Exists

func (o *DCN) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the DCN row exists.

func (*DCN) Insert

func (o *DCN) 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 (*DCN) Reload

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

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

func (*DCN) RemoveVehicle

func (o *DCN) RemoveVehicle(ctx context.Context, exec boil.ContextExecutor, related *Vehicle) error

RemoveVehicle relationship. Sets o.R.Vehicle to nil. Removes o from all passed in related items' relationships struct.

func (*DCN) SetVehicle

func (o *DCN) SetVehicle(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetVehicle of the dcn to the related item. Sets o.R.Vehicle to related. Adds o to related.R.DCNS.

func (*DCN) Update

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

Update uses an executor to update the DCN. 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 (*DCN) Upsert

func (o *DCN) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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.

func (*DCN) Vehicle

func (o *DCN) Vehicle(mods ...qm.QueryMod) vehicleQuery

Vehicle pointed to by the foreign key.

type DCNHook

type DCNHook func(context.Context, boil.ContextExecutor, *DCN) error

DCNHook is the signature for custom DCN hook methods

type DCNSlice

type DCNSlice []*DCN

DCNSlice is an alias for a slice of pointers to DCN. This should almost always be used instead of []DCN.

func (DCNSlice) DeleteAll

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

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

func (*DCNSlice) ReloadAll

func (o *DCNSlice) 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 (DCNSlice) UpdateAll

func (o DCNSlice) 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.

type Manufacturer

type Manufacturer struct {
	ID       int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name     string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	Owner    []byte    `boil:"owner" json:"owner" toml:"owner" yaml:"owner"`
	MintedAt time.Time `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`

	R *manufacturerR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L manufacturerL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Manufacturer is an object representing the database table.

func FindManufacturer

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

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

func (*Manufacturer) AddAftermarketDevices

func (o *Manufacturer) AddAftermarketDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AftermarketDevice) error

AddAftermarketDevices adds the given related objects to the existing relationships of the manufacturer, optionally inserting them as new records. Appends related to o.R.AftermarketDevices. Sets related.R.Manufacturer appropriately.

func (*Manufacturer) AddVehicles

func (o *Manufacturer) AddVehicles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vehicle) error

AddVehicles adds the given related objects to the existing relationships of the manufacturer, optionally inserting them as new records. Appends related to o.R.Vehicles. Sets related.R.Manufacturer appropriately.

func (*Manufacturer) AftermarketDevices

func (o *Manufacturer) AftermarketDevices(mods ...qm.QueryMod) aftermarketDeviceQuery

AftermarketDevices retrieves all the aftermarket_device's AftermarketDevices with an executor.

func (*Manufacturer) Delete

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

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

func (*Manufacturer) Exists

func (o *Manufacturer) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Manufacturer row exists.

func (*Manufacturer) Insert

func (o *Manufacturer) 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 (*Manufacturer) Reload

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

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

func (*Manufacturer) RemoveAftermarketDevices

func (o *Manufacturer) RemoveAftermarketDevices(ctx context.Context, exec boil.ContextExecutor, related ...*AftermarketDevice) error

RemoveAftermarketDevices relationships from objects passed in. Removes related items from R.AftermarketDevices (uses pointer comparison, removal does not keep order) Sets related.R.Manufacturer.

func (*Manufacturer) RemoveVehicles

func (o *Manufacturer) RemoveVehicles(ctx context.Context, exec boil.ContextExecutor, related ...*Vehicle) error

RemoveVehicles relationships from objects passed in. Removes related items from R.Vehicles (uses pointer comparison, removal does not keep order) Sets related.R.Manufacturer.

func (*Manufacturer) SetAftermarketDevices

func (o *Manufacturer) SetAftermarketDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AftermarketDevice) error

SetAftermarketDevices removes all previously related items of the manufacturer replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Manufacturer's AftermarketDevices accordingly. Replaces o.R.AftermarketDevices with related. Sets related.R.Manufacturer's AftermarketDevices accordingly.

func (*Manufacturer) SetVehicles

func (o *Manufacturer) SetVehicles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Vehicle) error

SetVehicles removes all previously related items of the manufacturer replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Manufacturer's Vehicles accordingly. Replaces o.R.Vehicles with related. Sets related.R.Manufacturer's Vehicles accordingly.

func (*Manufacturer) Update

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

Update uses an executor to update the Manufacturer. 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 (*Manufacturer) Upsert

func (o *Manufacturer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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.

func (*Manufacturer) Vehicles

func (o *Manufacturer) Vehicles(mods ...qm.QueryMod) vehicleQuery

Vehicles retrieves all the vehicle's Vehicles with an executor.

type ManufacturerHook

type ManufacturerHook func(context.Context, boil.ContextExecutor, *Manufacturer) error

ManufacturerHook is the signature for custom Manufacturer hook methods

type ManufacturerSlice

type ManufacturerSlice []*Manufacturer

ManufacturerSlice is an alias for a slice of pointers to Manufacturer. This should almost always be used instead of []Manufacturer.

func (ManufacturerSlice) DeleteAll

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

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

func (*ManufacturerSlice) ReloadAll

func (o *ManufacturerSlice) 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 (ManufacturerSlice) UpdateAll

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

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

type Privilege

type Privilege struct {
	TokenID     int       `boil:"token_id" json:"token_id" toml:"token_id" yaml:"token_id"`
	PrivilegeID int       `boil:"privilege_id" json:"privilege_id" toml:"privilege_id" yaml:"privilege_id"`
	UserAddress []byte    `boil:"user_address" json:"user_address" toml:"user_address" yaml:"user_address"`
	SetAt       time.Time `boil:"set_at" json:"set_at" toml:"set_at" yaml:"set_at"`
	ExpiresAt   time.Time `boil:"expires_at" json:"expires_at" toml:"expires_at" yaml:"expires_at"`

	R *privilegeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L privilegeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Privilege is an object representing the database table.

func FindPrivilege

func FindPrivilege(ctx context.Context, exec boil.ContextExecutor, tokenID int, privilegeID int, userAddress []byte, selectCols ...string) (*Privilege, error)

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

func (*Privilege) Delete

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

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

func (*Privilege) Exists

func (o *Privilege) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Privilege row exists.

func (*Privilege) Insert

func (o *Privilege) 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 (*Privilege) Reload

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

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

func (*Privilege) SetToken

func (o *Privilege) SetToken(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetToken of the privilege to the related item. Sets o.R.Token to related. Adds o to related.R.TokenPrivileges.

func (*Privilege) Token

func (o *Privilege) Token(mods ...qm.QueryMod) vehicleQuery

Token pointed to by the foreign key.

func (*Privilege) Update

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

Update uses an executor to update the Privilege. 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 (*Privilege) Upsert

func (o *Privilege) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 PrivilegeHook

type PrivilegeHook func(context.Context, boil.ContextExecutor, *Privilege) error

PrivilegeHook is the signature for custom Privilege hook methods

type PrivilegeSlice

type PrivilegeSlice []*Privilege

PrivilegeSlice is an alias for a slice of pointers to Privilege. This should almost always be used instead of []Privilege.

func (PrivilegeSlice) DeleteAll

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

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

func (*PrivilegeSlice) ReloadAll

func (o *PrivilegeSlice) 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 (PrivilegeSlice) UpdateAll

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

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

type Reward added in v0.1.5

type Reward struct {
	IssuanceWeek        int           `boil:"issuance_week" json:"issuance_week" toml:"issuance_week" yaml:"issuance_week"`
	VehicleID           int           `boil:"vehicle_id" json:"vehicle_id" toml:"vehicle_id" yaml:"vehicle_id"`
	ConnectionStreak    null.Int      `boil:"connection_streak" json:"connection_streak,omitempty" toml:"connection_streak" yaml:"connection_streak,omitempty"`
	StreakEarnings      types.Decimal `boil:"streak_earnings" json:"streak_earnings" toml:"streak_earnings" yaml:"streak_earnings"`
	AftermarketTokenID  null.Int      `` /* 131-byte string literal not displayed */
	AftermarketEarnings types.Decimal `boil:"aftermarket_earnings" json:"aftermarket_earnings" toml:"aftermarket_earnings" yaml:"aftermarket_earnings"`
	SyntheticTokenID    null.Int      `boil:"synthetic_token_id" json:"synthetic_token_id,omitempty" toml:"synthetic_token_id" yaml:"synthetic_token_id,omitempty"`
	SyntheticEarnings   types.Decimal `boil:"synthetic_earnings" json:"synthetic_earnings" toml:"synthetic_earnings" yaml:"synthetic_earnings"`
	ReceivedByAddress   null.Bytes    `` /* 127-byte string literal not displayed */
	EarnedAt            time.Time     `boil:"earned_at" json:"earned_at" toml:"earned_at" yaml:"earned_at"`

	R *rewardR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L rewardL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Reward is an object representing the database table.

func FindReward added in v0.1.5

func FindReward(ctx context.Context, exec boil.ContextExecutor, issuanceWeek int, vehicleID int, selectCols ...string) (*Reward, error)

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

func (*Reward) AftermarketToken added in v0.1.5

func (o *Reward) AftermarketToken(mods ...qm.QueryMod) aftermarketDeviceQuery

AftermarketToken pointed to by the foreign key.

func (*Reward) Delete added in v0.1.5

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

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

func (*Reward) Exists added in v0.1.5

func (o *Reward) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Reward row exists.

func (*Reward) Insert added in v0.1.5

func (o *Reward) 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 (*Reward) Reload added in v0.1.5

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

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

func (*Reward) RemoveAftermarketToken added in v0.1.5

func (o *Reward) RemoveAftermarketToken(ctx context.Context, exec boil.ContextExecutor, related *AftermarketDevice) error

RemoveAftermarketToken relationship. Sets o.R.AftermarketToken to nil. Removes o from all passed in related items' relationships struct.

func (*Reward) RemoveSyntheticToken added in v0.1.5

func (o *Reward) RemoveSyntheticToken(ctx context.Context, exec boil.ContextExecutor, related *SyntheticDevice) error

RemoveSyntheticToken relationship. Sets o.R.SyntheticToken to nil. Removes o from all passed in related items' relationships struct.

func (*Reward) SetAftermarketToken added in v0.1.5

func (o *Reward) SetAftermarketToken(ctx context.Context, exec boil.ContextExecutor, insert bool, related *AftermarketDevice) error

SetAftermarketToken of the reward to the related item. Sets o.R.AftermarketToken to related. Adds o to related.R.AftermarketTokenRewards.

func (*Reward) SetSyntheticToken added in v0.1.5

func (o *Reward) SetSyntheticToken(ctx context.Context, exec boil.ContextExecutor, insert bool, related *SyntheticDevice) error

SetSyntheticToken of the reward to the related item. Sets o.R.SyntheticToken to related. Adds o to related.R.SyntheticTokenRewards.

func (*Reward) SetVehicle added in v0.1.5

func (o *Reward) SetVehicle(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetVehicle of the reward to the related item. Sets o.R.Vehicle to related. Adds o to related.R.Rewards.

func (*Reward) SyntheticToken added in v0.1.5

func (o *Reward) SyntheticToken(mods ...qm.QueryMod) syntheticDeviceQuery

SyntheticToken pointed to by the foreign key.

func (*Reward) Update added in v0.1.5

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

Update uses an executor to update the Reward. 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 (*Reward) Upsert added in v0.1.5

func (o *Reward) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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.

func (*Reward) Vehicle added in v0.1.5

func (o *Reward) Vehicle(mods ...qm.QueryMod) vehicleQuery

Vehicle pointed to by the foreign key.

type RewardHook added in v0.1.5

type RewardHook func(context.Context, boil.ContextExecutor, *Reward) error

RewardHook is the signature for custom Reward hook methods

type RewardSlice added in v0.1.5

type RewardSlice []*Reward

RewardSlice is an alias for a slice of pointers to Reward. This should almost always be used instead of []Reward.

func (RewardSlice) DeleteAll added in v0.1.5

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

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

func (*RewardSlice) ReloadAll added in v0.1.5

func (o *RewardSlice) 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 (RewardSlice) UpdateAll added in v0.1.5

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

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

type SyntheticDevice

type SyntheticDevice struct {
	ID            int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	IntegrationID int       `boil:"integration_id" json:"integration_id" toml:"integration_id" yaml:"integration_id"`
	VehicleID     int       `boil:"vehicle_id" json:"vehicle_id" toml:"vehicle_id" yaml:"vehicle_id"`
	DeviceAddress []byte    `boil:"device_address" json:"device_address" toml:"device_address" yaml:"device_address"`
	MintedAt      time.Time `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`

	R *syntheticDeviceR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L syntheticDeviceL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

SyntheticDevice is an object representing the database table.

func FindSyntheticDevice

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

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

func (*SyntheticDevice) AddSyntheticTokenRewards added in v0.1.5

func (o *SyntheticDevice) AddSyntheticTokenRewards(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Reward) error

AddSyntheticTokenRewards adds the given related objects to the existing relationships of the synthetic_device, optionally inserting them as new records. Appends related to o.R.SyntheticTokenRewards. Sets related.R.SyntheticToken appropriately.

func (*SyntheticDevice) Delete

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

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

func (*SyntheticDevice) Exists

func (o *SyntheticDevice) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the SyntheticDevice row exists.

func (*SyntheticDevice) Insert

func (o *SyntheticDevice) 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 (*SyntheticDevice) Reload

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

func (*SyntheticDevice) RemoveSyntheticTokenRewards added in v0.1.5

func (o *SyntheticDevice) RemoveSyntheticTokenRewards(ctx context.Context, exec boil.ContextExecutor, related ...*Reward) error

RemoveSyntheticTokenRewards relationships from objects passed in. Removes related items from R.SyntheticTokenRewards (uses pointer comparison, removal does not keep order) Sets related.R.SyntheticToken.

func (*SyntheticDevice) SetSyntheticTokenRewards added in v0.1.5

func (o *SyntheticDevice) SetSyntheticTokenRewards(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Reward) error

SetSyntheticTokenRewards removes all previously related items of the synthetic_device replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.SyntheticToken's SyntheticTokenRewards accordingly. Replaces o.R.SyntheticTokenRewards with related. Sets related.R.SyntheticToken's SyntheticTokenRewards accordingly.

func (*SyntheticDevice) SetVehicle

func (o *SyntheticDevice) SetVehicle(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Vehicle) error

SetVehicle of the syntheticDevice to the related item. Sets o.R.Vehicle to related. Adds o to related.R.SyntheticDevices.

func (*SyntheticDevice) SyntheticTokenRewards added in v0.1.5

func (o *SyntheticDevice) SyntheticTokenRewards(mods ...qm.QueryMod) rewardQuery

SyntheticTokenRewards retrieves all the reward's Rewards with an executor via synthetic_token_id column.

func (*SyntheticDevice) Update

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

Update uses an executor to update the SyntheticDevice. 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 (*SyntheticDevice) Upsert

func (o *SyntheticDevice) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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.

func (*SyntheticDevice) Vehicle

func (o *SyntheticDevice) Vehicle(mods ...qm.QueryMod) vehicleQuery

Vehicle pointed to by the foreign key.

type SyntheticDeviceHook

type SyntheticDeviceHook func(context.Context, boil.ContextExecutor, *SyntheticDevice) error

SyntheticDeviceHook is the signature for custom SyntheticDevice hook methods

type SyntheticDeviceSlice

type SyntheticDeviceSlice []*SyntheticDevice

SyntheticDeviceSlice is an alias for a slice of pointers to SyntheticDevice. This should almost always be used instead of []SyntheticDevice.

func (SyntheticDeviceSlice) DeleteAll

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

func (*SyntheticDeviceSlice) ReloadAll

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

func (SyntheticDeviceSlice) UpdateAll

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

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

type UpsertOptionFunc added in v0.1.21

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget added in v0.1.21

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet added in v0.1.21

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions added in v0.1.21

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

type Vehicle

type Vehicle struct {
	ID             int         `boil:"id" json:"id" toml:"id" yaml:"id"`
	OwnerAddress   []byte      `boil:"owner_address" json:"owner_address" toml:"owner_address" yaml:"owner_address"`
	Make           null.String `boil:"make" json:"make,omitempty" toml:"make" yaml:"make,omitempty"`
	Model          null.String `boil:"model" json:"model,omitempty" toml:"model" yaml:"model,omitempty"`
	Year           null.Int    `boil:"year" json:"year,omitempty" toml:"year" yaml:"year,omitempty"`
	MintedAt       time.Time   `boil:"minted_at" json:"minted_at" toml:"minted_at" yaml:"minted_at"`
	DefinitionURI  null.String `boil:"definition_uri" json:"definition_uri,omitempty" toml:"definition_uri" yaml:"definition_uri,omitempty"`
	ManufacturerID null.Int    `boil:"manufacturer_id" json:"manufacturer_id,omitempty" toml:"manufacturer_id" yaml:"manufacturer_id,omitempty"`

	R *vehicleR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L vehicleL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Vehicle is an object representing the database table.

func FindVehicle

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

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

func (*Vehicle) AddDCNS

func (o *Vehicle) AddDCNS(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DCN) error

AddDCNS adds the given related objects to the existing relationships of the vehicle, optionally inserting them as new records. Appends related to o.R.DCNS. Sets related.R.Vehicle appropriately.

func (*Vehicle) AddRewards added in v0.1.5

func (o *Vehicle) AddRewards(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Reward) error

AddRewards adds the given related objects to the existing relationships of the vehicle, optionally inserting them as new records. Appends related to o.R.Rewards. Sets related.R.Vehicle appropriately.

func (*Vehicle) AddSyntheticDevices

func (o *Vehicle) AddSyntheticDevices(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*SyntheticDevice) error

AddSyntheticDevices adds the given related objects to the existing relationships of the vehicle, optionally inserting them as new records. Appends related to o.R.SyntheticDevices. Sets related.R.Vehicle appropriately.

func (*Vehicle) AddTokenPrivileges

func (o *Vehicle) AddTokenPrivileges(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Privilege) error

AddTokenPrivileges adds the given related objects to the existing relationships of the vehicle, optionally inserting them as new records. Appends related to o.R.TokenPrivileges. Sets related.R.Token appropriately.

func (*Vehicle) AftermarketDevice

func (o *Vehicle) AftermarketDevice(mods ...qm.QueryMod) aftermarketDeviceQuery

AftermarketDevice pointed to by the foreign key.

func (*Vehicle) DCNS

func (o *Vehicle) DCNS(mods ...qm.QueryMod) dcnQuery

DCNS retrieves all the dcn's DCNS with an executor.

func (*Vehicle) Delete

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

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

func (*Vehicle) Exists

func (o *Vehicle) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Vehicle row exists.

func (*Vehicle) Insert

func (o *Vehicle) 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 (*Vehicle) Manufacturer

func (o *Vehicle) Manufacturer(mods ...qm.QueryMod) manufacturerQuery

Manufacturer pointed to by the foreign key.

func (*Vehicle) Reload

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

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

func (*Vehicle) RemoveAftermarketDevice

func (o *Vehicle) RemoveAftermarketDevice(ctx context.Context, exec boil.ContextExecutor, related *AftermarketDevice) error

RemoveAftermarketDevice relationship. Sets o.R.AftermarketDevice to nil. Removes o from all passed in related items' relationships struct.

func (*Vehicle) RemoveDCNS

func (o *Vehicle) RemoveDCNS(ctx context.Context, exec boil.ContextExecutor, related ...*DCN) error

RemoveDCNS relationships from objects passed in. Removes related items from R.DCNS (uses pointer comparison, removal does not keep order) Sets related.R.Vehicle.

func (*Vehicle) RemoveManufacturer

func (o *Vehicle) RemoveManufacturer(ctx context.Context, exec boil.ContextExecutor, related *Manufacturer) error

RemoveManufacturer relationship. Sets o.R.Manufacturer to nil. Removes o from all passed in related items' relationships struct.

func (*Vehicle) Rewards added in v0.1.5

func (o *Vehicle) Rewards(mods ...qm.QueryMod) rewardQuery

Rewards retrieves all the reward's Rewards with an executor.

func (*Vehicle) SetAftermarketDevice

func (o *Vehicle) SetAftermarketDevice(ctx context.Context, exec boil.ContextExecutor, insert bool, related *AftermarketDevice) error

SetAftermarketDevice of the vehicle to the related item. Sets o.R.AftermarketDevice to related. Adds o to related.R.Vehicle.

func (*Vehicle) SetDCNS

func (o *Vehicle) SetDCNS(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*DCN) error

SetDCNS removes all previously related items of the vehicle replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Vehicle's DCNS accordingly. Replaces o.R.DCNS with related. Sets related.R.Vehicle's DCNS accordingly.

func (*Vehicle) SetManufacturer

func (o *Vehicle) SetManufacturer(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Manufacturer) error

SetManufacturer of the vehicle to the related item. Sets o.R.Manufacturer to related. Adds o to related.R.Vehicles.

func (*Vehicle) SyntheticDevices

func (o *Vehicle) SyntheticDevices(mods ...qm.QueryMod) syntheticDeviceQuery

SyntheticDevices retrieves all the synthetic_device's SyntheticDevices with an executor.

func (*Vehicle) TokenPrivileges

func (o *Vehicle) TokenPrivileges(mods ...qm.QueryMod) privilegeQuery

TokenPrivileges retrieves all the privilege's Privileges with an executor via token_id column.

func (*Vehicle) Update

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

Update uses an executor to update the Vehicle. 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 (*Vehicle) Upsert

func (o *Vehicle) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 VehicleHook

type VehicleHook func(context.Context, boil.ContextExecutor, *Vehicle) error

VehicleHook is the signature for custom Vehicle hook methods

type VehicleSlice

type VehicleSlice []*Vehicle

VehicleSlice is an alias for a slice of pointers to Vehicle. This should almost always be used instead of []Vehicle.

func (VehicleSlice) DeleteAll

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

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

func (*VehicleSlice) ReloadAll

func (o *VehicleSlice) 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 (VehicleSlice) UpdateAll

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

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

Jump to

Keyboard shortcuts

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