models

package
v0.0.0-...-736f05d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompositeColumns = struct {
	ID          string
	Name        string
	Description string
}{
	ID:          "id",
	Name:        "name",
	Description: "description",
}
View Source
var CompositeRels = struct {
	CompositesRooms string
}{
	CompositesRooms: "CompositesRooms",
}

CompositeRels is where relationship names are stored.

View Source
var CompositeWhere = struct {
	ID          whereHelperint64
	Name        whereHelperstring
	Description whereHelpernull_String
}{
	ID:          whereHelperint64{/* contains filtered or unexported fields */},
	Name:        whereHelperstring{/* contains filtered or unexported fields */},
	Description: whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var CompositesRoomColumns = struct {
	CompositeID string
	RoomID      string
	GatewayID   string
	Position    string
}{
	CompositeID: "composite_id",
	RoomID:      "room_id",
	GatewayID:   "gateway_id",
	Position:    "position",
}
View Source
var CompositesRoomRels = struct {
	Composite string
	Gateway   string
	Room      string
}{
	Composite: "Composite",
	Gateway:   "Gateway",
	Room:      "Room",
}

CompositesRoomRels is where relationship names are stored.

View Source
var CompositesRoomWhere = struct {
	CompositeID whereHelperint64
	RoomID      whereHelperint64
	GatewayID   whereHelperint64
	Position    whereHelperint
}{
	CompositeID: whereHelperint64{/* contains filtered or unexported fields */},
	RoomID:      whereHelperint64{/* contains filtered or unexported fields */},
	GatewayID:   whereHelperint64{/* contains filtered or unexported fields */},
	Position:    whereHelperint{/* contains filtered or unexported fields */},
}
View Source
var DynamicConfigColumns = struct {
	ID        string
	Key       string
	Value     string
	UpdatedAt string
}{
	ID:        "id",
	Key:       "key",
	Value:     "value",
	UpdatedAt: "updated_at",
}
View Source
var DynamicConfigRels = struct {
}{}

DynamicConfigRels is where relationship names are stored.

View Source
var DynamicConfigWhere = struct {
	ID        whereHelperint64
	Key       whereHelperstring
	Value     whereHelperstring
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperint64{/* contains filtered or unexported fields */},
	Key:       whereHelperstring{/* contains filtered or unexported fields */},
	Value:     whereHelperstring{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var GatewayColumns = struct {
	ID             string
	Name           string
	Description    string
	URL            string
	AdminURL       string
	AdminPassword  string
	Disabled       string
	Properties     string
	CreatedAt      string
	UpdatedAt      string
	RemovedAt      string
	EventsPassword string
	Type           string
}{
	ID:             "id",
	Name:           "name",
	Description:    "description",
	URL:            "url",
	AdminURL:       "admin_url",
	AdminPassword:  "admin_password",
	Disabled:       "disabled",
	Properties:     "properties",
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
	RemovedAt:      "removed_at",
	EventsPassword: "events_password",
	Type:           "type",
}
View Source
var GatewayRels = struct {
	CompositesRooms     string
	DefaultGatewayRooms string
	Sessions            string
}{
	CompositesRooms:     "CompositesRooms",
	DefaultGatewayRooms: "DefaultGatewayRooms",
	Sessions:            "Sessions",
}

GatewayRels is where relationship names are stored.

View Source
var GatewayWhere = struct {
	ID             whereHelperint64
	Name           whereHelperstring
	Description    whereHelpernull_String
	URL            whereHelperstring
	AdminURL       whereHelperstring
	AdminPassword  whereHelperstring
	Disabled       whereHelperbool
	Properties     whereHelpernull_JSON
	CreatedAt      whereHelpertime_Time
	UpdatedAt      whereHelpernull_Time
	RemovedAt      whereHelpernull_Time
	EventsPassword whereHelperstring
	Type           whereHelperstring
}{
	ID:             whereHelperint64{/* contains filtered or unexported fields */},
	Name:           whereHelperstring{/* contains filtered or unexported fields */},
	Description:    whereHelpernull_String{/* contains filtered or unexported fields */},
	URL:            whereHelperstring{/* contains filtered or unexported fields */},
	AdminURL:       whereHelperstring{/* contains filtered or unexported fields */},
	AdminPassword:  whereHelperstring{/* contains filtered or unexported fields */},
	Disabled:       whereHelperbool{/* contains filtered or unexported fields */},
	Properties:     whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
	RemovedAt:      whereHelpernull_Time{/* contains filtered or unexported fields */},
	EventsPassword: whereHelperstring{/* contains filtered or unexported fields */},
	Type:           whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var RoomColumns = struct {
	ID               string
	Name             string
	DefaultGatewayID string
	GatewayUID       string
	Disabled         string
	Properties       string
	CreatedAt        string
	UpdatedAt        string
	RemovedAt        string
	Extra            string
	Region           string
}{
	ID:               "id",
	Name:             "name",
	DefaultGatewayID: "default_gateway_id",
	GatewayUID:       "gateway_uid",
	Disabled:         "disabled",
	Properties:       "properties",
	CreatedAt:        "created_at",
	UpdatedAt:        "updated_at",
	RemovedAt:        "removed_at",
	Extra:            "extra",
	Region:           "region",
}
View Source
var RoomRels = struct {
	DefaultGateway  string
	RoomStatistic   string
	CompositesRooms string
	Sessions        string
}{
	DefaultGateway:  "DefaultGateway",
	RoomStatistic:   "RoomStatistic",
	CompositesRooms: "CompositesRooms",
	Sessions:        "Sessions",
}

RoomRels is where relationship names are stored.

View Source
var RoomStatisticColumns = struct {
	RoomID string
	OnAir  string
}{
	RoomID: "room_id",
	OnAir:  "on_air",
}
View Source
var RoomStatisticRels = struct {
	Room string
}{
	Room: "Room",
}

RoomStatisticRels is where relationship names are stored.

View Source
var RoomStatisticWhere = struct {
	RoomID whereHelperint64
	OnAir  whereHelperint
}{
	RoomID: whereHelperint64{/* contains filtered or unexported fields */},
	OnAir:  whereHelperint{/* contains filtered or unexported fields */},
}
View Source
var RoomWhere = struct {
	ID               whereHelperint64
	Name             whereHelperstring
	DefaultGatewayID whereHelperint64
	GatewayUID       whereHelperint
	Disabled         whereHelperbool
	Properties       whereHelpernull_JSON
	CreatedAt        whereHelpertime_Time
	UpdatedAt        whereHelpernull_Time
	RemovedAt        whereHelpernull_Time
	Extra            whereHelpernull_JSON
	Region           whereHelpernull_String
}{
	ID:               whereHelperint64{/* contains filtered or unexported fields */},
	Name:             whereHelperstring{/* contains filtered or unexported fields */},
	DefaultGatewayID: whereHelperint64{/* contains filtered or unexported fields */},
	GatewayUID:       whereHelperint{/* contains filtered or unexported fields */},
	Disabled:         whereHelperbool{/* contains filtered or unexported fields */},
	Properties:       whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:        whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:        whereHelpernull_Time{/* contains filtered or unexported fields */},
	RemovedAt:        whereHelpernull_Time{/* contains filtered or unexported fields */},
	Extra:            whereHelpernull_JSON{/* contains filtered or unexported fields */},
	Region:           whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var SchemaMigrationColumns = struct {
	Version string
	Dirty   string
}{
	Version: "version",
	Dirty:   "dirty",
}
View Source
var SchemaMigrationRels = struct {
}{}

SchemaMigrationRels is where relationship names are stored.

View Source
var SchemaMigrationWhere = struct {
	Version whereHelperint64
	Dirty   whereHelperbool
}{
	Version: whereHelperint64{/* contains filtered or unexported fields */},
	Dirty:   whereHelperbool{/* contains filtered or unexported fields */},
}
View Source
var SessionColumns = struct {
	ID                    string
	UserID                string
	RoomID                string
	GatewayID             string
	GatewaySession        string
	GatewayHandle         string
	GatewayFeed           string
	Display               string
	Camera                string
	Question              string
	SelfTest              string
	SoundTest             string
	UserAgent             string
	IPAddress             string
	Properties            string
	CreatedAt             string
	UpdatedAt             string
	RemovedAt             string
	Extra                 string
	GatewayHandleTextroom string
}{
	ID:                    "id",
	UserID:                "user_id",
	RoomID:                "room_id",
	GatewayID:             "gateway_id",
	GatewaySession:        "gateway_session",
	GatewayHandle:         "gateway_handle",
	GatewayFeed:           "gateway_feed",
	Display:               "display",
	Camera:                "camera",
	Question:              "question",
	SelfTest:              "self_test",
	SoundTest:             "sound_test",
	UserAgent:             "user_agent",
	IPAddress:             "ip_address",
	Properties:            "properties",
	CreatedAt:             "created_at",
	UpdatedAt:             "updated_at",
	RemovedAt:             "removed_at",
	Extra:                 "extra",
	GatewayHandleTextroom: "gateway_handle_textroom",
}
View Source
var SessionRels = struct {
	Gateway string
	Room    string
	User    string
}{
	Gateway: "Gateway",
	Room:    "Room",
	User:    "User",
}

SessionRels is where relationship names are stored.

View Source
var SessionWhere = struct {
	ID                    whereHelperint64
	UserID                whereHelperint64
	RoomID                whereHelpernull_Int64
	GatewayID             whereHelpernull_Int64
	GatewaySession        whereHelpernull_Int64
	GatewayHandle         whereHelpernull_Int64
	GatewayFeed           whereHelpernull_Int64
	Display               whereHelpernull_String
	Camera                whereHelperbool
	Question              whereHelperbool
	SelfTest              whereHelperbool
	SoundTest             whereHelperbool
	UserAgent             whereHelpernull_String
	IPAddress             whereHelpernull_String
	Properties            whereHelpernull_JSON
	CreatedAt             whereHelpertime_Time
	UpdatedAt             whereHelpernull_Time
	RemovedAt             whereHelpernull_Time
	Extra                 whereHelpernull_JSON
	GatewayHandleTextroom whereHelpernull_Int64
}{
	ID:                    whereHelperint64{/* contains filtered or unexported fields */},
	UserID:                whereHelperint64{/* contains filtered or unexported fields */},
	RoomID:                whereHelpernull_Int64{/* contains filtered or unexported fields */},
	GatewayID:             whereHelpernull_Int64{/* contains filtered or unexported fields */},
	GatewaySession:        whereHelpernull_Int64{/* contains filtered or unexported fields */},
	GatewayHandle:         whereHelpernull_Int64{/* contains filtered or unexported fields */},
	GatewayFeed:           whereHelpernull_Int64{/* contains filtered or unexported fields */},
	Display:               whereHelpernull_String{/* contains filtered or unexported fields */},
	Camera:                whereHelperbool{/* contains filtered or unexported fields */},
	Question:              whereHelperbool{/* contains filtered or unexported fields */},
	SelfTest:              whereHelperbool{/* contains filtered or unexported fields */},
	SoundTest:             whereHelperbool{/* contains filtered or unexported fields */},
	UserAgent:             whereHelpernull_String{/* contains filtered or unexported fields */},
	IPAddress:             whereHelpernull_String{/* contains filtered or unexported fields */},
	Properties:            whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:             whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:             whereHelpernull_Time{/* contains filtered or unexported fields */},
	RemovedAt:             whereHelpernull_Time{/* contains filtered or unexported fields */},
	Extra:                 whereHelpernull_JSON{/* contains filtered or unexported fields */},
	GatewayHandleTextroom: whereHelpernull_Int64{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Composites       string
	CompositesRooms  string
	DynamicConfig    string
	Gateways         string
	RoomStatistics   string
	Rooms            string
	SchemaMigrations string
	Sessions         string
	Users            string
}{
	Composites:       "composites",
	CompositesRooms:  "composites_rooms",
	DynamicConfig:    "dynamic_config",
	Gateways:         "gateways",
	RoomStatistics:   "room_statistics",
	Rooms:            "rooms",
	SchemaMigrations: "schema_migrations",
	Sessions:         "sessions",
	Users:            "users",
}
View Source
var UserColumns = struct {
	ID         string
	AccountsID string
	Email      string
	FirstName  string
	LastName   string
	Username   string
	Disabled   string
	Properties string
	CreatedAt  string
	UpdatedAt  string
	RemovedAt  string
}{
	ID:         "id",
	AccountsID: "accounts_id",
	Email:      "email",
	FirstName:  "first_name",
	LastName:   "last_name",
	Username:   "username",
	Disabled:   "disabled",
	Properties: "properties",
	CreatedAt:  "created_at",
	UpdatedAt:  "updated_at",
	RemovedAt:  "removed_at",
}
View Source
var UserRels = struct {
	Sessions string
}{
	Sessions: "Sessions",
}

UserRels is where relationship names are stored.

View Source
var UserWhere = struct {
	ID         whereHelperint64
	AccountsID whereHelperstring
	Email      whereHelpernull_String
	FirstName  whereHelpernull_String
	LastName   whereHelpernull_String
	Username   whereHelpernull_String
	Disabled   whereHelperbool
	Properties whereHelpernull_JSON
	CreatedAt  whereHelpertime_Time
	UpdatedAt  whereHelpernull_Time
	RemovedAt  whereHelpernull_Time
}{
	ID:         whereHelperint64{/* contains filtered or unexported fields */},
	AccountsID: whereHelperstring{/* contains filtered or unexported fields */},
	Email:      whereHelpernull_String{/* contains filtered or unexported fields */},
	FirstName:  whereHelpernull_String{/* contains filtered or unexported fields */},
	LastName:   whereHelpernull_String{/* contains filtered or unexported fields */},
	Username:   whereHelpernull_String{/* contains filtered or unexported fields */},
	Disabled:   whereHelperbool{/* contains filtered or unexported fields */},
	Properties: whereHelpernull_JSON{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
	RemovedAt:  whereHelpernull_Time{/* contains filtered or unexported fields */},
}

Functions

func CompositeExists

func CompositeExists(exec boil.Executor, iD int64) (bool, error)

CompositeExists checks if the Composite row exists.

func Composites

func Composites(mods ...qm.QueryMod) compositeQuery

Composites retrieves all the records using an executor.

func CompositesRoomExists

func CompositesRoomExists(exec boil.Executor, compositeID int64, roomID int64, gatewayID int64, position int) (bool, error)

CompositesRoomExists checks if the CompositesRoom row exists.

func CompositesRooms

func CompositesRooms(mods ...qm.QueryMod) compositesRoomQuery

CompositesRooms retrieves all the records using an executor.

func DynamicConfigExists

func DynamicConfigExists(exec boil.Executor, iD int64) (bool, error)

DynamicConfigExists checks if the DynamicConfig row exists.

func DynamicConfigs

func DynamicConfigs(mods ...qm.QueryMod) dynamicConfigQuery

DynamicConfigs retrieves all the records using an executor.

func GatewayExists

func GatewayExists(exec boil.Executor, iD int64) (bool, error)

GatewayExists checks if the Gateway row exists.

func Gateways

func Gateways(mods ...qm.QueryMod) gatewayQuery

Gateways retrieves all the records using an executor.

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

func RoomExists

func RoomExists(exec boil.Executor, iD int64) (bool, error)

RoomExists checks if the Room row exists.

func RoomStatisticExists

func RoomStatisticExists(exec boil.Executor, roomID int64) (bool, error)

RoomStatisticExists checks if the RoomStatistic row exists.

func RoomStatistics

func RoomStatistics(mods ...qm.QueryMod) roomStatisticQuery

RoomStatistics retrieves all the records using an executor.

func Rooms

func Rooms(mods ...qm.QueryMod) roomQuery

Rooms retrieves all the records using an executor.

func SchemaMigrationExists

func SchemaMigrationExists(exec boil.Executor, version int64) (bool, error)

SchemaMigrationExists checks if the SchemaMigration row exists.

func SchemaMigrations

func SchemaMigrations(mods ...qm.QueryMod) schemaMigrationQuery

SchemaMigrations retrieves all the records using an executor.

func SessionExists

func SessionExists(exec boil.Executor, iD int64) (bool, error)

SessionExists checks if the Session row exists.

func Sessions

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

Sessions retrieves all the records using an executor.

func UserExists

func UserExists(exec boil.Executor, iD int64) (bool, error)

UserExists checks if the User row exists.

func Users

func Users(mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

Types

type Composite

type Composite struct {
	ID          int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name        string      `boil:"name" json:"name" toml:"name" yaml:"name"`
	Description null.String `boil:"description" json:"description,omitempty" toml:"description" yaml:"description,omitempty"`

	R *compositeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L compositeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Composite is an object representing the database table.

func FindComposite

func FindComposite(exec boil.Executor, iD int64, selectCols ...string) (*Composite, error)

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

func (*Composite) AddCompositesRooms

func (o *Composite) AddCompositesRooms(exec boil.Executor, insert bool, related ...*CompositesRoom) error

AddCompositesRooms adds the given related objects to the existing relationships of the composite, optionally inserting them as new records. Appends related to o.R.CompositesRooms. Sets related.R.Composite appropriately.

func (*Composite) CompositesRooms

func (o *Composite) CompositesRooms(mods ...qm.QueryMod) compositesRoomQuery

CompositesRooms retrieves all the composites_room's CompositesRooms with an executor.

func (*Composite) Delete

func (o *Composite) Delete(exec boil.Executor) (int64, error)

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

func (*Composite) Insert

func (o *Composite) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Composite) Reload

func (o *Composite) Reload(exec boil.Executor) error

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

func (*Composite) Update

func (o *Composite) Update(exec boil.Executor, columns boil.Columns) (int64, error)

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

func (o *Composite) Upsert(exec boil.Executor, 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 CompositeSlice

type CompositeSlice []*Composite

CompositeSlice is an alias for a slice of pointers to Composite. This should generally be used opposed to []Composite.

func (CompositeSlice) DeleteAll

func (o CompositeSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*CompositeSlice) ReloadAll

func (o *CompositeSlice) ReloadAll(exec boil.Executor) error

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

func (CompositeSlice) UpdateAll

func (o CompositeSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

type CompositesRoom

type CompositesRoom struct {
	CompositeID int64 `boil:"composite_id" json:"composite_id" toml:"composite_id" yaml:"composite_id"`
	RoomID      int64 `boil:"room_id" json:"room_id" toml:"room_id" yaml:"room_id"`
	GatewayID   int64 `boil:"gateway_id" json:"gateway_id" toml:"gateway_id" yaml:"gateway_id"`
	Position    int   `boil:"position" json:"position" toml:"position" yaml:"position"`

	R *compositesRoomR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L compositesRoomL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

CompositesRoom is an object representing the database table.

func FindCompositesRoom

func FindCompositesRoom(exec boil.Executor, compositeID int64, roomID int64, gatewayID int64, position int, selectCols ...string) (*CompositesRoom, error)

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

func (*CompositesRoom) Composite

func (o *CompositesRoom) Composite(mods ...qm.QueryMod) compositeQuery

Composite pointed to by the foreign key.

func (*CompositesRoom) Delete

func (o *CompositesRoom) Delete(exec boil.Executor) (int64, error)

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

func (*CompositesRoom) Gateway

func (o *CompositesRoom) Gateway(mods ...qm.QueryMod) gatewayQuery

Gateway pointed to by the foreign key.

func (*CompositesRoom) Insert

func (o *CompositesRoom) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*CompositesRoom) Reload

func (o *CompositesRoom) Reload(exec boil.Executor) error

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

func (*CompositesRoom) Room

func (o *CompositesRoom) Room(mods ...qm.QueryMod) roomQuery

Room pointed to by the foreign key.

func (*CompositesRoom) SetComposite

func (o *CompositesRoom) SetComposite(exec boil.Executor, insert bool, related *Composite) error

SetComposite of the compositesRoom to the related item. Sets o.R.Composite to related. Adds o to related.R.CompositesRooms.

func (*CompositesRoom) SetGateway

func (o *CompositesRoom) SetGateway(exec boil.Executor, insert bool, related *Gateway) error

SetGateway of the compositesRoom to the related item. Sets o.R.Gateway to related. Adds o to related.R.CompositesRooms.

func (*CompositesRoom) SetRoom

func (o *CompositesRoom) SetRoom(exec boil.Executor, insert bool, related *Room) error

SetRoom of the compositesRoom to the related item. Sets o.R.Room to related. Adds o to related.R.CompositesRooms.

func (*CompositesRoom) Update

func (o *CompositesRoom) Update(exec boil.Executor, columns boil.Columns) (int64, error)

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

func (o *CompositesRoom) Upsert(exec boil.Executor, 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 CompositesRoomSlice

type CompositesRoomSlice []*CompositesRoom

CompositesRoomSlice is an alias for a slice of pointers to CompositesRoom. This should generally be used opposed to []CompositesRoom.

func (CompositesRoomSlice) DeleteAll

func (o CompositesRoomSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*CompositesRoomSlice) ReloadAll

func (o *CompositesRoomSlice) ReloadAll(exec boil.Executor) error

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

func (CompositesRoomSlice) UpdateAll

func (o CompositesRoomSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

type DynamicConfig

type DynamicConfig struct {
	ID        int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	Key       string    `boil:"key" json:"key" toml:"key" yaml:"key"`
	Value     string    `boil:"value" json:"value" toml:"value" yaml:"value"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *dynamicConfigR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L dynamicConfigL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

DynamicConfig is an object representing the database table.

func FindDynamicConfig

func FindDynamicConfig(exec boil.Executor, iD int64, selectCols ...string) (*DynamicConfig, error)

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

func (*DynamicConfig) Delete

func (o *DynamicConfig) Delete(exec boil.Executor) (int64, error)

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

func (*DynamicConfig) Insert

func (o *DynamicConfig) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*DynamicConfig) Reload

func (o *DynamicConfig) Reload(exec boil.Executor) error

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

func (*DynamicConfig) Update

func (o *DynamicConfig) Update(exec boil.Executor, columns boil.Columns) (int64, error)

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

func (o *DynamicConfig) Upsert(exec boil.Executor, 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 DynamicConfigSlice

type DynamicConfigSlice []*DynamicConfig

DynamicConfigSlice is an alias for a slice of pointers to DynamicConfig. This should generally be used opposed to []DynamicConfig.

func (DynamicConfigSlice) DeleteAll

func (o DynamicConfigSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*DynamicConfigSlice) ReloadAll

func (o *DynamicConfigSlice) ReloadAll(exec boil.Executor) error

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

func (DynamicConfigSlice) UpdateAll

func (o DynamicConfigSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

type Gateway

type Gateway struct {
	ID             int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name           string      `boil:"name" json:"name" toml:"name" yaml:"name"`
	Description    null.String `boil:"description" json:"description,omitempty" toml:"description" yaml:"description,omitempty"`
	URL            string      `boil:"url" json:"url" toml:"url" yaml:"url"`
	AdminURL       string      `boil:"admin_url" json:"admin_url" toml:"admin_url" yaml:"admin_url"`
	AdminPassword  string      `boil:"admin_password" json:"admin_password" toml:"admin_password" yaml:"admin_password"`
	Disabled       bool        `boil:"disabled" json:"disabled" toml:"disabled" yaml:"disabled"`
	Properties     null.JSON   `boil:"properties" json:"properties,omitempty" toml:"properties" yaml:"properties,omitempty"`
	CreatedAt      time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt      null.Time   `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`
	RemovedAt      null.Time   `boil:"removed_at" json:"removed_at,omitempty" toml:"removed_at" yaml:"removed_at,omitempty"`
	EventsPassword string      `boil:"events_password" json:"events_password" toml:"events_password" yaml:"events_password"`
	Type           string      `boil:"type" json:"type" toml:"type" yaml:"type"`

	R *gatewayR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L gatewayL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Gateway is an object representing the database table.

func FindGateway

func FindGateway(exec boil.Executor, iD int64, selectCols ...string) (*Gateway, error)

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

func (*Gateway) AddCompositesRooms

func (o *Gateway) AddCompositesRooms(exec boil.Executor, insert bool, related ...*CompositesRoom) error

AddCompositesRooms adds the given related objects to the existing relationships of the gateway, optionally inserting them as new records. Appends related to o.R.CompositesRooms. Sets related.R.Gateway appropriately.

func (*Gateway) AddDefaultGatewayRooms

func (o *Gateway) AddDefaultGatewayRooms(exec boil.Executor, insert bool, related ...*Room) error

AddDefaultGatewayRooms adds the given related objects to the existing relationships of the gateway, optionally inserting them as new records. Appends related to o.R.DefaultGatewayRooms. Sets related.R.DefaultGateway appropriately.

func (*Gateway) AddSessions

func (o *Gateway) AddSessions(exec boil.Executor, insert bool, related ...*Session) error

AddSessions adds the given related objects to the existing relationships of the gateway, optionally inserting them as new records. Appends related to o.R.Sessions. Sets related.R.Gateway appropriately.

func (*Gateway) CompositesRooms

func (o *Gateway) CompositesRooms(mods ...qm.QueryMod) compositesRoomQuery

CompositesRooms retrieves all the composites_room's CompositesRooms with an executor.

func (*Gateway) DefaultGatewayRooms

func (o *Gateway) DefaultGatewayRooms(mods ...qm.QueryMod) roomQuery

DefaultGatewayRooms retrieves all the room's Rooms with an executor via default_gateway_id column.

func (*Gateway) Delete

func (o *Gateway) Delete(exec boil.Executor) (int64, error)

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

func (*Gateway) Insert

func (o *Gateway) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Gateway) Reload

func (o *Gateway) Reload(exec boil.Executor) error

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

func (*Gateway) RemoveSessions

func (o *Gateway) RemoveSessions(exec boil.Executor, related ...*Session) error

RemoveSessions relationships from objects passed in. Removes related items from R.Sessions (uses pointer comparison, removal does not keep order) Sets related.R.Gateway.

func (*Gateway) Sessions

func (o *Gateway) Sessions(mods ...qm.QueryMod) sessionQuery

Sessions retrieves all the session's Sessions with an executor.

func (*Gateway) SetSessions

func (o *Gateway) SetSessions(exec boil.Executor, insert bool, related ...*Session) error

SetSessions removes all previously related items of the gateway replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Gateway's Sessions accordingly. Replaces o.R.Sessions with related. Sets related.R.Gateway's Sessions accordingly.

func (*Gateway) Update

func (o *Gateway) Update(exec boil.Executor, columns boil.Columns) (int64, error)

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

func (o *Gateway) Upsert(exec boil.Executor, 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 GatewaySlice

type GatewaySlice []*Gateway

GatewaySlice is an alias for a slice of pointers to Gateway. This should generally be used opposed to []Gateway.

func (GatewaySlice) DeleteAll

func (o GatewaySlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*GatewaySlice) ReloadAll

func (o *GatewaySlice) ReloadAll(exec boil.Executor) error

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

func (GatewaySlice) UpdateAll

func (o GatewaySlice) UpdateAll(exec boil.Executor, 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 Room

type Room struct {
	ID               int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name             string      `boil:"name" json:"name" toml:"name" yaml:"name"`
	DefaultGatewayID int64       `boil:"default_gateway_id" json:"default_gateway_id" toml:"default_gateway_id" yaml:"default_gateway_id"`
	GatewayUID       int         `boil:"gateway_uid" json:"gateway_uid" toml:"gateway_uid" yaml:"gateway_uid"`
	Disabled         bool        `boil:"disabled" json:"disabled" toml:"disabled" yaml:"disabled"`
	Properties       null.JSON   `boil:"properties" json:"properties,omitempty" toml:"properties" yaml:"properties,omitempty"`
	CreatedAt        time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt        null.Time   `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`
	RemovedAt        null.Time   `boil:"removed_at" json:"removed_at,omitempty" toml:"removed_at" yaml:"removed_at,omitempty"`
	Extra            null.JSON   `boil:"extra" json:"extra,omitempty" toml:"extra" yaml:"extra,omitempty"`
	Region           null.String `boil:"region" json:"region,omitempty" toml:"region" yaml:"region,omitempty"`

	R *roomR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L roomL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Room is an object representing the database table.

func FindRoom

func FindRoom(exec boil.Executor, iD int64, selectCols ...string) (*Room, error)

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

func (*Room) AddCompositesRooms

func (o *Room) AddCompositesRooms(exec boil.Executor, insert bool, related ...*CompositesRoom) error

AddCompositesRooms adds the given related objects to the existing relationships of the room, optionally inserting them as new records. Appends related to o.R.CompositesRooms. Sets related.R.Room appropriately.

func (*Room) AddSessions

func (o *Room) AddSessions(exec boil.Executor, insert bool, related ...*Session) error

AddSessions adds the given related objects to the existing relationships of the room, optionally inserting them as new records. Appends related to o.R.Sessions. Sets related.R.Room appropriately.

func (*Room) CompositesRooms

func (o *Room) CompositesRooms(mods ...qm.QueryMod) compositesRoomQuery

CompositesRooms retrieves all the composites_room's CompositesRooms with an executor.

func (*Room) DefaultGateway

func (o *Room) DefaultGateway(mods ...qm.QueryMod) gatewayQuery

DefaultGateway pointed to by the foreign key.

func (*Room) Delete

func (o *Room) Delete(exec boil.Executor) (int64, error)

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

func (*Room) Insert

func (o *Room) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Room) Reload

func (o *Room) Reload(exec boil.Executor) error

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

func (*Room) RemoveSessions

func (o *Room) RemoveSessions(exec boil.Executor, related ...*Session) error

RemoveSessions relationships from objects passed in. Removes related items from R.Sessions (uses pointer comparison, removal does not keep order) Sets related.R.Room.

func (*Room) RoomStatistic

func (o *Room) RoomStatistic(mods ...qm.QueryMod) roomStatisticQuery

RoomStatistic pointed to by the foreign key.

func (*Room) Sessions

func (o *Room) Sessions(mods ...qm.QueryMod) sessionQuery

Sessions retrieves all the session's Sessions with an executor.

func (*Room) SetDefaultGateway

func (o *Room) SetDefaultGateway(exec boil.Executor, insert bool, related *Gateway) error

SetDefaultGateway of the room to the related item. Sets o.R.DefaultGateway to related. Adds o to related.R.DefaultGatewayRooms.

func (*Room) SetRoomStatistic

func (o *Room) SetRoomStatistic(exec boil.Executor, insert bool, related *RoomStatistic) error

SetRoomStatistic of the room to the related item. Sets o.R.RoomStatistic to related. Adds o to related.R.Room.

func (*Room) SetSessions

func (o *Room) SetSessions(exec boil.Executor, insert bool, related ...*Session) error

SetSessions removes all previously related items of the room replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Room's Sessions accordingly. Replaces o.R.Sessions with related. Sets related.R.Room's Sessions accordingly.

func (*Room) Update

func (o *Room) Update(exec boil.Executor, columns boil.Columns) (int64, error)

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

func (o *Room) Upsert(exec boil.Executor, 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 RoomSlice

type RoomSlice []*Room

RoomSlice is an alias for a slice of pointers to Room. This should generally be used opposed to []Room.

func (RoomSlice) DeleteAll

func (o RoomSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*RoomSlice) ReloadAll

func (o *RoomSlice) ReloadAll(exec boil.Executor) error

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

func (RoomSlice) UpdateAll

func (o RoomSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

type RoomStatistic

type RoomStatistic struct {
	RoomID int64 `boil:"room_id" json:"room_id" toml:"room_id" yaml:"room_id"`
	OnAir  int   `boil:"on_air" json:"on_air" toml:"on_air" yaml:"on_air"`

	R *roomStatisticR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L roomStatisticL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

RoomStatistic is an object representing the database table.

func FindRoomStatistic

func FindRoomStatistic(exec boil.Executor, roomID int64, selectCols ...string) (*RoomStatistic, error)

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

func (*RoomStatistic) Delete

func (o *RoomStatistic) Delete(exec boil.Executor) (int64, error)

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

func (*RoomStatistic) Insert

func (o *RoomStatistic) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*RoomStatistic) Reload

func (o *RoomStatistic) Reload(exec boil.Executor) error

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

func (*RoomStatistic) Room

func (o *RoomStatistic) Room(mods ...qm.QueryMod) roomQuery

Room pointed to by the foreign key.

func (*RoomStatistic) SetRoom

func (o *RoomStatistic) SetRoom(exec boil.Executor, insert bool, related *Room) error

SetRoom of the roomStatistic to the related item. Sets o.R.Room to related. Adds o to related.R.RoomStatistic.

func (*RoomStatistic) Update

func (o *RoomStatistic) Update(exec boil.Executor, columns boil.Columns) (int64, error)

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

func (o *RoomStatistic) Upsert(exec boil.Executor, 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 RoomStatisticSlice

type RoomStatisticSlice []*RoomStatistic

RoomStatisticSlice is an alias for a slice of pointers to RoomStatistic. This should generally be used opposed to []RoomStatistic.

func (RoomStatisticSlice) DeleteAll

func (o RoomStatisticSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*RoomStatisticSlice) ReloadAll

func (o *RoomStatisticSlice) ReloadAll(exec boil.Executor) error

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

func (RoomStatisticSlice) UpdateAll

func (o RoomStatisticSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

type SchemaMigration

type SchemaMigration struct {
	Version int64 `boil:"version" json:"version" toml:"version" yaml:"version"`
	Dirty   bool  `boil:"dirty" json:"dirty" toml:"dirty" yaml:"dirty"`

	R *schemaMigrationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L schemaMigrationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

SchemaMigration is an object representing the database table.

func FindSchemaMigration

func FindSchemaMigration(exec boil.Executor, version int64, selectCols ...string) (*SchemaMigration, error)

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

func (*SchemaMigration) Delete

func (o *SchemaMigration) Delete(exec boil.Executor) (int64, error)

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

func (*SchemaMigration) Insert

func (o *SchemaMigration) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*SchemaMigration) Reload

func (o *SchemaMigration) Reload(exec boil.Executor) error

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

func (*SchemaMigration) Update

func (o *SchemaMigration) Update(exec boil.Executor, columns boil.Columns) (int64, error)

Update uses an executor to update the SchemaMigration. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*SchemaMigration) Upsert

func (o *SchemaMigration) Upsert(exec boil.Executor, 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 SchemaMigrationSlice

type SchemaMigrationSlice []*SchemaMigration

SchemaMigrationSlice is an alias for a slice of pointers to SchemaMigration. This should generally be used opposed to []SchemaMigration.

func (SchemaMigrationSlice) DeleteAll

func (o SchemaMigrationSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*SchemaMigrationSlice) ReloadAll

func (o *SchemaMigrationSlice) ReloadAll(exec boil.Executor) error

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

func (SchemaMigrationSlice) UpdateAll

func (o SchemaMigrationSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

type Session

type Session struct {
	ID                    int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	UserID                int64       `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	RoomID                null.Int64  `boil:"room_id" json:"room_id,omitempty" toml:"room_id" yaml:"room_id,omitempty"`
	GatewayID             null.Int64  `boil:"gateway_id" json:"gateway_id,omitempty" toml:"gateway_id" yaml:"gateway_id,omitempty"`
	GatewaySession        null.Int64  `boil:"gateway_session" json:"gateway_session,omitempty" toml:"gateway_session" yaml:"gateway_session,omitempty"`
	GatewayHandle         null.Int64  `boil:"gateway_handle" json:"gateway_handle,omitempty" toml:"gateway_handle" yaml:"gateway_handle,omitempty"`
	GatewayFeed           null.Int64  `boil:"gateway_feed" json:"gateway_feed,omitempty" toml:"gateway_feed" yaml:"gateway_feed,omitempty"`
	Display               null.String `boil:"display" json:"display,omitempty" toml:"display" yaml:"display,omitempty"`
	Camera                bool        `boil:"camera" json:"camera" toml:"camera" yaml:"camera"`
	Question              bool        `boil:"question" json:"question" toml:"question" yaml:"question"`
	SelfTest              bool        `boil:"self_test" json:"self_test" toml:"self_test" yaml:"self_test"`
	SoundTest             bool        `boil:"sound_test" json:"sound_test" toml:"sound_test" yaml:"sound_test"`
	UserAgent             null.String `boil:"user_agent" json:"user_agent,omitempty" toml:"user_agent" yaml:"user_agent,omitempty"`
	IPAddress             null.String `boil:"ip_address" json:"ip_address,omitempty" toml:"ip_address" yaml:"ip_address,omitempty"`
	Properties            null.JSON   `boil:"properties" json:"properties,omitempty" toml:"properties" yaml:"properties,omitempty"`
	CreatedAt             time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt             null.Time   `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`
	RemovedAt             null.Time   `boil:"removed_at" json:"removed_at,omitempty" toml:"removed_at" yaml:"removed_at,omitempty"`
	Extra                 null.JSON   `boil:"extra" json:"extra,omitempty" toml:"extra" yaml:"extra,omitempty"`
	GatewayHandleTextroom null.Int64  `` /* 143-byte string literal not displayed */

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

Session is an object representing the database table.

func FindSession

func FindSession(exec boil.Executor, iD int64, selectCols ...string) (*Session, error)

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

func (*Session) Delete

func (o *Session) Delete(exec boil.Executor) (int64, error)

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

func (*Session) Gateway

func (o *Session) Gateway(mods ...qm.QueryMod) gatewayQuery

Gateway pointed to by the foreign key.

func (*Session) Insert

func (o *Session) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Session) Reload

func (o *Session) Reload(exec boil.Executor) error

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

func (*Session) RemoveGateway

func (o *Session) RemoveGateway(exec boil.Executor, related *Gateway) error

RemoveGateway relationship. Sets o.R.Gateway to nil. Removes o from all passed in related items' relationships struct (Optional).

func (*Session) RemoveRoom

func (o *Session) RemoveRoom(exec boil.Executor, related *Room) error

RemoveRoom relationship. Sets o.R.Room to nil. Removes o from all passed in related items' relationships struct (Optional).

func (*Session) Room

func (o *Session) Room(mods ...qm.QueryMod) roomQuery

Room pointed to by the foreign key.

func (*Session) SetGateway

func (o *Session) SetGateway(exec boil.Executor, insert bool, related *Gateway) error

SetGateway of the session to the related item. Sets o.R.Gateway to related. Adds o to related.R.Sessions.

func (*Session) SetRoom

func (o *Session) SetRoom(exec boil.Executor, insert bool, related *Room) error

SetRoom of the session to the related item. Sets o.R.Room to related. Adds o to related.R.Sessions.

func (*Session) SetUser

func (o *Session) SetUser(exec boil.Executor, insert bool, related *User) error

SetUser of the session to the related item. Sets o.R.User to related. Adds o to related.R.Sessions.

func (*Session) Update

func (o *Session) Update(exec boil.Executor, columns boil.Columns) (int64, error)

Update uses an executor to update the Session. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Session) Upsert

func (o *Session) Upsert(exec boil.Executor, 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.

func (*Session) User

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

User pointed to by the foreign key.

type SessionSlice

type SessionSlice []*Session

SessionSlice is an alias for a slice of pointers to Session. This should generally be used opposed to []Session.

func (SessionSlice) DeleteAll

func (o SessionSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*SessionSlice) ReloadAll

func (o *SessionSlice) ReloadAll(exec boil.Executor) error

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

func (SessionSlice) UpdateAll

func (o SessionSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

type User

type User struct {
	ID         int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	AccountsID string      `boil:"accounts_id" json:"accounts_id" toml:"accounts_id" yaml:"accounts_id"`
	Email      null.String `boil:"email" json:"email,omitempty" toml:"email" yaml:"email,omitempty"`
	FirstName  null.String `boil:"first_name" json:"first_name,omitempty" toml:"first_name" yaml:"first_name,omitempty"`
	LastName   null.String `boil:"last_name" json:"last_name,omitempty" toml:"last_name" yaml:"last_name,omitempty"`
	Username   null.String `boil:"username" json:"username,omitempty" toml:"username" yaml:"username,omitempty"`
	Disabled   bool        `boil:"disabled" json:"disabled" toml:"disabled" yaml:"disabled"`
	Properties null.JSON   `boil:"properties" json:"properties,omitempty" toml:"properties" yaml:"properties,omitempty"`
	CreatedAt  time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt  null.Time   `boil:"updated_at" json:"updated_at,omitempty" toml:"updated_at" yaml:"updated_at,omitempty"`
	RemovedAt  null.Time   `boil:"removed_at" json:"removed_at,omitempty" toml:"removed_at" yaml:"removed_at,omitempty"`

	R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

User is an object representing the database table.

func FindUser

func FindUser(exec boil.Executor, iD int64, 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) AddSessions

func (o *User) AddSessions(exec boil.Executor, insert bool, related ...*Session) error

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

func (*User) Delete

func (o *User) Delete(exec boil.Executor) (int64, error)

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

func (*User) Insert

func (o *User) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*User) Reload

func (o *User) Reload(exec boil.Executor) error

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

func (*User) Sessions

func (o *User) Sessions(mods ...qm.QueryMod) sessionQuery

Sessions retrieves all the session's Sessions with an executor.

func (*User) Update

func (o *User) Update(exec boil.Executor, 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(exec boil.Executor, 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.

func (UserSlice) DeleteAll

func (o UserSlice) DeleteAll(exec boil.Executor) (int64, error)

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

func (*UserSlice) ReloadAll

func (o *UserSlice) ReloadAll(exec boil.Executor) error

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

func (UserSlice) UpdateAll

func (o UserSlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

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

Jump to

Keyboard shortcuts

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