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 AccountColumns = struct {
	AccountID         string
	Name              string
	NamePronunciation string
	Email             string
	Password          string
	CreatedAt         string
	DeletedAt         string
	UpdatedAt         string
}{
	AccountID:         "account_id",
	Name:              "name",
	NamePronunciation: "name_pronunciation",
	Email:             "email",
	Password:          "password",
	CreatedAt:         "created_at",
	DeletedAt:         "deleted_at",
	UpdatedAt:         "updated_at",
}
View Source
var AccountRels = struct {
}{}

AccountRels is where relationship names are stored.

View Source
var AccountTableColumns = struct {
	AccountID         string
	Name              string
	NamePronunciation string
	Email             string
	Password          string
	CreatedAt         string
	DeletedAt         string
	UpdatedAt         string
}{
	AccountID:         "account.account_id",
	Name:              "account.name",
	NamePronunciation: "account.name_pronunciation",
	Email:             "account.email",
	Password:          "account.password",
	CreatedAt:         "account.created_at",
	DeletedAt:         "account.deleted_at",
	UpdatedAt:         "account.updated_at",
}
View Source
var AccountWhere = struct {
	AccountID         whereHelperstring
	Name              whereHelperstring
	NamePronunciation whereHelperstring
	Email             whereHelperstring
	Password          whereHelperstring
	CreatedAt         whereHelpertime_Time
	DeletedAt         whereHelpernull_Time
	UpdatedAt         whereHelpertime_Time
}{
	AccountID:         whereHelperstring{/* contains filtered or unexported fields */},
	Name:              whereHelperstring{/* contains filtered or unexported fields */},
	NamePronunciation: whereHelperstring{/* contains filtered or unexported fields */},
	Email:             whereHelperstring{/* contains filtered or unexported fields */},
	Password:          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 {
	Account string
}{
	Account: "account",
}
View Source
var ViewNames = struct {
}{}

Functions

func AccountExists

func AccountExists(ctx context.Context, exec boil.ContextExecutor, accountID string) (bool, error)

AccountExists checks if the Account row exists.

func Accounts

func Accounts(mods ...qm.QueryMod) accountQuery

Accounts retrieves all the records using an executor.

func AddAccountHook

func AddAccountHook(hookPoint boil.HookPoint, accountHook AccountHook)

AddAccountHook 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

Types

type Account

type Account struct {
	AccountID         string    `boil:"account_id" json:"account_id" toml:"account_id" yaml:"account_id"`
	Name              string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	NamePronunciation string    `boil:"name_pronunciation" json:"name_pronunciation" toml:"name_pronunciation" yaml:"name_pronunciation"`
	Email             string    `boil:"email" json:"email" toml:"email" yaml:"email"`
	Password          string    `boil:"password" json:"password" toml:"password" yaml:"password"`
	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 *accountR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L accountL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Account is an object representing the database table.

func FindAccount

func FindAccount(ctx context.Context, exec boil.ContextExecutor, accountID string, selectCols ...string) (*Account, error)

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

func (*Account) Delete

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

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

func (*Account) Exists

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

Exists checks if the Account row exists.

func (*Account) Insert

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

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

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

func (*Account) Update

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

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

func (o *Account) 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 AccountHook

type AccountHook func(context.Context, boil.ContextExecutor, *Account) error

AccountHook is the signature for custom Account hook methods

type AccountSlice

type AccountSlice []*Account

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

func (AccountSlice) DeleteAll

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

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

func (*AccountSlice) ReloadAll

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

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