Documentation ¶
Index ¶
- Variables
- func AddMemoryHook(hookPoint boil.HookPoint, memoryHook MemoryHook)
- func Memories(mods ...qm.QueryMod) memoryQuery
- func MemoryExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type M
- type Memory
- func (o *Memory) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Memory) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Memory) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Memory) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Memory) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type MemoryHook
- type MemorySlice
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 MemoryColumns = struct { ID string Author string Content string Append string }{ ID: "id", Author: "author", Content: "content", Append: "append", }
var MemoryRels = struct {
}{}
MemoryRels is where relationship names are stored.
var MemoryTableColumns = struct { ID string Author string Content string Append string }{ ID: "memories.id", Author: "memories.author", Content: "memories.content", Append: "memories.append", }
var MemoryWhere = struct { ID whereHelperint Author whereHelperstring Content whereHelperstring Append whereHelpertime_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, Author: whereHelperstring{/* contains filtered or unexported fields */}, Content: whereHelperstring{/* contains filtered or unexported fields */}, Append: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { Memories string }{ Memories: "memories", }
var ViewNames = struct {
}{}
Functions ¶
func AddMemoryHook ¶
func AddMemoryHook(hookPoint boil.HookPoint, memoryHook MemoryHook)
AddMemoryHook registers your hook function for all future operations.
func MemoryExists ¶
MemoryExists checks if the Memory row exists.
Types ¶
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Memory ¶
type Memory struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` Author string `boil:"author" json:"author" toml:"author" yaml:"author"` Content string `boil:"content" json:"content" toml:"content" yaml:"content"` Append time.Time `boil:"append" json:"append" toml:"append" yaml:"append"` R *memoryR `boil:"-" json:"-" toml:"-" yaml:"-"` L memoryL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Memory is an object representing the database table.
func FindMemory ¶
func FindMemory(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Memory, error)
FindMemory retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Memory) Delete ¶
Delete deletes a single Memory record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Memory) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Memory) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Memory) Update ¶
func (o *Memory) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Memory. 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 (*Memory) Upsert ¶
func (o *Memory) 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 MemoryHook ¶
MemoryHook is the signature for custom Memory hook methods
type MemorySlice ¶
type MemorySlice []*Memory
MemorySlice is an alias for a slice of pointers to Memory. This should almost always be used instead of []Memory.
func (MemorySlice) DeleteAll ¶
func (o MemorySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*MemorySlice) ReloadAll ¶
func (o *MemorySlice) 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 (MemorySlice) UpdateAll ¶
func (o MemorySlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.