work

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSyncFail = errors.New("work: 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.

View Source
var GenOrderNoColumns = struct {
	OrderNow      string
	ProductIdw    string
	OrderNo       string
	OrderDetailNo string
	CreatedAt     string
	UpdatedAt     string
	CreatedBy     string
	UpdatedBy     string
}{
	OrderNow:      "order_now",
	ProductIdw:    "product_idw",
	OrderNo:       "order_no",
	OrderDetailNo: "order_detail_no",
	CreatedAt:     "created_at",
	UpdatedAt:     "updated_at",
	CreatedBy:     "created_by",
	UpdatedBy:     "updated_by",
}
View Source
var GenOrderNoRels = struct {
	ProductIdwGenProductID string
}{
	ProductIdwGenProductID: "ProductIdwGenProductID",
}

GenOrderNoRels is where relationship names are stored.

View Source
var GenOrderNoTableColumns = struct {
	OrderNow      string
	ProductIdw    string
	OrderNo       string
	OrderDetailNo string
	CreatedAt     string
	UpdatedAt     string
	CreatedBy     string
	UpdatedBy     string
}{
	OrderNow:      "gen_order_no.order_now",
	ProductIdw:    "gen_order_no.product_idw",
	OrderNo:       "gen_order_no.order_no",
	OrderDetailNo: "gen_order_no.order_detail_no",
	CreatedAt:     "gen_order_no.created_at",
	UpdatedAt:     "gen_order_no.updated_at",
	CreatedBy:     "gen_order_no.created_by",
	UpdatedBy:     "gen_order_no.updated_by",
}
View Source
var GenOrderNoWhere = struct {
	OrderNow      whereHelperstring
	ProductIdw    whereHelperstring
	OrderNo       whereHelperint
	OrderDetailNo whereHelperint
	CreatedAt     whereHelpertime_Time
	UpdatedAt     whereHelpertime_Time
	CreatedBy     whereHelpernull_String
	UpdatedBy     whereHelpernull_String
}{
	OrderNow:      whereHelperstring{/* contains filtered or unexported fields */},
	ProductIdw:    whereHelperstring{/* contains filtered or unexported fields */},
	OrderNo:       whereHelperint{/* contains filtered or unexported fields */},
	OrderDetailNo: whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedBy:     whereHelpernull_String{/* contains filtered or unexported fields */},
	UpdatedBy:     whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var GenProductIDColumns = struct {
	ProductIdw  string
	ProductName string
	CreatedAt   string
	UpdatedAt   string
	CreatedBy   string
	UpdatedBy   string
}{
	ProductIdw:  "product_idw",
	ProductName: "product_name",
	CreatedAt:   "created_at",
	UpdatedAt:   "updated_at",
	CreatedBy:   "created_by",
	UpdatedBy:   "updated_by",
}
View Source
var GenProductIDRels = struct {
	ProductIdwGenOrderNos string
}{
	ProductIdwGenOrderNos: "ProductIdwGenOrderNos",
}

GenProductIDRels is where relationship names are stored.

View Source
var GenProductIDTableColumns = struct {
	ProductIdw  string
	ProductName string
	CreatedAt   string
	UpdatedAt   string
	CreatedBy   string
	UpdatedBy   string
}{
	ProductIdw:  "gen_product_id.product_idw",
	ProductName: "gen_product_id.product_name",
	CreatedAt:   "gen_product_id.created_at",
	UpdatedAt:   "gen_product_id.updated_at",
	CreatedBy:   "gen_product_id.created_by",
	UpdatedBy:   "gen_product_id.updated_by",
}
View Source
var GenProductIDWhere = struct {
	ProductIdw  whereHelperstring
	ProductName whereHelperstring
	CreatedAt   whereHelpertime_Time
	UpdatedAt   whereHelpertime_Time
	CreatedBy   whereHelpernull_String
	UpdatedBy   whereHelpernull_String
}{
	ProductIdw:  whereHelperstring{/* contains filtered or unexported fields */},
	ProductName: whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:   whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedBy:   whereHelpernull_String{/* contains filtered or unexported fields */},
	UpdatedBy:   whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	GenOrderNo   string
	GenProductID string
}{
	GenOrderNo:   "gen_order_no",
	GenProductID: "gen_product_id",
}
View Source
var ViewNames = struct {
}{}

Functions

func AddGenOrderNoHook

func AddGenOrderNoHook(hookPoint boil.HookPoint, genOrderNoHook GenOrderNoHook)

AddGenOrderNoHook registers your hook function for all future operations.

func AddGenProductIDHook

func AddGenProductIDHook(hookPoint boil.HookPoint, genProductIDHook GenProductIDHook)

AddGenProductIDHook registers your hook function for all future operations.

func GenOrderNoExists

func GenOrderNoExists(ctx context.Context, exec boil.ContextExecutor, orderNow string, productIdw string) (bool, error)

GenOrderNoExists checks if the GenOrderNo row exists.

func GenOrderNoExistsG

func GenOrderNoExistsG(ctx context.Context, orderNow string, productIdw string) (bool, error)

GenOrderNoExistsG checks if the GenOrderNo row exists.

func GenOrderNos

func GenOrderNos(mods ...qm.QueryMod) genOrderNoQuery

GenOrderNos retrieves all the records using an executor.

func GenProductIDExists

func GenProductIDExists(ctx context.Context, exec boil.ContextExecutor, productIdw string) (bool, error)

GenProductIDExists checks if the GenProductID row exists.

func GenProductIDExistsG

func GenProductIDExistsG(ctx context.Context, productIdw string) (bool, error)

GenProductIDExistsG checks if the GenProductID row exists.

func GenProductIds

func GenProductIds(mods ...qm.QueryMod) genProductIDQuery

GenProductIds retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

Types

type GenOrderNo

type GenOrderNo struct {
	OrderNow string `boil:"order_now" json:"order_now" toml:"order_now" yaml:"order_now"`
	// 商品ID(WORK)
	ProductIdw string `boil:"product_idw" json:"product_idw" toml:"product_idw" yaml:"product_idw"`
	// 受注番号
	OrderNo int `boil:"order_no" json:"order_no" toml:"order_no" yaml:"order_no"`
	// 受注明細番号
	OrderDetailNo int `boil:"order_detail_no" json:"order_detail_no" toml:"order_detail_no" yaml:"order_detail_no"`
	// 作成日時
	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"`
	// 作成者
	CreatedBy null.String `boil:"created_by" json:"created_by,omitempty" toml:"created_by" yaml:"created_by,omitempty"`
	// 更新者
	UpdatedBy null.String `boil:"updated_by" json:"updated_by,omitempty" toml:"updated_by" yaml:"updated_by,omitempty"`

	R *genOrderNoR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L genOrderNoL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

GenOrderNo is an object representing the database table.

func FindGenOrderNo

func FindGenOrderNo(ctx context.Context, exec boil.ContextExecutor, orderNow string, productIdw string, selectCols ...string) (*GenOrderNo, error)

FindGenOrderNo retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindGenOrderNoG

func FindGenOrderNoG(ctx context.Context, orderNow string, productIdw string, selectCols ...string) (*GenOrderNo, error)

FindGenOrderNoG retrieves a single record by ID.

func (*GenOrderNo) Delete

func (o *GenOrderNo) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single GenOrderNo record with an executor. Delete will match against the primary key column to find the record to delete.

func (*GenOrderNo) DeleteG

func (o *GenOrderNo) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single GenOrderNo record. DeleteG will match against the primary key column to find the record to delete.

func (*GenOrderNo) Exists

func (o *GenOrderNo) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the GenOrderNo row exists.

func (*GenOrderNo) Insert

func (o *GenOrderNo) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*GenOrderNo) InsertG

func (o *GenOrderNo) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*GenOrderNo) ProductIdwGenProductID

func (o *GenOrderNo) ProductIdwGenProductID(mods ...qm.QueryMod) genProductIDQuery

ProductIdwGenProductID pointed to by the foreign key.

func (*GenOrderNo) Reload

func (o *GenOrderNo) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*GenOrderNo) ReloadG

func (o *GenOrderNo) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*GenOrderNo) SetProductIdwGenProductID

func (o *GenOrderNo) SetProductIdwGenProductID(ctx context.Context, exec boil.ContextExecutor, insert bool, related *GenProductID) error

SetProductIdwGenProductID of the genOrderNo to the related item. Sets o.R.ProductIdwGenProductID to related. Adds o to related.R.ProductIdwGenOrderNos.

func (*GenOrderNo) SetProductIdwGenProductIDG

func (o *GenOrderNo) SetProductIdwGenProductIDG(ctx context.Context, insert bool, related *GenProductID) error

SetProductIdwGenProductIDG of the genOrderNo to the related item. Sets o.R.ProductIdwGenProductID to related. Adds o to related.R.ProductIdwGenOrderNos. Uses the global database handle.

func (*GenOrderNo) Update

func (o *GenOrderNo) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the GenOrderNo. 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 (*GenOrderNo) UpdateG

func (o *GenOrderNo) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single GenOrderNo record using the global executor. See Update for more documentation.

func (*GenOrderNo) Upsert

func (o *GenOrderNo) 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.

func (*GenOrderNo) UpsertG

func (o *GenOrderNo) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type GenOrderNoHook

type GenOrderNoHook func(context.Context, boil.ContextExecutor, *GenOrderNo) error

GenOrderNoHook is the signature for custom GenOrderNo hook methods

type GenOrderNoSlice

type GenOrderNoSlice []*GenOrderNo

GenOrderNoSlice is an alias for a slice of pointers to GenOrderNo. This should almost always be used instead of []GenOrderNo.

func (GenOrderNoSlice) DeleteAll

func (o GenOrderNoSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (GenOrderNoSlice) DeleteAllG

func (o GenOrderNoSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*GenOrderNoSlice) ReloadAll

func (o *GenOrderNoSlice) 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 (*GenOrderNoSlice) ReloadAllG

func (o *GenOrderNoSlice) ReloadAllG(ctx context.Context) error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (GenOrderNoSlice) UpdateAll

func (o GenOrderNoSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (GenOrderNoSlice) UpdateAllG

func (o GenOrderNoSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type GenProductID

type GenProductID struct {
	ProductIdw string `boil:"product_idw" json:"product_idw" toml:"product_idw" yaml:"product_idw"`
	// 商品名
	ProductName string `boil:"product_name" json:"product_name" toml:"product_name" yaml:"product_name"`
	// 作成日時
	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"`
	// 作成者
	CreatedBy null.String `boil:"created_by" json:"created_by,omitempty" toml:"created_by" yaml:"created_by,omitempty"`
	// 更新者
	UpdatedBy null.String `boil:"updated_by" json:"updated_by,omitempty" toml:"updated_by" yaml:"updated_by,omitempty"`

	R *genProductIDR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L genProductIDL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

GenProductID is an object representing the database table.

func FindGenProductID

func FindGenProductID(ctx context.Context, exec boil.ContextExecutor, productIdw string, selectCols ...string) (*GenProductID, error)

FindGenProductID retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindGenProductIDG

func FindGenProductIDG(ctx context.Context, productIdw string, selectCols ...string) (*GenProductID, error)

FindGenProductIDG retrieves a single record by ID.

func (*GenProductID) AddProductIdwGenOrderNos

func (o *GenProductID) AddProductIdwGenOrderNos(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*GenOrderNo) error

AddProductIdwGenOrderNos adds the given related objects to the existing relationships of the gen_product_id, optionally inserting them as new records. Appends related to o.R.ProductIdwGenOrderNos. Sets related.R.ProductIdwGenProductID appropriately.

func (*GenProductID) AddProductIdwGenOrderNosG

func (o *GenProductID) AddProductIdwGenOrderNosG(ctx context.Context, insert bool, related ...*GenOrderNo) error

AddProductIdwGenOrderNosG adds the given related objects to the existing relationships of the gen_product_id, optionally inserting them as new records. Appends related to o.R.ProductIdwGenOrderNos. Sets related.R.ProductIdwGenProductID appropriately. Uses the global database handle.

func (*GenProductID) Delete

func (o *GenProductID) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single GenProductID record with an executor. Delete will match against the primary key column to find the record to delete.

func (*GenProductID) DeleteG

func (o *GenProductID) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single GenProductID record. DeleteG will match against the primary key column to find the record to delete.

func (*GenProductID) Exists

func (o *GenProductID) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the GenProductID row exists.

func (*GenProductID) Insert

func (o *GenProductID) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*GenProductID) InsertG

func (o *GenProductID) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*GenProductID) ProductIdwGenOrderNos

func (o *GenProductID) ProductIdwGenOrderNos(mods ...qm.QueryMod) genOrderNoQuery

ProductIdwGenOrderNos retrieves all the gen_order_no's GenOrderNos with an executor via product_idw column.

func (*GenProductID) Reload

func (o *GenProductID) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*GenProductID) ReloadG

func (o *GenProductID) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*GenProductID) Update

func (o *GenProductID) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the GenProductID. 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 (*GenProductID) UpdateG

func (o *GenProductID) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single GenProductID record using the global executor. See Update for more documentation.

func (*GenProductID) Upsert

func (o *GenProductID) 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.

func (*GenProductID) UpsertG

func (o *GenProductID) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type GenProductIDHook

type GenProductIDHook func(context.Context, boil.ContextExecutor, *GenProductID) error

GenProductIDHook is the signature for custom GenProductID hook methods

type GenProductIDSlice

type GenProductIDSlice []*GenProductID

GenProductIDSlice is an alias for a slice of pointers to GenProductID. This should almost always be used instead of []GenProductID.

func (GenProductIDSlice) DeleteAll

func (o GenProductIDSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (GenProductIDSlice) DeleteAllG

func (o GenProductIDSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*GenProductIDSlice) ReloadAll

func (o *GenProductIDSlice) 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 (*GenProductIDSlice) ReloadAllG

func (o *GenProductIDSlice) ReloadAllG(ctx context.Context) error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (GenProductIDSlice) UpdateAll

func (o GenProductIDSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (GenProductIDSlice) UpdateAllG

func (o GenProductIDSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL