models

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 GeodecodedLocationColumns = struct {
	TokenID    string
	PostalCode string
	CreatedAt  string
	Country    string
}{
	TokenID:    "token_id",
	PostalCode: "postal_code",
	CreatedAt:  "created_at",
	Country:    "country",
}
View Source
var GeodecodedLocationRels = struct {
}{}

GeodecodedLocationRels is where relationship names are stored.

View Source
var GeodecodedLocationTableColumns = struct {
	TokenID    string
	PostalCode string
	CreatedAt  string
	Country    string
}{
	TokenID:    "geodecoded_location.token_id",
	PostalCode: "geodecoded_location.postal_code",
	CreatedAt:  "geodecoded_location.created_at",
	Country:    "geodecoded_location.country",
}
View Source
var GeodecodedLocationWhere = struct {
	TokenID    whereHelperint64
	PostalCode whereHelpernull_String
	CreatedAt  whereHelpertime_Time
	Country    whereHelpernull_String
}{
	TokenID:    whereHelperint64{/* contains filtered or unexported fields */},
	PostalCode: whereHelpernull_String{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	Country:    whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	GeodecodedLocation string
	Valuations         string
}{
	GeodecodedLocation: "geodecoded_location",
	Valuations:         "valuations",
}
View Source
var ValuationColumns = struct {
	ID                    string
	DeviceDefinitionID    string
	Vin                   string
	OfferMetadata         string
	EdmundsMetadata       string
	CreatedAt             string
	UpdatedAt             string
	DrivlyPricingMetadata string
	RequestMetadata       string
	VincarioMetadata      string
	DefinitionID          string
	TokenID               string
}{
	ID:                    "id",
	DeviceDefinitionID:    "device_definition_id",
	Vin:                   "vin",
	OfferMetadata:         "offer_metadata",
	EdmundsMetadata:       "edmunds_metadata",
	CreatedAt:             "created_at",
	UpdatedAt:             "updated_at",
	DrivlyPricingMetadata: "drivly_pricing_metadata",
	RequestMetadata:       "request_metadata",
	VincarioMetadata:      "vincario_metadata",
	DefinitionID:          "definition_id",
	TokenID:               "token_id",
}
View Source
var ValuationRels = struct {
}{}

ValuationRels is where relationship names are stored.

View Source
var ValuationTableColumns = struct {
	ID                    string
	DeviceDefinitionID    string
	Vin                   string
	OfferMetadata         string
	EdmundsMetadata       string
	CreatedAt             string
	UpdatedAt             string
	DrivlyPricingMetadata string
	RequestMetadata       string
	VincarioMetadata      string
	DefinitionID          string
	TokenID               string
}{
	ID:                    "valuations.id",
	DeviceDefinitionID:    "valuations.device_definition_id",
	Vin:                   "valuations.vin",
	OfferMetadata:         "valuations.offer_metadata",
	EdmundsMetadata:       "valuations.edmunds_metadata",
	CreatedAt:             "valuations.created_at",
	UpdatedAt:             "valuations.updated_at",
	DrivlyPricingMetadata: "valuations.drivly_pricing_metadata",
	RequestMetadata:       "valuations.request_metadata",
	VincarioMetadata:      "valuations.vincario_metadata",
	DefinitionID:          "valuations.definition_id",
	TokenID:               "valuations.token_id",
}
View Source
var ValuationWhere = struct {
	ID                    whereHelperstring
	DeviceDefinitionID    whereHelpernull_String
	Vin                   whereHelperstring
	OfferMetadata         whereHelpernull_JSON
	EdmundsMetadata       whereHelpernull_JSON
	CreatedAt             whereHelpertime_Time
	UpdatedAt             whereHelpertime_Time
	DrivlyPricingMetadata whereHelpernull_JSON
	RequestMetadata       whereHelpernull_JSON
	VincarioMetadata      whereHelpernull_JSON
	DefinitionID          whereHelpernull_String
	TokenID               whereHelpertypes_NullDecimal
}{
	ID:                    whereHelperstring{/* contains filtered or unexported fields */},
	DeviceDefinitionID:    whereHelpernull_String{/* contains filtered or unexported fields */},
	Vin:                   whereHelperstring{/* contains filtered or unexported fields */},
	OfferMetadata:         whereHelpernull_JSON{/* contains filtered or unexported fields */},
	EdmundsMetadata:       whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:             whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:             whereHelpertime_Time{/* contains filtered or unexported fields */},
	DrivlyPricingMetadata: whereHelpernull_JSON{/* contains filtered or unexported fields */},
	RequestMetadata:       whereHelpernull_JSON{/* contains filtered or unexported fields */},
	VincarioMetadata:      whereHelpernull_JSON{/* contains filtered or unexported fields */},
	DefinitionID:          whereHelpernull_String{/* contains filtered or unexported fields */},
	TokenID:               whereHelpertypes_NullDecimal{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddGeodecodedLocationHook added in v0.5.3

func AddGeodecodedLocationHook(hookPoint boil.HookPoint, geodecodedLocationHook GeodecodedLocationHook)

AddGeodecodedLocationHook registers your hook function for all future operations.

func AddValuationHook

func AddValuationHook(hookPoint boil.HookPoint, valuationHook ValuationHook)

AddValuationHook registers your hook function for all future operations.

func GeodecodedLocationExists added in v0.5.3

func GeodecodedLocationExists(ctx context.Context, exec boil.ContextExecutor, tokenID int64) (bool, error)

GeodecodedLocationExists checks if the GeodecodedLocation row exists.

func GeodecodedLocations added in v0.5.3

func GeodecodedLocations(mods ...qm.QueryMod) geodecodedLocationQuery

GeodecodedLocations 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 ValuationExists

func ValuationExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

ValuationExists checks if the Valuation row exists.

func Valuations

func Valuations(mods ...qm.QueryMod) valuationQuery

Valuations retrieves all the records using an executor.

Types

type GeodecodedLocation added in v0.5.3

type GeodecodedLocation struct {
	TokenID    int64       `boil:"token_id" json:"token_id" toml:"token_id" yaml:"token_id"`
	PostalCode null.String `boil:"postal_code" json:"postal_code,omitempty" toml:"postal_code" yaml:"postal_code,omitempty"`
	CreatedAt  time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	Country    null.String `boil:"country" json:"country,omitempty" toml:"country" yaml:"country,omitempty"`

	R *geodecodedLocationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L geodecodedLocationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

GeodecodedLocation is an object representing the database table.

func FindGeodecodedLocation added in v0.5.3

func FindGeodecodedLocation(ctx context.Context, exec boil.ContextExecutor, tokenID int64, selectCols ...string) (*GeodecodedLocation, error)

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

func (*GeodecodedLocation) Delete added in v0.5.3

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

func (*GeodecodedLocation) Exists added in v0.5.3

Exists checks if the GeodecodedLocation row exists.

func (*GeodecodedLocation) Insert added in v0.5.3

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

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

func (*GeodecodedLocation) Update added in v0.5.3

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

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

func (o *GeodecodedLocation) 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 GeodecodedLocationHook added in v0.5.3

type GeodecodedLocationHook func(context.Context, boil.ContextExecutor, *GeodecodedLocation) error

GeodecodedLocationHook is the signature for custom GeodecodedLocation hook methods

type GeodecodedLocationSlice added in v0.5.3

type GeodecodedLocationSlice []*GeodecodedLocation

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

func (GeodecodedLocationSlice) DeleteAll added in v0.5.3

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

func (*GeodecodedLocationSlice) ReloadAll added in v0.5.3

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

func (GeodecodedLocationSlice) UpdateAll added in v0.5.3

func (o GeodecodedLocationSlice) 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 UpsertOptionFunc added in v0.5.3

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget added in v0.5.3

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet added in v0.5.3

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions added in v0.5.3

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

type Valuation

type Valuation struct {
	ID                    string            `boil:"id" json:"id" toml:"id" yaml:"id"`
	DeviceDefinitionID    null.String       `` /* 131-byte string literal not displayed */
	Vin                   string            `boil:"vin" json:"vin" toml:"vin" yaml:"vin"`
	OfferMetadata         null.JSON         `boil:"offer_metadata" json:"offer_metadata,omitempty" toml:"offer_metadata" yaml:"offer_metadata,omitempty"`
	EdmundsMetadata       null.JSON         `boil:"edmunds_metadata" json:"edmunds_metadata,omitempty" toml:"edmunds_metadata" yaml:"edmunds_metadata,omitempty"`
	CreatedAt             time.Time         `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt             time.Time         `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	DrivlyPricingMetadata null.JSON         `` /* 143-byte string literal not displayed */
	RequestMetadata       null.JSON         `boil:"request_metadata" json:"request_metadata,omitempty" toml:"request_metadata" yaml:"request_metadata,omitempty"`
	VincarioMetadata      null.JSON         `boil:"vincario_metadata" json:"vincario_metadata,omitempty" toml:"vincario_metadata" yaml:"vincario_metadata,omitempty"`
	DefinitionID          null.String       `boil:"definition_id" json:"definition_id,omitempty" toml:"definition_id" yaml:"definition_id,omitempty"`
	TokenID               types.NullDecimal `boil:"token_id" json:"token_id,omitempty" toml:"token_id" yaml:"token_id,omitempty"`

	R *valuationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L valuationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Valuation is an object representing the database table.

func FindValuation

func FindValuation(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Valuation, error)

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

func (*Valuation) Delete

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

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

func (*Valuation) Exists added in v0.1.1

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

Exists checks if the Valuation row exists.

func (*Valuation) Insert

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

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

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

func (*Valuation) Update

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

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

func (o *Valuation) 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 ValuationHook

type ValuationHook func(context.Context, boil.ContextExecutor, *Valuation) error

ValuationHook is the signature for custom Valuation hook methods

type ValuationSlice

type ValuationSlice []*Valuation

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

func (ValuationSlice) DeleteAll

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

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

func (*ValuationSlice) ReloadAll

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

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