Documentation ¶
Index ¶
- Variables
- func AddBuildingHook(hookPoint boil.HookPoint, buildingHook BuildingHook)
- func AddGroupHook(hookPoint boil.HookPoint, groupHook GroupHook)
- func AddLocationHook(hookPoint boil.HookPoint, locationHook LocationHook)
- func AddManufacturerHook(hookPoint boil.HookPoint, manufacturerHook ManufacturerHook)
- func AddModelHook(hookPoint boil.HookPoint, modelHook ModelHook)
- func AddPrinterHook(hookPoint boil.HookPoint, printerHook PrinterHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func BuildingExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Buildings(mods ...qm.QueryMod) buildingQuery
- func GroupExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Groups(mods ...qm.QueryMod) groupQuery
- func LocationExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Locations(mods ...qm.QueryMod) locationQuery
- func ManufacturerExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Manufacturers(mods ...qm.QueryMod) manufacturerQuery
- func ModelExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Models(mods ...qm.QueryMod) modelQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func PrinterExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Printers(mods ...qm.QueryMod) printerQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Building
- func (o *Building) AddLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Building) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Building) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Building) Locations(mods ...qm.QueryMod) locationQuery
- func (o *Building) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Building) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Building) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type BuildingHook
- type BuildingSlice
- type Group
- func (o *Group) AddLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Group) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Group) Locations(mods ...qm.QueryMod) locationQuery
- func (o *Group) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Group) RemoveLocations(ctx context.Context, exec boil.ContextExecutor, related ...*Location) error
- func (o *Group) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Group) SetLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Group) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Group) Users(mods ...qm.QueryMod) userQuery
- type GroupHook
- type GroupSlice
- type Location
- func (o *Location) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *Location) AddPrinters(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Location) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Location) Building(mods ...qm.QueryMod) buildingQuery
- func (o *Location) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Location) Groups(mods ...qm.QueryMod) groupQuery
- func (o *Location) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Location) Printers(mods ...qm.QueryMod) printerQuery
- func (o *Location) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Location) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
- func (o *Location) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Location) SetBuilding(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Building) error
- func (o *Location) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *Location) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Location) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Location) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Location) Users(mods ...qm.QueryMod) userQuery
- type LocationHook
- type LocationSlice
- type M
- type Manufacturer
- func (o *Manufacturer) AddModels(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Model) error
- func (o *Manufacturer) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Manufacturer) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Manufacturer) Models(mods ...qm.QueryMod) modelQuery
- func (o *Manufacturer) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Manufacturer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Manufacturer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type ManufacturerHook
- type ManufacturerSlice
- type Model
- func (o *Model) AddPrinters(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Model) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Model) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Model) Manufacturer(mods ...qm.QueryMod) manufacturerQuery
- func (o *Model) Printers(mods ...qm.QueryMod) printerQuery
- func (o *Model) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Model) SetManufacturer(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Model) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Model) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type ModelHook
- type ModelSlice
- type Printer
- func (o *Printer) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Printer) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Printer) Location(mods ...qm.QueryMod) locationQuery
- func (o *Printer) Model(mods ...qm.QueryMod) modelQuery
- func (o *Printer) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Printer) SetLocation(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Location) error
- func (o *Printer) SetModel(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Model) error
- func (o *Printer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Printer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type PrinterHook
- type PrinterSlice
- type User
- func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) AddLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Groups(mods ...qm.QueryMod) groupQuery
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Locations(mods ...qm.QueryMod) locationQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
- func (o *User) RemoveLocations(ctx context.Context, exec boil.ContextExecutor, related ...*Location) error
- func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) SetLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type UserHook
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var BuildingColumns = struct { ID string Name string }{ ID: "id", Name: "name", }
var BuildingRels = struct { Locations string }{ Locations: "Locations", }
BuildingRels is where relationship names are stored.
var BuildingWhere = struct { ID whereHelperstring Name whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("db: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var GroupColumns = struct { ID string LocalID string DisplayName string }{ ID: "id", LocalID: "local_id", DisplayName: "display_name", }
var GroupRels = struct { Users string Locations string }{ Users: "Users", Locations: "Locations", }
GroupRels is where relationship names are stored.
var GroupWhere = struct { ID whereHelperstring LocalID whereHelperstring DisplayName whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, LocalID: whereHelperstring{/* contains filtered or unexported fields */}, DisplayName: whereHelperstring{/* contains filtered or unexported fields */}, }
var LocationColumns = struct { ID string BuildingID string Name string }{ ID: "id", BuildingID: "building_id", Name: "name", }
var LocationRels = struct { Building string Groups string Users string Printers string }{ Building: "Building", Groups: "Groups", Users: "Users", Printers: "Printers", }
LocationRels is where relationship names are stored.
var LocationWhere = struct { ID whereHelperstring BuildingID whereHelperstring Name whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, BuildingID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, }
var ManufacturerColumns = struct { ID string Name string }{ ID: "id", Name: "name", }
var ManufacturerRels = struct { Models string }{ Models: "Models", }
ManufacturerRels is where relationship names are stored.
var ManufacturerWhere = struct { ID whereHelperstring Name whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, }
var ModelColumns = struct { ID string ManufacturerID string Name string Driver string }{ ID: "id", ManufacturerID: "manufacturer_id", Name: "name", Driver: "driver", }
var ModelRels = struct { Manufacturer string Printers string }{ Manufacturer: "Manufacturer", Printers: "Printers", }
ModelRels is where relationship names are stored.
var ModelWhere = struct { ID whereHelperstring ManufacturerID whereHelperstring Name whereHelperstring Driver whereHelpertypes_JSON }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, ManufacturerID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Driver: whereHelpertypes_JSON{/* contains filtered or unexported fields */}, }
var PrinterColumns = struct { ID string ModelID string LocationID string Hostname string DriverExtra string }{ ID: "id", ModelID: "model_id", LocationID: "location_id", Hostname: "hostname", DriverExtra: "driver_extra", }
var PrinterRels = struct { Location string Model string }{ Location: "Location", Model: "Model", }
PrinterRels is where relationship names are stored.
var PrinterWhere = struct { ID whereHelperstring ModelID whereHelperstring LocationID whereHelperstring Hostname whereHelperstring DriverExtra whereHelpernull_JSON }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, ModelID: whereHelperstring{/* contains filtered or unexported fields */}, LocationID: whereHelperstring{/* contains filtered or unexported fields */}, Hostname: whereHelperstring{/* contains filtered or unexported fields */}, DriverExtra: whereHelpernull_JSON{/* contains filtered or unexported fields */}, }
var TableNames = struct { Building string Group string GroupUserAssignment string Location string LocationGroupAssignment string LocationUserAssignment string Manufacturer string Model string Printer string User string }{ Building: "building", Group: "group", GroupUserAssignment: "group_user_assignment", Location: "location", LocationGroupAssignment: "location_group_assignment", LocationUserAssignment: "location_user_assignment", Manufacturer: "manufacturer", Model: "model", Printer: "printer", User: "user", }
var UserColumns = struct { ID string LocalID string DisplayName string Username string }{ ID: "id", LocalID: "local_id", DisplayName: "display_name", Username: "username", }
var UserRels = struct { Groups string Locations string }{ Groups: "Groups", Locations: "Locations", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperstring LocalID whereHelperstring DisplayName whereHelperstring Username whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, LocalID: whereHelperstring{/* contains filtered or unexported fields */}, DisplayName: whereHelperstring{/* contains filtered or unexported fields */}, Username: whereHelperstring{/* contains filtered or unexported fields */}, }
Functions ¶
func AddBuildingHook ¶
func AddBuildingHook(hookPoint boil.HookPoint, buildingHook BuildingHook)
AddBuildingHook registers your hook function for all future operations.
func AddGroupHook ¶
AddGroupHook registers your hook function for all future operations.
func AddLocationHook ¶
func AddLocationHook(hookPoint boil.HookPoint, locationHook LocationHook)
AddLocationHook registers your hook function for all future operations.
func AddManufacturerHook ¶
func AddManufacturerHook(hookPoint boil.HookPoint, manufacturerHook ManufacturerHook)
AddManufacturerHook registers your hook function for all future operations.
func AddModelHook ¶
AddModelHook registers your hook function for all future operations.
func AddPrinterHook ¶
func AddPrinterHook(hookPoint boil.HookPoint, printerHook PrinterHook)
AddPrinterHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func BuildingExists ¶
BuildingExists checks if the Building row exists.
func GroupExists ¶
GroupExists checks if the Group row exists.
func LocationExists ¶
LocationExists checks if the Location row exists.
func ManufacturerExists ¶
ManufacturerExists checks if the Manufacturer row exists.
func Manufacturers ¶
Manufacturers retrieves all the records using an executor.
func ModelExists ¶
ModelExists checks if the Model row exists.
func PrinterExists ¶
PrinterExists checks if the Printer row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Building ¶
type Building struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` R *buildingR `boil:"-" json:"-" toml:"-" yaml:"-"` L buildingL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Building is an object representing the database table.
func FindBuilding ¶
func FindBuilding(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Building, error)
FindBuilding retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Building) AddLocations ¶
func (o *Building) AddLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Location) error
AddLocations adds the given related objects to the existing relationships of the building, optionally inserting them as new records. Appends related to o.R.Locations. Sets related.R.Building appropriately.
func (*Building) Delete ¶
Delete deletes a single Building record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Building) Insert ¶
func (o *Building) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Building) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Building) Update ¶
func (o *Building) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Building. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Building) Upsert ¶
func (o *Building) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type BuildingHook ¶
BuildingHook is the signature for custom Building hook methods
type BuildingSlice ¶
type BuildingSlice []*Building
BuildingSlice is an alias for a slice of pointers to Building. This should generally be used opposed to []Building.
func (BuildingSlice) DeleteAll ¶
func (o BuildingSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*BuildingSlice) ReloadAll ¶
func (o *BuildingSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (BuildingSlice) UpdateAll ¶
func (o BuildingSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Group ¶
type Group struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` LocalID string `boil:"local_id" json:"local_id" toml:"local_id" yaml:"local_id"` DisplayName string `boil:"display_name" json:"display_name" toml:"display_name" yaml:"display_name"` R *groupR `boil:"-" json:"-" toml:"-" yaml:"-"` L groupL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Group is an object representing the database table.
func FindGroup ¶
func FindGroup(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Group, error)
FindGroup retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Group) AddLocations ¶
func (o *Group) AddLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Location) error
AddLocations adds the given related objects to the existing relationships of the group, optionally inserting them as new records. Appends related to o.R.Locations. Sets related.R.Groups appropriately.
func (*Group) AddUsers ¶
func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
AddUsers adds the given related objects to the existing relationships of the group, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Groups appropriately.
func (*Group) Delete ¶
Delete deletes a single Group record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Group) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Group) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Group) RemoveLocations ¶
func (o *Group) RemoveLocations(ctx context.Context, exec boil.ContextExecutor, related ...*Location) error
RemoveLocations relationships from objects passed in. Removes related items from R.Locations (uses pointer comparison, removal does not keep order) Sets related.R.Groups.
func (*Group) RemoveUsers ¶
RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Groups.
func (*Group) SetLocations ¶
func (o *Group) SetLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Location) error
SetLocations removes all previously related items of the group replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Groups's Locations accordingly. Replaces o.R.Locations with related. Sets related.R.Groups's Locations accordingly.
func (*Group) SetUsers ¶
func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
SetUsers removes all previously related items of the group replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Groups's Users accordingly. Replaces o.R.Users with related. Sets related.R.Groups's Users accordingly.
func (*Group) Update ¶
func (o *Group) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Group. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Group) Upsert ¶
func (o *Group) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type GroupSlice ¶
type GroupSlice []*Group
GroupSlice is an alias for a slice of pointers to Group. This should generally be used opposed to []Group.
func (GroupSlice) DeleteAll ¶
func (o GroupSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*GroupSlice) ReloadAll ¶
func (o *GroupSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (GroupSlice) UpdateAll ¶
func (o GroupSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Location ¶
type Location struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` BuildingID string `boil:"building_id" json:"building_id" toml:"building_id" yaml:"building_id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` R *locationR `boil:"-" json:"-" toml:"-" yaml:"-"` L locationL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Location is an object representing the database table.
func FindLocation ¶
func FindLocation(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Location, error)
FindLocation retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Location) AddGroups ¶
func (o *Location) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
AddGroups adds the given related objects to the existing relationships of the location, optionally inserting them as new records. Appends related to o.R.Groups. Sets related.R.Locations appropriately.
func (*Location) AddPrinters ¶
func (o *Location) AddPrinters(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Printer) error
AddPrinters adds the given related objects to the existing relationships of the location, optionally inserting them as new records. Appends related to o.R.Printers. Sets related.R.Location appropriately.
func (*Location) AddUsers ¶
func (o *Location) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
AddUsers adds the given related objects to the existing relationships of the location, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Locations appropriately.
func (*Location) Delete ¶
Delete deletes a single Location record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Location) Insert ¶
func (o *Location) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Location) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Location) RemoveGroups ¶
func (o *Location) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
RemoveGroups relationships from objects passed in. Removes related items from R.Groups (uses pointer comparison, removal does not keep order) Sets related.R.Locations.
func (*Location) RemoveUsers ¶
func (o *Location) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Locations.
func (*Location) SetBuilding ¶
func (o *Location) SetBuilding(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Building) error
SetBuilding of the location to the related item. Sets o.R.Building to related. Adds o to related.R.Locations.
func (*Location) SetGroups ¶
func (o *Location) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
SetGroups removes all previously related items of the location replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Locations's Groups accordingly. Replaces o.R.Groups with related. Sets related.R.Locations's Groups accordingly.
func (*Location) SetUsers ¶
func (o *Location) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
SetUsers removes all previously related items of the location replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Locations's Users accordingly. Replaces o.R.Users with related. Sets related.R.Locations's Users accordingly.
func (*Location) Update ¶
func (o *Location) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Location. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Location) Upsert ¶
func (o *Location) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type LocationHook ¶
LocationHook is the signature for custom Location hook methods
type LocationSlice ¶
type LocationSlice []*Location
LocationSlice is an alias for a slice of pointers to Location. This should generally be used opposed to []Location.
func (LocationSlice) DeleteAll ¶
func (o LocationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*LocationSlice) ReloadAll ¶
func (o *LocationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (LocationSlice) UpdateAll ¶
func (o LocationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Manufacturer ¶
type Manufacturer struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` R *manufacturerR `boil:"-" json:"-" toml:"-" yaml:"-"` L manufacturerL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Manufacturer is an object representing the database table.
func FindManufacturer ¶
func FindManufacturer(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Manufacturer, error)
FindManufacturer retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Manufacturer) AddModels ¶
func (o *Manufacturer) AddModels(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Model) error
AddModels adds the given related objects to the existing relationships of the manufacturer, optionally inserting them as new records. Appends related to o.R.Models. Sets related.R.Manufacturer appropriately.
func (*Manufacturer) Delete ¶
func (o *Manufacturer) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single Manufacturer record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Manufacturer) Insert ¶
func (o *Manufacturer) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Manufacturer) Models ¶
func (o *Manufacturer) Models(mods ...qm.QueryMod) modelQuery
Models retrieves all the model's Models with an executor.
func (*Manufacturer) Reload ¶
func (o *Manufacturer) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*Manufacturer) Update ¶
func (o *Manufacturer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Manufacturer. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Manufacturer) Upsert ¶
func (o *Manufacturer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type ManufacturerHook ¶
type ManufacturerHook func(context.Context, boil.ContextExecutor, *Manufacturer) error
ManufacturerHook is the signature for custom Manufacturer hook methods
type ManufacturerSlice ¶
type ManufacturerSlice []*Manufacturer
ManufacturerSlice is an alias for a slice of pointers to Manufacturer. This should generally be used opposed to []Manufacturer.
func (ManufacturerSlice) DeleteAll ¶
func (o ManufacturerSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ManufacturerSlice) ReloadAll ¶
func (o *ManufacturerSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (ManufacturerSlice) UpdateAll ¶
func (o ManufacturerSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Model ¶
type Model struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` ManufacturerID string `boil:"manufacturer_id" json:"manufacturer_id" toml:"manufacturer_id" yaml:"manufacturer_id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Driver types.JSON `boil:"driver" json:"driver" toml:"driver" yaml:"driver"` R *modelR `boil:"-" json:"-" toml:"-" yaml:"-"` L modelL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Model is an object representing the database table.
func FindModel ¶
func FindModel(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Model, error)
FindModel retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Model) AddPrinters ¶
func (o *Model) AddPrinters(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Printer) error
AddPrinters adds the given related objects to the existing relationships of the model, optionally inserting them as new records. Appends related to o.R.Printers. Sets related.R.Model appropriately.
func (*Model) Delete ¶
Delete deletes a single Model record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Model) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Model) Manufacturer ¶
Manufacturer pointed to by the foreign key.
func (*Model) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Model) SetManufacturer ¶
func (o *Model) SetManufacturer(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Manufacturer) error
SetManufacturer of the model to the related item. Sets o.R.Manufacturer to related. Adds o to related.R.Models.
func (*Model) Update ¶
func (o *Model) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Model. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Model) Upsert ¶
func (o *Model) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type ModelSlice ¶
type ModelSlice []*Model
ModelSlice is an alias for a slice of pointers to Model. This should generally be used opposed to []Model.
func (ModelSlice) DeleteAll ¶
func (o ModelSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ModelSlice) ReloadAll ¶
func (o *ModelSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (ModelSlice) UpdateAll ¶
func (o ModelSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Printer ¶
type Printer struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` ModelID string `boil:"model_id" json:"model_id" toml:"model_id" yaml:"model_id"` LocationID string `boil:"location_id" json:"location_id" toml:"location_id" yaml:"location_id"` Hostname string `boil:"hostname" json:"hostname" toml:"hostname" yaml:"hostname"` DriverExtra null.JSON `boil:"driver_extra" json:"driver_extra,omitempty" toml:"driver_extra" yaml:"driver_extra,omitempty"` R *printerR `boil:"-" json:"-" toml:"-" yaml:"-"` L printerL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Printer is an object representing the database table.
func FindPrinter ¶
func FindPrinter(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Printer, error)
FindPrinter retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Printer) Delete ¶
Delete deletes a single Printer record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Printer) Insert ¶
func (o *Printer) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Printer) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Printer) SetLocation ¶
func (o *Printer) SetLocation(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Location) error
SetLocation of the printer to the related item. Sets o.R.Location to related. Adds o to related.R.Printers.
func (*Printer) SetModel ¶
func (o *Printer) SetModel(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Model) error
SetModel of the printer to the related item. Sets o.R.Model to related. Adds o to related.R.Printers.
func (*Printer) Update ¶
func (o *Printer) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Printer. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Printer) Upsert ¶
func (o *Printer) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type PrinterHook ¶
PrinterHook is the signature for custom Printer hook methods
type PrinterSlice ¶
type PrinterSlice []*Printer
PrinterSlice is an alias for a slice of pointers to Printer. This should generally be used opposed to []Printer.
func (PrinterSlice) DeleteAll ¶
func (o PrinterSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*PrinterSlice) ReloadAll ¶
func (o *PrinterSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (PrinterSlice) UpdateAll ¶
func (o PrinterSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type User ¶
type User struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` LocalID string `boil:"local_id" json:"local_id" toml:"local_id" yaml:"local_id"` DisplayName string `boil:"display_name" json:"display_name" toml:"display_name" yaml:"display_name"` Username string `boil:"username" json:"username" toml:"username" yaml:"username"` R *userR `boil:"-" json:"-" toml:"-" yaml:"-"` L userL `boil:"-" json:"-" toml:"-" yaml:"-"` }
User is an object representing the database table.
func FindUser ¶
func FindUser(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*User, error)
FindUser retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*User) AddGroups ¶
func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
AddGroups adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Groups. Sets related.R.Users appropriately.
func (*User) AddLocations ¶
func (o *User) AddLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Location) error
AddLocations adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Locations. Sets related.R.Users appropriately.
func (*User) Delete ¶
Delete deletes a single User record with an executor. Delete will match against the primary key column to find the record to delete.
func (*User) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) RemoveGroups ¶
func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
RemoveGroups relationships from objects passed in. Removes related items from R.Groups (uses pointer comparison, removal does not keep order) Sets related.R.Users.
func (*User) RemoveLocations ¶
func (o *User) RemoveLocations(ctx context.Context, exec boil.ContextExecutor, related ...*Location) error
RemoveLocations relationships from objects passed in. Removes related items from R.Locations (uses pointer comparison, removal does not keep order) Sets related.R.Users.
func (*User) SetGroups ¶
func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
SetGroups removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Groups accordingly. Replaces o.R.Groups with related. Sets related.R.Users's Groups accordingly.
func (*User) SetLocations ¶
func (o *User) SetLocations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Location) error
SetLocations removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Locations accordingly. Replaces o.R.Locations with related. Sets related.R.Users's Locations accordingly.
func (*User) Update ¶
func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the User. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*User) Upsert ¶
func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type UserSlice ¶
type UserSlice []*User
UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.