Documentation ¶
Index ¶
- Variables
- func AddFileHook(hookPoint boil.HookPoint, fileHook FileHook)
- func AddTenantHook(hookPoint boil.HookPoint, tenantHook TenantHook)
- func FileExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Files(mods ...qm.QueryMod) fileQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func TenantExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Tenants(mods ...qm.QueryMod) tenantQuery
- type File
- func (o *File) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *File) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *File) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *File) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *File) SetTenantIdTenant(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Tenant) error
- func (o *File) TenantIdTenant(mods ...qm.QueryMod) tenantQuery
- func (o *File) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *File) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type FileHook
- type FileSlice
- type M
- type Tenant
- func (o *Tenant) AddTenantIdFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
- func (o *Tenant) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Tenant) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Tenant) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Tenant) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Tenant) TenantIdFiles(mods ...qm.QueryMod) fileQuery
- func (o *Tenant) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Tenant) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type TenantHook
- type TenantSlice
- type UpsertOptionFunc
- type UpsertOptions
Constants ¶
This section is empty.
Variables ¶
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.
var FileColumns = struct { ID string TenantId string Created string Modified string Active string Deleted string UploadError string }{ ID: "id", TenantId: "tenantId", Created: "created", Modified: "modified", Active: "active", Deleted: "deleted", UploadError: "uploadError", }
var FileRels = struct { TenantIdTenant string }{ TenantIdTenant: "TenantIdTenant", }
FileRels is where relationship names are stored.
var FileTableColumns = struct { ID string TenantId string Created string Modified string Active string Deleted string UploadError string }{ ID: "file.id", TenantId: "file.tenantId", Created: "file.created", Modified: "file.modified", Active: "file.active", Deleted: "file.deleted", UploadError: "file.uploadError", }
var FileWhere = struct { ID whereHelperstring TenantId whereHelperstring Created whereHelpertime_Time Modified whereHelpertime_Time Active whereHelperbool Deleted whereHelperbool UploadError whereHelperbool }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, TenantId: whereHelperstring{/* contains filtered or unexported fields */}, Created: whereHelpertime_Time{/* contains filtered or unexported fields */}, Modified: whereHelpertime_Time{/* contains filtered or unexported fields */}, Active: whereHelperbool{/* contains filtered or unexported fields */}, Deleted: whereHelperbool{/* contains filtered or unexported fields */}, UploadError: whereHelperbool{/* contains filtered or unexported fields */}, }
var TableNames = struct { File string Tenant string }{ File: "file", Tenant: "tenant", }
var TenantColumns = struct { ID string ApiKey string Name string Created string Modified string Active string }{ ID: "id", ApiKey: "apiKey", Name: "name", Created: "created", Modified: "modified", Active: "active", }
var TenantRels = struct { TenantIdFiles string }{ TenantIdFiles: "TenantIdFiles", }
TenantRels is where relationship names are stored.
var TenantTableColumns = struct { ID string ApiKey string Name string Created string Modified string Active string }{ ID: "tenant.id", ApiKey: "tenant.apiKey", Name: "tenant.name", Created: "tenant.created", Modified: "tenant.modified", Active: "tenant.active", }
var TenantWhere = struct { ID whereHelperstring ApiKey whereHelperstring Name whereHelperstring Created whereHelpertime_Time Modified whereHelpertime_Time Active whereHelperbool }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, ApiKey: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Created: whereHelpertime_Time{/* contains filtered or unexported fields */}, Modified: whereHelpertime_Time{/* contains filtered or unexported fields */}, Active: whereHelperbool{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func AddFileHook ¶
AddFileHook registers your hook function for all future operations.
func AddTenantHook ¶
func AddTenantHook(hookPoint boil.HookPoint, tenantHook TenantHook)
AddTenantHook registers your hook function for all future operations.
func FileExists ¶
FileExists checks if the File row exists.
func TenantExists ¶
TenantExists checks if the Tenant row exists.
Types ¶
type File ¶
type File struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` TenantId string `boil:"tenantId" json:"tenantId" toml:"tenantId" yaml:"tenantId"` Created time.Time `boil:"created" json:"created" toml:"created" yaml:"created"` Modified time.Time `boil:"modified" json:"modified" toml:"modified" yaml:"modified"` Active bool `boil:"active" json:"active" toml:"active" yaml:"active"` Deleted bool `boil:"deleted" json:"deleted" toml:"deleted" yaml:"deleted"` UploadError bool `boil:"uploadError" json:"uploadError" toml:"uploadError" yaml:"uploadError"` R *fileR `boil:"-" json:"-" toml:"-" yaml:"-"` L fileL `boil:"-" json:"-" toml:"-" yaml:"-"` }
File is an object representing the database table.
func FindFile ¶
func FindFile(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*File, error)
FindFile retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*File) Delete ¶
Delete deletes a single File record with an executor. Delete will match against the primary key column to find the record to delete.
func (*File) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*File) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*File) SetTenantIdTenant ¶
func (o *File) SetTenantIdTenant(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Tenant) error
SetTenantIdTenant of the file to the related item. Sets o.R.TenantIdTenant to related. Adds o to related.R.TenantIdFiles.
func (*File) TenantIdTenant ¶
TenantIdTenant pointed to by the foreign key.
func (*File) Update ¶
func (o *File) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the File. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*File) Upsert ¶
func (o *File) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type FileSlice ¶
type FileSlice []*File
FileSlice is an alias for a slice of pointers to File. This should almost always be used instead of []File.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Tenant ¶
type Tenant struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` ApiKey string `boil:"apiKey" json:"apiKey" toml:"apiKey" yaml:"apiKey"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Created time.Time `boil:"created" json:"created" toml:"created" yaml:"created"` Modified time.Time `boil:"modified" json:"modified" toml:"modified" yaml:"modified"` Active bool `boil:"active" json:"active" toml:"active" yaml:"active"` R *tenantR `boil:"-" json:"-" toml:"-" yaml:"-"` L tenantL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Tenant is an object representing the database table.
func FindTenant ¶
func FindTenant(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Tenant, error)
FindTenant retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Tenant) AddTenantIdFiles ¶
func (o *Tenant) AddTenantIdFiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*File) error
AddTenantIdFiles adds the given related objects to the existing relationships of the tenant, optionally inserting them as new records. Appends related to o.R.TenantIdFiles. Sets related.R.TenantIdTenant appropriately.
func (*Tenant) Delete ¶
Delete deletes a single Tenant record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Tenant) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Tenant) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Tenant) TenantIdFiles ¶
TenantIdFiles retrieves all the file's Files with an executor via tenantId column.
func (*Tenant) Update ¶
func (o *Tenant) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Tenant. 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 (*Tenant) Upsert ¶
func (o *Tenant) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type TenantHook ¶
TenantHook is the signature for custom Tenant hook methods
type TenantSlice ¶
type TenantSlice []*Tenant
TenantSlice is an alias for a slice of pointers to Tenant. This should almost always be used instead of []Tenant.
func (TenantSlice) DeleteAll ¶
func (o TenantSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*TenantSlice) ReloadAll ¶
func (o *TenantSlice) 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 (TenantSlice) UpdateAll ¶
func (o TenantSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type UpsertOptionFunc ¶
type UpsertOptionFunc func(o *UpsertOptions)
func UpsertConflictTarget ¶
func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc
func UpsertUpdateSet ¶
func UpsertUpdateSet(updateSet string) UpsertOptionFunc
type UpsertOptions ¶
type UpsertOptions struct {
// contains filtered or unexported fields
}