models

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 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
	PartsTotalCounter sqlite.Expression
	CreatedBy         sqlite.Expression
	CreatedAt         sqlite.Expression
	UpdatedAt         sqlite.Expression
	Type              sqlite.Expression
	Quantity          sqlite.Expression
	QuantityUnit      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"),
	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"),
	Type:              sqlite.Quote("assets", "type"),
	Quantity:          sqlite.Quote("assets", "quantity"),
	QuantityUnit:      sqlite.Quote("assets", "quantity_unit"),
}
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
	FullPath   sqlite.Expression
	PublicPath 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"),
	FullPath:   sqlite.Quote("asset_files", "full_path"),
	PublicPath: sqlite.Quote("asset_files", "public_path"),
}
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 AssetPurchaseColumns = struct {
	ID        sqlite.Expression
	AssetID   sqlite.Expression
	Supplier  sqlite.Expression
	OrderNo   sqlite.Expression
	OrderDate sqlite.Expression
	Amount    sqlite.Expression
	Currency  sqlite.Expression
	CreatedBy sqlite.Expression
	CreatedAt sqlite.Expression
	UpdatedAt sqlite.Expression
}{
	ID:        sqlite.Quote("asset_purchases", "id"),
	AssetID:   sqlite.Quote("asset_purchases", "asset_id"),
	Supplier:  sqlite.Quote("asset_purchases", "supplier"),
	OrderNo:   sqlite.Quote("asset_purchases", "order_no"),
	OrderDate: sqlite.Quote("asset_purchases", "order_date"),
	Amount:    sqlite.Quote("asset_purchases", "amount"),
	Currency:  sqlite.Quote("asset_purchases", "currency"),
	CreatedBy: sqlite.Quote("asset_purchases", "created_by"),
	CreatedAt: sqlite.Quote("asset_purchases", "created_at"),
	UpdatedAt: sqlite.Quote("asset_purchases", "updated_at"),
}
View Source
var AssetPurchases = sqlite.NewTablex[*AssetPurchase, AssetPurchaseSlice, *AssetPurchaseSetter]("", "asset_purchases")

AssetPurchases contains methods to work with the asset_purchases 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 {
	CatName sqlite.Expression
}{
	CatName: sqlite.Quote("categories", "cat_name"),
}
View Source
var ColumnNames = struct {
	AssetFiles      assetFileColumnNames
	AssetParts      assetPartColumnNames
	AssetPurchases  assetPurchaseColumnNames
	Assets          assetColumnNames
	AssetsFTS       assetsFTColumnNames
	LocalAuthUsers  localAuthUserColumnNames
	Sessions        sessionColumnNames
	Tags            tagColumnNames
	UserPreferences userPreferenceColumnNames
	Users           userColumnNames
	Categories      categoryColumnNames
	CustomAttrNames customAttrNameColumnNames
	Locations       locationColumnNames
	Manufacturers   manufacturerColumnNames
	Models          modelColumnNames
	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",
		FullPath:   "full_path",
		PublicPath: "public_path",
	},
	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",
	},
	AssetPurchases: assetPurchaseColumnNames{
		ID:        "id",
		AssetID:   "asset_id",
		Supplier:  "supplier",
		OrderNo:   "order_no",
		OrderDate: "order_date",
		Amount:    "amount",
		Currency:  "currency",
		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",
		PartsTotalCounter: "parts_total_counter",
		CreatedBy:         "created_by",
		CreatedAt:         "created_at",
		UpdatedAt:         "updated_at",
		Type:              "type",
		Quantity:          "quantity",
		QuantityUnit:      "quantity_unit",
	},
	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",
	},
	UserPreferences: userPreferenceColumnNames{
		ID:        "id",
		UserID:    "user_id",
		Key:       "key",
		Value:     "value",
		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{
		CatName: "cat_name",
	},
	CustomAttrNames: customAttrNameColumnNames{
		AttrName: "attr_name",
	},
	Locations: locationColumnNames{
		LocName: "loc_name",
	},
	Manufacturers: manufacturerColumnNames{
		Manufacturer: "manufacturer",
	},
	Models: modelColumnNames{
		Model:   "model",
		ModelNo: "model_no",
	},
	PositionCodes: positionCodeColumnNames{
		PosCode: "pos_code",
	},
	Suppliers: supplierColumnNames{
		Name: "name",
	},
}
View Source
var CustomAttrNameColumns = struct {
	AttrName sqlite.Expression
}{
	AttrName: sqlite.Quote("custom_attr_names", "attr_name"),
}
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 {
	LocName sqlite.Expression
}{
	LocName: sqlite.Quote("locations", "loc_name"),
}
View Source
var Locations = sqlite.NewViewx[*Location, LocationSlice]("", "locations")

Locations contains methods to work with the locations view

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

Manufacturers contains methods to work with the manufacturers view

View Source
var ModelColumns = struct {
	Model   sqlite.Expression
	ModelNo sqlite.Expression
}{
	Model:   sqlite.Quote("models", "model"),
	ModelNo: sqlite.Quote("models", "model_no"),
}
View Source
var Models = sqlite.NewViewx[*Model, ModelSlice]("", "models")

Models contains methods to work with the models view

View Source
var PositionCodeColumns = struct {
	PosCode sqlite.Expression
}{
	PosCode: sqlite.Quote("position_codes", "pos_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
	AssetPurchases  string
	Assets          string
	AssetsFTS       string
	LocalAuthUsers  string
	Sessions        string
	Tags            string
	UserPreferences string
	Users           string
	Categories      string
	CustomAttrNames string
	Locations       string
	Manufacturers   string
	Models          string
	PositionCodes   string
	Suppliers       string
}{
	AssetFiles:      "asset_files",
	AssetParts:      "asset_parts",
	AssetPurchases:  "asset_purchases",
	Assets:          "assets",
	AssetsFTS:       "assets_fts",
	LocalAuthUsers:  "local_auth_users",
	Sessions:        "sessions",
	Tags:            "tags",
	UserPreferences: "user_preferences",
	Users:           "users",
	Categories:      "categories",
	CustomAttrNames: "custom_attr_names",
	Locations:       "locations",
	Manufacturers:   "manufacturers",
	Models:          "models",
	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 UserPreferenceColumns = struct {
	ID        sqlite.Expression
	UserID    sqlite.Expression
	Key       sqlite.Expression
	Value     sqlite.Expression
	CreatedAt sqlite.Expression
	UpdatedAt sqlite.Expression
}{
	ID:        sqlite.Quote("user_preferences", "id"),
	UserID:    sqlite.Quote("user_preferences", "user_id"),
	Key:       sqlite.Quote("user_preferences", "key"),
	Value:     sqlite.Quote("user_preferences", "value"),
	CreatedAt: sqlite.Quote("user_preferences", "created_at"),
	UpdatedAt: sqlite.Quote("user_preferences", "updated_at"),
}
View Source
var UserPreferences = sqlite.NewTablex[*UserPreference, UserPreferenceSlice, *UserPreferenceSetter]("", "user_preferences")

UserPreferences contains methods to work with the user_preferences table

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 AssetPurchaseExists added in v0.3.0

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

AssetPurchaseExists checks the presence of a single record by primary key

func AssetPurchaseWhere added in v0.3.0

func AssetPurchaseWhere[Q sqlite.Filterable]() assetPurchaseWhere[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 ModelWhere added in v0.3.0

func ModelWhere[Q sqlite.Filterable]() modelWhere[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 PreloadAssetFileAsset added in v0.3.0

func PreloadAssetFileAsset(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 PreloadAssetPurchaseAsset added in v0.3.0

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

func PreloadAssetPurchaseCreatedByUser added in v0.3.0

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

func PreloadAssetTag

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

func PreloadUserPreferenceUser added in v0.7.0

func PreloadUserPreferenceUser(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 ThenLoadAssetAssetFiles added in v0.3.0

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

func ThenLoadAssetAssetParts

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

func ThenLoadAssetAssetPurchases added in v0.3.0

func ThenLoadAssetAssetPurchases(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 ThenLoadAssetFileAsset added in v0.3.0

func ThenLoadAssetFileAsset(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 ThenLoadAssetPurchaseAsset added in v0.3.0

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

func ThenLoadAssetPurchaseCreatedByUser added in v0.3.0

func ThenLoadAssetPurchaseCreatedByUser(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 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 ThenLoadUserCreatedByAssetPurchases added in v0.3.0

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

func ThenLoadUserCreatedByAssets

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

func ThenLoadUserPreferenceUser added in v0.7.0

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

func ThenLoadUserUserPreferences added in v0.7.0

func ThenLoadUserUserPreferences(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 UserPreferenceExists added in v0.7.0

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

UserPreferenceExists checks the presence of a single record by primary key

func UserPreferenceWhere added in v0.7.0

func UserPreferenceWhere[Q sqlite.Filterable]() userPreferenceWhere[Q]

func UserWhere

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

func Where

func Where[Q sqlite.Filterable]() struct {
	AssetFiles      assetFileWhere[Q]
	AssetParts      assetPartWhere[Q]
	AssetPurchases  assetPurchaseWhere[Q]
	Assets          assetWhere[Q]
	AssetsFTS       assetsFTWhere[Q]
	LocalAuthUsers  localAuthUserWhere[Q]
	Sessions        sessionWhere[Q]
	Tags            tagWhere[Q]
	UserPreferences userPreferenceWhere[Q]
	Users           userWhere[Q]
	Categories      categoryWhere[Q]
	CustomAttrNames customAttrNameWhere[Q]
	Locations       locationWhere[Q]
	Manufacturers   manufacturerWhere[Q]
	Models          modelWhere[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" `
	PartsTotalCounter int64                                        `db:"parts_total_counter" `
	CreatedBy         int64                                        `db:"created_by" `
	CreatedAt         types.SQLiteDatetime                         `db:"created_at" `
	UpdatedAt         types.SQLiteDatetime                         `db:"updated_at" `
	Type              string                                       `db:"type" `
	Quantity          uint64                                       `db:"quantity" `
	QuantityUnit      null.Val[string]                             `db:"quantity_unit" `

	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) AssetFiles added in v0.3.0

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

AssetFiles starts a query for related objects on asset_files

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) AssetPurchases added in v0.3.0

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

AssetPurchases starts a query for related objects on asset_purchases

func (*Asset) AttachAssetFiles added in v0.3.0

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

func (*Asset) AttachAssetParts

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

func (*Asset) AttachAssetPurchases added in v0.3.0

func (asset0 *Asset) AttachAssetPurchases(ctx context.Context, exec bob.Executor, related ...*AssetPurchase) 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) InsertAssetFiles added in v0.3.0

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

func (*Asset) InsertAssetParts

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

func (*Asset) InsertAssetPurchases added in v0.3.0

func (asset0 *Asset) InsertAssetPurchases(ctx context.Context, exec bob.Executor, related ...*AssetPurchaseSetter) 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) LoadAssetAssetFiles added in v0.3.0

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

LoadAssetAssetFiles loads the asset's AssetFiles into the .R struct

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) LoadAssetAssetPurchases added in v0.3.0

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

LoadAssetAssetPurchases loads the asset's AssetPurchases 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" `
	FullPath   string               `db:"full_path" `
	PublicPath string               `db:"public_path" `

	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) Asset added in v0.3.0

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

Asset starts a query for related objects on assets

func (*AssetFile) AttachAsset added in v0.3.0

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

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) InsertAsset added in v0.3.0

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

func (*AssetFile) InsertCreatedByUser

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

func (*AssetFile) LoadAssetFileAsset added in v0.3.0

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

LoadAssetFileAsset loads the assetFile's Asset into the .R struct

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"`
	FullPath   omit.Val[string]               `db:"full_path"`
	PublicPath omit.Val[string]               `db:"public_path"`
}

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) Asset added in v0.3.0

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) LoadAssetFileAsset added in v0.3.0

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

LoadAssetFileAsset loads the assetFile's Asset into the .R struct

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) 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) 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) 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) 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) 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 AssetPurchase added in v0.3.0

type AssetPurchase struct {
	ID        int64                          `db:"id,pk" `
	AssetID   int64                          `db:"asset_id" `
	Supplier  null.Val[string]               `db:"supplier" `
	OrderNo   null.Val[string]               `db:"order_no" `
	OrderDate null.Val[types.SQLiteDatetime] `db:"order_date" `
	Amount    null.Val[int64]                `db:"amount" `
	Currency  null.Val[string]               `db:"currency" `
	CreatedBy int64                          `db:"created_by" `
	CreatedAt types.SQLiteDatetime           `db:"created_at" `
	UpdatedAt types.SQLiteDatetime           `db:"updated_at" `

	R assetPurchaseR `db:"-" `
}

AssetPurchase is an object representing the database table.

func FindAssetPurchase added in v0.3.0

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

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

func (*AssetPurchase) Asset added in v0.3.0

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

Asset starts a query for related objects on assets

func (*AssetPurchase) AttachAsset added in v0.3.0

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

func (*AssetPurchase) AttachCreatedByUser added in v0.3.0

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

func (*AssetPurchase) CreatedByUser added in v0.3.0

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

CreatedByUser starts a query for related objects on users

func (*AssetPurchase) Delete added in v0.3.0

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

Delete deletes a single AssetPurchase record with an executor

func (*AssetPurchase) InsertAsset added in v0.3.0

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

func (*AssetPurchase) InsertCreatedByUser added in v0.3.0

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

func (*AssetPurchase) LoadAssetPurchaseAsset added in v0.3.0

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

LoadAssetPurchaseAsset loads the assetPurchase's Asset into the .R struct

func (*AssetPurchase) LoadAssetPurchaseCreatedByUser added in v0.3.0

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

LoadAssetPurchaseCreatedByUser loads the assetPurchase's CreatedByUser into the .R struct

func (*AssetPurchase) Preload added in v0.3.0

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

func (*AssetPurchase) PrimaryKeyVals added in v0.3.0

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

PrimaryKeyVals returns the primary key values of the AssetPurchase

func (*AssetPurchase) Reload added in v0.3.0

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

Reload refreshes the AssetPurchase using the executor

func (*AssetPurchase) Update added in v0.3.0

Update uses an executor to update the AssetPurchase

type AssetPurchaseSetter added in v0.3.0

type AssetPurchaseSetter struct {
	ID        omit.Val[int64]                    `db:"id,pk"`
	AssetID   omit.Val[int64]                    `db:"asset_id"`
	Supplier  omitnull.Val[string]               `db:"supplier"`
	OrderNo   omitnull.Val[string]               `db:"order_no"`
	OrderDate omitnull.Val[types.SQLiteDatetime] `db:"order_date"`
	Amount    omitnull.Val[int64]                `db:"amount"`
	Currency  omitnull.Val[string]               `db:"currency"`
	CreatedBy omit.Val[int64]                    `db:"created_by"`
	CreatedAt omit.Val[types.SQLiteDatetime]     `db:"created_at"`
	UpdatedAt omit.Val[types.SQLiteDatetime]     `db:"updated_at"`
}

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

func (AssetPurchaseSetter) Apply added in v0.3.0

func (AssetPurchaseSetter) Insert added in v0.3.0

func (AssetPurchaseSetter) Overwrite added in v0.3.0

func (s AssetPurchaseSetter) Overwrite(t *AssetPurchase)

func (AssetPurchaseSetter) SetColumns added in v0.3.0

func (s AssetPurchaseSetter) SetColumns() []string

type AssetPurchaseSlice added in v0.3.0

type AssetPurchaseSlice []*AssetPurchase

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

func (AssetPurchaseSlice) Asset added in v0.3.0

func (AssetPurchaseSlice) CreatedByUser added in v0.3.0

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

func (AssetPurchaseSlice) DeleteAll added in v0.3.0

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

func (AssetPurchaseSlice) LoadAssetPurchaseAsset added in v0.3.0

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

LoadAssetPurchaseAsset loads the assetPurchase's Asset into the .R struct

func (AssetPurchaseSlice) LoadAssetPurchaseCreatedByUser added in v0.3.0

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

LoadAssetPurchaseCreatedByUser loads the assetPurchase's CreatedByUser into the .R struct

func (AssetPurchaseSlice) ReloadAll added in v0.3.0

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

func (AssetPurchaseSlice) UpdateAll added in v0.3.0

type AssetPurchasesQuery added in v0.3.0

type AssetPurchasesQuery = *sqlite.ViewQuery[*AssetPurchase, AssetPurchaseSlice]

AssetPurchasesQuery is a query on the asset_purchases table

type AssetPurchasesStmt added in v0.3.0

type AssetPurchasesStmt = bob.QueryStmt[*AssetPurchase, AssetPurchaseSlice]

AssetPurchasesStmt is a prepared statment on asset_purchases

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"`
	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"`
	Type              omit.Val[string]                                 `db:"type"`
	Quantity          omit.Val[uint64]                                 `db:"quantity"`
	QuantityUnit      omitnull.Val[string]                             `db:"quantity_unit"`
}

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) AssetFiles added in v0.3.0

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

func (AssetSlice) AssetParts

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

func (AssetSlice) AssetPurchases added in v0.3.0

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

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) LoadAssetAssetFiles added in v0.3.0

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

LoadAssetAssetFiles loads the asset's AssetFiles into the .R struct

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) LoadAssetAssetPurchases added in v0.3.0

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

LoadAssetAssetPurchases loads the asset's AssetPurchases 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 {
	CatName null.Val[string] `db:"cat_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 {
	AttrName null.Val[string] `db:"attr_name" `
}

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 {
	LocName null.Val[string] `db:"loc_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 {
	Manufacturer null.Val[string] `db:"manufacturer" `
}

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 Model added in v0.3.0

type Model struct {
	Model   null.Val[string] `db:"model" `
	ModelNo null.Val[string] `db:"model_no" `
}

Model is an object representing the database table.

type ModelSlice added in v0.3.0

type ModelSlice []*Model

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

type ModelsQuery added in v0.3.0

type ModelsQuery = *sqlite.ViewQuery[*Model, ModelSlice]

ModelsQuery is a query on the models view

type ModelsStmt added in v0.3.0

type ModelsStmt = bob.QueryStmt[*Model, ModelSlice]

ModelsStmt is a prepared statment on models

type PositionCode

type PositionCode struct {
	PosCode null.Val[string] `db:"pos_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) 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) 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) InsertAssets

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

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) 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) 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) AttachCreatedByAssetPurchases added in v0.3.0

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

func (*User) AttachCreatedByAssets

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

func (*User) AttachUserPreferences added in v0.7.0

func (user0 *User) AttachUserPreferences(ctx context.Context, exec bob.Executor, related ...*UserPreference) 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) CreatedByAssetPurchases added in v0.3.0

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

CreatedByAssetPurchases starts a query for related objects on asset_purchases

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) InsertCreatedByAssetPurchases added in v0.3.0

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

func (*User) InsertCreatedByAssets

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

func (*User) InsertUserPreferences added in v0.7.0

func (user0 *User) InsertUserPreferences(ctx context.Context, exec bob.Executor, related ...*UserPreferenceSetter) 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) LoadUserCreatedByAssetPurchases added in v0.3.0

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

LoadUserCreatedByAssetPurchases loads the user's CreatedByAssetPurchases 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) LoadUserUserPreferences added in v0.7.0

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

LoadUserUserPreferences loads the user's UserPreferences 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

func (*User) UserPreferences added in v0.7.0

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

UserPreferences starts a query for related objects on user_preferences

type UserPreference added in v0.7.0

type UserPreference struct {
	ID        int64                `db:"id,pk" `
	UserID    int64                `db:"user_id" `
	Key       string               `db:"key" `
	Value     []byte               `db:"value" `
	CreatedAt types.SQLiteDatetime `db:"created_at" `
	UpdatedAt types.SQLiteDatetime `db:"updated_at" `

	R userPreferenceR `db:"-" `
}

UserPreference is an object representing the database table.

func FindUserPreference added in v0.7.0

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

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

func (*UserPreference) AttachUser added in v0.7.0

func (userPreference0 *UserPreference) AttachUser(ctx context.Context, exec bob.Executor, user1 *User) error

func (*UserPreference) Delete added in v0.7.0

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

Delete deletes a single UserPreference record with an executor

func (*UserPreference) InsertUser added in v0.7.0

func (userPreference0 *UserPreference) InsertUser(ctx context.Context, exec bob.Executor, related *UserSetter) error

func (*UserPreference) LoadUserPreferenceUser added in v0.7.0

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

LoadUserPreferenceUser loads the userPreference's User into the .R struct

func (*UserPreference) Preload added in v0.7.0

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

func (*UserPreference) PrimaryKeyVals added in v0.7.0

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

PrimaryKeyVals returns the primary key values of the UserPreference

func (*UserPreference) Reload added in v0.7.0

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

Reload refreshes the UserPreference using the executor

func (*UserPreference) Update added in v0.7.0

Update uses an executor to update the UserPreference

func (*UserPreference) User added in v0.7.0

User starts a query for related objects on users

type UserPreferenceSetter added in v0.7.0

type UserPreferenceSetter struct {
	ID        omit.Val[int64]                `db:"id,pk"`
	UserID    omit.Val[int64]                `db:"user_id"`
	Key       omit.Val[string]               `db:"key"`
	Value     omit.Val[[]byte]               `db:"value"`
	CreatedAt omit.Val[types.SQLiteDatetime] `db:"created_at"`
	UpdatedAt omit.Val[types.SQLiteDatetime] `db:"updated_at"`
}

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

func (UserPreferenceSetter) Apply added in v0.7.0

func (UserPreferenceSetter) Insert added in v0.7.0

func (UserPreferenceSetter) Overwrite added in v0.7.0

func (s UserPreferenceSetter) Overwrite(t *UserPreference)

func (UserPreferenceSetter) SetColumns added in v0.7.0

func (s UserPreferenceSetter) SetColumns() []string

type UserPreferenceSlice added in v0.7.0

type UserPreferenceSlice []*UserPreference

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

func (UserPreferenceSlice) DeleteAll added in v0.7.0

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

func (UserPreferenceSlice) LoadUserPreferenceUser added in v0.7.0

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

LoadUserPreferenceUser loads the userPreference's User into the .R struct

func (UserPreferenceSlice) ReloadAll added in v0.7.0

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

func (UserPreferenceSlice) UpdateAll added in v0.7.0

func (UserPreferenceSlice) User added in v0.7.0

type UserPreferencesQuery added in v0.7.0

type UserPreferencesQuery = *sqlite.ViewQuery[*UserPreference, UserPreferenceSlice]

UserPreferencesQuery is a query on the user_preferences table

type UserPreferencesStmt added in v0.7.0

type UserPreferencesStmt = bob.QueryStmt[*UserPreference, UserPreferenceSlice]

UserPreferencesStmt is a prepared statment on user_preferences

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) CreatedByAssetPurchases added in v0.3.0

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

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) LoadUserCreatedByAssetPurchases added in v0.3.0

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

LoadUserCreatedByAssetPurchases loads the user's CreatedByAssetPurchases 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) LoadUserUserPreferences added in v0.7.0

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

LoadUserUserPreferences loads the user's UserPreferences 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

func (UserSlice) UserPreferences added in v0.7.0

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

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