models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 16 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 TableNames = struct {
	Valuations string
}{
	Valuations: "valuations",
}
View Source
var ValuationColumns = struct {
	ID                 string
	DeviceDefinitionID string
	Vin                string
	UserDeviceID       string
	VinMetadata        string
	OfferMetadata      string
	AutocheckMetadata  string
	BuildMetadata      string
	CargurusMetadata   string
	CarvanaMetadata    string
	CarmaxMetadata     string
	CarstoryMetadata   string
	EdmundsMetadata    string
	TMVMetadata        string
	KBBMetadata        string
	VroomMetadata      string
	CreatedAt          string
	UpdatedAt          string
	PricingMetadata    string
	BlackbookMetadata  string
	RequestMetadata    string
	VincarioMetadata   string
}{
	ID:                 "id",
	DeviceDefinitionID: "device_definition_id",
	Vin:                "vin",
	UserDeviceID:       "user_device_id",
	VinMetadata:        "vin_metadata",
	OfferMetadata:      "offer_metadata",
	AutocheckMetadata:  "autocheck_metadata",
	BuildMetadata:      "build_metadata",
	CargurusMetadata:   "cargurus_metadata",
	CarvanaMetadata:    "carvana_metadata",
	CarmaxMetadata:     "carmax_metadata",
	CarstoryMetadata:   "carstory_metadata",
	EdmundsMetadata:    "edmunds_metadata",
	TMVMetadata:        "tmv_metadata",
	KBBMetadata:        "kbb_metadata",
	VroomMetadata:      "vroom_metadata",
	CreatedAt:          "created_at",
	UpdatedAt:          "updated_at",
	PricingMetadata:    "pricing_metadata",
	BlackbookMetadata:  "blackbook_metadata",
	RequestMetadata:    "request_metadata",
	VincarioMetadata:   "vincario_metadata",
}
View Source
var ValuationRels = struct {
}{}

ValuationRels is where relationship names are stored.

View Source
var ValuationTableColumns = struct {
	ID                 string
	DeviceDefinitionID string
	Vin                string
	UserDeviceID       string
	VinMetadata        string
	OfferMetadata      string
	AutocheckMetadata  string
	BuildMetadata      string
	CargurusMetadata   string
	CarvanaMetadata    string
	CarmaxMetadata     string
	CarstoryMetadata   string
	EdmundsMetadata    string
	TMVMetadata        string
	KBBMetadata        string
	VroomMetadata      string
	CreatedAt          string
	UpdatedAt          string
	PricingMetadata    string
	BlackbookMetadata  string
	RequestMetadata    string
	VincarioMetadata   string
}{
	ID:                 "valuations.id",
	DeviceDefinitionID: "valuations.device_definition_id",
	Vin:                "valuations.vin",
	UserDeviceID:       "valuations.user_device_id",
	VinMetadata:        "valuations.vin_metadata",
	OfferMetadata:      "valuations.offer_metadata",
	AutocheckMetadata:  "valuations.autocheck_metadata",
	BuildMetadata:      "valuations.build_metadata",
	CargurusMetadata:   "valuations.cargurus_metadata",
	CarvanaMetadata:    "valuations.carvana_metadata",
	CarmaxMetadata:     "valuations.carmax_metadata",
	CarstoryMetadata:   "valuations.carstory_metadata",
	EdmundsMetadata:    "valuations.edmunds_metadata",
	TMVMetadata:        "valuations.tmv_metadata",
	KBBMetadata:        "valuations.kbb_metadata",
	VroomMetadata:      "valuations.vroom_metadata",
	CreatedAt:          "valuations.created_at",
	UpdatedAt:          "valuations.updated_at",
	PricingMetadata:    "valuations.pricing_metadata",
	BlackbookMetadata:  "valuations.blackbook_metadata",
	RequestMetadata:    "valuations.request_metadata",
	VincarioMetadata:   "valuations.vincario_metadata",
}
View Source
var ValuationWhere = struct {
	ID                 whereHelperstring
	DeviceDefinitionID whereHelpernull_String
	Vin                whereHelperstring
	UserDeviceID       whereHelpernull_String
	VinMetadata        whereHelpernull_JSON
	OfferMetadata      whereHelpernull_JSON
	AutocheckMetadata  whereHelpernull_JSON
	BuildMetadata      whereHelpernull_JSON
	CargurusMetadata   whereHelpernull_JSON
	CarvanaMetadata    whereHelpernull_JSON
	CarmaxMetadata     whereHelpernull_JSON
	CarstoryMetadata   whereHelpernull_JSON
	EdmundsMetadata    whereHelpernull_JSON
	TMVMetadata        whereHelpernull_JSON
	KBBMetadata        whereHelpernull_JSON
	VroomMetadata      whereHelpernull_JSON
	CreatedAt          whereHelpertime_Time
	UpdatedAt          whereHelpertime_Time
	PricingMetadata    whereHelpernull_JSON
	BlackbookMetadata  whereHelpernull_JSON
	RequestMetadata    whereHelpernull_JSON
	VincarioMetadata   whereHelpernull_JSON
}{
	ID:                 whereHelperstring{/* contains filtered or unexported fields */},
	DeviceDefinitionID: whereHelpernull_String{/* contains filtered or unexported fields */},
	Vin:                whereHelperstring{/* contains filtered or unexported fields */},
	UserDeviceID:       whereHelpernull_String{/* contains filtered or unexported fields */},
	VinMetadata:        whereHelpernull_JSON{/* contains filtered or unexported fields */},
	OfferMetadata:      whereHelpernull_JSON{/* contains filtered or unexported fields */},
	AutocheckMetadata:  whereHelpernull_JSON{/* contains filtered or unexported fields */},
	BuildMetadata:      whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CargurusMetadata:   whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CarvanaMetadata:    whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CarmaxMetadata:     whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CarstoryMetadata:   whereHelpernull_JSON{/* contains filtered or unexported fields */},
	EdmundsMetadata:    whereHelpernull_JSON{/* contains filtered or unexported fields */},
	TMVMetadata:        whereHelpernull_JSON{/* contains filtered or unexported fields */},
	KBBMetadata:        whereHelpernull_JSON{/* contains filtered or unexported fields */},
	VroomMetadata:      whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	PricingMetadata:    whereHelpernull_JSON{/* contains filtered or unexported fields */},
	BlackbookMetadata:  whereHelpernull_JSON{/* contains filtered or unexported fields */},
	RequestMetadata:    whereHelpernull_JSON{/* contains filtered or unexported fields */},
	VincarioMetadata:   whereHelpernull_JSON{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddValuationHook

func AddValuationHook(hookPoint boil.HookPoint, valuationHook ValuationHook)

AddValuationHook registers your hook function for all future operations.

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 M

type M map[string]interface{}

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

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"`
	UserDeviceID       null.String `boil:"user_device_id" json:"user_device_id,omitempty" toml:"user_device_id" yaml:"user_device_id,omitempty"`
	VinMetadata        null.JSON   `boil:"vin_metadata" json:"vin_metadata,omitempty" toml:"vin_metadata" yaml:"vin_metadata,omitempty"`
	OfferMetadata      null.JSON   `boil:"offer_metadata" json:"offer_metadata,omitempty" toml:"offer_metadata" yaml:"offer_metadata,omitempty"`
	AutocheckMetadata  null.JSON   `boil:"autocheck_metadata" json:"autocheck_metadata,omitempty" toml:"autocheck_metadata" yaml:"autocheck_metadata,omitempty"`
	BuildMetadata      null.JSON   `boil:"build_metadata" json:"build_metadata,omitempty" toml:"build_metadata" yaml:"build_metadata,omitempty"`
	CargurusMetadata   null.JSON   `boil:"cargurus_metadata" json:"cargurus_metadata,omitempty" toml:"cargurus_metadata" yaml:"cargurus_metadata,omitempty"`
	CarvanaMetadata    null.JSON   `boil:"carvana_metadata" json:"carvana_metadata,omitempty" toml:"carvana_metadata" yaml:"carvana_metadata,omitempty"`
	CarmaxMetadata     null.JSON   `boil:"carmax_metadata" json:"carmax_metadata,omitempty" toml:"carmax_metadata" yaml:"carmax_metadata,omitempty"`
	CarstoryMetadata   null.JSON   `boil:"carstory_metadata" json:"carstory_metadata,omitempty" toml:"carstory_metadata" yaml:"carstory_metadata,omitempty"`
	EdmundsMetadata    null.JSON   `boil:"edmunds_metadata" json:"edmunds_metadata,omitempty" toml:"edmunds_metadata" yaml:"edmunds_metadata,omitempty"`
	TMVMetadata        null.JSON   `boil:"tmv_metadata" json:"tmv_metadata,omitempty" toml:"tmv_metadata" yaml:"tmv_metadata,omitempty"`
	KBBMetadata        null.JSON   `boil:"kbb_metadata" json:"kbb_metadata,omitempty" toml:"kbb_metadata" yaml:"kbb_metadata,omitempty"`
	VroomMetadata      null.JSON   `boil:"vroom_metadata" json:"vroom_metadata,omitempty" toml:"vroom_metadata" yaml:"vroom_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"`
	PricingMetadata    null.JSON   `boil:"pricing_metadata" json:"pricing_metadata,omitempty" toml:"pricing_metadata" yaml:"pricing_metadata,omitempty"`
	BlackbookMetadata  null.JSON   `boil:"blackbook_metadata" json:"blackbook_metadata,omitempty" toml:"blackbook_metadata" yaml:"blackbook_metadata,omitempty"`
	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"`

	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) 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) 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