models

package
v0.0.0-...-5e9aa0f Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthItemColumns = struct {
	ID        string
	GroupID   string
	Name      string
	ItemType  string
	Reserved  string
	Obj       string
	Act       string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	GroupID:   "group_id",
	Name:      "name",
	ItemType:  "item_type",
	Reserved:  "reserved",
	Obj:       "obj",
	Act:       "act",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var AuthItemGroupColumns = struct {
	ID        string
	Name      string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	Name:      "name",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var AuthItemGroupRels = struct {
}{}

AuthItemGroupRels is where relationship names are stored.

View Source
var AuthItemGroupWhere = struct {
	ID        whereHelperint
	Name      whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpernull_Time
}{
	ID:        whereHelperint{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var AuthItemRels = struct {
}{}

AuthItemRels is where relationship names are stored.

View Source
var AuthItemWhere = struct {
	ID        whereHelperstring
	GroupID   whereHelperint
	Name      whereHelperstring
	ItemType  whereHelperint
	Reserved  whereHelperbool
	Obj       whereHelperstring
	Act       whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpernull_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	GroupID:   whereHelperint{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	ItemType:  whereHelperint{/* contains filtered or unexported fields */},
	Reserved:  whereHelperbool{/* contains filtered or unexported fields */},
	Obj:       whereHelperstring{/* contains filtered or unexported fields */},
	Act:       whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var AuthRuleColumns = struct {
	ID    string
	PType string
	V0    string
	V1    string
	V2    string
	V3    string
	V4    string
	V5    string
}{
	ID:    "id",
	PType: "p_type",
	V0:    "v0",
	V1:    "v1",
	V2:    "v2",
	V3:    "v3",
	V4:    "v4",
	V5:    "v5",
}
View Source
var AuthRuleRels = struct {
}{}

AuthRuleRels is where relationship names are stored.

View Source
var AuthRuleWhere = struct {
	ID    whereHelperint
	PType whereHelperstring
	V0    whereHelperstring
	V1    whereHelperstring
	V2    whereHelperstring
	V3    whereHelperstring
	V4    whereHelperstring
	V5    whereHelperstring
}{
	ID:    whereHelperint{/* contains filtered or unexported fields */},
	PType: whereHelperstring{/* contains filtered or unexported fields */},
	V0:    whereHelperstring{/* contains filtered or unexported fields */},
	V1:    whereHelperstring{/* contains filtered or unexported fields */},
	V2:    whereHelperstring{/* contains filtered or unexported fields */},
	V3:    whereHelperstring{/* contains filtered or unexported fields */},
	V4:    whereHelperstring{/* contains filtered or unexported fields */},
	V5:    whereHelperstring{/* contains filtered or unexported fields */},
}
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 PostColumns = struct {
	ID        string
	State     string
	UserID    string
	Title     string
	Content   string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	State:     "state",
	UserID:    "user_id",
	Title:     "title",
	Content:   "content",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var PostMetumColumns = struct {
	PostID    string
	MetaKey   string
	MetaValue string
	CreatedAt string
	UpdatedAt string
}{
	PostID:    "post_id",
	MetaKey:   "meta_key",
	MetaValue: "meta_value",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var PostMetumRels = struct {
}{}

PostMetumRels is where relationship names are stored.

View Source
var PostMetumWhere = struct {
	PostID    whereHelperint64
	MetaKey   whereHelperstring
	MetaValue whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpernull_Time
}{
	PostID:    whereHelperint64{/* contains filtered or unexported fields */},
	MetaKey:   whereHelperstring{/* contains filtered or unexported fields */},
	MetaValue: whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var PostRels = struct {
}{}

PostRels is where relationship names are stored.

View Source
var PostWhere = struct {
	ID        whereHelperint64
	State     whereHelperint
	UserID    whereHelperint64
	Title     whereHelperstring
	Content   whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpernull_Time
}{
	ID:        whereHelperint64{/* contains filtered or unexported fields */},
	State:     whereHelperint{/* contains filtered or unexported fields */},
	UserID:    whereHelperint64{/* contains filtered or unexported fields */},
	Title:     whereHelperstring{/* contains filtered or unexported fields */},
	Content:   whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var SchemaMigrationColumns = struct {
	Version string
	Dirty   string
}{
	Version: "version",
	Dirty:   "dirty",
}
View Source
var SchemaMigrationRels = struct {
}{}

SchemaMigrationRels is where relationship names are stored.

View Source
var SchemaMigrationWhere = struct {
	Version whereHelperint64
	Dirty   whereHelperbool
}{
	Version: whereHelperint64{/* contains filtered or unexported fields */},
	Dirty:   whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	AuthItemGroups   string
	AuthItems        string
	AuthRules        string
	PostMeta         string
	Posts            string
	SchemaMigrations string
	Users            string
}{
	AuthItemGroups:   "auth_item_groups",
	AuthItems:        "auth_items",
	AuthRules:        "auth_rules",
	PostMeta:         "post_meta",
	Posts:            "posts",
	SchemaMigrations: "schema_migrations",
	Users:            "users",
}
View Source
var UserColumns = struct {
	ID                 string
	Username           string
	Email              string
	VerificationToken  string
	HashedPassword     string
	PasswordResetToken string
	State              string
	CreatedAt          string
	UpdatedAt          string
	DeletedAt          string
}{
	ID:                 "id",
	Username:           "username",
	Email:              "email",
	VerificationToken:  "verification_token",
	HashedPassword:     "hashed_password",
	PasswordResetToken: "password_reset_token",
	State:              "state",
	CreatedAt:          "created_at",
	UpdatedAt:          "updated_at",
	DeletedAt:          "deleted_at",
}
View Source
var UserRels = struct {
}{}

UserRels is where relationship names are stored.

View Source
var UserWhere = struct {
	ID                 whereHelperint64
	Username           whereHelperstring
	Email              whereHelperstring
	VerificationToken  whereHelpernull_String
	HashedPassword     whereHelperstring
	PasswordResetToken whereHelpernull_String
	State              whereHelperint
	CreatedAt          whereHelpertime_Time
	UpdatedAt          whereHelpernull_Time
	DeletedAt          whereHelpernull_Time
}{
	ID:                 whereHelperint64{/* contains filtered or unexported fields */},
	Username:           whereHelperstring{/* contains filtered or unexported fields */},
	Email:              whereHelperstring{/* contains filtered or unexported fields */},
	VerificationToken:  whereHelpernull_String{/* contains filtered or unexported fields */},
	HashedPassword:     whereHelperstring{/* contains filtered or unexported fields */},
	PasswordResetToken: whereHelpernull_String{/* contains filtered or unexported fields */},
	State:              whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt:          whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:          whereHelpernull_Time{/* contains filtered or unexported fields */},
	DeletedAt:          whereHelpernull_Time{/* contains filtered or unexported fields */},
}

Functions

func AddAuthItemGroupHook

func AddAuthItemGroupHook(hookPoint boil.HookPoint, authItemGroupHook AuthItemGroupHook)

AddAuthItemGroupHook registers your hook function for all future operations.

func AddAuthItemHook

func AddAuthItemHook(hookPoint boil.HookPoint, authItemHook AuthItemHook)

AddAuthItemHook registers your hook function for all future operations.

func AddAuthRuleHook

func AddAuthRuleHook(hookPoint boil.HookPoint, authRuleHook AuthRuleHook)

AddAuthRuleHook registers your hook function for all future operations.

func AddPostHook

func AddPostHook(hookPoint boil.HookPoint, postHook PostHook)

AddPostHook registers your hook function for all future operations.

func AddPostMetumHook

func AddPostMetumHook(hookPoint boil.HookPoint, postMetumHook PostMetumHook)

AddPostMetumHook registers your hook function for all future operations.

func AddSchemaMigrationHook

func AddSchemaMigrationHook(hookPoint boil.HookPoint, schemaMigrationHook SchemaMigrationHook)

AddSchemaMigrationHook 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 AuthItemExists

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

AuthItemExists checks if the AuthItem row exists.

func AuthItemGroupExists

func AuthItemGroupExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

AuthItemGroupExists checks if the AuthItemGroup row exists.

func AuthItemGroups

func AuthItemGroups(mods ...qm.QueryMod) authItemGroupQuery

AuthItemGroups retrieves all the records using an executor.

func AuthItems

func AuthItems(mods ...qm.QueryMod) authItemQuery

AuthItems retrieves all the records using an executor.

func AuthRuleExists

func AuthRuleExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)

AuthRuleExists checks if the AuthRule row exists.

func AuthRules

func AuthRules(mods ...qm.QueryMod) authRuleQuery

AuthRules 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 PostExists

func PostExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

PostExists checks if the Post row exists.

func PostMeta

func PostMeta(mods ...qm.QueryMod) postMetumQuery

PostMeta retrieves all the records using an executor.

func PostMetumExists

func PostMetumExists(ctx context.Context, exec boil.ContextExecutor, postID int64, metaKey string) (bool, error)

PostMetumExists checks if the PostMetum row exists.

func Posts

func Posts(mods ...qm.QueryMod) postQuery

Posts retrieves all the records using an executor.

func SchemaMigrationExists

func SchemaMigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)

SchemaMigrationExists checks if the SchemaMigration row exists.

func SchemaMigrations

func SchemaMigrations(mods ...qm.QueryMod) schemaMigrationQuery

SchemaMigrations retrieves all the records using an executor.

func UserExists

func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (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 AuthItem

type AuthItem struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	GroupID   int       `boil:"group_id" json:"group_id" toml:"group_id" yaml:"group_id"`
	Name      string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	ItemType  int       `boil:"item_type" json:"item_type" toml:"item_type" yaml:"item_type"`
	Reserved  bool      `boil:"reserved" json:"reserved" toml:"reserved" yaml:"reserved"`
	Obj       string    `boil:"obj" json:"obj" toml:"obj" yaml:"obj"`
	Act       string    `boil:"act" json:"act" toml:"act" yaml:"act"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`

	R *authItemR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L authItemL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AuthItem is an object representing the database table.

func FindAuthItem

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

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

func (*AuthItem) Delete

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

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

func (*AuthItem) Insert

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

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

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

func (*AuthItem) Update

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

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

func (o *AuthItem) 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 AuthItemGroup

type AuthItemGroup struct {
	ID        int       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      string    `boil:"name" json:"name" toml:"name" yaml:"name"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`

	R *authItemGroupR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L authItemGroupL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AuthItemGroup is an object representing the database table.

func FindAuthItemGroup

func FindAuthItemGroup(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*AuthItemGroup, error)

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

func (*AuthItemGroup) Delete

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

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

func (*AuthItemGroup) Insert

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

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

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

func (*AuthItemGroup) Update

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

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

func (o *AuthItemGroup) 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 AuthItemGroupHook

type AuthItemGroupHook func(context.Context, boil.ContextExecutor, *AuthItemGroup) error

AuthItemGroupHook is the signature for custom AuthItemGroup hook methods

type AuthItemGroupSlice

type AuthItemGroupSlice []*AuthItemGroup

AuthItemGroupSlice is an alias for a slice of pointers to AuthItemGroup. This should generally be used opposed to []AuthItemGroup.

func (AuthItemGroupSlice) DeleteAll

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

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

func (*AuthItemGroupSlice) ReloadAll

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

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

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

type AuthItemHook

type AuthItemHook func(context.Context, boil.ContextExecutor, *AuthItem) error

AuthItemHook is the signature for custom AuthItem hook methods

type AuthItemSlice

type AuthItemSlice []*AuthItem

AuthItemSlice is an alias for a slice of pointers to AuthItem. This should generally be used opposed to []AuthItem.

func (AuthItemSlice) DeleteAll

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

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

func (*AuthItemSlice) ReloadAll

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

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

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

type AuthRule

type AuthRule struct {
	ID    int    `boil:"id" json:"id" toml:"id" yaml:"id"`
	PType string `boil:"p_type" json:"p_type" toml:"p_type" yaml:"p_type"`
	V0    string `boil:"v0" json:"v0" toml:"v0" yaml:"v0"`
	V1    string `boil:"v1" json:"v1" toml:"v1" yaml:"v1"`
	V2    string `boil:"v2" json:"v2" toml:"v2" yaml:"v2"`
	V3    string `boil:"v3" json:"v3" toml:"v3" yaml:"v3"`
	V4    string `boil:"v4" json:"v4" toml:"v4" yaml:"v4"`
	V5    string `boil:"v5" json:"v5" toml:"v5" yaml:"v5"`

	R *authRuleR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L authRuleL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AuthRule is an object representing the database table.

func FindAuthRule

func FindAuthRule(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*AuthRule, error)

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

func (*AuthRule) Delete

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

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

func (*AuthRule) Insert

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

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

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

func (*AuthRule) Update

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

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

func (o *AuthRule) 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 AuthRuleHook

type AuthRuleHook func(context.Context, boil.ContextExecutor, *AuthRule) error

AuthRuleHook is the signature for custom AuthRule hook methods

type AuthRuleSlice

type AuthRuleSlice []*AuthRule

AuthRuleSlice is an alias for a slice of pointers to AuthRule. This should generally be used opposed to []AuthRule.

func (AuthRuleSlice) DeleteAll

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

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

func (*AuthRuleSlice) ReloadAll

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

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

type Post struct {
	ID        int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	State     int       `boil:"state" json:"state" toml:"state" yaml:"state"`
	UserID    int64     `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	Title     string    `boil:"title" json:"title" toml:"title" yaml:"title"`
	Content   string    `boil:"content" json:"content" toml:"content" yaml:"content"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`

	R *postR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L postL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Post is an object representing the database table.

func FindPost

func FindPost(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Post, error)

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

func (*Post) Delete

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

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

func (*Post) Insert

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

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

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

func (*Post) Update

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

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

func (o *Post) 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 PostHook

type PostHook func(context.Context, boil.ContextExecutor, *Post) error

PostHook is the signature for custom Post hook methods

type PostMetum

type PostMetum struct {
	PostID    int64     `boil:"post_id" json:"post_id" toml:"post_id" yaml:"post_id"`
	MetaKey   string    `boil:"meta_key" json:"meta_key" toml:"meta_key" yaml:"meta_key"`
	MetaValue string    `boil:"meta_value" json:"meta_value" toml:"meta_value" yaml:"meta_value"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt null.Time `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`

	R *postMetumR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L postMetumL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

PostMetum is an object representing the database table.

func FindPostMetum

func FindPostMetum(ctx context.Context, exec boil.ContextExecutor, postID int64, metaKey string, selectCols ...string) (*PostMetum, error)

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

func (*PostMetum) Delete

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

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

func (*PostMetum) Insert

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

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

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

func (*PostMetum) Update

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

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

func (o *PostMetum) 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 PostMetumHook

type PostMetumHook func(context.Context, boil.ContextExecutor, *PostMetum) error

PostMetumHook is the signature for custom PostMetum hook methods

type PostMetumSlice

type PostMetumSlice []*PostMetum

PostMetumSlice is an alias for a slice of pointers to PostMetum. This should generally be used opposed to []PostMetum.

func (PostMetumSlice) DeleteAll

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

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

func (*PostMetumSlice) ReloadAll

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

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

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

type PostSlice

type PostSlice []*Post

PostSlice is an alias for a slice of pointers to Post. This should generally be used opposed to []Post.

func (PostSlice) DeleteAll

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

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

func (*PostSlice) ReloadAll

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

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

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

type SchemaMigration

type SchemaMigration struct {
	Version int64 `boil:"version" json:"version" toml:"version" yaml:"version"`
	Dirty   bool  `boil:"dirty" json:"dirty" toml:"dirty" yaml:"dirty"`

	R *schemaMigrationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L schemaMigrationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

SchemaMigration is an object representing the database table.

func FindSchemaMigration

func FindSchemaMigration(ctx context.Context, exec boil.ContextExecutor, version int64, selectCols ...string) (*SchemaMigration, error)

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

func (*SchemaMigration) Delete

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

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

func (*SchemaMigration) Insert

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

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

func (*SchemaMigration) Update

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

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

func (o *SchemaMigration) 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 SchemaMigrationHook

type SchemaMigrationHook func(context.Context, boil.ContextExecutor, *SchemaMigration) error

SchemaMigrationHook is the signature for custom SchemaMigration hook methods

type SchemaMigrationSlice

type SchemaMigrationSlice []*SchemaMigration

SchemaMigrationSlice is an alias for a slice of pointers to SchemaMigration. This should generally be used opposed to []SchemaMigration.

func (SchemaMigrationSlice) DeleteAll

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

func (*SchemaMigrationSlice) ReloadAll

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

func (SchemaMigrationSlice) UpdateAll

func (o SchemaMigrationSlice) 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 {
	ID                 int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Username           string      `boil:"username" json:"username" toml:"username" yaml:"username"`
	Email              string      `boil:"email" json:"email" toml:"email" yaml:"email"`
	VerificationToken  null.String `boil:"verification_token" json:"verification_token,omitempty" toml:"verification_token" yaml:"verification_token,omitempty"`
	HashedPassword     string      `boil:"hashed_password" json:"hashed_password" toml:"hashed_password" yaml:"hashed_password"`
	PasswordResetToken null.String `` /* 131-byte string literal not displayed */
	State              int         `boil:"state" json:"state" toml:"state" yaml:"state"`
	CreatedAt          time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt          null.Time   `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`
	DeletedAt          null.Time   `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"`

	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, iD int64, 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 generally be used opposed to []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