models

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 FileColumns = struct {
	ID                   string
	UUID                 string
	ListRelations        string
	WebID16colors        string
	WebIDGithub          string
	WebIDYoutube         string
	WebIDPouet           string
	WebIDDemozoo         string
	GroupBrandFor        string
	GroupBrandBy         string
	RecordTitle          string
	DateIssuedYear       string
	DateIssuedMonth      string
	DateIssuedDay        string
	CreditText           string
	CreditProgram        string
	CreditIllustration   string
	CreditAudio          string
	Filename             string
	Filesize             string
	ListLinks            string
	FileSecurityAlertURL string
	FileZipContent       string
	FileMagicType        string
	FileIntegrityStrong  string
	FileLastModified     string
	Platform             string
	Section              string
	Comment              string
	Createdat            string
	Updatedat            string
	Deletedat            string
	Deletedby            string
	RetrotxtReadme       string
	DoseeRunProgram      string
	DoseeHardwareCPU     string
	DoseeHardwareGraphic string
	DoseeHardwareAudio   string
	DoseeIncompatible    string
	DoseeNoEms           string
	DoseeNoXMS           string
	DoseeNoUmb           string
	DoseeLoadUtilities   string
}{
	ID:                   "id",
	UUID:                 "uuid",
	ListRelations:        "list_relations",
	WebID16colors:        "web_id_16colors",
	WebIDGithub:          "web_id_github",
	WebIDYoutube:         "web_id_youtube",
	WebIDPouet:           "web_id_pouet",
	WebIDDemozoo:         "web_id_demozoo",
	GroupBrandFor:        "group_brand_for",
	GroupBrandBy:         "group_brand_by",
	RecordTitle:          "record_title",
	DateIssuedYear:       "date_issued_year",
	DateIssuedMonth:      "date_issued_month",
	DateIssuedDay:        "date_issued_day",
	CreditText:           "credit_text",
	CreditProgram:        "credit_program",
	CreditIllustration:   "credit_illustration",
	CreditAudio:          "credit_audio",
	Filename:             "filename",
	Filesize:             "filesize",
	ListLinks:            "list_links",
	FileSecurityAlertURL: "file_security_alert_url",
	FileZipContent:       "file_zip_content",
	FileMagicType:        "file_magic_type",
	FileIntegrityStrong:  "file_integrity_strong",
	FileLastModified:     "file_last_modified",
	Platform:             "platform",
	Section:              "section",
	Comment:              "comment",
	Createdat:            "createdat",
	Updatedat:            "updatedat",
	Deletedat:            "deletedat",
	Deletedby:            "deletedby",
	RetrotxtReadme:       "retrotxt_readme",
	DoseeRunProgram:      "dosee_run_program",
	DoseeHardwareCPU:     "dosee_hardware_cpu",
	DoseeHardwareGraphic: "dosee_hardware_graphic",
	DoseeHardwareAudio:   "dosee_hardware_audio",
	DoseeIncompatible:    "dosee_incompatible",
	DoseeNoEms:           "dosee_no_ems",
	DoseeNoXMS:           "dosee_no_xms",
	DoseeNoUmb:           "dosee_no_umb",
	DoseeLoadUtilities:   "dosee_load_utilities",
}
View Source
var FileRels = struct {
}{}

FileRels is where relationship names are stored.

View Source
var FileTableColumns = struct {
	ID                   string
	UUID                 string
	ListRelations        string
	WebID16colors        string
	WebIDGithub          string
	WebIDYoutube         string
	WebIDPouet           string
	WebIDDemozoo         string
	GroupBrandFor        string
	GroupBrandBy         string
	RecordTitle          string
	DateIssuedYear       string
	DateIssuedMonth      string
	DateIssuedDay        string
	CreditText           string
	CreditProgram        string
	CreditIllustration   string
	CreditAudio          string
	Filename             string
	Filesize             string
	ListLinks            string
	FileSecurityAlertURL string
	FileZipContent       string
	FileMagicType        string
	FileIntegrityStrong  string
	FileLastModified     string
	Platform             string
	Section              string
	Comment              string
	Createdat            string
	Updatedat            string
	Deletedat            string
	Deletedby            string
	RetrotxtReadme       string
	DoseeRunProgram      string
	DoseeHardwareCPU     string
	DoseeHardwareGraphic string
	DoseeHardwareAudio   string
	DoseeIncompatible    string
	DoseeNoEms           string
	DoseeNoXMS           string
	DoseeNoUmb           string
	DoseeLoadUtilities   string
}{
	ID:                   "files.id",
	UUID:                 "files.uuid",
	ListRelations:        "files.list_relations",
	WebID16colors:        "files.web_id_16colors",
	WebIDGithub:          "files.web_id_github",
	WebIDYoutube:         "files.web_id_youtube",
	WebIDPouet:           "files.web_id_pouet",
	WebIDDemozoo:         "files.web_id_demozoo",
	GroupBrandFor:        "files.group_brand_for",
	GroupBrandBy:         "files.group_brand_by",
	RecordTitle:          "files.record_title",
	DateIssuedYear:       "files.date_issued_year",
	DateIssuedMonth:      "files.date_issued_month",
	DateIssuedDay:        "files.date_issued_day",
	CreditText:           "files.credit_text",
	CreditProgram:        "files.credit_program",
	CreditIllustration:   "files.credit_illustration",
	CreditAudio:          "files.credit_audio",
	Filename:             "files.filename",
	Filesize:             "files.filesize",
	ListLinks:            "files.list_links",
	FileSecurityAlertURL: "files.file_security_alert_url",
	FileZipContent:       "files.file_zip_content",
	FileMagicType:        "files.file_magic_type",
	FileIntegrityStrong:  "files.file_integrity_strong",
	FileLastModified:     "files.file_last_modified",
	Platform:             "files.platform",
	Section:              "files.section",
	Comment:              "files.comment",
	Createdat:            "files.createdat",
	Updatedat:            "files.updatedat",
	Deletedat:            "files.deletedat",
	Deletedby:            "files.deletedby",
	RetrotxtReadme:       "files.retrotxt_readme",
	DoseeRunProgram:      "files.dosee_run_program",
	DoseeHardwareCPU:     "files.dosee_hardware_cpu",
	DoseeHardwareGraphic: "files.dosee_hardware_graphic",
	DoseeHardwareAudio:   "files.dosee_hardware_audio",
	DoseeIncompatible:    "files.dosee_incompatible",
	DoseeNoEms:           "files.dosee_no_ems",
	DoseeNoXMS:           "files.dosee_no_xms",
	DoseeNoUmb:           "files.dosee_no_umb",
	DoseeLoadUtilities:   "files.dosee_load_utilities",
}
View Source
var FileWhere = struct {
	ID                   whereHelperint64
	UUID                 whereHelpernull_String
	ListRelations        whereHelpernull_String
	WebID16colors        whereHelpernull_String
	WebIDGithub          whereHelpernull_String
	WebIDYoutube         whereHelpernull_String
	WebIDPouet           whereHelpernull_Int64
	WebIDDemozoo         whereHelpernull_Int64
	GroupBrandFor        whereHelpernull_String
	GroupBrandBy         whereHelpernull_String
	RecordTitle          whereHelpernull_String
	DateIssuedYear       whereHelpernull_Int16
	DateIssuedMonth      whereHelpernull_Int16
	DateIssuedDay        whereHelpernull_Int16
	CreditText           whereHelpernull_String
	CreditProgram        whereHelpernull_String
	CreditIllustration   whereHelpernull_String
	CreditAudio          whereHelpernull_String
	Filename             whereHelpernull_String
	Filesize             whereHelpernull_Int64
	ListLinks            whereHelpernull_String
	FileSecurityAlertURL whereHelpernull_String
	FileZipContent       whereHelpernull_String
	FileMagicType        whereHelpernull_String
	FileIntegrityStrong  whereHelpernull_String
	FileLastModified     whereHelpernull_Time
	Platform             whereHelpernull_String
	Section              whereHelpernull_String
	Comment              whereHelpernull_String
	Createdat            whereHelpernull_Time
	Updatedat            whereHelpernull_Time
	Deletedat            whereHelpernull_Time
	Deletedby            whereHelpernull_String
	RetrotxtReadme       whereHelpernull_String
	DoseeRunProgram      whereHelpernull_String
	DoseeHardwareCPU     whereHelpernull_String
	DoseeHardwareGraphic whereHelpernull_String
	DoseeHardwareAudio   whereHelpernull_String
	DoseeIncompatible    whereHelpernull_Int16
	DoseeNoEms           whereHelpernull_Int16
	DoseeNoXMS           whereHelpernull_Int16
	DoseeNoUmb           whereHelpernull_Int16
	DoseeLoadUtilities   whereHelpernull_Int16
}{
	ID:                   whereHelperint64{/* contains filtered or unexported fields */},
	UUID:                 whereHelpernull_String{/* contains filtered or unexported fields */},
	ListRelations:        whereHelpernull_String{/* contains filtered or unexported fields */},
	WebID16colors:        whereHelpernull_String{/* contains filtered or unexported fields */},
	WebIDGithub:          whereHelpernull_String{/* contains filtered or unexported fields */},
	WebIDYoutube:         whereHelpernull_String{/* contains filtered or unexported fields */},
	WebIDPouet:           whereHelpernull_Int64{/* contains filtered or unexported fields */},
	WebIDDemozoo:         whereHelpernull_Int64{/* contains filtered or unexported fields */},
	GroupBrandFor:        whereHelpernull_String{/* contains filtered or unexported fields */},
	GroupBrandBy:         whereHelpernull_String{/* contains filtered or unexported fields */},
	RecordTitle:          whereHelpernull_String{/* contains filtered or unexported fields */},
	DateIssuedYear:       whereHelpernull_Int16{/* contains filtered or unexported fields */},
	DateIssuedMonth:      whereHelpernull_Int16{/* contains filtered or unexported fields */},
	DateIssuedDay:        whereHelpernull_Int16{/* contains filtered or unexported fields */},
	CreditText:           whereHelpernull_String{/* contains filtered or unexported fields */},
	CreditProgram:        whereHelpernull_String{/* contains filtered or unexported fields */},
	CreditIllustration:   whereHelpernull_String{/* contains filtered or unexported fields */},
	CreditAudio:          whereHelpernull_String{/* contains filtered or unexported fields */},
	Filename:             whereHelpernull_String{/* contains filtered or unexported fields */},
	Filesize:             whereHelpernull_Int64{/* contains filtered or unexported fields */},
	ListLinks:            whereHelpernull_String{/* contains filtered or unexported fields */},
	FileSecurityAlertURL: whereHelpernull_String{/* contains filtered or unexported fields */},
	FileZipContent:       whereHelpernull_String{/* contains filtered or unexported fields */},
	FileMagicType:        whereHelpernull_String{/* contains filtered or unexported fields */},
	FileIntegrityStrong:  whereHelpernull_String{/* contains filtered or unexported fields */},
	FileLastModified:     whereHelpernull_Time{/* contains filtered or unexported fields */},
	Platform:             whereHelpernull_String{/* contains filtered or unexported fields */},
	Section:              whereHelpernull_String{/* contains filtered or unexported fields */},
	Comment:              whereHelpernull_String{/* contains filtered or unexported fields */},
	Createdat:            whereHelpernull_Time{/* contains filtered or unexported fields */},
	Updatedat:            whereHelpernull_Time{/* contains filtered or unexported fields */},
	Deletedat:            whereHelpernull_Time{/* contains filtered or unexported fields */},
	Deletedby:            whereHelpernull_String{/* contains filtered or unexported fields */},
	RetrotxtReadme:       whereHelpernull_String{/* contains filtered or unexported fields */},
	DoseeRunProgram:      whereHelpernull_String{/* contains filtered or unexported fields */},
	DoseeHardwareCPU:     whereHelpernull_String{/* contains filtered or unexported fields */},
	DoseeHardwareGraphic: whereHelpernull_String{/* contains filtered or unexported fields */},
	DoseeHardwareAudio:   whereHelpernull_String{/* contains filtered or unexported fields */},
	DoseeIncompatible:    whereHelpernull_Int16{/* contains filtered or unexported fields */},
	DoseeNoEms:           whereHelpernull_Int16{/* contains filtered or unexported fields */},
	DoseeNoXMS:           whereHelpernull_Int16{/* contains filtered or unexported fields */},
	DoseeNoUmb:           whereHelpernull_Int16{/* contains filtered or unexported fields */},
	DoseeLoadUtilities:   whereHelpernull_Int16{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Files string
}{
	Files: "files",
}
View Source
var ViewNames = struct {
}{}

Functions

func FileExists

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

FileExists checks if the File row exists.

func Files

func Files(mods ...qm.QueryMod) fileQuery

Files retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

Types

type File

type File struct {
	ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"`
	// Global identifier
	UUID null.String `boil:"uuid" json:"uuid,omitempty" toml:"uuid" yaml:"uuid,omitempty"`
	// List of associated records
	ListRelations null.String `boil:"list_relations" json:"list_relations,omitempty" toml:"list_relations" yaml:"list_relations,omitempty"`
	// URI for a 16colo.rs page
	WebID16colors null.String `boil:"web_id_16colors" json:"web_id_16colors,omitempty" toml:"web_id_16colors" yaml:"web_id_16colors,omitempty"`
	// Id for a GitHub repository
	WebIDGithub null.String `boil:"web_id_github" json:"web_id_github,omitempty" toml:"web_id_github" yaml:"web_id_github,omitempty"`
	// Id for a related YouTube video
	WebIDYoutube null.String `boil:"web_id_youtube" json:"web_id_youtube,omitempty" toml:"web_id_youtube" yaml:"web_id_youtube,omitempty"`
	// Id for a Pouët record
	WebIDPouet null.Int64 `boil:"web_id_pouet" json:"web_id_pouet,omitempty" toml:"web_id_pouet" yaml:"web_id_pouet,omitempty"`
	// Id for a Demozoo record
	WebIDDemozoo null.Int64 `boil:"web_id_demozoo" json:"web_id_demozoo,omitempty" toml:"web_id_demozoo" yaml:"web_id_demozoo,omitempty"`
	// Group or brand used to credit the file
	GroupBrandFor null.String `boil:"group_brand_for" json:"group_brand_for,omitempty" toml:"group_brand_for" yaml:"group_brand_for,omitempty"`
	// Optional alternative Group or brand used to credit the file
	GroupBrandBy null.String `boil:"group_brand_by" json:"group_brand_by,omitempty" toml:"group_brand_by" yaml:"group_brand_by,omitempty"`
	// Display title or magazine edition
	RecordTitle null.String `boil:"record_title" json:"record_title,omitempty" toml:"record_title" yaml:"record_title,omitempty"`
	// Published date year
	DateIssuedYear null.Int16 `boil:"date_issued_year" json:"date_issued_year,omitempty" toml:"date_issued_year" yaml:"date_issued_year,omitempty"`
	// Published date month
	DateIssuedMonth null.Int16 `boil:"date_issued_month" json:"date_issued_month,omitempty" toml:"date_issued_month" yaml:"date_issued_month,omitempty"`
	// Published date day
	DateIssuedDay null.Int16 `boil:"date_issued_day" json:"date_issued_day,omitempty" toml:"date_issued_day" yaml:"date_issued_day,omitempty"`
	// Writing credits
	CreditText null.String `boil:"credit_text" json:"credit_text,omitempty" toml:"credit_text" yaml:"credit_text,omitempty"`
	// Programming credits
	CreditProgram null.String `boil:"credit_program" json:"credit_program,omitempty" toml:"credit_program" yaml:"credit_program,omitempty"`
	// Artist credits
	CreditIllustration null.String `` /* 127-byte string literal not displayed */
	// Composer credits
	CreditAudio null.String `boil:"credit_audio" json:"credit_audio,omitempty" toml:"credit_audio" yaml:"credit_audio,omitempty"`
	// File name
	Filename null.String `boil:"filename" json:"filename,omitempty" toml:"filename" yaml:"filename,omitempty"`
	// Size of the file in bytes
	Filesize null.Int64 `boil:"filesize" json:"filesize,omitempty" toml:"filesize" yaml:"filesize,omitempty"`
	// List of URLs related to this file
	ListLinks null.String `boil:"list_links" json:"list_links,omitempty" toml:"list_links" yaml:"list_links,omitempty"`
	// URL showing results of a virus scan
	FileSecurityAlertURL null.String `` /* 143-byte string literal not displayed */
	// Content of archive
	FileZipContent null.String `boil:"file_zip_content" json:"file_zip_content,omitempty" toml:"file_zip_content" yaml:"file_zip_content,omitempty"`
	// File type meta data
	FileMagicType null.String `boil:"file_magic_type" json:"file_magic_type,omitempty" toml:"file_magic_type" yaml:"file_magic_type,omitempty"`
	// SHA384 hash of file
	FileIntegrityStrong null.String `` /* 135-byte string literal not displayed */
	// Date last modified attribute saved to file
	FileLastModified null.Time `boil:"file_last_modified" json:"file_last_modified,omitempty" toml:"file_last_modified" yaml:"file_last_modified,omitempty"`
	// Computer platform
	Platform null.String `boil:"platform" json:"platform,omitempty" toml:"platform" yaml:"platform,omitempty"`
	// Category
	Section null.String `boil:"section" json:"section,omitempty" toml:"section" yaml:"section,omitempty"`
	// Description
	Comment null.String `boil:"comment" json:"comment,omitempty" toml:"comment" yaml:"comment,omitempty"`
	// Timestamp when record was created
	Createdat null.Time `boil:"createdat" json:"createdat,omitempty" toml:"createdat" yaml:"createdat,omitempty"`
	// Timestamp when record was revised
	Updatedat null.Time `boil:"updatedat" json:"updatedat,omitempty" toml:"updatedat" yaml:"updatedat,omitempty"`
	// Timestamp used to ignore record
	Deletedat null.Time `boil:"deletedat" json:"deletedat,omitempty" toml:"deletedat" yaml:"deletedat,omitempty"`
	// UUID of the user who removed this record
	Deletedby null.String `boil:"deletedby" json:"deletedby,omitempty" toml:"deletedby" yaml:"deletedby,omitempty"`
	// Text file contained in archive to display
	RetrotxtReadme null.String `boil:"retrotxt_readme" json:"retrotxt_readme,omitempty" toml:"retrotxt_readme" yaml:"retrotxt_readme,omitempty"`
	// Program contained in archive to run in DOSBox
	DoseeRunProgram null.String `boil:"dosee_run_program" json:"dosee_run_program,omitempty" toml:"dosee_run_program" yaml:"dosee_run_program,omitempty"`
	// DOSee turn off expanded memory (EMS)
	DoseeHardwareCPU null.String `boil:"dosee_hardware_cpu" json:"dosee_hardware_cpu,omitempty" toml:"dosee_hardware_cpu" yaml:"dosee_hardware_cpu,omitempty"`
	// DOSee graphics/machine override
	DoseeHardwareGraphic null.String `` /* 139-byte string literal not displayed */
	// DOSee audio override
	DoseeHardwareAudio null.String `` /* 131-byte string literal not displayed */
	// Flag DOS program as incompatible for DOSBox
	DoseeIncompatible null.Int16 `boil:"dosee_incompatible" json:"dosee_incompatible,omitempty" toml:"dosee_incompatible" yaml:"dosee_incompatible,omitempty"`
	// DOSBox turn off EMS
	DoseeNoEms null.Int16 `boil:"dosee_no_ems" json:"dosee_no_ems,omitempty" toml:"dosee_no_ems" yaml:"dosee_no_ems,omitempty"`
	// DOSee turn off extended memory (XMS)
	DoseeNoXMS null.Int16 `boil:"dosee_no_xms" json:"dosee_no_xms,omitempty" toml:"dosee_no_xms" yaml:"dosee_no_xms,omitempty"`
	// DOSee turn off upper memory block access (UMB)
	DoseeNoUmb null.Int16 `boil:"dosee_no_umb" json:"dosee_no_umb,omitempty" toml:"dosee_no_umb" yaml:"dosee_no_umb,omitempty"`
	// DOSee load utilities
	DoseeLoadUtilities null.Int16 `` /* 131-byte string literal not displayed */

	R *fileR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L fileL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

File is an object representing the database table.

func FindFile

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

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

func (*File) Delete

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

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

func (*File) Exists

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

Exists checks if the File row exists.

func (*File) Insert

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

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

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

func (*File) Update

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

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

func (o *File) 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 FileSlice

type FileSlice []*File

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

func (FileSlice) DeleteAll

func (o FileSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)

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

func (*FileSlice) ReloadAll

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL