Documentation
¶
Index ¶
- Variables
- func AddObjectHook(hookPoint boil.HookPoint, objectHook ObjectHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func ObjectExists(ctx context.Context, exec boil.ContextExecutor, iD null.Int64) (bool, error)
- func Objects(mods ...qm.QueryMod) objectQuery
- type M
- type Object
- func (o *Object) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Object) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Object) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Object) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type ObjectHook
- type ObjectSlice
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 ObjectColumns = struct { ID string Path string Type string Size string Mtime string Sha256 string Status string CreatedAt string UpdatedAt string }{ ID: "id", Path: "path", Type: "type", Size: "size", Mtime: "mtime", Sha256: "sha256", Status: "status", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var ObjectRels = struct {
}{}
ObjectRels is where relationship names are stored.
var ObjectWhere = struct { ID whereHelpernull_Int64 Path whereHelperstring Type whereHelperstring Size whereHelperint64 Mtime whereHelpertime_Time Sha256 whereHelperstring Status whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ ID: whereHelpernull_Int64{/* contains filtered or unexported fields */}, Path: whereHelperstring{/* contains filtered or unexported fields */}, Type: whereHelperstring{/* contains filtered or unexported fields */}, Size: whereHelperint64{/* contains filtered or unexported fields */}, Mtime: whereHelpertime_Time{/* contains filtered or unexported fields */}, Sha256: whereHelperstring{/* contains filtered or unexported fields */}, Status: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { Objects string }{ Objects: "objects", }
Functions ¶
func AddObjectHook ¶
func AddObjectHook(hookPoint boil.HookPoint, objectHook ObjectHook)
AddObjectHook registers your hook function for all future operations.
func ObjectExists ¶
ObjectExists checks if the Object row exists.
Types ¶
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Object ¶
type Object struct { ID null.Int64 `boil:"id" json:"id,omitempty" toml:"id" yaml:"id,omitempty"` Path string `boil:"path" json:"path" toml:"path" yaml:"path"` Type string `boil:"type" json:"type" toml:"type" yaml:"type"` Size int64 `boil:"size" json:"size" toml:"size" yaml:"size"` Mtime time.Time `boil:"mtime" json:"mtime" toml:"mtime" yaml:"mtime"` Sha256 string `boil:"sha256" json:"sha256" toml:"sha256" yaml:"sha256"` Status string `boil:"status" json:"status" toml:"status" yaml:"status"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` R *objectR `boil:"-" json:"-" toml:"-" yaml:"-"` L objectL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Object is an object representing the database table.
func FindObject ¶
func FindObject(ctx context.Context, exec boil.ContextExecutor, iD null.Int64, selectCols ...string) (*Object, error)
FindObject retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Object) Delete ¶
Delete deletes a single Object record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Object) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Object) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Object) Update ¶
func (o *Object) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Object. 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.
type ObjectHook ¶
ObjectHook is the signature for custom Object hook methods
type ObjectSlice ¶
type ObjectSlice []*Object
ObjectSlice is an alias for a slice of pointers to Object. This should generally be used opposed to []Object.
func (ObjectSlice) DeleteAll ¶
func (o ObjectSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ObjectSlice) ReloadAll ¶
func (o *ObjectSlice) 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 (ObjectSlice) UpdateAll ¶
func (o ObjectSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.