models

package
v0.0.0-...-c0b8c70 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountActivationColumns = struct {
	ID              string
	UserID          string
	UserEmail       string
	ActivationToken string
	Expiration      string
	CreatedAt       string
}{
	ID:              "id",
	UserID:          "user_id",
	UserEmail:       "user_email",
	ActivationToken: "activation_token",
	Expiration:      "expiration",
	CreatedAt:       "created_at",
}
View Source
var AccountActivationRels = struct {
	User string
}{
	User: "User",
}

AccountActivationRels is where relationship names are stored.

View Source
var AccountActivationTableColumns = struct {
	ID              string
	UserID          string
	UserEmail       string
	ActivationToken string
	Expiration      string
	CreatedAt       string
}{
	ID:              "account_activations.id",
	UserID:          "account_activations.user_id",
	UserEmail:       "account_activations.user_email",
	ActivationToken: "account_activations.activation_token",
	Expiration:      "account_activations.expiration",
	CreatedAt:       "account_activations.created_at",
}
View Source
var AccountActivationWhere = struct {
	ID              whereHelperstring
	UserID          whereHelperstring
	UserEmail       whereHelperstring
	ActivationToken whereHelperint
	Expiration      whereHelpertime_Time
	CreatedAt       whereHelpernull_Time
}{
	ID:              whereHelperstring{/* contains filtered or unexported fields */},
	UserID:          whereHelperstring{/* contains filtered or unexported fields */},
	UserEmail:       whereHelperstring{/* contains filtered or unexported fields */},
	ActivationToken: whereHelperint{/* contains filtered or unexported fields */},
	Expiration:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var ArtColumns = struct {
	ID        string
	Title     string
	ImageID   string
	AuthorID  string
	CreatedAt string
	UpdatedAt string
	DeletedAt string
	Status    string
}{
	ID:        "id",
	Title:     "title",
	ImageID:   "image_id",
	AuthorID:  "author_id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
	DeletedAt: "deleted_at",
	Status:    "status",
}
View Source
var ArtRels = struct {
	Author        string
	ArtVariations string
	Compositions  string
}{
	Author:        "Author",
	ArtVariations: "ArtVariations",
	Compositions:  "Compositions",
}

ArtRels is where relationship names are stored.

View Source
var ArtTableColumns = struct {
	ID        string
	Title     string
	ImageID   string
	AuthorID  string
	CreatedAt string
	UpdatedAt string
	DeletedAt string
	Status    string
}{
	ID:        "arts.id",
	Title:     "arts.title",
	ImageID:   "arts.image_id",
	AuthorID:  "arts.author_id",
	CreatedAt: "arts.created_at",
	UpdatedAt: "arts.updated_at",
	DeletedAt: "arts.deleted_at",
	Status:    "arts.status",
}
View Source
var ArtVariationColumns = struct {
	ID        string
	ArtID     string
	ImageID   string
	AuthorID  string
	CreatedAt string
	UpdatedAt string
	DeletedAt string
}{
	ID:        "id",
	ArtID:     "art_id",
	ImageID:   "image_id",
	AuthorID:  "author_id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
	DeletedAt: "deleted_at",
}
View Source
var ArtVariationRels = struct {
	Art    string
	Author string
}{
	Art:    "Art",
	Author: "Author",
}

ArtVariationRels is where relationship names are stored.

View Source
var ArtVariationTableColumns = struct {
	ID        string
	ArtID     string
	ImageID   string
	AuthorID  string
	CreatedAt string
	UpdatedAt string
	DeletedAt string
}{
	ID:        "art_variations.id",
	ArtID:     "art_variations.art_id",
	ImageID:   "art_variations.image_id",
	AuthorID:  "art_variations.author_id",
	CreatedAt: "art_variations.created_at",
	UpdatedAt: "art_variations.updated_at",
	DeletedAt: "art_variations.deleted_at",
}
View Source
var ArtVariationWhere = struct {
	ID        whereHelperstring
	ArtID     whereHelpernull_String
	ImageID   whereHelpernull_String
	AuthorID  whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
	DeletedAt whereHelpernull_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	ArtID:     whereHelpernull_String{/* contains filtered or unexported fields */},
	ImageID:   whereHelpernull_String{/* contains filtered or unexported fields */},
	AuthorID:  whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
}
View Source
var ArtWhere = struct {
	ID        whereHelperstring
	Title     whereHelperstring
	ImageID   whereHelpernull_String
	AuthorID  whereHelperstring
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
	DeletedAt whereHelpernull_Time
	Status    whereHelperArtStatusEnum
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	Title:     whereHelperstring{/* contains filtered or unexported fields */},
	ImageID:   whereHelpernull_String{/* contains filtered or unexported fields */},
	AuthorID:  whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	Status:    whereHelperArtStatusEnum{/* contains filtered or unexported fields */},
}
View Source
var CompositionColumns = struct {
	ID                string
	ArtID             string
	Status            string
	NailsQuantity     string
	ImgSize           string
	MaxPaths          string
	StartingNail      string
	MinimumDifference string
	BrightnessFactor  string
	ImageContrast     string
	PhysicalRadius    string
	PreviewURL        string
	GcodeURL          string
	PathlistURL       string
	ThreadLength      string
	TotalLines        string
	ErrorMessage      string
	CreatedAt         string
	UpdatedAt         string
}{
	ID:                "id",
	ArtID:             "art_id",
	Status:            "status",
	NailsQuantity:     "nails_quantity",
	ImgSize:           "img_size",
	MaxPaths:          "max_paths",
	StartingNail:      "starting_nail",
	MinimumDifference: "minimum_difference",
	BrightnessFactor:  "brightness_factor",
	ImageContrast:     "image_contrast",
	PhysicalRadius:    "physical_radius",
	PreviewURL:        "preview_url",
	GcodeURL:          "gcode_url",
	PathlistURL:       "pathlist_url",
	ThreadLength:      "thread_length",
	TotalLines:        "total_lines",
	ErrorMessage:      "error_message",
	CreatedAt:         "created_at",
	UpdatedAt:         "updated_at",
}
View Source
var CompositionRels = struct {
	Art string
}{
	Art: "Art",
}

CompositionRels is where relationship names are stored.

View Source
var CompositionTableColumns = struct {
	ID                string
	ArtID             string
	Status            string
	NailsQuantity     string
	ImgSize           string
	MaxPaths          string
	StartingNail      string
	MinimumDifference string
	BrightnessFactor  string
	ImageContrast     string
	PhysicalRadius    string
	PreviewURL        string
	GcodeURL          string
	PathlistURL       string
	ThreadLength      string
	TotalLines        string
	ErrorMessage      string
	CreatedAt         string
	UpdatedAt         string
}{
	ID:                "compositions.id",
	ArtID:             "compositions.art_id",
	Status:            "compositions.status",
	NailsQuantity:     "compositions.nails_quantity",
	ImgSize:           "compositions.img_size",
	MaxPaths:          "compositions.max_paths",
	StartingNail:      "compositions.starting_nail",
	MinimumDifference: "compositions.minimum_difference",
	BrightnessFactor:  "compositions.brightness_factor",
	ImageContrast:     "compositions.image_contrast",
	PhysicalRadius:    "compositions.physical_radius",
	PreviewURL:        "compositions.preview_url",
	GcodeURL:          "compositions.gcode_url",
	PathlistURL:       "compositions.pathlist_url",
	ThreadLength:      "compositions.thread_length",
	TotalLines:        "compositions.total_lines",
	ErrorMessage:      "compositions.error_message",
	CreatedAt:         "compositions.created_at",
	UpdatedAt:         "compositions.updated_at",
}
View Source
var CompositionWhere = struct {
	ID                whereHelperstring
	ArtID             whereHelperstring
	Status            whereHelperCompositionStatusEnum
	NailsQuantity     whereHelperint
	ImgSize           whereHelperint
	MaxPaths          whereHelperint
	StartingNail      whereHelperint
	MinimumDifference whereHelperint
	BrightnessFactor  whereHelperint
	ImageContrast     whereHelperfloat64
	PhysicalRadius    whereHelperfloat64
	PreviewURL        whereHelpernull_String
	GcodeURL          whereHelpernull_String
	PathlistURL       whereHelpernull_String
	ThreadLength      whereHelpernull_Int
	TotalLines        whereHelpernull_Int
	ErrorMessage      whereHelpernull_String
	CreatedAt         whereHelpertime_Time
	UpdatedAt         whereHelpertime_Time
}{
	ID:                whereHelperstring{/* contains filtered or unexported fields */},
	ArtID:             whereHelperstring{/* contains filtered or unexported fields */},
	Status:            whereHelperCompositionStatusEnum{/* contains filtered or unexported fields */},
	NailsQuantity:     whereHelperint{/* contains filtered or unexported fields */},
	ImgSize:           whereHelperint{/* contains filtered or unexported fields */},
	MaxPaths:          whereHelperint{/* contains filtered or unexported fields */},
	StartingNail:      whereHelperint{/* contains filtered or unexported fields */},
	MinimumDifference: whereHelperint{/* contains filtered or unexported fields */},
	BrightnessFactor:  whereHelperint{/* contains filtered or unexported fields */},
	ImageContrast:     whereHelperfloat64{/* contains filtered or unexported fields */},
	PhysicalRadius:    whereHelperfloat64{/* contains filtered or unexported fields */},
	PreviewURL:        whereHelpernull_String{/* contains filtered or unexported fields */},
	GcodeURL:          whereHelpernull_String{/* contains filtered or unexported fields */},
	PathlistURL:       whereHelpernull_String{/* contains filtered or unexported fields */},
	ThreadLength:      whereHelpernull_Int{/* contains filtered or unexported fields */},
	TotalLines:        whereHelpernull_Int{/* contains filtered or unexported fields */},
	ErrorMessage:      whereHelpernull_String{/* contains filtered or unexported fields */},
	CreatedAt:         whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:         whereHelpertime_Time{/* 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 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 SchemaMigrationTableColumns = struct {
	Version string
	Dirty   string
}{
	Version: "schema_migrations.version",
	Dirty:   "schema_migrations.dirty",
}
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 SessionColumns = struct {
	Token  string
	Data   string
	Expiry string
}{
	Token:  "token",
	Data:   "data",
	Expiry: "expiry",
}
View Source
var SessionRels = struct {
}{}

SessionRels is where relationship names are stored.

View Source
var SessionTableColumns = struct {
	Token  string
	Data   string
	Expiry string
}{
	Token:  "sessions.token",
	Data:   "sessions.data",
	Expiry: "sessions.expiry",
}
View Source
var SessionWhere = struct {
	Token  whereHelperstring
	Data   whereHelper__byte
	Expiry whereHelpertime_Time
}{
	Token:  whereHelperstring{/* contains filtered or unexported fields */},
	Data:   whereHelper__byte{/* contains filtered or unexported fields */},
	Expiry: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	AccountActivations string
	ArtVariations      string
	Arts               string
	Compositions       string
	SchemaMigrations   string
	Sessions           string
	Users              string
}{
	AccountActivations: "account_activations",
	ArtVariations:      "art_variations",
	Arts:               "arts",
	Compositions:       "compositions",
	SchemaMigrations:   "schema_migrations",
	Sessions:           "sessions",
	Users:              "users",
}
View Source
var UserColumns = struct {
	ID          string
	Email       string
	AvatarID    string
	Active      string
	CreatedAt   string
	UpdatedAt   string
	Role        string
	FirstName   string
	LastName    string
	FirebaseUID string
}{
	ID:          "id",
	Email:       "email",
	AvatarID:    "avatar_id",
	Active:      "active",
	CreatedAt:   "created_at",
	UpdatedAt:   "updated_at",
	Role:        "role",
	FirstName:   "first_name",
	LastName:    "last_name",
	FirebaseUID: "firebase_uid",
}
View Source
var UserRels = struct {
	AccountActivations  string
	AuthorArtVariations string
	AuthorArts          string
}{
	AccountActivations:  "AccountActivations",
	AuthorArtVariations: "AuthorArtVariations",
	AuthorArts:          "AuthorArts",
}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	ID          string
	Email       string
	AvatarID    string
	Active      string
	CreatedAt   string
	UpdatedAt   string
	Role        string
	FirstName   string
	LastName    string
	FirebaseUID string
}{
	ID:          "users.id",
	Email:       "users.email",
	AvatarID:    "users.avatar_id",
	Active:      "users.active",
	CreatedAt:   "users.created_at",
	UpdatedAt:   "users.updated_at",
	Role:        "users.role",
	FirstName:   "users.first_name",
	LastName:    "users.last_name",
	FirebaseUID: "users.firebase_uid",
}
View Source
var UserWhere = struct {
	ID          whereHelperstring
	Email       whereHelpernull_String
	AvatarID    whereHelpernull_String
	Active      whereHelperbool
	CreatedAt   whereHelpertime_Time
	UpdatedAt   whereHelpertime_Time
	Role        whereHelperRoleEnum
	FirstName   whereHelperstring
	LastName    whereHelpernull_String
	FirebaseUID whereHelpernull_String
}{
	ID:          whereHelperstring{/* contains filtered or unexported fields */},
	Email:       whereHelpernull_String{/* contains filtered or unexported fields */},
	AvatarID:    whereHelpernull_String{/* contains filtered or unexported fields */},
	Active:      whereHelperbool{/* contains filtered or unexported fields */},
	CreatedAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
	Role:        whereHelperRoleEnum{/* contains filtered or unexported fields */},
	FirstName:   whereHelperstring{/* contains filtered or unexported fields */},
	LastName:    whereHelpernull_String{/* contains filtered or unexported fields */},
	FirebaseUID: whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AccountActivationExists

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

AccountActivationExists checks if the AccountActivation row exists.

func AccountActivations

func AccountActivations(mods ...qm.QueryMod) accountActivationQuery

AccountActivations retrieves all the records using an executor.

func AddAccountActivationHook

func AddAccountActivationHook(hookPoint boil.HookPoint, accountActivationHook AccountActivationHook)

AddAccountActivationHook registers your hook function for all future operations.

func AddArtHook

func AddArtHook(hookPoint boil.HookPoint, artHook ArtHook)

AddArtHook registers your hook function for all future operations.

func AddArtVariationHook

func AddArtVariationHook(hookPoint boil.HookPoint, artVariationHook ArtVariationHook)

AddArtVariationHook registers your hook function for all future operations.

func AddCompositionHook

func AddCompositionHook(hookPoint boil.HookPoint, compositionHook CompositionHook)

AddCompositionHook 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 AddSessionHook

func AddSessionHook(hookPoint boil.HookPoint, sessionHook SessionHook)

AddSessionHook 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 ArtExists

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

ArtExists checks if the Art row exists.

func ArtVariationExists

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

ArtVariationExists checks if the ArtVariation row exists.

func ArtVariations

func ArtVariations(mods ...qm.QueryMod) artVariationQuery

ArtVariations retrieves all the records using an executor.

func Arts

func Arts(mods ...qm.QueryMod) artQuery

Arts retrieves all the records using an executor.

func CompositionExists

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

CompositionExists checks if the Composition row exists.

func Compositions

func Compositions(mods ...qm.QueryMod) compositionQuery

Compositions 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 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 SessionExists

func SessionExists(ctx context.Context, exec boil.ContextExecutor, token string) (bool, error)

SessionExists checks if the Session row exists.

func Sessions

func Sessions(mods ...qm.QueryMod) sessionQuery

Sessions retrieves all the records using an executor.

func UserExists

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

type AccountActivation struct {
	ID              string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	UserID          string    `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	UserEmail       string    `boil:"user_email" json:"user_email" toml:"user_email" yaml:"user_email"`
	ActivationToken int       `boil:"activation_token" json:"activation_token" toml:"activation_token" yaml:"activation_token"`
	Expiration      time.Time `boil:"expiration" json:"expiration" toml:"expiration" yaml:"expiration"`
	CreatedAt       null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"`

	R *accountActivationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L accountActivationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

AccountActivation is an object representing the database table.

func FindAccountActivation

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

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

func (*AccountActivation) Delete

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

func (*AccountActivation) Exists

Exists checks if the AccountActivation row exists.

func (*AccountActivation) Insert

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

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

func (*AccountActivation) SetUser

func (o *AccountActivation) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetUser of the accountActivation to the related item. Sets o.R.User to related. Adds o to related.R.AccountActivations.

func (*AccountActivation) Update

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

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

func (o *AccountActivation) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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.

func (*AccountActivation) User

func (o *AccountActivation) User(mods ...qm.QueryMod) userQuery

User pointed to by the foreign key.

type AccountActivationHook

type AccountActivationHook func(context.Context, boil.ContextExecutor, *AccountActivation) error

AccountActivationHook is the signature for custom AccountActivation hook methods

type AccountActivationSlice

type AccountActivationSlice []*AccountActivation

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

func (AccountActivationSlice) DeleteAll

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

func (*AccountActivationSlice) ReloadAll

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

func (AccountActivationSlice) UpdateAll

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

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

type Art

type Art struct {
	ID        string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	Title     string      `boil:"title" json:"title" toml:"title" yaml:"title"`
	ImageID   null.String `boil:"image_id" json:"image_id,omitempty" toml:"image_id" yaml:"image_id,omitempty"`
	AuthorID  string      `boil:"author_id" json:"author_id" toml:"author_id" yaml:"author_id"`
	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"`
	DeletedAt null.Time   `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"`
	// Current status of the art resource
	Status ArtStatusEnum `boil:"status" json:"status" toml:"status" yaml:"status"`

	R *artR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L artL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Art is an object representing the database table.

func FindArt

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

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

func (*Art) AddArtVariations

func (o *Art) AddArtVariations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ArtVariation) error

AddArtVariations adds the given related objects to the existing relationships of the art, optionally inserting them as new records. Appends related to o.R.ArtVariations. Sets related.R.Art appropriately.

func (*Art) AddCompositions

func (o *Art) AddCompositions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Composition) error

AddCompositions adds the given related objects to the existing relationships of the art, optionally inserting them as new records. Appends related to o.R.Compositions. Sets related.R.Art appropriately.

func (*Art) ArtVariations

func (o *Art) ArtVariations(mods ...qm.QueryMod) artVariationQuery

ArtVariations retrieves all the art_variation's ArtVariations with an executor.

func (*Art) Author

func (o *Art) Author(mods ...qm.QueryMod) userQuery

Author pointed to by the foreign key.

func (*Art) Compositions

func (o *Art) Compositions(mods ...qm.QueryMod) compositionQuery

Compositions retrieves all the composition's Compositions with an executor.

func (*Art) Delete

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

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

func (*Art) Exists

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

Exists checks if the Art row exists.

func (*Art) Insert

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

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

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

func (*Art) RemoveArtVariations

func (o *Art) RemoveArtVariations(ctx context.Context, exec boil.ContextExecutor, related ...*ArtVariation) error

RemoveArtVariations relationships from objects passed in. Removes related items from R.ArtVariations (uses pointer comparison, removal does not keep order) Sets related.R.Art.

func (*Art) SetArtVariations

func (o *Art) SetArtVariations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ArtVariation) error

SetArtVariations removes all previously related items of the art replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Art's ArtVariations accordingly. Replaces o.R.ArtVariations with related. Sets related.R.Art's ArtVariations accordingly.

func (*Art) SetAuthor

func (o *Art) SetAuthor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetAuthor of the art to the related item. Sets o.R.Author to related. Adds o to related.R.AuthorArts.

func (*Art) Update

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

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

func (o *Art) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 ArtHook

type ArtHook func(context.Context, boil.ContextExecutor, *Art) error

ArtHook is the signature for custom Art hook methods

type ArtSlice

type ArtSlice []*Art

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

func (ArtSlice) DeleteAll

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

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

func (*ArtSlice) ReloadAll

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

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

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

type ArtStatusEnum

type ArtStatusEnum string
const (
	ArtStatusEnumPENDING_IMAGE ArtStatusEnum = "PENDING_IMAGE"
	ArtStatusEnumPROCESSING    ArtStatusEnum = "PROCESSING"
	ArtStatusEnumCOMPLETE      ArtStatusEnum = "COMPLETE"
	ArtStatusEnumFAILED        ArtStatusEnum = "FAILED"
	ArtStatusEnumARCHIVED      ArtStatusEnum = "ARCHIVED"
)

Enum values for ArtStatusEnum

func AllArtStatusEnum

func AllArtStatusEnum() []ArtStatusEnum

func (ArtStatusEnum) IsValid

func (e ArtStatusEnum) IsValid() error

func (ArtStatusEnum) Ordinal

func (e ArtStatusEnum) Ordinal() int

func (ArtStatusEnum) String

func (e ArtStatusEnum) String() string

type ArtVariation

type ArtVariation struct {
	ID        string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	ArtID     null.String `boil:"art_id" json:"art_id,omitempty" toml:"art_id" yaml:"art_id,omitempty"`
	ImageID   null.String `boil:"image_id" json:"image_id,omitempty" toml:"image_id" yaml:"image_id,omitempty"`
	AuthorID  string      `boil:"author_id" json:"author_id" toml:"author_id" yaml:"author_id"`
	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"`
	DeletedAt null.Time   `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"`

	R *artVariationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L artVariationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

ArtVariation is an object representing the database table.

func FindArtVariation

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

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

func (*ArtVariation) Art

func (o *ArtVariation) Art(mods ...qm.QueryMod) artQuery

Art pointed to by the foreign key.

func (*ArtVariation) Author

func (o *ArtVariation) Author(mods ...qm.QueryMod) userQuery

Author pointed to by the foreign key.

func (*ArtVariation) Delete

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

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

func (*ArtVariation) Exists

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

Exists checks if the ArtVariation row exists.

func (*ArtVariation) Insert

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

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

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

func (*ArtVariation) RemoveArt

func (o *ArtVariation) RemoveArt(ctx context.Context, exec boil.ContextExecutor, related *Art) error

RemoveArt relationship. Sets o.R.Art to nil. Removes o from all passed in related items' relationships struct.

func (*ArtVariation) SetArt

func (o *ArtVariation) SetArt(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Art) error

SetArt of the artVariation to the related item. Sets o.R.Art to related. Adds o to related.R.ArtVariations.

func (*ArtVariation) SetAuthor

func (o *ArtVariation) SetAuthor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetAuthor of the artVariation to the related item. Sets o.R.Author to related. Adds o to related.R.AuthorArtVariations.

func (*ArtVariation) Update

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

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

func (o *ArtVariation) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 ArtVariationHook

type ArtVariationHook func(context.Context, boil.ContextExecutor, *ArtVariation) error

ArtVariationHook is the signature for custom ArtVariation hook methods

type ArtVariationSlice

type ArtVariationSlice []*ArtVariation

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

func (ArtVariationSlice) DeleteAll

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

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

func (*ArtVariationSlice) ReloadAll

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

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

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

type Composition

type Composition struct {
	ID    string `boil:"id" json:"id" toml:"id" yaml:"id"`
	ArtID string `boil:"art_id" json:"art_id" toml:"art_id" yaml:"art_id"`
	// Current status of the composition processing
	Status CompositionStatusEnum `boil:"status" json:"status" toml:"status" yaml:"status"`
	// Number of nails to use in the circle
	NailsQuantity int `boil:"nails_quantity" json:"nails_quantity" toml:"nails_quantity" yaml:"nails_quantity"`
	// Image size in pixels
	ImgSize int `boil:"img_size" json:"img_size" toml:"img_size" yaml:"img_size"`
	// Maximum number of paths to generate
	MaxPaths int `boil:"max_paths" json:"max_paths" toml:"max_paths" yaml:"max_paths"`
	// Starting nail position
	StartingNail int `boil:"starting_nail" json:"starting_nail" toml:"starting_nail" yaml:"starting_nail"`
	// Minimum difference between connected nails
	MinimumDifference int `boil:"minimum_difference" json:"minimum_difference" toml:"minimum_difference" yaml:"minimum_difference"`
	// Brightness factor for thread lines
	BrightnessFactor int `boil:"brightness_factor" json:"brightness_factor" toml:"brightness_factor" yaml:"brightness_factor"`
	// Image contrast adjustment value
	ImageContrast float64 `boil:"image_contrast" json:"image_contrast" toml:"image_contrast" yaml:"image_contrast"`
	// Physical radius of the final artwork in mm
	PhysicalRadius float64 `boil:"physical_radius" json:"physical_radius" toml:"physical_radius" yaml:"physical_radius"`
	// URL to the preview image of the composition result
	PreviewURL null.String `boil:"preview_url" json:"preview_url,omitempty" toml:"preview_url" yaml:"preview_url,omitempty"`
	// URL to download the GCode file
	GcodeURL null.String `boil:"gcode_url" json:"gcode_url,omitempty" toml:"gcode_url" yaml:"gcode_url,omitempty"`
	// URL to download the paths list file
	PathlistURL null.String `boil:"pathlist_url" json:"pathlist_url,omitempty" toml:"pathlist_url" yaml:"pathlist_url,omitempty"`
	// Thread length in meters
	ThreadLength null.Int `boil:"thread_length" json:"thread_length,omitempty" toml:"thread_length" yaml:"thread_length,omitempty"`
	// Total number of thread lines
	TotalLines null.Int `boil:"total_lines" json:"total_lines,omitempty" toml:"total_lines" yaml:"total_lines,omitempty"`
	// Error message if processing failed
	ErrorMessage null.String `boil:"error_message" json:"error_message,omitempty" toml:"error_message" yaml:"error_message,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"`

	R *compositionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L compositionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Composition is an object representing the database table.

func FindComposition

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

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

func (*Composition) Art

func (o *Composition) Art(mods ...qm.QueryMod) artQuery

Art pointed to by the foreign key.

func (*Composition) Delete

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

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

func (*Composition) Exists

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

Exists checks if the Composition row exists.

func (*Composition) Insert

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

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

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

func (*Composition) SetArt

func (o *Composition) SetArt(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Art) error

SetArt of the composition to the related item. Sets o.R.Art to related. Adds o to related.R.Compositions.

func (*Composition) Update

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

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

func (o *Composition) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 CompositionHook

type CompositionHook func(context.Context, boil.ContextExecutor, *Composition) error

CompositionHook is the signature for custom Composition hook methods

type CompositionSlice

type CompositionSlice []*Composition

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

func (CompositionSlice) DeleteAll

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

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

func (*CompositionSlice) ReloadAll

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

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

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

type CompositionStatusEnum

type CompositionStatusEnum string
const (
	CompositionStatusEnumPENDING    CompositionStatusEnum = "PENDING"
	CompositionStatusEnumPROCESSING CompositionStatusEnum = "PROCESSING"
	CompositionStatusEnumCOMPLETE   CompositionStatusEnum = "COMPLETE"
	CompositionStatusEnumFAILED     CompositionStatusEnum = "FAILED"
)

Enum values for CompositionStatusEnum

func AllCompositionStatusEnum

func AllCompositionStatusEnum() []CompositionStatusEnum

func (CompositionStatusEnum) IsValid

func (e CompositionStatusEnum) IsValid() error

func (CompositionStatusEnum) Ordinal

func (e CompositionStatusEnum) Ordinal() int

func (CompositionStatusEnum) String

func (e CompositionStatusEnum) String() string

type M

type M map[string]interface{}

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

type RoleEnum

type RoleEnum string
const (
	RoleEnumUser       RoleEnum = "user"
	RoleEnumAdmin      RoleEnum = "admin"
	RoleEnumSuperAdmin RoleEnum = "super_admin"
)

Enum values for RoleEnum

func AllRoleEnum

func AllRoleEnum() []RoleEnum

func (RoleEnum) IsValid

func (e RoleEnum) IsValid() error

func (RoleEnum) Ordinal

func (e RoleEnum) Ordinal() int

func (RoleEnum) String

func (e RoleEnum) String() string

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

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

Exists checks if the SchemaMigration row exists.

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, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 almost always be used instead of []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 Session

type Session struct {
	Token string `boil:"token" json:"token" toml:"token" yaml:"token"`
	// Serialized session data in binary format
	Data []byte `boil:"data" json:"data" toml:"data" yaml:"data"`
	// Session expiration timestamp with timezone
	Expiry time.Time `boil:"expiry" json:"expiry" toml:"expiry" yaml:"expiry"`

	R *sessionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L sessionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Session is an object representing the database table.

func FindSession

func FindSession(ctx context.Context, exec boil.ContextExecutor, token string, selectCols ...string) (*Session, error)

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

func (*Session) Delete

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

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

func (*Session) Exists

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

Exists checks if the Session row exists.

func (*Session) Insert

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

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

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

func (*Session) Update

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

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

func (o *Session) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 SessionHook

type SessionHook func(context.Context, boil.ContextExecutor, *Session) error

SessionHook is the signature for custom Session hook methods

type SessionSlice

type SessionSlice []*Session

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

func (SessionSlice) DeleteAll

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

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

func (*SessionSlice) ReloadAll

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

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

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

type UpsertOptionFunc

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions

type UpsertOptions struct {
	// contains filtered or unexported fields
}

type User

type User struct {
	ID          string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	Email       null.String `boil:"email" json:"email,omitempty" toml:"email" yaml:"email,omitempty"`
	AvatarID    null.String `boil:"avatar_id" json:"avatar_id,omitempty" toml:"avatar_id" yaml:"avatar_id,omitempty"`
	Active      bool        `boil:"active" json:"active" toml:"active" yaml:"active"`
	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"`
	Role        RoleEnum    `boil:"role" json:"role" toml:"role" yaml:"role"`
	FirstName   string      `boil:"first_name" json:"first_name" toml:"first_name" yaml:"first_name"`
	LastName    null.String `boil:"last_name" json:"last_name,omitempty" toml:"last_name" yaml:"last_name,omitempty"`
	FirebaseUID null.String `boil:"firebase_uid" json:"firebase_uid,omitempty" toml:"firebase_uid" yaml:"firebase_uid,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 string, 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) AccountActivations

func (o *User) AccountActivations(mods ...qm.QueryMod) accountActivationQuery

AccountActivations retrieves all the account_activation's AccountActivations with an executor.

func (*User) AddAccountActivations

func (o *User) AddAccountActivations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AccountActivation) error

AddAccountActivations adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.AccountActivations. Sets related.R.User appropriately.

func (*User) AddAuthorArtVariations

func (o *User) AddAuthorArtVariations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ArtVariation) error

AddAuthorArtVariations adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.AuthorArtVariations. Sets related.R.Author appropriately.

func (*User) AddAuthorArts

func (o *User) AddAuthorArts(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Art) error

AddAuthorArts adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.AuthorArts. Sets related.R.Author appropriately.

func (*User) AuthorArtVariations

func (o *User) AuthorArtVariations(mods ...qm.QueryMod) artVariationQuery

AuthorArtVariations retrieves all the art_variation's ArtVariations with an executor via author_id column.

func (*User) AuthorArts

func (o *User) AuthorArts(mods ...qm.QueryMod) artQuery

AuthorArts retrieves all the art's Arts with an executor via author_id column.

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

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

Exists checks if the User row exists.

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, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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