model

package
v0.0.0-...-c662a9e Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 JWTAudienceSecretColumns = struct {
	JWTAudienceSecretID string
	Audience            string
	Secret              string
	CreatedAt           string
	UpdatedAt           string
}{
	JWTAudienceSecretID: "jwt_audience_secret_id",
	Audience:            "audience",
	Secret:              "secret",
	CreatedAt:           "created_at",
	UpdatedAt:           "updated_at",
}
View Source
var JWTAudienceSecretRels = struct {
}{}

JWTAudienceSecretRels is where relationship names are stored.

View Source
var JWTAudienceSecretTableColumns = struct {
	JWTAudienceSecretID string
	Audience            string
	Secret              string
	CreatedAt           string
	UpdatedAt           string
}{
	JWTAudienceSecretID: "jwt_audience_secret.jwt_audience_secret_id",
	Audience:            "jwt_audience_secret.audience",
	Secret:              "jwt_audience_secret.secret",
	CreatedAt:           "jwt_audience_secret.created_at",
	UpdatedAt:           "jwt_audience_secret.updated_at",
}
View Source
var JWTAudienceSecretWhere = struct {
	JWTAudienceSecretID whereHelperint
	Audience            whereHelperstring
	Secret              whereHelperstring
	CreatedAt           whereHelpertime_Time
	UpdatedAt           whereHelpertime_Time
}{
	JWTAudienceSecretID: whereHelperint{/* contains filtered or unexported fields */},
	Audience:            whereHelperstring{/* contains filtered or unexported fields */},
	Secret:              whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:           whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:           whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var JWTDenylistColumns = struct {
	JWTDenylistID string
	UserID        string
	Jti           string
	CreatedAt     string
	UpdatedAt     string
}{
	JWTDenylistID: "jwt_denylist_id",
	UserID:        "user_id",
	Jti:           "jti",
	CreatedAt:     "created_at",
	UpdatedAt:     "updated_at",
}
View Source
var JWTDenylistRels = struct {
}{}

JWTDenylistRels is where relationship names are stored.

View Source
var JWTDenylistTableColumns = struct {
	JWTDenylistID string
	UserID        string
	Jti           string
	CreatedAt     string
	UpdatedAt     string
}{
	JWTDenylistID: "jwt_denylist.jwt_denylist_id",
	UserID:        "jwt_denylist.user_id",
	Jti:           "jwt_denylist.jti",
	CreatedAt:     "jwt_denylist.created_at",
	UpdatedAt:     "jwt_denylist.updated_at",
}
View Source
var JWTDenylistWhere = struct {
	JWTDenylistID whereHelperint
	UserID        whereHelperint
	Jti           whereHelperstring
	CreatedAt     whereHelpertime_Time
	UpdatedAt     whereHelpertime_Time
}{
	JWTDenylistID: whereHelperint{/* contains filtered or unexported fields */},
	UserID:        whereHelperint{/* contains filtered or unexported fields */},
	Jti:           whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var SMSOtpVerificationColumns = struct {
	SMSOtpVerificationID   string
	VerificationToken      string
	PhoneNumber            string
	OtpCode                string
	ExpiresAt              string
	VerificationTrials     string
	VerificationValidUntil string
	CreatedAt              string
	UpdatedAt              string
}{
	SMSOtpVerificationID:   "sms_otp_verification_id",
	VerificationToken:      "verification_token",
	PhoneNumber:            "phone_number",
	OtpCode:                "otp_code",
	ExpiresAt:              "expires_at",
	VerificationTrials:     "verification_trials",
	VerificationValidUntil: "verification_valid_until",
	CreatedAt:              "created_at",
	UpdatedAt:              "updated_at",
}
View Source
var SMSOtpVerificationRels = struct {
}{}

SMSOtpVerificationRels is where relationship names are stored.

View Source
var SMSOtpVerificationTableColumns = struct {
	SMSOtpVerificationID   string
	VerificationToken      string
	PhoneNumber            string
	OtpCode                string
	ExpiresAt              string
	VerificationTrials     string
	VerificationValidUntil string
	CreatedAt              string
	UpdatedAt              string
}{
	SMSOtpVerificationID:   "sms_otp_verification.sms_otp_verification_id",
	VerificationToken:      "sms_otp_verification.verification_token",
	PhoneNumber:            "sms_otp_verification.phone_number",
	OtpCode:                "sms_otp_verification.otp_code",
	ExpiresAt:              "sms_otp_verification.expires_at",
	VerificationTrials:     "sms_otp_verification.verification_trials",
	VerificationValidUntil: "sms_otp_verification.verification_valid_until",
	CreatedAt:              "sms_otp_verification.created_at",
	UpdatedAt:              "sms_otp_verification.updated_at",
}
View Source
var SMSOtpVerificationWhere = struct {
	SMSOtpVerificationID   whereHelperint
	VerificationToken      whereHelperstring
	PhoneNumber            whereHelperstring
	OtpCode                whereHelperstring
	ExpiresAt              whereHelpertime_Time
	VerificationTrials     whereHelperint
	VerificationValidUntil whereHelpernull_Time
	CreatedAt              whereHelpertime_Time
	UpdatedAt              whereHelpertime_Time
}{
	SMSOtpVerificationID:   whereHelperint{/* contains filtered or unexported fields */},
	VerificationToken:      whereHelperstring{/* contains filtered or unexported fields */},
	PhoneNumber:            whereHelperstring{/* contains filtered or unexported fields */},
	OtpCode:                whereHelperstring{/* contains filtered or unexported fields */},
	ExpiresAt:              whereHelpertime_Time{/* contains filtered or unexported fields */},
	VerificationTrials:     whereHelperint{/* contains filtered or unexported fields */},
	VerificationValidUntil: whereHelpernull_Time{/* contains filtered or unexported fields */},
	CreatedAt:              whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:              whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	JWTAudienceSecret  string
	JWTDenylist        string
	SMSOtpVerification string
	User               string
}{
	JWTAudienceSecret:  "jwt_audience_secret",
	JWTDenylist:        "jwt_denylist",
	SMSOtpVerification: "sms_otp_verification",
	User:               "user",
}
View Source
var UserColumns = struct {
	UserID           string
	Name             string
	Email            string
	IsEmailConfirmed string
	PhoneNumber      string
	Nickname         string
	PasswordHash     string
	CreatedAt        string
	UpdatedAt        string
}{
	UserID:           "user_id",
	Name:             "name",
	Email:            "email",
	IsEmailConfirmed: "is_email_confirmed",
	PhoneNumber:      "phone_number",
	Nickname:         "nickname",
	PasswordHash:     "password_hash",
	CreatedAt:        "created_at",
	UpdatedAt:        "updated_at",
}
View Source
var UserRels = struct {
}{}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	UserID           string
	Name             string
	Email            string
	IsEmailConfirmed string
	PhoneNumber      string
	Nickname         string
	PasswordHash     string
	CreatedAt        string
	UpdatedAt        string
}{
	UserID:           "user.user_id",
	Name:             "user.name",
	Email:            "user.email",
	IsEmailConfirmed: "user.is_email_confirmed",
	PhoneNumber:      "user.phone_number",
	Nickname:         "user.nickname",
	PasswordHash:     "user.password_hash",
	CreatedAt:        "user.created_at",
	UpdatedAt:        "user.updated_at",
}
View Source
var UserWhere = struct {
	UserID           whereHelperint
	Name             whereHelperstring
	Email            whereHelperstring
	IsEmailConfirmed whereHelperbool
	PhoneNumber      whereHelperstring
	Nickname         whereHelperstring
	PasswordHash     whereHelperstring
	CreatedAt        whereHelpertime_Time
	UpdatedAt        whereHelpertime_Time
}{
	UserID:           whereHelperint{/* contains filtered or unexported fields */},
	Name:             whereHelperstring{/* contains filtered or unexported fields */},
	Email:            whereHelperstring{/* contains filtered or unexported fields */},
	IsEmailConfirmed: whereHelperbool{/* contains filtered or unexported fields */},
	PhoneNumber:      whereHelperstring{/* contains filtered or unexported fields */},
	Nickname:         whereHelperstring{/* contains filtered or unexported fields */},
	PasswordHash:     whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:        whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:        whereHelpertime_Time{/* contains filtered or unexported fields */},
}

Functions

func AddJWTAudienceSecretHook

func AddJWTAudienceSecretHook(hookPoint boil.HookPoint, jwtAudienceSecretHook JWTAudienceSecretHook)

AddJWTAudienceSecretHook registers your hook function for all future operations.

func AddJWTDenylistHook

func AddJWTDenylistHook(hookPoint boil.HookPoint, jwtDenylistHook JWTDenylistHook)

AddJWTDenylistHook registers your hook function for all future operations.

func AddSMSOtpVerificationHook

func AddSMSOtpVerificationHook(hookPoint boil.HookPoint, smsOtpVerificationHook SMSOtpVerificationHook)

AddSMSOtpVerificationHook registers your hook function for all future operations.

func AddUserHook

func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)

AddUserHook registers your hook function for all future operations.

func JWTAudienceSecretExists

func JWTAudienceSecretExists(ctx context.Context, exec boil.ContextExecutor, jWTAudienceSecretID int) (bool, error)

JWTAudienceSecretExists checks if the JWTAudienceSecret row exists.

func JWTAudienceSecrets

func JWTAudienceSecrets(mods ...qm.QueryMod) jwtAudienceSecretQuery

JWTAudienceSecrets retrieves all the records using an executor.

func JWTDenylistExists

func JWTDenylistExists(ctx context.Context, exec boil.ContextExecutor, jWTDenylistID int) (bool, error)

JWTDenylistExists checks if the JWTDenylist row exists.

func JWTDenylists

func JWTDenylists(mods ...qm.QueryMod) jwtDenylistQuery

JWTDenylists 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 SMSOtpVerificationExists

func SMSOtpVerificationExists(ctx context.Context, exec boil.ContextExecutor, sMSOtpVerificationID int) (bool, error)

SMSOtpVerificationExists checks if the SMSOtpVerification row exists.

func SMSOtpVerifications

func SMSOtpVerifications(mods ...qm.QueryMod) smsOtpVerificationQuery

SMSOtpVerifications retrieves all the records using an executor.

func UserExists

func UserExists(ctx context.Context, exec boil.ContextExecutor, userID int) (bool, error)

UserExists checks if the User row exists.

func Users

func Users(mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

Types

type JWTAudienceSecret

type JWTAudienceSecret struct {
	JWTAudienceSecretID int `boil:"jwt_audience_secret_id" json:"jwt_audience_secret_id" toml:"jwt_audience_secret_id" yaml:"jwt_audience_secret_id"`
	// JWT audience
	Audience string `boil:"audience" json:"audience" toml:"audience" yaml:"audience"`
	// secret
	Secret    string    `boil:"secret" json:"secret" toml:"secret" yaml:"secret"`
	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"`

	R *jwtAudienceSecretR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L jwtAudienceSecretL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

JWTAudienceSecret is an object representing the database table.

func FindJWTAudienceSecret

func FindJWTAudienceSecret(ctx context.Context, exec boil.ContextExecutor, jWTAudienceSecretID int, selectCols ...string) (*JWTAudienceSecret, error)

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

func (*JWTAudienceSecret) Delete

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

func (*JWTAudienceSecret) Insert

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

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

func (*JWTAudienceSecret) Update

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

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

func (o *JWTAudienceSecret) 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 JWTAudienceSecretHook

type JWTAudienceSecretHook func(context.Context, boil.ContextExecutor, *JWTAudienceSecret) error

JWTAudienceSecretHook is the signature for custom JWTAudienceSecret hook methods

type JWTAudienceSecretSlice

type JWTAudienceSecretSlice []*JWTAudienceSecret

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

func (JWTAudienceSecretSlice) DeleteAll

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

func (*JWTAudienceSecretSlice) ReloadAll

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

func (JWTAudienceSecretSlice) UpdateAll

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

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

type JWTDenylist

type JWTDenylist struct {
	JWTDenylistID int `boil:"jwt_denylist_id" json:"jwt_denylist_id" toml:"jwt_denylist_id" yaml:"jwt_denylist_id"`
	// 유저 아이디
	UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	// jti(JWT ID) claim
	Jti       string    `boil:"jti" json:"jti" toml:"jti" yaml:"jti"`
	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"`

	R *jwtDenylistR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L jwtDenylistL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

JWTDenylist is an object representing the database table.

func FindJWTDenylist

func FindJWTDenylist(ctx context.Context, exec boil.ContextExecutor, jWTDenylistID int, selectCols ...string) (*JWTDenylist, error)

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

func (*JWTDenylist) Delete

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

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

func (*JWTDenylist) Insert

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

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

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

func (*JWTDenylist) Update

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

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

func (o *JWTDenylist) 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 JWTDenylistHook

type JWTDenylistHook func(context.Context, boil.ContextExecutor, *JWTDenylist) error

JWTDenylistHook is the signature for custom JWTDenylist hook methods

type JWTDenylistSlice

type JWTDenylistSlice []*JWTDenylist

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

func (JWTDenylistSlice) DeleteAll

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

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

func (*JWTDenylistSlice) ReloadAll

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

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

type SMSOtpVerification struct {
	SMSOtpVerificationID int `boil:"sms_otp_verification_id" json:"sms_otp_verification_id" toml:"sms_otp_verification_id" yaml:"sms_otp_verification_id"`
	// 인증 토큰
	VerificationToken string `boil:"verification_token" json:"verification_token" toml:"verification_token" yaml:"verification_token"`
	// 핸드폰 번호
	PhoneNumber string `boil:"phone_number" json:"phone_number" toml:"phone_number" yaml:"phone_number"`
	// 인증 코드
	OtpCode string `boil:"otp_code" json:"otp_code" toml:"otp_code" yaml:"otp_code"`
	// 만료 일시
	ExpiresAt time.Time `boil:"expires_at" json:"expires_at" toml:"expires_at" yaml:"expires_at"`
	// 검증 시도 횟수
	VerificationTrials int `boil:"verification_trials" json:"verification_trials" toml:"verification_trials" yaml:"verification_trials"`
	// 검증 유효 일시
	VerificationValidUntil null.Time `` /* 147-byte string literal not displayed */
	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"`

	R *smsOtpVerificationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L smsOtpVerificationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

SMSOtpVerification is an object representing the database table.

func FindSMSOtpVerification

func FindSMSOtpVerification(ctx context.Context, exec boil.ContextExecutor, sMSOtpVerificationID int, selectCols ...string) (*SMSOtpVerification, error)

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

func (*SMSOtpVerification) Delete

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

func (*SMSOtpVerification) Insert

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

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

func (*SMSOtpVerification) Update

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

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

func (o *SMSOtpVerification) 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 SMSOtpVerificationHook

type SMSOtpVerificationHook func(context.Context, boil.ContextExecutor, *SMSOtpVerification) error

SMSOtpVerificationHook is the signature for custom SMSOtpVerification hook methods

type SMSOtpVerificationSlice

type SMSOtpVerificationSlice []*SMSOtpVerification

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

func (SMSOtpVerificationSlice) DeleteAll

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

func (*SMSOtpVerificationSlice) ReloadAll

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

func (SMSOtpVerificationSlice) UpdateAll

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

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

type User

type User struct {
	UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	// 이름
	Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
	// 이메일
	Email string `boil:"email" json:"email" toml:"email" yaml:"email"`
	// 이메일 확인 여부
	IsEmailConfirmed bool `boil:"is_email_confirmed" json:"is_email_confirmed" toml:"is_email_confirmed" yaml:"is_email_confirmed"`
	// 핸드폰 번호
	PhoneNumber string `boil:"phone_number" json:"phone_number" toml:"phone_number" yaml:"phone_number"`
	// 닉네임
	Nickname string `boil:"nickname" json:"nickname" toml:"nickname" yaml:"nickname"`
	// 비밀번호
	PasswordHash string    `boil:"password_hash" json:"password_hash" toml:"password_hash" yaml:"password_hash"`
	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"`

	R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

User is an object representing the database table.

func FindUser

func FindUser(ctx context.Context, exec boil.ContextExecutor, userID int, selectCols ...string) (*User, error)

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

func (*User) Delete

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

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

func (*User) Insert

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

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

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

func (*User) Update

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

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

func (o *User) 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 UserHook

type UserHook func(context.Context, boil.ContextExecutor, *User) error

UserHook is the signature for custom User hook methods

type UserSlice

type UserSlice []*User

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

func (UserSlice) DeleteAll

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

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

func (*UserSlice) ReloadAll

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

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