models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SelectWhere = Where[*dialect.SelectQuery]()
	InsertWhere = Where[*dialect.InsertQuery]()
	UpdateWhere = Where[*dialect.UpdateQuery]()
	DeleteWhere = Where[*dialect.DeleteQuery]()
)
View Source
var (
	SelectJoins = getJoins[*dialect.SelectQuery]
	UpdateJoins = getJoins[*dialect.UpdateQuery]
)
View Source
var AssetColumns = struct {
	ID                sqlite.Expression
	ParentAssetID     sqlite.Expression
	Status            sqlite.Expression
	Tag               sqlite.Expression
	Name              sqlite.Expression
	Category          sqlite.Expression
	Model             sqlite.Expression
	ModelNo           sqlite.Expression
	SerialNo          sqlite.Expression
	Manufacturer      sqlite.Expression
	Notes             sqlite.Expression
	ImageURL          sqlite.Expression
	ThumbnailURL      sqlite.Expression
	WarrantyUntil     sqlite.Expression
	CustomAttrs       sqlite.Expression
	CheckedOutTo      sqlite.Expression
	Location          sqlite.Expression
	PositionCode      sqlite.Expression
	PurchaseSupplier  sqlite.Expression
	PurchaseOrderNo   sqlite.Expression
	PurchaseDate      sqlite.Expression
	PurchaseAmount    sqlite.Expression
	PurchaseCurrency  sqlite.Expression
	PartsTotalCounter sqlite.Expression
	CreatedBy         sqlite.Expression
	CreatedAt         sqlite.Expression
	UpdatedAt         sqlite.Expression
}{
	ID:                sqlite.Quote("assets", "id"),
	ParentAssetID:     sqlite.Quote("assets", "parent_asset_id"),
	Status:            sqlite.Quote("assets", "status"),
	Tag:               sqlite.Quote("assets", "tag"),
	Name:              sqlite.Quote("assets", "name"),
	Category:          sqlite.Quote("assets", "category"),
	Model:             sqlite.Quote("assets", "model"),
	ModelNo:           sqlite.Quote("assets", "model_no"),
	SerialNo:          sqlite.Quote("assets", "serial_no"),
	Manufacturer:      sqlite.Quote("assets", "manufacturer"),
	Notes:             sqlite.Quote("assets", "notes"),
	ImageURL:          sqlite.Quote("assets", "image_url"),
	ThumbnailURL:      sqlite.Quote("assets", "thumbnail_url"),
	WarrantyUntil:     sqlite.Quote("assets", "warranty_until"),
	CustomAttrs:       sqlite.Quote("assets", "custom_attrs"),
	CheckedOutTo:      sqlite.Quote("assets", "checked_out_to"),
	Location:          sqlite.Quote("assets", "location"),
	PositionCode:      sqlite.Quote("assets", "position_code"),
	PurchaseSupplier:  sqlite.Quote("assets", "purchase_supplier"),
	PurchaseOrderNo:   sqlite.Quote("assets", "purchase_order_no"),
	PurchaseDate:      sqlite.Quote("assets", "purchase_date"),
	PurchaseAmount:    sqlite.Quote("assets", "purchase_amount"),
	PurchaseCurrency:  sqlite.Quote("assets", "purchase_currency"),
	PartsTotalCounter: sqlite.Quote("assets", "parts_total_counter"),
	CreatedBy:         sqlite.Quote("assets", "created_by"),
	CreatedAt:         sqlite.Quote("assets", "created_at"),
	UpdatedAt:         sqlite.Quote("assets", "updated_at"),
}
View Source
var AssetFileColumns = struct {
	ID        sqlite.Expression
	AssetID   sqlite.Expression
	Name      sqlite.Expression
	Filetype  sqlite.Expression
	Sha256    sqlite.Expression
	SizeBytes sqlite.Expression
	CreatedBy sqlite.Expression
	CreatedAt sqlite.Expression
	UpdatedAt sqlite.Expression
}{
	ID:        sqlite.Quote("asset_files", "id"),
	AssetID:   sqlite.Quote("asset_files", "asset_id"),
	Name:      sqlite.Quote("asset_files", "name"),
	Filetype:  sqlite.Quote("asset_files", "filetype"),
	Sha256:    sqlite.Quote("asset_files", "sha256"),
	SizeBytes: sqlite.Quote("asset_files", "size_bytes"),
	CreatedBy: sqlite.Quote("asset_files", "created_by"),
	CreatedAt: sqlite.Quote("asset_files", "created_at"),
	UpdatedAt: sqlite.Quote("asset_files", "updated_at"),
}
View Source
var AssetFiles = sqlite.NewTablex[*AssetFile, AssetFileSlice, *AssetFileSetter]("", "asset_files")

AssetFiles contains methods to work with the asset_files table

View Source
var AssetPartColumns = struct {
	ID           sqlite.Expression
	AssetID      sqlite.Expression
	Tag          sqlite.Expression
	Name         sqlite.Expression
	Location     sqlite.Expression
	PositionCode sqlite.Expression
	Notes        sqlite.Expression
	CreatedBy    sqlite.Expression
	CreatedAt    sqlite.Expression
	UpdatedAt    sqlite.Expression
}{
	ID:           sqlite.Quote("asset_parts", "id"),
	AssetID:      sqlite.Quote("asset_parts", "asset_id"),
	Tag:          sqlite.Quote("asset_parts", "tag"),
	Name:         sqlite.Quote("asset_parts", "name"),
	Location:     sqlite.Quote("asset_parts", "location"),
	PositionCode: sqlite.Quote("asset_parts", "position_code"),
	Notes:        sqlite.Quote("asset_parts", "notes"),
	CreatedBy:    sqlite.Quote("asset_parts", "created_by"),
	CreatedAt:    sqlite.Quote("asset_parts", "created_at"),
	UpdatedAt:    sqlite.Quote("asset_parts", "updated_at"),
}
View Source
var AssetParts = sqlite.NewTablex[*AssetPart, AssetPartSlice, *AssetPartSetter]("", "asset_parts")

AssetParts contains methods to work with the asset_parts table

View Source
var Assets = sqlite.NewTablex[*Asset, AssetSlice, *AssetSetter]("", "assets")

Assets contains methods to work with the assets table

View Source
var AssetsFTColumns = struct {
	ID           sqlite.Expression
	Name         sqlite.Expression
	Tag          sqlite.Expression
	Category     sqlite.Expression
	Model        sqlite.Expression
	ModelNo      sqlite.Expression
	SerialNo     sqlite.Expression
	Manufacturer sqlite.Expression
	Notes        sqlite.Expression
	CustomAttrs  sqlite.Expression
	AssetsFTS    sqlite.Expression
	Rank         sqlite.Expression
}{
	ID:           sqlite.Quote("assets_fts", "id"),
	Name:         sqlite.Quote("assets_fts", "name"),
	Tag:          sqlite.Quote("assets_fts", "tag"),
	Category:     sqlite.Quote("assets_fts", "category"),
	Model:        sqlite.Quote("assets_fts", "model"),
	ModelNo:      sqlite.Quote("assets_fts", "model_no"),
	SerialNo:     sqlite.Quote("assets_fts", "serial_no"),
	Manufacturer: sqlite.Quote("assets_fts", "manufacturer"),
	Notes:        sqlite.Quote("assets_fts", "notes"),
	CustomAttrs:  sqlite.Quote("assets_fts", "custom_attrs"),
	AssetsFTS:    sqlite.Quote("assets_fts", "assets_fts"),
	Rank:         sqlite.Quote("assets_fts", "rank"),
}
View Source
var AssetsFTS = sqlite.NewViewx[*AssetsFT, AssetsFTSlice]("", "assets_fts")

AssetsFTS contains methods to work with the assets_fts view

View Source
var Categories = sqlite.NewViewx[*Category, CategorySlice]("", "categories")

Categories contains methods to work with the categories view

View Source
var CategoryColumns = struct {
	Name sqlite.Expression
}{
	Name: sqlite.Quote("categories", "name"),
}
View Source
var ColumnNames = struct {
	AssetFiles      assetFileColumnNames
	AssetParts      assetPartColumnNames
	Assets          assetColumnNames
	AssetsFTS       assetsFTColumnNames
	LocalAuthUsers  localAuthUserColumnNames
	Sessions        sessionColumnNames
	Tags            tagColumnNames
	Users           userColumnNames
	Categories      categoryColumnNames
	CustomAttrNames customAttrNameColumnNames
	Locations       locationColumnNames
	Manufacturers   manufacturerColumnNames
	PositionCodes   positionCodeColumnNames
	Suppliers       supplierColumnNames
}{
	AssetFiles: assetFileColumnNames{
		ID:        "id",
		AssetID:   "asset_id",
		Name:      "name",
		Filetype:  "filetype",
		Sha256:    "sha256",
		SizeBytes: "size_bytes",
		CreatedBy: "created_by",
		CreatedAt: "created_at",
		UpdatedAt: "updated_at",
	},
	AssetParts: assetPartColumnNames{
		ID:           "id",
		AssetID:      "asset_id",
		Tag:          "tag",
		Name:         "name",
		Location:     "location",
		PositionCode: "position_code",
		Notes:        "notes",
		CreatedBy:    "created_by",
		CreatedAt:    "created_at",
		UpdatedAt:    "updated_at",
	},
	Assets: assetColumnNames{
		ID:                "id",
		ParentAssetID:     "parent_asset_id",
		Status:            "status",
		Tag:               "tag",
		Name:              "name",
		Category:          "category",
		Model:             "model",
		ModelNo:           "model_no",
		SerialNo:          "serial_no",
		Manufacturer:      "manufacturer",
		Notes:             "notes",
		ImageURL:          "image_url",
		ThumbnailURL:      "thumbnail_url",
		WarrantyUntil:     "warranty_until",
		CustomAttrs:       "custom_attrs",
		CheckedOutTo:      "checked_out_to",
		Location:          "location",
		PositionCode:      "position_code",
		PurchaseSupplier:  "purchase_supplier",
		PurchaseOrderNo:   "purchase_order_no",
		PurchaseDate:      "purchase_date",
		PurchaseAmount:    "purchase_amount",
		PurchaseCurrency:  "purchase_currency",
		PartsTotalCounter: "parts_total_counter",
		CreatedBy:         "created_by",
		CreatedAt:         "created_at",
		UpdatedAt:         "updated_at",
	},
	AssetsFTS: assetsFTColumnNames{
		ID:           "id",
		Name:         "name",
		Tag:          "tag",
		Category:     "category",
		Model:        "model",
		ModelNo:      "model_no",
		SerialNo:     "serial_no",
		Manufacturer: "manufacturer",
		Notes:        "notes",
		CustomAttrs:  "custom_attrs",
		AssetsFTS:    "assets_fts",
		Rank:         "rank",
	},
	LocalAuthUsers: localAuthUserColumnNames{
		ID:                     "id",
		Username:               "username",
		Algorithm:              "algorithm",
		Params:                 "params",
		Salt:                   "salt",
		Password:               "password",
		RequiresPasswordChange: "requires_password_change",
		CreatedAt:              "created_at",
		UpdatedAt:              "updated_at",
	},
	Sessions: sessionColumnNames{
		ID:        "id",
		Token:     "token",
		Data:      "data",
		ExpiresAt: "expires_at",
	},
	Tags: tagColumnNames{
		ID:        "id",
		Tag:       "tag",
		InUse:     "in_use",
		CreatedAt: "created_at",
		UpdatedAt: "updated_at",
	},
	Users: userColumnNames{
		ID:          "id",
		Username:    "username",
		DisplayName: "display_name",
		IsAdmin:     "is_admin",
		AuthRef:     "auth_ref",
		CreatedAt:   "created_at",
		UpdatedAt:   "updated_at",
	},
	Categories: categoryColumnNames{
		Name: "name",
	},
	CustomAttrNames: customAttrNameColumnNames{
		Name: "name",
		Type: "type",
	},
	Locations: locationColumnNames{
		Name: "name",
	},
	Manufacturers: manufacturerColumnNames{
		Name: "name",
	},
	PositionCodes: positionCodeColumnNames{
		Code: "code",
	},
	Suppliers: supplierColumnNames{
		Name: "name",
	},
}
View Source
var CustomAttrNameColumns = struct {
	Name sqlite.Expression
	Type sqlite.Expression
}{
	Name: sqlite.Quote("custom_attr_names", "name"),
	Type: sqlite.Quote("custom_attr_names", "type"),
}
View Source
var CustomAttrNames = sqlite.NewViewx[*CustomAttrName, CustomAttrNameSlice]("", "custom_attr_names")

CustomAttrNames contains methods to work with the custom_attr_names view

View Source
var LocalAuthUserColumns = struct {
	ID                     sqlite.Expression
	Username               sqlite.Expression
	Algorithm              sqlite.Expression
	Params                 sqlite.Expression
	Salt                   sqlite.Expression
	Password               sqlite.Expression
	RequiresPasswordChange sqlite.Expression
	CreatedAt              sqlite.Expression
	UpdatedAt              sqlite.Expression
}{
	ID:                     sqlite.Quote("local_auth_users", "id"),
	Username:               sqlite.Quote("local_auth_users", "username"),
	Algorithm:              sqlite.Quote("local_auth_users", "algorithm"),
	Params:                 sqlite.Quote("local_auth_users", "params"),
	Salt:                   sqlite.Quote("local_auth_users", "salt"),
	Password:               sqlite.Quote("local_auth_users", "password"),
	RequiresPasswordChange: sqlite.Quote("local_auth_users", "requires_password_change"),
	CreatedAt:              sqlite.Quote("local_auth_users", "created_at"),
	UpdatedAt:              sqlite.Quote("local_auth_users", "updated_at"),
}
View Source
var LocalAuthUsers = sqlite.NewTablex[*LocalAuthUser, LocalAuthUserSlice, *LocalAuthUserSetter]("", "local_auth_users")

LocalAuthUsers contains methods to work with the local_auth_users table

View Source
var LocationColumns = struct {
	Name sqlite.Expression
}{
	Name: sqlite.Quote("locations", "name"),
}
View Source
var Locations = sqlite.NewViewx[*Location, LocationSlice]("", "locations")

Locations contains methods to work with the locations view

View Source
var ManufacturerColumns = struct {
	Name sqlite.Expression
}{
	Name: sqlite.Quote("manufacturers", "name"),
}
View Source
var Manufacturers = sqlite.NewViewx[*Manufacturer, ManufacturerSlice]("", "manufacturers")

Manufacturers contains methods to work with the manufacturers view

View Source
var PositionCodeColumns = struct {
	Code sqlite.Expression
}{
	Code: sqlite.Quote("position_codes", "code"),
}
View Source
var PositionCodes = sqlite.NewViewx[*PositionCode, PositionCodeSlice]("", "position_codes")

PositionCodes contains methods to work with the position_codes view

View Source
var SessionColumns = struct {
	ID        sqlite.Expression
	Token     sqlite.Expression
	Data      sqlite.Expression
	ExpiresAt sqlite.Expression
}{
	ID:        sqlite.Quote("sessions", "id"),
	Token:     sqlite.Quote("sessions", "token"),
	Data:      sqlite.Quote("sessions", "data"),
	ExpiresAt: sqlite.Quote("sessions", "expires_at"),
}
View Source
var Sessions = sqlite.NewTablex[*Session, SessionSlice, *SessionSetter]("", "sessions")

Sessions contains methods to work with the sessions table

View Source
var SupplierColumns = struct {
	Name sqlite.Expression
}{
	Name: sqlite.Quote("suppliers", "name"),
}
View Source
var Suppliers = sqlite.NewViewx[*Supplier, SupplierSlice]("", "suppliers")

Suppliers contains methods to work with the suppliers view

View Source
var TableNames = struct {
	AssetFiles      string
	AssetParts      string
	Assets          string
	AssetsFTS       string
	LocalAuthUsers  string
	Sessions        string
	Tags            string
	Users           string
	Categories      string
	CustomAttrNames string
	Locations       string
	Manufacturers   string
	PositionCodes   string
	Suppliers       string
}{
	AssetFiles:      "asset_files",
	AssetParts:      "asset_parts",
	Assets:          "assets",
	AssetsFTS:       "assets_fts",
	LocalAuthUsers:  "local_auth_users",
	Sessions:        "sessions",
	Tags:            "tags",
	Users:           "users",
	Categories:      "categories",
	CustomAttrNames: "custom_attr_names",
	Locations:       "locations",
	Manufacturers:   "manufacturers",
	PositionCodes:   "position_codes",
	Suppliers:       "suppliers",
}
View Source
var TagColumns = struct {
	ID        sqlite.Expression
	Tag       sqlite.Expression
	InUse     sqlite.Expression
	CreatedAt sqlite.Expression
	UpdatedAt sqlite.Expression
}{
	ID:        sqlite.Quote("tags", "id"),
	Tag:       sqlite.Quote("tags", "tag"),
	InUse:     sqlite.Quote("tags", "in_use"),
	CreatedAt: sqlite.Quote("tags", "created_at"),
	UpdatedAt: sqlite.Quote("tags", "updated_at"),
}
View Source
var Tags = sqlite.NewTablex[*Tag, TagSlice, *TagSetter]("", "tags")

Tags contains methods to work with the tags table

View Source
var UserColumns = struct {
	ID          sqlite.Expression
	Username    sqlite.Expression
	DisplayName sqlite.Expression
	IsAdmin     sqlite.Expression
	AuthRef     sqlite.Expression
	CreatedAt   sqlite.Expression
	UpdatedAt   sqlite.Expression
}{
	ID:          sqlite.Quote("users", "id"),
	Username:    sqlite.Quote("users", "username"),
	DisplayName: sqlite.Quote("users", "display_name"),
	IsAdmin:     sqlite.Quote("users", "is_admin"),
	AuthRef:     sqlite.Quote("users", "auth_ref"),
	CreatedAt:   sqlite.Quote("users", "created_at"),
	UpdatedAt:   sqlite.Quote("users", "updated_at"),
}
View Source
var Users = sqlite.NewTablex[*User, UserSlice, *UserSetter]("", "users")

Users contains methods to work with the users table

Functions

func AssetExists

func AssetExists(ctx context.Context, exec bob.Executor, IDPK int64) (bool, error)

AssetExists checks the presence of a single record by primary key

func AssetFileExists

func AssetFileExists(ctx context.Context, exec bob.Executor, IDPK int64) (bool, error)

AssetFileExists checks the presence of a single record by primary key

func AssetFileWhere

func AssetFileWhere[Q sqlite.Filterable]() assetFileWhere[Q]

func AssetPartExists

func AssetPartExists(ctx context.Context, exec bob.Executor, IDPK int64) (bool, error)

AssetPartExists checks the presence of a single record by primary key

func AssetPartWhere

func AssetPartWhere[Q sqlite.Filterable]() assetPartWhere[Q]

func AssetWhere

func AssetWhere[Q sqlite.Filterable]() assetWhere[Q]

func AssetsFTWhere

func AssetsFTWhere[Q sqlite.Filterable]() assetsFTWhere[Q]

func CategoryWhere

func CategoryWhere[Q sqlite.Filterable]() categoryWhere[Q]

func CustomAttrNameWhere

func CustomAttrNameWhere[Q sqlite.Filterable]() customAttrNameWhere[Q]

func LocalAuthUserExists

func LocalAuthUserExists(ctx context.Context, exec bob.Executor, IDPK int64) (bool, error)

LocalAuthUserExists checks the presence of a single record by primary key

func LocalAuthUserWhere

func LocalAuthUserWhere[Q sqlite.Filterable]() localAuthUserWhere[Q]

func LocationWhere

func LocationWhere[Q sqlite.Filterable]() locationWhere[Q]

func ManufacturerWhere

func ManufacturerWhere[Q sqlite.Filterable]() manufacturerWhere[Q]

func PositionCodeWhere

func PositionCodeWhere[Q sqlite.Filterable]() positionCodeWhere[Q]

func PreloadAssetCheckedOutToUser

func PreloadAssetCheckedOutToUser(opts ...sqlite.PreloadOption) sqlite.Preloader

func PreloadAssetCreatedByUser

func PreloadAssetCreatedByUser(opts ...sqlite.PreloadOption) sqlite.Preloader

func PreloadAssetFileCreatedByUser

func PreloadAssetFileCreatedByUser(opts ...sqlite.PreloadOption) sqlite.Preloader

func PreloadAssetParentAsset

func PreloadAssetParentAsset(opts ...sqlite.PreloadOption) sqlite.Preloader

func PreloadAssetPartAsset

func PreloadAssetPartAsset(opts ...sqlite.PreloadOption) sqlite.Preloader

func PreloadAssetPartCreatedByUser

func PreloadAssetPartCreatedByUser(opts ...sqlite.PreloadOption) sqlite.Preloader

func PreloadAssetPartTag

func PreloadAssetPartTag(opts ...sqlite.PreloadOption) sqlite.Preloader

func PreloadAssetTag

func PreloadAssetTag(opts ...sqlite.PreloadOption) sqlite.Preloader

func SessionExists

func SessionExists(ctx context.Context, exec bob.Executor, IDPK int64) (bool, error)

SessionExists checks the presence of a single record by primary key

func SessionWhere

func SessionWhere[Q sqlite.Filterable]() sessionWhere[Q]

func SupplierWhere

func SupplierWhere[Q sqlite.Filterable]() supplierWhere[Q]

func TagExists

func TagExists(ctx context.Context, exec bob.Executor, IDPK int64) (bool, error)

TagExists checks the presence of a single record by primary key

func TagWhere

func TagWhere[Q sqlite.Filterable]() tagWhere[Q]

func ThenLoadAssetAssetParts

func ThenLoadAssetAssetParts(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetCheckedOutToUser

func ThenLoadAssetCheckedOutToUser(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetCreatedByUser

func ThenLoadAssetCreatedByUser(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetFileCreatedByUser

func ThenLoadAssetFileCreatedByUser(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetParentAsset

func ThenLoadAssetParentAsset(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetPartAsset

func ThenLoadAssetPartAsset(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetPartCreatedByUser

func ThenLoadAssetPartCreatedByUser(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetPartTag

func ThenLoadAssetPartTag(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetReverseParentAssets

func ThenLoadAssetReverseParentAssets(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadAssetTag

func ThenLoadAssetTag(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadTagAssetParts

func ThenLoadTagAssetParts(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadTagAssets

func ThenLoadTagAssets(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadUserCheckedOutToAssets

func ThenLoadUserCheckedOutToAssets(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadUserCreatedByAssetFiles

func ThenLoadUserCreatedByAssetFiles(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadUserCreatedByAssetParts

func ThenLoadUserCreatedByAssetParts(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func ThenLoadUserCreatedByAssets

func ThenLoadUserCreatedByAssets(queryMods ...bob.Mod[*dialect.SelectQuery]) sqlite.Loader

func UserExists

func UserExists(ctx context.Context, exec bob.Executor, IDPK int64) (bool, error)

UserExists checks the presence of a single record by primary key

func UserWhere

func UserWhere[Q sqlite.Filterable]() userWhere[Q]

func Where

func Where[Q sqlite.Filterable]() struct {
	AssetFiles      assetFileWhere[Q]
	AssetParts      assetPartWhere[Q]
	Assets          assetWhere[Q]
	AssetsFTS       assetsFTWhere[Q]
	LocalAuthUsers  localAuthUserWhere[Q]
	Sessions        sessionWhere[Q]
	Tags            tagWhere[Q]
	Users           userWhere[Q]
	Categories      categoryWhere[Q]
	CustomAttrNames customAttrNameWhere[Q]
	Locations       locationWhere[Q]
	Manufacturers   manufacturerWhere[Q]
	PositionCodes   positionCodeWhere[Q]
	Suppliers       supplierWhere[Q]
}

Types

type Asset

type Asset struct {
	ID                int64                                      `db:"id,pk" `
	ParentAssetID     null.Val[int64]                            `db:"parent_asset_id" `
	Status            string                                     `db:"status" `
	Tag               null.Val[string]                           `db:"tag" `
	Name              string                                     `db:"name" `
	Category          string                                     `db:"category" `
	Model             null.Val[string]                           `db:"model" `
	ModelNo           null.Val[string]                           `db:"model_no" `
	SerialNo          null.Val[string]                           `db:"serial_no" `
	Manufacturer      null.Val[string]                           `db:"manufacturer" `
	Notes             null.Val[string]                           `db:"notes" `
	ImageURL          null.Val[string]                           `db:"image_url" `
	ThumbnailURL      null.Val[string]                           `db:"thumbnail_url" `
	WarrantyUntil     null.Val[types.SQLiteDatetime]             `db:"warranty_until" `
	CustomAttrs       null.Val[types.SQLiteJSON[map[string]any]] `db:"custom_attrs" `
	CheckedOutTo      null.Val[int64]                            `db:"checked_out_to" `
	Location          null.Val[string]                           `db:"location" `
	PositionCode      null.Val[string]                           `db:"position_code" `
	PurchaseSupplier  null.Val[string]                           `db:"purchase_supplier" `
	PurchaseOrderNo   null.Val[string]                           `db:"purchase_order_no" `
	PurchaseDate      null.Val[types.SQLiteDatetime]             `db:"purchase_date" `
	PurchaseAmount    null.Val[int64]                            `db:"purchase_amount" `
	PurchaseCurrency  null.Val[string]                           `db:"purchase_currency" `
	PartsTotalCounter int64                                      `db:"parts_total_counter" `
	CreatedBy         int64                                      `db:"created_by" `
	CreatedAt         types.SQLiteDatetime                       `db:"created_at" `
	UpdatedAt         types.SQLiteDatetime                       `db:"updated_at" `

	R assetR `db:"-" `
}

Asset is an object representing the database table.

func FindAsset

func FindAsset(ctx context.Context, exec bob.Executor, IDPK int64, cols ...string) (*Asset, error)

FindAsset retrieves a single record by primary key If cols is empty Find will return all columns.

func (*Asset) AssetParts

func (o *Asset) AssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetPartsQuery

AssetParts starts a query for related objects on asset_parts

func (*Asset) AttachAssetParts

func (asset0 *Asset) AttachAssetParts(ctx context.Context, exec bob.Executor, related ...*AssetPart) error

func (*Asset) AttachCheckedOutToUser

func (asset0 *Asset) AttachCheckedOutToUser(ctx context.Context, exec bob.Executor, user1 *User) error

func (*Asset) AttachCreatedByUser

func (asset0 *Asset) AttachCreatedByUser(ctx context.Context, exec bob.Executor, user1 *User) error

func (*Asset) AttachParentAsset

func (asset0 *Asset) AttachParentAsset(ctx context.Context, exec bob.Executor, asset1 *Asset) error

func (*Asset) AttachReverseParentAssets

func (asset0 *Asset) AttachReverseParentAssets(ctx context.Context, exec bob.Executor, related ...*Asset) error

func (*Asset) AttachTag

func (asset0 *Asset) AttachTag(ctx context.Context, exec bob.Executor, tag1 *Tag) error

func (*Asset) CheckedOutToUser

func (o *Asset) CheckedOutToUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

CheckedOutToUser starts a query for related objects on users

func (*Asset) CreatedByUser

func (o *Asset) CreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

CreatedByUser starts a query for related objects on users

func (*Asset) Delete

func (o *Asset) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single Asset record with an executor

func (*Asset) InsertAssetParts

func (asset0 *Asset) InsertAssetParts(ctx context.Context, exec bob.Executor, related ...*AssetPartSetter) error

func (*Asset) InsertCheckedOutToUser

func (asset0 *Asset) InsertCheckedOutToUser(ctx context.Context, exec bob.Executor, related *UserSetter) error

func (*Asset) InsertCreatedByUser

func (asset0 *Asset) InsertCreatedByUser(ctx context.Context, exec bob.Executor, related *UserSetter) error

func (*Asset) InsertParentAsset

func (asset0 *Asset) InsertParentAsset(ctx context.Context, exec bob.Executor, related *AssetSetter) error

func (*Asset) InsertReverseParentAssets

func (asset0 *Asset) InsertReverseParentAssets(ctx context.Context, exec bob.Executor, related ...*AssetSetter) error

func (*Asset) InsertTag

func (asset0 *Asset) InsertTag(ctx context.Context, exec bob.Executor, related *TagSetter) error

func (*Asset) LoadAssetAssetParts

func (o *Asset) LoadAssetAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetAssetParts loads the asset's AssetParts into the .R struct

func (*Asset) LoadAssetCheckedOutToUser

func (o *Asset) LoadAssetCheckedOutToUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetCheckedOutToUser loads the asset's CheckedOutToUser into the .R struct

func (*Asset) LoadAssetCreatedByUser

func (o *Asset) LoadAssetCreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetCreatedByUser loads the asset's CreatedByUser into the .R struct

func (*Asset) LoadAssetParentAsset

func (o *Asset) LoadAssetParentAsset(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetParentAsset loads the asset's ParentAsset into the .R struct

func (*Asset) LoadAssetReverseParentAssets

func (o *Asset) LoadAssetReverseParentAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetReverseParentAssets loads the asset's ReverseParentAssets into the .R struct

func (*Asset) LoadAssetTag

func (o *Asset) LoadAssetTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetTag loads the asset's Tag into the .R struct

func (*Asset) ParentAsset

func (o *Asset) ParentAsset(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

ParentAsset starts a query for related objects on assets

func (*Asset) Preload

func (o *Asset) Preload(name string, retrieved any) error

func (*Asset) PrimaryKeyVals

func (o *Asset) PrimaryKeyVals() bob.Expression

PrimaryKeyVals returns the primary key values of the Asset

func (*Asset) RelatedTag

func (o *Asset) RelatedTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) TagsQuery

Tag starts a query for related objects on tags

func (*Asset) Reload

func (o *Asset) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the Asset using the executor

func (*Asset) ReverseParentAssets

func (o *Asset) ReverseParentAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

ReverseParentAssets starts a query for related objects on assets

func (*Asset) Update

func (o *Asset) Update(ctx context.Context, exec bob.Executor, s *AssetSetter) error

Update uses an executor to update the Asset

type AssetFile

type AssetFile struct {
	ID        int64                `db:"id,pk" `
	AssetID   int64                `db:"asset_id" `
	Name      string               `db:"name" `
	Filetype  string               `db:"filetype" `
	Sha256    []byte               `db:"sha256" `
	SizeBytes int64                `db:"size_bytes" `
	CreatedBy int64                `db:"created_by" `
	CreatedAt types.SQLiteDatetime `db:"created_at" `
	UpdatedAt types.SQLiteDatetime `db:"updated_at" `

	R assetFileR `db:"-" `
}

AssetFile is an object representing the database table.

func FindAssetFile

func FindAssetFile(ctx context.Context, exec bob.Executor, IDPK int64, cols ...string) (*AssetFile, error)

FindAssetFile retrieves a single record by primary key If cols is empty Find will return all columns.

func (*AssetFile) AttachCreatedByUser

func (assetFile0 *AssetFile) AttachCreatedByUser(ctx context.Context, exec bob.Executor, user1 *User) error

func (*AssetFile) CreatedByUser

func (o *AssetFile) CreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

CreatedByUser starts a query for related objects on users

func (*AssetFile) Delete

func (o *AssetFile) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single AssetFile record with an executor

func (*AssetFile) InsertCreatedByUser

func (assetFile0 *AssetFile) InsertCreatedByUser(ctx context.Context, exec bob.Executor, related *UserSetter) error

func (*AssetFile) LoadAssetFileCreatedByUser

func (o *AssetFile) LoadAssetFileCreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetFileCreatedByUser loads the assetFile's CreatedByUser into the .R struct

func (*AssetFile) Preload

func (o *AssetFile) Preload(name string, retrieved any) error

func (*AssetFile) PrimaryKeyVals

func (o *AssetFile) PrimaryKeyVals() bob.Expression

PrimaryKeyVals returns the primary key values of the AssetFile

func (*AssetFile) Reload

func (o *AssetFile) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the AssetFile using the executor

func (*AssetFile) Update

func (o *AssetFile) Update(ctx context.Context, exec bob.Executor, s *AssetFileSetter) error

Update uses an executor to update the AssetFile

type AssetFileSetter

type AssetFileSetter struct {
	ID        omit.Val[int64]                `db:"id,pk"`
	AssetID   omit.Val[int64]                `db:"asset_id"`
	Name      omit.Val[string]               `db:"name"`
	Filetype  omit.Val[string]               `db:"filetype"`
	Sha256    omit.Val[[]byte]               `db:"sha256"`
	SizeBytes omit.Val[int64]                `db:"size_bytes"`
	CreatedBy omit.Val[int64]                `db:"created_by"`
	CreatedAt omit.Val[types.SQLiteDatetime] `db:"created_at"`
	UpdatedAt omit.Val[types.SQLiteDatetime] `db:"updated_at"`
}

AssetFileSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (AssetFileSetter) Apply

func (s AssetFileSetter) Apply(q *dialect.UpdateQuery)

func (AssetFileSetter) Insert

func (s AssetFileSetter) Insert() bob.Mod[*dialect.InsertQuery]

func (AssetFileSetter) Overwrite

func (s AssetFileSetter) Overwrite(t *AssetFile)

func (AssetFileSetter) SetColumns

func (s AssetFileSetter) SetColumns() []string

type AssetFileSlice

type AssetFileSlice []*AssetFile

AssetFileSlice is an alias for a slice of pointers to AssetFile. This should almost always be used instead of []*AssetFile.

func (AssetFileSlice) CreatedByUser

func (os AssetFileSlice) CreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

func (AssetFileSlice) DeleteAll

func (o AssetFileSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (AssetFileSlice) LoadAssetFileCreatedByUser

func (os AssetFileSlice) LoadAssetFileCreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetFileCreatedByUser loads the assetFile's CreatedByUser into the .R struct

func (AssetFileSlice) ReloadAll

func (o AssetFileSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (AssetFileSlice) UpdateAll

func (o AssetFileSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals AssetFileSetter) error

type AssetFilesQuery

type AssetFilesQuery = *sqlite.ViewQuery[*AssetFile, AssetFileSlice]

AssetFilesQuery is a query on the asset_files table

type AssetFilesStmt

type AssetFilesStmt = bob.QueryStmt[*AssetFile, AssetFileSlice]

AssetFilesStmt is a prepared statment on asset_files

type AssetPart

type AssetPart struct {
	ID           int64                `db:"id,pk" `
	AssetID      int64                `db:"asset_id" `
	Tag          string               `db:"tag" `
	Name         string               `db:"name" `
	Location     null.Val[string]     `db:"location" `
	PositionCode null.Val[string]     `db:"position_code" `
	Notes        null.Val[string]     `db:"notes" `
	CreatedBy    int64                `db:"created_by" `
	CreatedAt    types.SQLiteDatetime `db:"created_at" `
	UpdatedAt    types.SQLiteDatetime `db:"updated_at" `

	R assetPartR `db:"-" `
}

AssetPart is an object representing the database table.

func FindAssetPart

func FindAssetPart(ctx context.Context, exec bob.Executor, IDPK int64, cols ...string) (*AssetPart, error)

FindAssetPart retrieves a single record by primary key If cols is empty Find will return all columns.

func (*AssetPart) Asset

func (o *AssetPart) Asset(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

Asset starts a query for related objects on assets

func (*AssetPart) AttachAsset

func (assetPart0 *AssetPart) AttachAsset(ctx context.Context, exec bob.Executor, asset1 *Asset) error

func (*AssetPart) AttachCreatedByUser

func (assetPart0 *AssetPart) AttachCreatedByUser(ctx context.Context, exec bob.Executor, user1 *User) error

func (*AssetPart) AttachTag

func (assetPart0 *AssetPart) AttachTag(ctx context.Context, exec bob.Executor, tag1 *Tag) error

func (*AssetPart) CreatedByUser

func (o *AssetPart) CreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

CreatedByUser starts a query for related objects on users

func (*AssetPart) Delete

func (o *AssetPart) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single AssetPart record with an executor

func (*AssetPart) InsertAsset

func (assetPart0 *AssetPart) InsertAsset(ctx context.Context, exec bob.Executor, related *AssetSetter) error

func (*AssetPart) InsertCreatedByUser

func (assetPart0 *AssetPart) InsertCreatedByUser(ctx context.Context, exec bob.Executor, related *UserSetter) error

func (*AssetPart) InsertTag

func (assetPart0 *AssetPart) InsertTag(ctx context.Context, exec bob.Executor, related *TagSetter) error

func (*AssetPart) LoadAssetPartAsset

func (o *AssetPart) LoadAssetPartAsset(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetPartAsset loads the assetPart's Asset into the .R struct

func (*AssetPart) LoadAssetPartCreatedByUser

func (o *AssetPart) LoadAssetPartCreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetPartCreatedByUser loads the assetPart's CreatedByUser into the .R struct

func (*AssetPart) LoadAssetPartTag

func (o *AssetPart) LoadAssetPartTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetPartTag loads the assetPart's Tag into the .R struct

func (*AssetPart) Preload

func (o *AssetPart) Preload(name string, retrieved any) error

func (*AssetPart) PrimaryKeyVals

func (o *AssetPart) PrimaryKeyVals() bob.Expression

PrimaryKeyVals returns the primary key values of the AssetPart

func (*AssetPart) RelatedTag

func (o *AssetPart) RelatedTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) TagsQuery

Tag starts a query for related objects on tags

func (*AssetPart) Reload

func (o *AssetPart) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the AssetPart using the executor

func (*AssetPart) Update

func (o *AssetPart) Update(ctx context.Context, exec bob.Executor, s *AssetPartSetter) error

Update uses an executor to update the AssetPart

type AssetPartSetter

type AssetPartSetter struct {
	ID           omit.Val[int64]                `db:"id,pk"`
	AssetID      omit.Val[int64]                `db:"asset_id"`
	Tag          omit.Val[string]               `db:"tag"`
	Name         omit.Val[string]               `db:"name"`
	Location     omitnull.Val[string]           `db:"location"`
	PositionCode omitnull.Val[string]           `db:"position_code"`
	Notes        omitnull.Val[string]           `db:"notes"`
	CreatedBy    omit.Val[int64]                `db:"created_by"`
	CreatedAt    omit.Val[types.SQLiteDatetime] `db:"created_at"`
	UpdatedAt    omit.Val[types.SQLiteDatetime] `db:"updated_at"`
}

AssetPartSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (AssetPartSetter) Apply

func (s AssetPartSetter) Apply(q *dialect.UpdateQuery)

func (AssetPartSetter) Insert

func (s AssetPartSetter) Insert() bob.Mod[*dialect.InsertQuery]

func (AssetPartSetter) Overwrite

func (s AssetPartSetter) Overwrite(t *AssetPart)

func (AssetPartSetter) SetColumns

func (s AssetPartSetter) SetColumns() []string

type AssetPartSlice

type AssetPartSlice []*AssetPart

AssetPartSlice is an alias for a slice of pointers to AssetPart. This should almost always be used instead of []*AssetPart.

func (AssetPartSlice) Asset

func (AssetPartSlice) CreatedByUser

func (os AssetPartSlice) CreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

func (AssetPartSlice) DeleteAll

func (o AssetPartSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (AssetPartSlice) LoadAssetPartAsset

func (os AssetPartSlice) LoadAssetPartAsset(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetPartAsset loads the assetPart's Asset into the .R struct

func (AssetPartSlice) LoadAssetPartCreatedByUser

func (os AssetPartSlice) LoadAssetPartCreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetPartCreatedByUser loads the assetPart's CreatedByUser into the .R struct

func (AssetPartSlice) LoadAssetPartTag

func (os AssetPartSlice) LoadAssetPartTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetPartTag loads the assetPart's Tag into the .R struct

func (AssetPartSlice) RelatedTag

func (os AssetPartSlice) RelatedTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) TagsQuery

func (AssetPartSlice) ReloadAll

func (o AssetPartSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (AssetPartSlice) UpdateAll

func (o AssetPartSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals AssetPartSetter) error

type AssetPartsQuery

type AssetPartsQuery = *sqlite.ViewQuery[*AssetPart, AssetPartSlice]

AssetPartsQuery is a query on the asset_parts table

type AssetPartsStmt

type AssetPartsStmt = bob.QueryStmt[*AssetPart, AssetPartSlice]

AssetPartsStmt is a prepared statment on asset_parts

type AssetSetter

type AssetSetter struct {
	ID                omit.Val[int64]                                `db:"id,pk"`
	ParentAssetID     omitnull.Val[int64]                            `db:"parent_asset_id"`
	Status            omit.Val[string]                               `db:"status"`
	Tag               omitnull.Val[string]                           `db:"tag"`
	Name              omit.Val[string]                               `db:"name"`
	Category          omit.Val[string]                               `db:"category"`
	Model             omitnull.Val[string]                           `db:"model"`
	ModelNo           omitnull.Val[string]                           `db:"model_no"`
	SerialNo          omitnull.Val[string]                           `db:"serial_no"`
	Manufacturer      omitnull.Val[string]                           `db:"manufacturer"`
	Notes             omitnull.Val[string]                           `db:"notes"`
	ImageURL          omitnull.Val[string]                           `db:"image_url"`
	ThumbnailURL      omitnull.Val[string]                           `db:"thumbnail_url"`
	WarrantyUntil     omitnull.Val[types.SQLiteDatetime]             `db:"warranty_until"`
	CustomAttrs       omitnull.Val[types.SQLiteJSON[map[string]any]] `db:"custom_attrs"`
	CheckedOutTo      omitnull.Val[int64]                            `db:"checked_out_to"`
	Location          omitnull.Val[string]                           `db:"location"`
	PositionCode      omitnull.Val[string]                           `db:"position_code"`
	PurchaseSupplier  omitnull.Val[string]                           `db:"purchase_supplier"`
	PurchaseOrderNo   omitnull.Val[string]                           `db:"purchase_order_no"`
	PurchaseDate      omitnull.Val[types.SQLiteDatetime]             `db:"purchase_date"`
	PurchaseAmount    omitnull.Val[int64]                            `db:"purchase_amount"`
	PurchaseCurrency  omitnull.Val[string]                           `db:"purchase_currency"`
	PartsTotalCounter omit.Val[int64]                                `db:"parts_total_counter"`
	CreatedBy         omit.Val[int64]                                `db:"created_by"`
	CreatedAt         omit.Val[types.SQLiteDatetime]                 `db:"created_at"`
	UpdatedAt         omit.Val[types.SQLiteDatetime]                 `db:"updated_at"`
}

AssetSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (AssetSetter) Apply

func (s AssetSetter) Apply(q *dialect.UpdateQuery)

func (AssetSetter) Insert

func (s AssetSetter) Insert() bob.Mod[*dialect.InsertQuery]

func (AssetSetter) Overwrite

func (s AssetSetter) Overwrite(t *Asset)

func (AssetSetter) SetColumns

func (s AssetSetter) SetColumns() []string

type AssetSlice

type AssetSlice []*Asset

AssetSlice is an alias for a slice of pointers to Asset. This should almost always be used instead of []*Asset.

func (AssetSlice) AssetParts

func (os AssetSlice) AssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetPartsQuery

func (AssetSlice) CheckedOutToUser

func (os AssetSlice) CheckedOutToUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

func (AssetSlice) CreatedByUser

func (os AssetSlice) CreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) UsersQuery

func (AssetSlice) DeleteAll

func (o AssetSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (AssetSlice) LoadAssetAssetParts

func (os AssetSlice) LoadAssetAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetAssetParts loads the asset's AssetParts into the .R struct

func (AssetSlice) LoadAssetCheckedOutToUser

func (os AssetSlice) LoadAssetCheckedOutToUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetCheckedOutToUser loads the asset's CheckedOutToUser into the .R struct

func (AssetSlice) LoadAssetCreatedByUser

func (os AssetSlice) LoadAssetCreatedByUser(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetCreatedByUser loads the asset's CreatedByUser into the .R struct

func (AssetSlice) LoadAssetParentAsset

func (os AssetSlice) LoadAssetParentAsset(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetParentAsset loads the asset's ParentAsset into the .R struct

func (AssetSlice) LoadAssetReverseParentAssets

func (os AssetSlice) LoadAssetReverseParentAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetReverseParentAssets loads the asset's ReverseParentAssets into the .R struct

func (AssetSlice) LoadAssetTag

func (os AssetSlice) LoadAssetTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadAssetTag loads the asset's Tag into the .R struct

func (AssetSlice) ParentAsset

func (os AssetSlice) ParentAsset(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

func (AssetSlice) RelatedTag

func (os AssetSlice) RelatedTag(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) TagsQuery

func (AssetSlice) ReloadAll

func (o AssetSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (AssetSlice) ReverseParentAssets

func (os AssetSlice) ReverseParentAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

func (AssetSlice) UpdateAll

func (o AssetSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals AssetSetter) error

type AssetsFT

type AssetsFT struct {
	ID           null.Val[string] `db:"id" `
	Name         null.Val[string] `db:"name" `
	Tag          null.Val[string] `db:"tag" `
	Category     null.Val[string] `db:"category" `
	Model        null.Val[string] `db:"model" `
	ModelNo      null.Val[string] `db:"model_no" `
	SerialNo     null.Val[string] `db:"serial_no" `
	Manufacturer null.Val[string] `db:"manufacturer" `
	Notes        null.Val[string] `db:"notes" `
	CustomAttrs  null.Val[string] `db:"custom_attrs" `
	AssetsFTS    null.Val[string] `db:"assets_fts" `
	Rank         null.Val[string] `db:"rank" `
}

AssetsFT is an object representing the database table.

type AssetsFTSQuery

type AssetsFTSQuery = *sqlite.ViewQuery[*AssetsFT, AssetsFTSlice]

AssetsFTSQuery is a query on the assets_fts view

type AssetsFTSStmt

type AssetsFTSStmt = bob.QueryStmt[*AssetsFT, AssetsFTSlice]

AssetsFTSStmt is a prepared statment on assets_fts

type AssetsFTSlice

type AssetsFTSlice []*AssetsFT

AssetsFTSlice is an alias for a slice of pointers to AssetsFT. This should almost always be used instead of []*AssetsFT.

type AssetsQuery

type AssetsQuery = *sqlite.ViewQuery[*Asset, AssetSlice]

AssetsQuery is a query on the assets table

type AssetsStmt

type AssetsStmt = bob.QueryStmt[*Asset, AssetSlice]

AssetsStmt is a prepared statment on assets

type CategoriesQuery

type CategoriesQuery = *sqlite.ViewQuery[*Category, CategorySlice]

CategoriesQuery is a query on the categories view

type CategoriesStmt

type CategoriesStmt = bob.QueryStmt[*Category, CategorySlice]

CategoriesStmt is a prepared statment on categories

type Category

type Category struct {
	Name null.Val[string] `db:"name" `
}

Category is an object representing the database table.

type CategorySlice

type CategorySlice []*Category

CategorySlice is an alias for a slice of pointers to Category. This should almost always be used instead of []*Category.

type CustomAttrName

type CustomAttrName struct {
	Name null.Val[string] `db:"name" `
	Type null.Val[string] `db:"type" `
}

CustomAttrName is an object representing the database table.

type CustomAttrNameSlice

type CustomAttrNameSlice []*CustomAttrName

CustomAttrNameSlice is an alias for a slice of pointers to CustomAttrName. This should almost always be used instead of []*CustomAttrName.

type CustomAttrNamesQuery

type CustomAttrNamesQuery = *sqlite.ViewQuery[*CustomAttrName, CustomAttrNameSlice]

CustomAttrNamesQuery is a query on the custom_attr_names view

type CustomAttrNamesStmt

type CustomAttrNamesStmt = bob.QueryStmt[*CustomAttrName, CustomAttrNameSlice]

CustomAttrNamesStmt is a prepared statment on custom_attr_names

type LocalAuthUser

type LocalAuthUser struct {
	ID                     int64                `db:"id,pk" `
	Username               string               `db:"username" `
	Algorithm              string               `db:"algorithm" `
	Params                 string               `db:"params" `
	Salt                   []byte               `db:"salt" `
	Password               []byte               `db:"password" `
	RequiresPasswordChange bool                 `db:"requires_password_change" `
	CreatedAt              types.SQLiteDatetime `db:"created_at" `
	UpdatedAt              types.SQLiteDatetime `db:"updated_at" `
}

LocalAuthUser is an object representing the database table.

func FindLocalAuthUser

func FindLocalAuthUser(ctx context.Context, exec bob.Executor, IDPK int64, cols ...string) (*LocalAuthUser, error)

FindLocalAuthUser retrieves a single record by primary key If cols is empty Find will return all columns.

func (*LocalAuthUser) Delete

func (o *LocalAuthUser) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single LocalAuthUser record with an executor

func (*LocalAuthUser) PrimaryKeyVals

func (o *LocalAuthUser) PrimaryKeyVals() bob.Expression

PrimaryKeyVals returns the primary key values of the LocalAuthUser

func (*LocalAuthUser) Reload

func (o *LocalAuthUser) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the LocalAuthUser using the executor

func (*LocalAuthUser) Update

Update uses an executor to update the LocalAuthUser

type LocalAuthUserSetter

type LocalAuthUserSetter struct {
	ID                     omit.Val[int64]                `db:"id,pk"`
	Username               omit.Val[string]               `db:"username"`
	Algorithm              omit.Val[string]               `db:"algorithm"`
	Params                 omit.Val[string]               `db:"params"`
	Salt                   omit.Val[[]byte]               `db:"salt"`
	Password               omit.Val[[]byte]               `db:"password"`
	RequiresPasswordChange omit.Val[bool]                 `db:"requires_password_change"`
	CreatedAt              omit.Val[types.SQLiteDatetime] `db:"created_at"`
	UpdatedAt              omit.Val[types.SQLiteDatetime] `db:"updated_at"`
}

LocalAuthUserSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (LocalAuthUserSetter) Apply

func (LocalAuthUserSetter) Insert

func (LocalAuthUserSetter) Overwrite

func (s LocalAuthUserSetter) Overwrite(t *LocalAuthUser)

func (LocalAuthUserSetter) SetColumns

func (s LocalAuthUserSetter) SetColumns() []string

type LocalAuthUserSlice

type LocalAuthUserSlice []*LocalAuthUser

LocalAuthUserSlice is an alias for a slice of pointers to LocalAuthUser. This should almost always be used instead of []*LocalAuthUser.

func (LocalAuthUserSlice) DeleteAll

func (o LocalAuthUserSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (LocalAuthUserSlice) ReloadAll

func (o LocalAuthUserSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (LocalAuthUserSlice) UpdateAll

type LocalAuthUsersQuery

type LocalAuthUsersQuery = *sqlite.ViewQuery[*LocalAuthUser, LocalAuthUserSlice]

LocalAuthUsersQuery is a query on the local_auth_users table

type LocalAuthUsersStmt

type LocalAuthUsersStmt = bob.QueryStmt[*LocalAuthUser, LocalAuthUserSlice]

LocalAuthUsersStmt is a prepared statment on local_auth_users

type Location

type Location struct {
	Name null.Val[string] `db:"name" `
}

Location is an object representing the database table.

type LocationSlice

type LocationSlice []*Location

LocationSlice is an alias for a slice of pointers to Location. This should almost always be used instead of []*Location.

type LocationsQuery

type LocationsQuery = *sqlite.ViewQuery[*Location, LocationSlice]

LocationsQuery is a query on the locations view

type LocationsStmt

type LocationsStmt = bob.QueryStmt[*Location, LocationSlice]

LocationsStmt is a prepared statment on locations

type Manufacturer

type Manufacturer struct {
	Name null.Val[string] `db:"name" `
}

Manufacturer is an object representing the database table.

type ManufacturerSlice

type ManufacturerSlice []*Manufacturer

ManufacturerSlice is an alias for a slice of pointers to Manufacturer. This should almost always be used instead of []*Manufacturer.

type ManufacturersQuery

type ManufacturersQuery = *sqlite.ViewQuery[*Manufacturer, ManufacturerSlice]

ManufacturersQuery is a query on the manufacturers view

type ManufacturersStmt

type ManufacturersStmt = bob.QueryStmt[*Manufacturer, ManufacturerSlice]

ManufacturersStmt is a prepared statment on manufacturers

type PositionCode

type PositionCode struct {
	Code null.Val[string] `db:"code" `
}

PositionCode is an object representing the database table.

type PositionCodeSlice

type PositionCodeSlice []*PositionCode

PositionCodeSlice is an alias for a slice of pointers to PositionCode. This should almost always be used instead of []*PositionCode.

type PositionCodesQuery

type PositionCodesQuery = *sqlite.ViewQuery[*PositionCode, PositionCodeSlice]

PositionCodesQuery is a query on the position_codes view

type PositionCodesStmt

type PositionCodesStmt = bob.QueryStmt[*PositionCode, PositionCodeSlice]

PositionCodesStmt is a prepared statment on position_codes

type Session

type Session struct {
	ID        int64                `db:"id,pk" `
	Token     string               `db:"token" `
	Data      []byte               `db:"data" `
	ExpiresAt types.SQLiteDatetime `db:"expires_at" `
}

Session is an object representing the database table.

func FindSession

func FindSession(ctx context.Context, exec bob.Executor, IDPK int64, cols ...string) (*Session, error)

FindSession retrieves a single record by primary key If cols is empty Find will return all columns.

func (*Session) Delete

func (o *Session) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single Session record with an executor

func (*Session) PrimaryKeyVals

func (o *Session) PrimaryKeyVals() bob.Expression

PrimaryKeyVals returns the primary key values of the Session

func (*Session) Reload

func (o *Session) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the Session using the executor

func (*Session) Update

func (o *Session) Update(ctx context.Context, exec bob.Executor, s *SessionSetter) error

Update uses an executor to update the Session

type SessionSetter

type SessionSetter struct {
	ID        omit.Val[int64]                `db:"id,pk"`
	Token     omit.Val[string]               `db:"token"`
	Data      omit.Val[[]byte]               `db:"data"`
	ExpiresAt omit.Val[types.SQLiteDatetime] `db:"expires_at"`
}

SessionSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (SessionSetter) Apply

func (s SessionSetter) Apply(q *dialect.UpdateQuery)

func (SessionSetter) Insert

func (s SessionSetter) Insert() bob.Mod[*dialect.InsertQuery]

func (SessionSetter) Overwrite

func (s SessionSetter) Overwrite(t *Session)

func (SessionSetter) SetColumns

func (s SessionSetter) SetColumns() []string

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 bob.Executor) error

func (SessionSlice) ReloadAll

func (o SessionSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (SessionSlice) UpdateAll

func (o SessionSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals SessionSetter) error

type SessionsQuery

type SessionsQuery = *sqlite.ViewQuery[*Session, SessionSlice]

SessionsQuery is a query on the sessions table

type SessionsStmt

type SessionsStmt = bob.QueryStmt[*Session, SessionSlice]

SessionsStmt is a prepared statment on sessions

type Supplier

type Supplier struct {
	Name null.Val[string] `db:"name" `
}

Supplier is an object representing the database table.

type SupplierSlice

type SupplierSlice []*Supplier

SupplierSlice is an alias for a slice of pointers to Supplier. This should almost always be used instead of []*Supplier.

type SuppliersQuery

type SuppliersQuery = *sqlite.ViewQuery[*Supplier, SupplierSlice]

SuppliersQuery is a query on the suppliers view

type SuppliersStmt

type SuppliersStmt = bob.QueryStmt[*Supplier, SupplierSlice]

SuppliersStmt is a prepared statment on suppliers

type Tag

type Tag struct {
	ID        int64                `db:"id,pk" `
	Tag       string               `db:"tag" `
	InUse     bool                 `db:"in_use" `
	CreatedAt types.SQLiteDatetime `db:"created_at" `
	UpdatedAt types.SQLiteDatetime `db:"updated_at" `

	R tagR `db:"-" `
}

Tag is an object representing the database table.

func FindTag

func FindTag(ctx context.Context, exec bob.Executor, IDPK int64, cols ...string) (*Tag, error)

FindTag retrieves a single record by primary key If cols is empty Find will return all columns.

func (*Tag) AssetParts

func (o *Tag) AssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetPartsQuery

AssetParts starts a query for related objects on asset_parts

func (*Tag) Assets

func (o *Tag) Assets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

Assets starts a query for related objects on assets

func (*Tag) AttachAssetParts

func (tag0 *Tag) AttachAssetParts(ctx context.Context, exec bob.Executor, related ...*AssetPart) error

func (*Tag) AttachAssets

func (tag0 *Tag) AttachAssets(ctx context.Context, exec bob.Executor, related ...*Asset) error

func (*Tag) Delete

func (o *Tag) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single Tag record with an executor

func (*Tag) InsertAssetParts

func (tag0 *Tag) InsertAssetParts(ctx context.Context, exec bob.Executor, related ...*AssetPartSetter) error

func (*Tag) InsertAssets

func (tag0 *Tag) InsertAssets(ctx context.Context, exec bob.Executor, related ...*AssetSetter) error

func (*Tag) LoadTagAssetParts

func (o *Tag) LoadTagAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTagAssetParts loads the tag's AssetParts into the .R struct

func (*Tag) LoadTagAssets

func (o *Tag) LoadTagAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTagAssets loads the tag's Assets into the .R struct

func (*Tag) Preload

func (o *Tag) Preload(name string, retrieved any) error

func (*Tag) PrimaryKeyVals

func (o *Tag) PrimaryKeyVals() bob.Expression

PrimaryKeyVals returns the primary key values of the Tag

func (*Tag) Reload

func (o *Tag) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the Tag using the executor

func (*Tag) Update

func (o *Tag) Update(ctx context.Context, exec bob.Executor, s *TagSetter) error

Update uses an executor to update the Tag

type TagSetter

type TagSetter struct {
	ID        omit.Val[int64]                `db:"id,pk"`
	Tag       omit.Val[string]               `db:"tag"`
	InUse     omit.Val[bool]                 `db:"in_use"`
	CreatedAt omit.Val[types.SQLiteDatetime] `db:"created_at"`
	UpdatedAt omit.Val[types.SQLiteDatetime] `db:"updated_at"`
}

TagSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (TagSetter) Apply

func (s TagSetter) Apply(q *dialect.UpdateQuery)

func (TagSetter) Insert

func (s TagSetter) Insert() bob.Mod[*dialect.InsertQuery]

func (TagSetter) Overwrite

func (s TagSetter) Overwrite(t *Tag)

func (TagSetter) SetColumns

func (s TagSetter) SetColumns() []string

type TagSlice

type TagSlice []*Tag

TagSlice is an alias for a slice of pointers to Tag. This should almost always be used instead of []*Tag.

func (TagSlice) AssetParts

func (os TagSlice) AssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetPartsQuery

func (TagSlice) Assets

func (os TagSlice) Assets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

func (TagSlice) DeleteAll

func (o TagSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (TagSlice) LoadTagAssetParts

func (os TagSlice) LoadTagAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTagAssetParts loads the tag's AssetParts into the .R struct

func (TagSlice) LoadTagAssets

func (os TagSlice) LoadTagAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadTagAssets loads the tag's Assets into the .R struct

func (TagSlice) ReloadAll

func (o TagSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (TagSlice) UpdateAll

func (o TagSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals TagSetter) error

type TagsQuery

type TagsQuery = *sqlite.ViewQuery[*Tag, TagSlice]

TagsQuery is a query on the tags table

type TagsStmt

type TagsStmt = bob.QueryStmt[*Tag, TagSlice]

TagsStmt is a prepared statment on tags

type User

type User struct {
	ID          int64                `db:"id,pk" `
	Username    string               `db:"username" `
	DisplayName string               `db:"display_name" `
	IsAdmin     bool                 `db:"is_admin" `
	AuthRef     string               `db:"auth_ref" `
	CreatedAt   types.SQLiteDatetime `db:"created_at" `
	UpdatedAt   types.SQLiteDatetime `db:"updated_at" `

	R userR `db:"-" `
}

User is an object representing the database table.

func FindUser

func FindUser(ctx context.Context, exec bob.Executor, IDPK int64, cols ...string) (*User, error)

FindUser retrieves a single record by primary key If cols is empty Find will return all columns.

func (*User) AttachCheckedOutToAssets

func (user0 *User) AttachCheckedOutToAssets(ctx context.Context, exec bob.Executor, related ...*Asset) error

func (*User) AttachCreatedByAssetFiles

func (user0 *User) AttachCreatedByAssetFiles(ctx context.Context, exec bob.Executor, related ...*AssetFile) error

func (*User) AttachCreatedByAssetParts

func (user0 *User) AttachCreatedByAssetParts(ctx context.Context, exec bob.Executor, related ...*AssetPart) error

func (*User) AttachCreatedByAssets

func (user0 *User) AttachCreatedByAssets(ctx context.Context, exec bob.Executor, related ...*Asset) error

func (*User) CheckedOutToAssets

func (o *User) CheckedOutToAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

CheckedOutToAssets starts a query for related objects on assets

func (*User) CreatedByAssetFiles

func (o *User) CreatedByAssetFiles(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetFilesQuery

CreatedByAssetFiles starts a query for related objects on asset_files

func (*User) CreatedByAssetParts

func (o *User) CreatedByAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetPartsQuery

CreatedByAssetParts starts a query for related objects on asset_parts

func (*User) CreatedByAssets

func (o *User) CreatedByAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

CreatedByAssets starts a query for related objects on assets

func (*User) Delete

func (o *User) Delete(ctx context.Context, exec bob.Executor) error

Delete deletes a single User record with an executor

func (*User) InsertCheckedOutToAssets

func (user0 *User) InsertCheckedOutToAssets(ctx context.Context, exec bob.Executor, related ...*AssetSetter) error

func (*User) InsertCreatedByAssetFiles

func (user0 *User) InsertCreatedByAssetFiles(ctx context.Context, exec bob.Executor, related ...*AssetFileSetter) error

func (*User) InsertCreatedByAssetParts

func (user0 *User) InsertCreatedByAssetParts(ctx context.Context, exec bob.Executor, related ...*AssetPartSetter) error

func (*User) InsertCreatedByAssets

func (user0 *User) InsertCreatedByAssets(ctx context.Context, exec bob.Executor, related ...*AssetSetter) error

func (*User) LoadUserCheckedOutToAssets

func (o *User) LoadUserCheckedOutToAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCheckedOutToAssets loads the user's CheckedOutToAssets into the .R struct

func (*User) LoadUserCreatedByAssetFiles

func (o *User) LoadUserCreatedByAssetFiles(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCreatedByAssetFiles loads the user's CreatedByAssetFiles into the .R struct

func (*User) LoadUserCreatedByAssetParts

func (o *User) LoadUserCreatedByAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCreatedByAssetParts loads the user's CreatedByAssetParts into the .R struct

func (*User) LoadUserCreatedByAssets

func (o *User) LoadUserCreatedByAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCreatedByAssets loads the user's CreatedByAssets into the .R struct

func (*User) Preload

func (o *User) Preload(name string, retrieved any) error

func (*User) PrimaryKeyVals

func (o *User) PrimaryKeyVals() bob.Expression

PrimaryKeyVals returns the primary key values of the User

func (*User) Reload

func (o *User) Reload(ctx context.Context, exec bob.Executor) error

Reload refreshes the User using the executor

func (*User) Update

func (o *User) Update(ctx context.Context, exec bob.Executor, s *UserSetter) error

Update uses an executor to update the User

type UserSetter

type UserSetter struct {
	ID          omit.Val[int64]                `db:"id,pk"`
	Username    omit.Val[string]               `db:"username"`
	DisplayName omit.Val[string]               `db:"display_name"`
	IsAdmin     omit.Val[bool]                 `db:"is_admin"`
	AuthRef     omit.Val[string]               `db:"auth_ref"`
	CreatedAt   omit.Val[types.SQLiteDatetime] `db:"created_at"`
	UpdatedAt   omit.Val[types.SQLiteDatetime] `db:"updated_at"`
}

UserSetter is used for insert/upsert/update operations All values are optional, and do not have to be set Generated columns are not included

func (UserSetter) Apply

func (s UserSetter) Apply(q *dialect.UpdateQuery)

func (UserSetter) Insert

func (s UserSetter) Insert() bob.Mod[*dialect.InsertQuery]

func (UserSetter) Overwrite

func (s UserSetter) Overwrite(t *User)

func (UserSetter) SetColumns

func (s UserSetter) SetColumns() []string

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

func (os UserSlice) CheckedOutToAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

func (UserSlice) CreatedByAssetFiles

func (os UserSlice) CreatedByAssetFiles(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetFilesQuery

func (UserSlice) CreatedByAssetParts

func (os UserSlice) CreatedByAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetPartsQuery

func (UserSlice) CreatedByAssets

func (os UserSlice) CreatedByAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) AssetsQuery

func (UserSlice) DeleteAll

func (o UserSlice) DeleteAll(ctx context.Context, exec bob.Executor) error

func (UserSlice) LoadUserCheckedOutToAssets

func (os UserSlice) LoadUserCheckedOutToAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCheckedOutToAssets loads the user's CheckedOutToAssets into the .R struct

func (UserSlice) LoadUserCreatedByAssetFiles

func (os UserSlice) LoadUserCreatedByAssetFiles(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCreatedByAssetFiles loads the user's CreatedByAssetFiles into the .R struct

func (UserSlice) LoadUserCreatedByAssetParts

func (os UserSlice) LoadUserCreatedByAssetParts(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCreatedByAssetParts loads the user's CreatedByAssetParts into the .R struct

func (UserSlice) LoadUserCreatedByAssets

func (os UserSlice) LoadUserCreatedByAssets(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error

LoadUserCreatedByAssets loads the user's CreatedByAssets into the .R struct

func (UserSlice) ReloadAll

func (o UserSlice) ReloadAll(ctx context.Context, exec bob.Executor) error

func (UserSlice) UpdateAll

func (o UserSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals UserSetter) error

type UsersQuery

type UsersQuery = *sqlite.ViewQuery[*User, UserSlice]

UsersQuery is a query on the users table

type UsersStmt

type UsersStmt = bob.QueryStmt[*User, UserSlice]

UsersStmt is a prepared statment on users

Jump to

Keyboard shortcuts

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