func (o *JobStatus) InsertP(exec boil.Executor, columns boil.Columns) {
	if err := o.Insert(exec, columns); err != nil {
		panic(boil.WrapErr(err))
	}
}
InsertP a single record using an executor, and panics on error. See Insert
for whitelist behavior description.
package model
import (
	"database/sql"
	"fmt"
	"reflect"
	"strconv"
	"strings"
	"sync"
	"time"
	"github.com/pkg/errors"
	"github.com/volatiletech/null"
	"github.com/volatiletech/sqlboiler/boil"
	"github.com/volatiletech/sqlboiler/queries"
	"github.com/volatiletech/sqlboiler/queries/qm"
	"github.com/volatiletech/sqlboiler/queries/qmhelper"
	"github.com/volatiletech/sqlboiler/strmangle"
)
type JobStatus struct {
	JobName      string      `boil:"job_name" json:"job_name" toml:"job_name" yaml:"job_name"`
	LastSync     time.Time   `boil:"last_sync" json:"last_sync" toml:"last_sync" yaml:"last_sync"`
	IsSuccess    bool        `boil:"is_success" json:"is_success" toml:"is_success" yaml:"is_success"`
	ErrorMessage null.String `boil:"error_message" json:"error_message,omitempty" toml:"error_message" yaml:"error_message,omitempty"`
	State        null.JSON   `boil:"state" json:"state,omitempty" toml:"state" yaml:"state,omitempty"`
	R *jobStatusR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L jobStatusL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}
var JobStatusColumns = struct {
	JobName      string
	LastSync     string
	IsSuccess    string
	ErrorMessage string
	State        string
}{
	JobName:      "job_name",
	LastSync:     "last_sync",
	IsSuccess:    "is_success",
	ErrorMessage: "error_message",
	State:        "state",
}
var JobStatusWhere = struct {
	JobName      whereHelperstring
	LastSync     whereHelpertime_Time
	IsSuccess    whereHelperbool
	ErrorMessage whereHelpernull_String
	State        whereHelpernull_JSON
}{
	JobName:      whereHelperstring{field: "`job_status`.`job_name`"},
	LastSync:     whereHelpertime_Time{field: "`job_status`.`last_sync`"},
	IsSuccess:    whereHelperbool{field: "`job_status`.`is_success`"},
	ErrorMessage: whereHelpernull_String{field: "`job_status`.`error_message`"},
	State:        whereHelpernull_JSON{field: "`job_status`.`state`"},
}
var JobStatusRels = struct {
}{}
type jobStatusR struct {
}
func (*jobStatusR) NewStruct() *jobStatusR {
	return &jobStatusR{}
}
type jobStatusL struct{}
var (
	jobStatusAllColumns            = []string{"job_name", "last_sync", "is_success", "error_message", "state"}
	jobStatusColumnsWithoutDefault = []string{"job_name", "error_message", "state"}
	jobStatusColumnsWithDefault    = []string{"last_sync", "is_success"}
	jobStatusPrimaryKeyColumns     = []string{"job_name"}
)
type (
	JobStatusSlice []*JobStatus
	jobStatusQuery struct {
		*queries.Query
	}
)
var (
	jobStatusType                 = reflect.TypeOf(&JobStatus{})
	jobStatusMapping              = queries.MakeStructMapping(jobStatusType)
	jobStatusPrimaryKeyMapping, _ = queries.BindMapping(jobStatusType, jobStatusMapping, jobStatusPrimaryKeyColumns)
	jobStatusInsertCacheMut       sync.RWMutex
	jobStatusInsertCache          = make(map[string]insertCache)
	jobStatusUpdateCacheMut       sync.RWMutex
	jobStatusUpdateCache          = make(map[string]updateCache)
	jobStatusUpsertCacheMut       sync.RWMutex
	jobStatusUpsertCache          = make(map[string]insertCache)
)
var (
	_ = time.Second
	_ = qmhelper.Where
)
func (q jobStatusQuery) OneG() (*JobStatus, error) {
	return q.One(boil.GetDB())
}
func (q jobStatusQuery) OneGP() *JobStatus {
	o, err := q.One(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q jobStatusQuery) OneP(exec boil.Executor) *JobStatus {
	o, err := q.One(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q jobStatusQuery) One(exec boil.Executor) (*JobStatus, error) {
	o := &JobStatus{}
	queries.SetLimit(q.Query, 1)
	err := q.Bind(nil, exec, o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "model: failed to execute a one query for job_status")
	}
	return o, nil
}
func (q jobStatusQuery) AllG() (JobStatusSlice, error) {
	return q.All(boil.GetDB())
}
func (q jobStatusQuery) AllGP() JobStatusSlice {
	o, err := q.All(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q jobStatusQuery) AllP(exec boil.Executor) JobStatusSlice {
	o, err := q.All(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q jobStatusQuery) All(exec boil.Executor) (JobStatusSlice, error) {
	var o []*JobStatus
	err := q.Bind(nil, exec, &o)
	if err != nil {
		return nil, errors.Wrap(err, "model: failed to assign all query results to JobStatus slice")
	}
	return o, nil
}
func (q jobStatusQuery) CountG() (int64, error) {
	return q.Count(boil.GetDB())
}
func (q jobStatusQuery) CountGP() int64 {
	c, err := q.Count(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q jobStatusQuery) CountP(exec boil.Executor) int64 {
	c, err := q.Count(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q jobStatusQuery) Count(exec boil.Executor) (int64, error) {
	var count int64
	queries.SetSelect(q.Query, nil)
	queries.SetCount(q.Query)
	err := q.Query.QueryRow(exec).Scan(&count)
	if err != nil {
		return 0, errors.Wrap(err, "model: failed to count job_status rows")
	}
	return count, nil
}
func (q jobStatusQuery) ExistsG() (bool, error) {
	return q.Exists(boil.GetDB())
}
func (q jobStatusQuery) ExistsGP() bool {
	e, err := q.Exists(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q jobStatusQuery) ExistsP(exec boil.Executor) bool {
	e, err := q.Exists(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q jobStatusQuery) Exists(exec boil.Executor) (bool, error) {
	var count int64
	queries.SetSelect(q.Query, nil)
	queries.SetCount(q.Query)
	queries.SetLimit(q.Query, 1)
	err := q.Query.QueryRow(exec).Scan(&count)
	if err != nil {
		return false, errors.Wrap(err, "model: failed to check if job_status exists")
	}
	return count > 0, nil
}
func JobStatuses(mods ...qm.QueryMod) jobStatusQuery {
	mods = append(mods, qm.From("`job_status`"))
	return jobStatusQuery{NewQuery(mods...)}
}
func FindJobStatusG(jobName string, selectCols ...string) (*JobStatus, error) {
	return FindJobStatus(boil.GetDB(), jobName, selectCols...)
}
func FindJobStatusP(exec boil.Executor, jobName string, selectCols ...string) *JobStatus {
	retobj, err := FindJobStatus(exec, jobName, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return retobj
}
func FindJobStatusGP(jobName string, selectCols ...string) *JobStatus {
	retobj, err := FindJobStatus(boil.GetDB(), jobName, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return retobj
}
func FindJobStatus(exec boil.Executor, jobName string, selectCols ...string) (*JobStatus, error) {
	jobStatusObj := &JobStatus{}
	sel := "*"
	if len(selectCols) > 0 {
		sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
	}
	query := fmt.Sprintf(
		"select %s from `job_status` where `job_name`=?", sel,
	)
	q := queries.Raw(query, jobName)
	err := q.Bind(nil, exec, jobStatusObj)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "model: unable to select from job_status")
	}
	return jobStatusObj, nil
}
func (o *JobStatus) InsertG(columns boil.Columns) error {
	return o.Insert(boil.GetDB(), columns)
}