Documentation ¶
Index ¶
- Constants
- Variables
- func AddTaskHook(hookPoint boil.HookPoint, taskHook TaskHook)
- func AllTaskStatus() []string
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func TaskExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Tasks(mods ...qm.QueryMod) taskQuery
- type M
- type Task
- func (o *Task) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Task) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Task) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Task) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Task) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Task) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type TaskHook
- type TaskSlice
Constants ¶
const ( TaskStatusBACKLOG string = "BACKLOG" TaskStatusPROGRESS string = "PROGRESS" TaskStatusDONE string = "DONE" )
Enum values for TaskStatus
Variables ¶
var ErrSyncFail = errors.New("model: 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 TableNames = struct { Task string }{ Task: "task", }
var TaskColumns = struct { ID string Title string Content string Status string Created string Updated string }{ ID: "id", Title: "title", Content: "content", Status: "status", Created: "created", Updated: "updated", }
var TaskRels = struct {
}{}
TaskRels is where relationship names are stored.
var TaskTableColumns = struct { ID string Title string Content string Status string Created string Updated string }{ ID: "task.id", Title: "task.title", Content: "task.content", Status: "task.status", Created: "task.created", Updated: "task.updated", }
var TaskWhere = struct { ID whereHelperstring Title whereHelperstring Content whereHelperstring Status whereHelperstring Created whereHelpertime_Time Updated whereHelpertime_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Title: whereHelperstring{/* contains filtered or unexported fields */}, Content: whereHelperstring{/* contains filtered or unexported fields */}, Status: whereHelperstring{/* contains filtered or unexported fields */}, Created: whereHelpertime_Time{/* contains filtered or unexported fields */}, Updated: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func AddTaskHook ¶
AddTaskHook registers your hook function for all future operations.
func AllTaskStatus ¶
func AllTaskStatus() []string
func TaskExists ¶
TaskExists checks if the Task row exists.
Types ¶
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Task ¶
type Task struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` // タイトル Title string `boil:"title" json:"title" toml:"title" yaml:"title"` // 内容 Content string `boil:"content" json:"content" toml:"content" yaml:"content"` // ステータス Status string `boil:"status" json:"status" toml:"status" yaml:"status"` // 作成時間 Created time.Time `boil:"created" json:"created" toml:"created" yaml:"created"` // 更新時間 Updated time.Time `boil:"updated" json:"updated" toml:"updated" yaml:"updated"` R *taskR `boil:"-" json:"-" toml:"-" yaml:"-"` L taskL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Task is an object representing the database table.
func FindTask ¶
func FindTask(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Task, error)
FindTask retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Task) Delete ¶
Delete deletes a single Task record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Task) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Task) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Task) Update ¶
func (o *Task) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Task. 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 (*Task) Upsert ¶
func (o *Task) Upsert(ctx context.Context, exec boil.ContextExecutor, 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 TaskSlice ¶
type TaskSlice []*Task
TaskSlice is an alias for a slice of pointers to Task. This should almost always be used instead of []Task.