model

package
v0.0.0-...-c31d802 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddressColumns = struct {
	AddressID     string
	OwnerID       string
	FullName      string
	ZipCode       string
	StateOrRegion string
	Line1         string
	Line2         string
	PhoneNumber   string
	CreatedAt     string
	DeletedAt     string
	UpdatedAt     string
}{
	AddressID:     "address_id",
	OwnerID:       "owner_id",
	FullName:      "full_name",
	ZipCode:       "zip_code",
	StateOrRegion: "state_or_region",
	Line1:         "line1",
	Line2:         "line2",
	PhoneNumber:   "phone_number",
	CreatedAt:     "created_at",
	DeletedAt:     "deleted_at",
	UpdatedAt:     "updated_at",
}
View Source
var AddressRels = struct {
}{}

AddressRels is where relationship names are stored.

View Source
var AddressTableColumns = struct {
	AddressID     string
	OwnerID       string
	FullName      string
	ZipCode       string
	StateOrRegion string
	Line1         string
	Line2         string
	PhoneNumber   string
	CreatedAt     string
	DeletedAt     string
	UpdatedAt     string
}{
	AddressID:     "address.address_id",
	OwnerID:       "address.owner_id",
	FullName:      "address.full_name",
	ZipCode:       "address.zip_code",
	StateOrRegion: "address.state_or_region",
	Line1:         "address.line1",
	Line2:         "address.line2",
	PhoneNumber:   "address.phone_number",
	CreatedAt:     "address.created_at",
	DeletedAt:     "address.deleted_at",
	UpdatedAt:     "address.updated_at",
}
View Source
var AddressWhere = struct {
	AddressID     whereHelperstring
	OwnerID       whereHelperstring
	FullName      whereHelperstring
	ZipCode       whereHelperstring
	StateOrRegion whereHelperstring
	Line1         whereHelperstring
	Line2         whereHelpernull_String
	PhoneNumber   whereHelperstring
	CreatedAt     whereHelpertime_Time
	DeletedAt     whereHelpernull_Time
	UpdatedAt     whereHelpertime_Time
}{
	AddressID:     whereHelperstring{/* contains filtered or unexported fields */},
	OwnerID:       whereHelperstring{/* contains filtered or unexported fields */},
	FullName:      whereHelperstring{/* contains filtered or unexported fields */},
	ZipCode:       whereHelperstring{/* contains filtered or unexported fields */},
	StateOrRegion: whereHelperstring{/* contains filtered or unexported fields */},
	Line1:         whereHelperstring{/* contains filtered or unexported fields */},
	Line2:         whereHelpernull_String{/* contains filtered or unexported fields */},
	PhoneNumber:   whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
	DeletedAt:     whereHelpernull_Time{/* contains filtered or unexported fields */},
	UpdatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("model: 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 {
	Address string
}{
	Address: "address",
}
View Source
var ViewNames = struct {
}{}

Functions

func AddAddressHook

func AddAddressHook(hookPoint boil.HookPoint, addressHook AddressHook)

AddAddressHook registers your hook function for all future operations.

func AddressExists

func AddressExists(ctx context.Context, exec boil.ContextExecutor, addressID string) (bool, error)

AddressExists checks if the Address row exists.

func Addresses

func Addresses(mods ...qm.QueryMod) addressQuery

Addresses 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 Address

type Address struct {
	AddressID     string      `boil:"address_id" json:"address_id" toml:"address_id" yaml:"address_id"`
	OwnerID       string      `boil:"owner_id" json:"owner_id" toml:"owner_id" yaml:"owner_id"`
	FullName      string      `boil:"full_name" json:"full_name" toml:"full_name" yaml:"full_name"`
	ZipCode       string      `boil:"zip_code" json:"zip_code" toml:"zip_code" yaml:"zip_code"`
	StateOrRegion string      `boil:"state_or_region" json:"state_or_region" toml:"state_or_region" yaml:"state_or_region"`
	Line1         string      `boil:"line1" json:"line1" toml:"line1" yaml:"line1"`
	Line2         null.String `boil:"line2" json:"line2,omitempty" toml:"line2" yaml:"line2,omitempty"`
	PhoneNumber   string      `boil:"phone_number" json:"phone_number" toml:"phone_number" yaml:"phone_number"`
	CreatedAt     time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	DeletedAt     null.Time   `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"`
	UpdatedAt     time.Time   `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *addressR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L addressL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Address is an object representing the database table.

func FindAddress

func FindAddress(ctx context.Context, exec boil.ContextExecutor, addressID string, selectCols ...string) (*Address, error)

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

func (*Address) Delete

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

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

func (*Address) Exists

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

Exists checks if the Address row exists.

func (*Address) Insert

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

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

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

func (*Address) Update

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

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

func (o *Address) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 AddressHook

type AddressHook func(context.Context, boil.ContextExecutor, *Address) error

AddressHook is the signature for custom Address hook methods

type AddressSlice

type AddressSlice []*Address

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

func (AddressSlice) DeleteAll

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

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

func (*AddressSlice) ReloadAll

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

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