ent

package
v0.0.0-...-738d89c Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeDecisionDef    = "DecisionDef"
	TypeDecisionReqDef = "DecisionReqDef"
	TypeDeployment     = "Deployment"
	TypeIdentityLink   = "IdentityLink"
	TypeOrgApp         = "OrgApp"
	TypeOrgRole        = "OrgRole"
	TypeOrgRoleUser    = "OrgRoleUser"
	TypeOrgUser        = "OrgUser"
	TypeProcDef        = "ProcDef"
	TypeProcInst       = "ProcInst"
	TypeTask           = "Task"
)

Variables

View Source
var (
	// DecisionDefOrderFieldCreatedAt orders DecisionDef by created_at.
	DecisionDefOrderFieldCreatedAt = &DecisionDefOrderField{
		Value: func(dd *DecisionDef) (ent.Value, error) {
			return dd.CreatedAt, nil
		},
		column: decisiondef.FieldCreatedAt,
		toTerm: decisiondef.ByCreatedAt,
		toCursor: func(dd *DecisionDef) Cursor {
			return Cursor{
				ID:    dd.ID,
				Value: dd.CreatedAt,
			}
		},
	}
)
View Source
var (
	// DecisionReqDefOrderFieldCreatedAt orders DecisionReqDef by created_at.
	DecisionReqDefOrderFieldCreatedAt = &DecisionReqDefOrderField{
		Value: func(drd *DecisionReqDef) (ent.Value, error) {
			return drd.CreatedAt, nil
		},
		column: decisionreqdef.FieldCreatedAt,
		toTerm: decisionreqdef.ByCreatedAt,
		toCursor: func(drd *DecisionReqDef) Cursor {
			return Cursor{
				ID:    drd.ID,
				Value: drd.CreatedAt,
			}
		},
	}
)
View Source
var DefaultDecisionDefOrder = &DecisionDefOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &DecisionDefOrderField{
		Value: func(dd *DecisionDef) (ent.Value, error) {
			return dd.ID, nil
		},
		column: decisiondef.FieldID,
		toTerm: decisiondef.ByID,
		toCursor: func(dd *DecisionDef) Cursor {
			return Cursor{ID: dd.ID}
		},
	},
}

DefaultDecisionDefOrder is the default ordering of DecisionDef.

View Source
var DefaultDecisionReqDefOrder = &DecisionReqDefOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &DecisionReqDefOrderField{
		Value: func(drd *DecisionReqDef) (ent.Value, error) {
			return drd.ID, nil
		},
		column: decisionreqdef.FieldID,
		toTerm: decisionreqdef.ByID,
		toCursor: func(drd *DecisionReqDef) Cursor {
			return Cursor{ID: drd.ID}
		},
	},
}

DefaultDecisionReqDefOrder is the default ordering of DecisionReqDef.

View Source
var DefaultDeploymentOrder = &DeploymentOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &DeploymentOrderField{
		Value: func(d *Deployment) (ent.Value, error) {
			return d.ID, nil
		},
		column: deployment.FieldID,
		toTerm: deployment.ByID,
		toCursor: func(d *Deployment) Cursor {
			return Cursor{ID: d.ID}
		},
	},
}

DefaultDeploymentOrder is the default ordering of Deployment.

View Source
var DefaultIdentityLinkOrder = &IdentityLinkOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &IdentityLinkOrderField{
		Value: func(il *IdentityLink) (ent.Value, error) {
			return il.ID, nil
		},
		column: identitylink.FieldID,
		toTerm: identitylink.ByID,
		toCursor: func(il *IdentityLink) Cursor {
			return Cursor{ID: il.ID}
		},
	},
}

DefaultIdentityLinkOrder is the default ordering of IdentityLink.

View Source
var DefaultOrgRoleOrder = &OrgRoleOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OrgRoleOrderField{
		Value: func(or *OrgRole) (ent.Value, error) {
			return or.ID, nil
		},
		column: orgrole.FieldID,
		toTerm: orgrole.ByID,
		toCursor: func(or *OrgRole) Cursor {
			return Cursor{ID: or.ID}
		},
	},
}

DefaultOrgRoleOrder is the default ordering of OrgRole.

View Source
var DefaultOrgUserOrder = &OrgUserOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OrgUserOrderField{
		Value: func(ou *OrgUser) (ent.Value, error) {
			return ou.ID, nil
		},
		column: orguser.FieldID,
		toTerm: orguser.ByID,
		toCursor: func(ou *OrgUser) Cursor {
			return Cursor{ID: ou.ID}
		},
	},
}

DefaultOrgUserOrder is the default ordering of OrgUser.

View Source
var DefaultProcDefOrder = &ProcDefOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ProcDefOrderField{
		Value: func(pd *ProcDef) (ent.Value, error) {
			return pd.ID, nil
		},
		column: procdef.FieldID,
		toTerm: procdef.ByID,
		toCursor: func(pd *ProcDef) Cursor {
			return Cursor{ID: pd.ID}
		},
	},
}

DefaultProcDefOrder is the default ordering of ProcDef.

View Source
var DefaultProcInstOrder = &ProcInstOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ProcInstOrderField{
		Value: func(pi *ProcInst) (ent.Value, error) {
			return pi.ID, nil
		},
		column: procinst.FieldID,
		toTerm: procinst.ByID,
		toCursor: func(pi *ProcInst) Cursor {
			return Cursor{ID: pi.ID}
		},
	},
}

DefaultProcInstOrder is the default ordering of ProcInst.

View Source
var DefaultTaskOrder = &TaskOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &TaskOrderField{
		Value: func(t *Task) (ent.Value, error) {
			return t.ID, nil
		},
		column: task.FieldID,
		toTerm: task.ByID,
		toCursor: func(t *Task) Cursor {
			return Cursor{ID: t.ID}
		},
	},
}

DefaultTaskOrder is the default ordering of Task.

View Source
var (
	// DeploymentOrderFieldCreatedAt orders Deployment by created_at.
	DeploymentOrderFieldCreatedAt = &DeploymentOrderField{
		Value: func(d *Deployment) (ent.Value, error) {
			return d.CreatedAt, nil
		},
		column: deployment.FieldCreatedAt,
		toTerm: deployment.ByCreatedAt,
		toCursor: func(d *Deployment) Cursor {
			return Cursor{
				ID:    d.ID,
				Value: d.CreatedAt,
			}
		},
	}
)
View Source
var ErrEmptyDecisionDefWhereInput = errors.New("ent: empty predicate DecisionDefWhereInput")

ErrEmptyDecisionDefWhereInput is returned in case the DecisionDefWhereInput is empty.

View Source
var ErrEmptyDecisionReqDefWhereInput = errors.New("ent: empty predicate DecisionReqDefWhereInput")

ErrEmptyDecisionReqDefWhereInput is returned in case the DecisionReqDefWhereInput is empty.

View Source
var ErrEmptyDeploymentWhereInput = errors.New("ent: empty predicate DeploymentWhereInput")

ErrEmptyDeploymentWhereInput is returned in case the DeploymentWhereInput is empty.

View Source
var ErrEmptyIdentityLinkWhereInput = errors.New("ent: empty predicate IdentityLinkWhereInput")

ErrEmptyIdentityLinkWhereInput is returned in case the IdentityLinkWhereInput is empty.

View Source
var ErrEmptyOrgRoleWhereInput = errors.New("ent: empty predicate OrgRoleWhereInput")

ErrEmptyOrgRoleWhereInput is returned in case the OrgRoleWhereInput is empty.

View Source
var ErrEmptyOrgUserWhereInput = errors.New("ent: empty predicate OrgUserWhereInput")

ErrEmptyOrgUserWhereInput is returned in case the OrgUserWhereInput is empty.

View Source
var ErrEmptyProcDefWhereInput = errors.New("ent: empty predicate ProcDefWhereInput")

ErrEmptyProcDefWhereInput is returned in case the ProcDefWhereInput is empty.

View Source
var ErrEmptyProcInstWhereInput = errors.New("ent: empty predicate ProcInstWhereInput")

ErrEmptyProcInstWhereInput is returned in case the ProcInstWhereInput is empty.

View Source
var ErrEmptyTaskWhereInput = errors.New("ent: empty predicate TaskWhereInput")

ErrEmptyTaskWhereInput is returned in case the TaskWhereInput is empty.

View Source
var (
	// ProcDefOrderFieldCreatedAt orders ProcDef by created_at.
	ProcDefOrderFieldCreatedAt = &ProcDefOrderField{
		Value: func(pd *ProcDef) (ent.Value, error) {
			return pd.CreatedAt, nil
		},
		column: procdef.FieldCreatedAt,
		toTerm: procdef.ByCreatedAt,
		toCursor: func(pd *ProcDef) Cursor {
			return Cursor{
				ID:    pd.ID,
				Value: pd.CreatedAt,
			}
		},
	}
)
View Source
var (
	// ProcInstOrderFieldCreatedAt orders ProcInst by created_at.
	ProcInstOrderFieldCreatedAt = &ProcInstOrderField{
		Value: func(pi *ProcInst) (ent.Value, error) {
			return pi.CreatedAt, nil
		},
		column: procinst.FieldCreatedAt,
		toTerm: procinst.ByCreatedAt,
		toCursor: func(pi *ProcInst) Cursor {
			return Cursor{
				ID:    pi.ID,
				Value: pi.CreatedAt,
			}
		},
	}
)

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func GlobalID

func GlobalID(tp, id string) (string, error)

GlobalID returns the global identifier for the given type and id.

func IntFromGlobalID

func IntFromGlobalID(s string) (int, error)

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// DecisionDef is the client for interacting with the DecisionDef builders.
	DecisionDef *DecisionDefClient
	// DecisionReqDef is the client for interacting with the DecisionReqDef builders.
	DecisionReqDef *DecisionReqDefClient
	// Deployment is the client for interacting with the Deployment builders.
	Deployment *DeploymentClient
	// IdentityLink is the client for interacting with the IdentityLink builders.
	IdentityLink *IdentityLinkClient
	// OrgApp is the client for interacting with the OrgApp builders.
	OrgApp *OrgAppClient
	// OrgRole is the client for interacting with the OrgRole builders.
	OrgRole *OrgRoleClient
	// OrgRoleUser is the client for interacting with the OrgRoleUser builders.
	OrgRoleUser *OrgRoleUserClient
	// OrgUser is the client for interacting with the OrgUser builders.
	OrgUser *OrgUserClient
	// ProcDef is the client for interacting with the ProcDef builders.
	ProcDef *ProcDefClient
	// ProcInst is the client for interacting with the ProcInst builders.
	ProcInst *ProcInstClient
	// Task is the client for interacting with the Task builders.
	Task *TaskClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	DecisionDef.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) NoderEx

func (c *Client) NoderEx(ctx context.Context, id string) (Noder, error)

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)

func (*Client) NodersEx

func (c *Client) NodersEx(ctx context.Context, ids []string, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

type ConstraintError struct {
	// contains filtered or unexported fields
}

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type CreateDeploymentInput

type CreateDeploymentInput struct {
	TenantID       int
	AppID          int
	Name           *string
	Source         *string
	DeployTime     *time.Time
	ProcDefIDs     []int
	DecisionReqIDs []int
}

CreateDeploymentInput represents a mutation input for creating deployments.

func (*CreateDeploymentInput) Mutate

Mutate applies the CreateDeploymentInput on the DeploymentMutation builder.

type CreateIdentityLinkInput

type CreateIdentityLinkInput struct {
	TenantID      int
	ProcDefID     int
	GroupID       *int
	UserID        *int
	AssignerID    *int
	LinkType      identitylink.LinkType
	OperationType identitylink.OperationType
	Comments      *string
	TaskID        int
}

CreateIdentityLinkInput represents a mutation input for creating identitylinks.

func (*CreateIdentityLinkInput) Mutate

Mutate applies the CreateIdentityLinkInput on the IdentityLinkMutation builder.

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

type DecisionDef

type DecisionDef struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 部署ID
	DeploymentID int `json:"deployment_id,omitempty"`
	// 所属应用ID
	AppID int `json:"app_id,omitempty"`
	// 决策定义ID
	ReqDefID int `json:"req_def_id,omitempty"`
	// 分类
	Category string `json:"category,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// KEY
	Key string `json:"key,omitempty"`
	// 决策定义key
	ReqDefKey string `json:"req_def_key,omitempty"`
	// 版本
	Version int32 `json:"version,omitempty"`
	// 小版本
	Revision int32 `json:"revision,omitempty"`
	// 版本标签
	VersionTag string `json:"version_tag,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DecisionDefQuery when eager-loading is set.
	Edges DecisionDefEdges `json:"edges"`
	// contains filtered or unexported fields
}

DecisionDef is the model entity for the DecisionDef schema.

func (*DecisionDef) GlobalID

func (dd *DecisionDef) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given DecisionDef node.

func (*DecisionDef) IsNode

func (*DecisionDef) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*DecisionDef) QueryReqDef

func (dd *DecisionDef) QueryReqDef() *DecisionReqDefQuery

QueryReqDef queries the "req_def" edge of the DecisionDef entity.

func (*DecisionDef) ReqDef

func (dd *DecisionDef) ReqDef(ctx context.Context) (*DecisionReqDef, error)

func (*DecisionDef) String

func (dd *DecisionDef) String() string

String implements the fmt.Stringer.

func (*DecisionDef) ToEdge

func (dd *DecisionDef) ToEdge(order *DecisionDefOrder) *DecisionDefEdge

ToEdge converts DecisionDef into DecisionDefEdge.

func (*DecisionDef) Unwrap

func (dd *DecisionDef) Unwrap() *DecisionDef

Unwrap unwraps the DecisionDef entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DecisionDef) Update

func (dd *DecisionDef) Update() *DecisionDefUpdateOne

Update returns a builder for updating this DecisionDef. Note that you need to call DecisionDef.Unwrap() before calling this method if this DecisionDef was returned from a transaction, and the transaction was committed or rolled back.

func (*DecisionDef) Value

func (dd *DecisionDef) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DecisionDef. This includes values selected through modifiers, order, etc.

type DecisionDefClient

type DecisionDefClient struct {
	// contains filtered or unexported fields
}

DecisionDefClient is a client for the DecisionDef schema.

func NewDecisionDefClient

func NewDecisionDefClient(c config) *DecisionDefClient

NewDecisionDefClient returns a client for the DecisionDef from the given config.

func (*DecisionDefClient) Create

func (c *DecisionDefClient) Create() *DecisionDefCreate

Create returns a builder for creating a DecisionDef entity.

func (*DecisionDefClient) CreateBulk

func (c *DecisionDefClient) CreateBulk(builders ...*DecisionDefCreate) *DecisionDefCreateBulk

CreateBulk returns a builder for creating a bulk of DecisionDef entities.

func (*DecisionDefClient) Delete

func (c *DecisionDefClient) Delete() *DecisionDefDelete

Delete returns a delete builder for DecisionDef.

func (*DecisionDefClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DecisionDefClient) DeleteOneID

func (c *DecisionDefClient) DeleteOneID(id int) *DecisionDefDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DecisionDefClient) Get

func (c *DecisionDefClient) Get(ctx context.Context, id int) (*DecisionDef, error)

Get returns a DecisionDef entity by its id.

func (*DecisionDefClient) GetX

func (c *DecisionDefClient) GetX(ctx context.Context, id int) *DecisionDef

GetX is like Get, but panics if an error occurs.

func (*DecisionDefClient) Hooks

func (c *DecisionDefClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DecisionDefClient) Intercept

func (c *DecisionDefClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `decisiondef.Intercept(f(g(h())))`.

func (*DecisionDefClient) Interceptors

func (c *DecisionDefClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DecisionDefClient) Query

func (c *DecisionDefClient) Query() *DecisionDefQuery

Query returns a query builder for DecisionDef.

func (*DecisionDefClient) QueryReqDef

func (c *DecisionDefClient) QueryReqDef(dd *DecisionDef) *DecisionReqDefQuery

QueryReqDef queries the req_def edge of a DecisionDef.

func (*DecisionDefClient) Update

func (c *DecisionDefClient) Update() *DecisionDefUpdate

Update returns an update builder for DecisionDef.

func (*DecisionDefClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DecisionDefClient) UpdateOneID

func (c *DecisionDefClient) UpdateOneID(id int) *DecisionDefUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DecisionDefClient) Use

func (c *DecisionDefClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `decisiondef.Hooks(f(g(h())))`.

type DecisionDefConnection

type DecisionDefConnection struct {
	Edges      []*DecisionDefEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

DecisionDefConnection is the connection containing edges to DecisionDef.

type DecisionDefCreate

type DecisionDefCreate struct {
	// contains filtered or unexported fields
}

DecisionDefCreate is the builder for creating a DecisionDef entity.

func (*DecisionDefCreate) Exec

func (ddc *DecisionDefCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DecisionDefCreate) ExecX

func (ddc *DecisionDefCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefCreate) Mutation

func (ddc *DecisionDefCreate) Mutation() *DecisionDefMutation

Mutation returns the DecisionDefMutation object of the builder.

func (*DecisionDefCreate) OnConflict

func (ddc *DecisionDefCreate) OnConflict(opts ...sql.ConflictOption) *DecisionDefUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DecisionDef.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DecisionDefUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*DecisionDefCreate) OnConflictColumns

func (ddc *DecisionDefCreate) OnConflictColumns(columns ...string) *DecisionDefUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DecisionDef.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DecisionDefCreate) Save

func (ddc *DecisionDefCreate) Save(ctx context.Context) (*DecisionDef, error)

Save creates the DecisionDef in the database.

func (*DecisionDefCreate) SaveX

func (ddc *DecisionDefCreate) SaveX(ctx context.Context) *DecisionDef

SaveX calls Save and panics if Save returns an error.

func (*DecisionDefCreate) SetAppID

func (ddc *DecisionDefCreate) SetAppID(i int) *DecisionDefCreate

SetAppID sets the "app_id" field.

func (*DecisionDefCreate) SetCategory

func (ddc *DecisionDefCreate) SetCategory(s string) *DecisionDefCreate

SetCategory sets the "category" field.

func (*DecisionDefCreate) SetCreatedAt

func (ddc *DecisionDefCreate) SetCreatedAt(t time.Time) *DecisionDefCreate

SetCreatedAt sets the "created_at" field.

func (*DecisionDefCreate) SetCreatedBy

func (ddc *DecisionDefCreate) SetCreatedBy(i int) *DecisionDefCreate

SetCreatedBy sets the "created_by" field.

func (*DecisionDefCreate) SetDeploymentID

func (ddc *DecisionDefCreate) SetDeploymentID(i int) *DecisionDefCreate

SetDeploymentID sets the "deployment_id" field.

func (*DecisionDefCreate) SetID

func (ddc *DecisionDefCreate) SetID(i int) *DecisionDefCreate

SetID sets the "id" field.

func (*DecisionDefCreate) SetKey

func (ddc *DecisionDefCreate) SetKey(s string) *DecisionDefCreate

SetKey sets the "key" field.

func (*DecisionDefCreate) SetName

func (ddc *DecisionDefCreate) SetName(s string) *DecisionDefCreate

SetName sets the "name" field.

func (*DecisionDefCreate) SetNillableCategory

func (ddc *DecisionDefCreate) SetNillableCategory(s *string) *DecisionDefCreate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*DecisionDefCreate) SetNillableCreatedAt

func (ddc *DecisionDefCreate) SetNillableCreatedAt(t *time.Time) *DecisionDefCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DecisionDefCreate) SetNillableID

func (ddc *DecisionDefCreate) SetNillableID(i *int) *DecisionDefCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*DecisionDefCreate) SetNillableName

func (ddc *DecisionDefCreate) SetNillableName(s *string) *DecisionDefCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*DecisionDefCreate) SetNillableRevision

func (ddc *DecisionDefCreate) SetNillableRevision(i *int32) *DecisionDefCreate

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*DecisionDefCreate) SetNillableUpdatedAt

func (ddc *DecisionDefCreate) SetNillableUpdatedAt(t *time.Time) *DecisionDefCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DecisionDefCreate) SetNillableUpdatedBy

func (ddc *DecisionDefCreate) SetNillableUpdatedBy(i *int) *DecisionDefCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DecisionDefCreate) SetNillableVersionTag

func (ddc *DecisionDefCreate) SetNillableVersionTag(s *string) *DecisionDefCreate

SetNillableVersionTag sets the "version_tag" field if the given value is not nil.

func (*DecisionDefCreate) SetReqDef

SetReqDef sets the "req_def" edge to the DecisionReqDef entity.

func (*DecisionDefCreate) SetReqDefID

func (ddc *DecisionDefCreate) SetReqDefID(i int) *DecisionDefCreate

SetReqDefID sets the "req_def_id" field.

func (*DecisionDefCreate) SetReqDefKey

func (ddc *DecisionDefCreate) SetReqDefKey(s string) *DecisionDefCreate

SetReqDefKey sets the "req_def_key" field.

func (*DecisionDefCreate) SetRevision

func (ddc *DecisionDefCreate) SetRevision(i int32) *DecisionDefCreate

SetRevision sets the "revision" field.

func (*DecisionDefCreate) SetTenantID

func (ddc *DecisionDefCreate) SetTenantID(i int) *DecisionDefCreate

SetTenantID sets the "tenant_id" field.

func (*DecisionDefCreate) SetUpdatedAt

func (ddc *DecisionDefCreate) SetUpdatedAt(t time.Time) *DecisionDefCreate

SetUpdatedAt sets the "updated_at" field.

func (*DecisionDefCreate) SetUpdatedBy

func (ddc *DecisionDefCreate) SetUpdatedBy(i int) *DecisionDefCreate

SetUpdatedBy sets the "updated_by" field.

func (*DecisionDefCreate) SetVersion

func (ddc *DecisionDefCreate) SetVersion(i int32) *DecisionDefCreate

SetVersion sets the "version" field.

func (*DecisionDefCreate) SetVersionTag

func (ddc *DecisionDefCreate) SetVersionTag(s string) *DecisionDefCreate

SetVersionTag sets the "version_tag" field.

type DecisionDefCreateBulk

type DecisionDefCreateBulk struct {
	// contains filtered or unexported fields
}

DecisionDefCreateBulk is the builder for creating many DecisionDef entities in bulk.

func (*DecisionDefCreateBulk) Exec

func (ddcb *DecisionDefCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DecisionDefCreateBulk) ExecX

func (ddcb *DecisionDefCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DecisionDef.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DecisionDefUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*DecisionDefCreateBulk) OnConflictColumns

func (ddcb *DecisionDefCreateBulk) OnConflictColumns(columns ...string) *DecisionDefUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DecisionDef.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DecisionDefCreateBulk) Save

func (ddcb *DecisionDefCreateBulk) Save(ctx context.Context) ([]*DecisionDef, error)

Save creates the DecisionDef entities in the database.

func (*DecisionDefCreateBulk) SaveX

func (ddcb *DecisionDefCreateBulk) SaveX(ctx context.Context) []*DecisionDef

SaveX is like Save, but panics if an error occurs.

type DecisionDefDelete

type DecisionDefDelete struct {
	// contains filtered or unexported fields
}

DecisionDefDelete is the builder for deleting a DecisionDef entity.

func (*DecisionDefDelete) Exec

func (ddd *DecisionDefDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DecisionDefDelete) ExecX

func (ddd *DecisionDefDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefDelete) Where

Where appends a list predicates to the DecisionDefDelete builder.

type DecisionDefDeleteOne

type DecisionDefDeleteOne struct {
	// contains filtered or unexported fields
}

DecisionDefDeleteOne is the builder for deleting a single DecisionDef entity.

func (*DecisionDefDeleteOne) Exec

func (dddo *DecisionDefDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DecisionDefDeleteOne) ExecX

func (dddo *DecisionDefDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefDeleteOne) Where

Where appends a list predicates to the DecisionDefDelete builder.

type DecisionDefEdge

type DecisionDefEdge struct {
	Node   *DecisionDef `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

DecisionDefEdge is the edge representation of DecisionDef.

type DecisionDefEdges

type DecisionDefEdges struct {
	// ReqDef holds the value of the req_def edge.
	ReqDef *DecisionReqDef `json:"req_def,omitempty"`
	// contains filtered or unexported fields
}

DecisionDefEdges holds the relations/edges for other nodes in the graph.

func (DecisionDefEdges) ReqDefOrErr

func (e DecisionDefEdges) ReqDefOrErr() (*DecisionReqDef, error)

ReqDefOrErr returns the ReqDef value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DecisionDefGroupBy

type DecisionDefGroupBy struct {
	// contains filtered or unexported fields
}

DecisionDefGroupBy is the group-by builder for DecisionDef entities.

func (*DecisionDefGroupBy) Aggregate

func (ddgb *DecisionDefGroupBy) Aggregate(fns ...AggregateFunc) *DecisionDefGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DecisionDefGroupBy) Bool

func (s *DecisionDefGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) BoolX

func (s *DecisionDefGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DecisionDefGroupBy) Bools

func (s *DecisionDefGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) BoolsX

func (s *DecisionDefGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DecisionDefGroupBy) Float64

func (s *DecisionDefGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) Float64X

func (s *DecisionDefGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DecisionDefGroupBy) Float64s

func (s *DecisionDefGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) Float64sX

func (s *DecisionDefGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DecisionDefGroupBy) Int

func (s *DecisionDefGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) IntX

func (s *DecisionDefGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DecisionDefGroupBy) Ints

func (s *DecisionDefGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) IntsX

func (s *DecisionDefGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DecisionDefGroupBy) Scan

func (ddgb *DecisionDefGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DecisionDefGroupBy) ScanX

func (s *DecisionDefGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DecisionDefGroupBy) String

func (s *DecisionDefGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) StringX

func (s *DecisionDefGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DecisionDefGroupBy) Strings

func (s *DecisionDefGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DecisionDefGroupBy) StringsX

func (s *DecisionDefGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DecisionDefMutation

type DecisionDefMutation struct {
	// contains filtered or unexported fields
}

DecisionDefMutation represents an operation that mutates the DecisionDef nodes in the graph.

func (*DecisionDefMutation) AddAppID

func (m *DecisionDefMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*DecisionDefMutation) AddCreatedBy

func (m *DecisionDefMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*DecisionDefMutation) AddDeploymentID

func (m *DecisionDefMutation) AddDeploymentID(i int)

AddDeploymentID adds i to the "deployment_id" field.

func (*DecisionDefMutation) AddField

func (m *DecisionDefMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DecisionDefMutation) AddRevision

func (m *DecisionDefMutation) AddRevision(i int32)

AddRevision adds i to the "revision" field.

func (*DecisionDefMutation) AddTenantID

func (m *DecisionDefMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*DecisionDefMutation) AddUpdatedBy

func (m *DecisionDefMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*DecisionDefMutation) AddVersion

func (m *DecisionDefMutation) AddVersion(i int32)

AddVersion adds i to the "version" field.

func (*DecisionDefMutation) AddedAppID

func (m *DecisionDefMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*DecisionDefMutation) AddedCreatedBy

func (m *DecisionDefMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*DecisionDefMutation) AddedDeploymentID

func (m *DecisionDefMutation) AddedDeploymentID() (r int, exists bool)

AddedDeploymentID returns the value that was added to the "deployment_id" field in this mutation.

func (*DecisionDefMutation) AddedEdges

func (m *DecisionDefMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DecisionDefMutation) AddedField

func (m *DecisionDefMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DecisionDefMutation) AddedFields

func (m *DecisionDefMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DecisionDefMutation) AddedIDs

func (m *DecisionDefMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DecisionDefMutation) AddedRevision

func (m *DecisionDefMutation) AddedRevision() (r int32, exists bool)

AddedRevision returns the value that was added to the "revision" field in this mutation.

func (*DecisionDefMutation) AddedTenantID

func (m *DecisionDefMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*DecisionDefMutation) AddedUpdatedBy

func (m *DecisionDefMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*DecisionDefMutation) AddedVersion

func (m *DecisionDefMutation) AddedVersion() (r int32, exists bool)

AddedVersion returns the value that was added to the "version" field in this mutation.

func (*DecisionDefMutation) AppID

func (m *DecisionDefMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*DecisionDefMutation) Category

func (m *DecisionDefMutation) Category() (r string, exists bool)

Category returns the value of the "category" field in the mutation.

func (*DecisionDefMutation) CategoryCleared

func (m *DecisionDefMutation) CategoryCleared() bool

CategoryCleared returns if the "category" field was cleared in this mutation.

func (*DecisionDefMutation) ClearCategory

func (m *DecisionDefMutation) ClearCategory()

ClearCategory clears the value of the "category" field.

func (*DecisionDefMutation) ClearEdge

func (m *DecisionDefMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DecisionDefMutation) ClearField

func (m *DecisionDefMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DecisionDefMutation) ClearName

func (m *DecisionDefMutation) ClearName()

ClearName clears the value of the "name" field.

func (*DecisionDefMutation) ClearReqDef

func (m *DecisionDefMutation) ClearReqDef()

ClearReqDef clears the "req_def" edge to the DecisionReqDef entity.

func (*DecisionDefMutation) ClearRevision

func (m *DecisionDefMutation) ClearRevision()

ClearRevision clears the value of the "revision" field.

func (*DecisionDefMutation) ClearUpdatedAt

func (m *DecisionDefMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionDefMutation) ClearUpdatedBy

func (m *DecisionDefMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionDefMutation) ClearVersionTag

func (m *DecisionDefMutation) ClearVersionTag()

ClearVersionTag clears the value of the "version_tag" field.

func (*DecisionDefMutation) ClearedEdges

func (m *DecisionDefMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DecisionDefMutation) ClearedFields

func (m *DecisionDefMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DecisionDefMutation) Client

func (m DecisionDefMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DecisionDefMutation) CreatedAt

func (m *DecisionDefMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DecisionDefMutation) CreatedBy

func (m *DecisionDefMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*DecisionDefMutation) DeploymentID

func (m *DecisionDefMutation) DeploymentID() (r int, exists bool)

DeploymentID returns the value of the "deployment_id" field in the mutation.

func (*DecisionDefMutation) EdgeCleared

func (m *DecisionDefMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DecisionDefMutation) Field

func (m *DecisionDefMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DecisionDefMutation) FieldCleared

func (m *DecisionDefMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DecisionDefMutation) Fields

func (m *DecisionDefMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DecisionDefMutation) ID

func (m *DecisionDefMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DecisionDefMutation) IDs

func (m *DecisionDefMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DecisionDefMutation) Key

func (m *DecisionDefMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*DecisionDefMutation) Name

func (m *DecisionDefMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*DecisionDefMutation) NameCleared

func (m *DecisionDefMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*DecisionDefMutation) OldAppID

func (m *DecisionDefMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldCategory

func (m *DecisionDefMutation) OldCategory(ctx context.Context) (v string, err error)

OldCategory returns the old "category" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldCreatedAt

func (m *DecisionDefMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldCreatedBy

func (m *DecisionDefMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldDeploymentID

func (m *DecisionDefMutation) OldDeploymentID(ctx context.Context) (v int, err error)

OldDeploymentID returns the old "deployment_id" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldField

func (m *DecisionDefMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DecisionDefMutation) OldKey

func (m *DecisionDefMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldName

func (m *DecisionDefMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldReqDefID

func (m *DecisionDefMutation) OldReqDefID(ctx context.Context) (v int, err error)

OldReqDefID returns the old "req_def_id" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldReqDefKey

func (m *DecisionDefMutation) OldReqDefKey(ctx context.Context) (v string, err error)

OldReqDefKey returns the old "req_def_key" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldRevision

func (m *DecisionDefMutation) OldRevision(ctx context.Context) (v int32, err error)

OldRevision returns the old "revision" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldTenantID

func (m *DecisionDefMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldUpdatedAt

func (m *DecisionDefMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldUpdatedBy

func (m *DecisionDefMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldVersion

func (m *DecisionDefMutation) OldVersion(ctx context.Context) (v int32, err error)

OldVersion returns the old "version" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) OldVersionTag

func (m *DecisionDefMutation) OldVersionTag(ctx context.Context) (v string, err error)

OldVersionTag returns the old "version_tag" field's value of the DecisionDef entity. If the DecisionDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionDefMutation) Op

func (m *DecisionDefMutation) Op() Op

Op returns the operation name.

func (*DecisionDefMutation) RemovedEdges

func (m *DecisionDefMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DecisionDefMutation) RemovedIDs

func (m *DecisionDefMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DecisionDefMutation) ReqDefCleared

func (m *DecisionDefMutation) ReqDefCleared() bool

ReqDefCleared reports if the "req_def" edge to the DecisionReqDef entity was cleared.

func (*DecisionDefMutation) ReqDefID

func (m *DecisionDefMutation) ReqDefID() (r int, exists bool)

ReqDefID returns the value of the "req_def_id" field in the mutation.

func (*DecisionDefMutation) ReqDefIDs

func (m *DecisionDefMutation) ReqDefIDs() (ids []int)

ReqDefIDs returns the "req_def" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ReqDefID instead. It exists only for internal usage by the builders.

func (*DecisionDefMutation) ReqDefKey

func (m *DecisionDefMutation) ReqDefKey() (r string, exists bool)

ReqDefKey returns the value of the "req_def_key" field in the mutation.

func (*DecisionDefMutation) ResetAppID

func (m *DecisionDefMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*DecisionDefMutation) ResetCategory

func (m *DecisionDefMutation) ResetCategory()

ResetCategory resets all changes to the "category" field.

func (*DecisionDefMutation) ResetCreatedAt

func (m *DecisionDefMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DecisionDefMutation) ResetCreatedBy

func (m *DecisionDefMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*DecisionDefMutation) ResetDeploymentID

func (m *DecisionDefMutation) ResetDeploymentID()

ResetDeploymentID resets all changes to the "deployment_id" field.

func (*DecisionDefMutation) ResetEdge

func (m *DecisionDefMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DecisionDefMutation) ResetField

func (m *DecisionDefMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DecisionDefMutation) ResetKey

func (m *DecisionDefMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*DecisionDefMutation) ResetName

func (m *DecisionDefMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*DecisionDefMutation) ResetReqDef

func (m *DecisionDefMutation) ResetReqDef()

ResetReqDef resets all changes to the "req_def" edge.

func (*DecisionDefMutation) ResetReqDefID

func (m *DecisionDefMutation) ResetReqDefID()

ResetReqDefID resets all changes to the "req_def_id" field.

func (*DecisionDefMutation) ResetReqDefKey

func (m *DecisionDefMutation) ResetReqDefKey()

ResetReqDefKey resets all changes to the "req_def_key" field.

func (*DecisionDefMutation) ResetRevision

func (m *DecisionDefMutation) ResetRevision()

ResetRevision resets all changes to the "revision" field.

func (*DecisionDefMutation) ResetTenantID

func (m *DecisionDefMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*DecisionDefMutation) ResetUpdatedAt

func (m *DecisionDefMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DecisionDefMutation) ResetUpdatedBy

func (m *DecisionDefMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*DecisionDefMutation) ResetVersion

func (m *DecisionDefMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*DecisionDefMutation) ResetVersionTag

func (m *DecisionDefMutation) ResetVersionTag()

ResetVersionTag resets all changes to the "version_tag" field.

func (*DecisionDefMutation) Revision

func (m *DecisionDefMutation) Revision() (r int32, exists bool)

Revision returns the value of the "revision" field in the mutation.

func (*DecisionDefMutation) RevisionCleared

func (m *DecisionDefMutation) RevisionCleared() bool

RevisionCleared returns if the "revision" field was cleared in this mutation.

func (*DecisionDefMutation) SetAppID

func (m *DecisionDefMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*DecisionDefMutation) SetCategory

func (m *DecisionDefMutation) SetCategory(s string)

SetCategory sets the "category" field.

func (*DecisionDefMutation) SetCreatedAt

func (m *DecisionDefMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DecisionDefMutation) SetCreatedBy

func (m *DecisionDefMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*DecisionDefMutation) SetDeploymentID

func (m *DecisionDefMutation) SetDeploymentID(i int)

SetDeploymentID sets the "deployment_id" field.

func (*DecisionDefMutation) SetField

func (m *DecisionDefMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DecisionDefMutation) SetID

func (m *DecisionDefMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DecisionDef entities.

func (*DecisionDefMutation) SetKey

func (m *DecisionDefMutation) SetKey(s string)

SetKey sets the "key" field.

func (*DecisionDefMutation) SetName

func (m *DecisionDefMutation) SetName(s string)

SetName sets the "name" field.

func (*DecisionDefMutation) SetOp

func (m *DecisionDefMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DecisionDefMutation) SetReqDefID

func (m *DecisionDefMutation) SetReqDefID(i int)

SetReqDefID sets the "req_def_id" field.

func (*DecisionDefMutation) SetReqDefKey

func (m *DecisionDefMutation) SetReqDefKey(s string)

SetReqDefKey sets the "req_def_key" field.

func (*DecisionDefMutation) SetRevision

func (m *DecisionDefMutation) SetRevision(i int32)

SetRevision sets the "revision" field.

func (*DecisionDefMutation) SetTenantID

func (m *DecisionDefMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*DecisionDefMutation) SetUpdatedAt

func (m *DecisionDefMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DecisionDefMutation) SetUpdatedBy

func (m *DecisionDefMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*DecisionDefMutation) SetVersion

func (m *DecisionDefMutation) SetVersion(i int32)

SetVersion sets the "version" field.

func (*DecisionDefMutation) SetVersionTag

func (m *DecisionDefMutation) SetVersionTag(s string)

SetVersionTag sets the "version_tag" field.

func (*DecisionDefMutation) TenantID

func (m *DecisionDefMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (DecisionDefMutation) Tx

func (m DecisionDefMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DecisionDefMutation) Type

func (m *DecisionDefMutation) Type() string

Type returns the node type of this mutation (DecisionDef).

func (*DecisionDefMutation) UpdatedAt

func (m *DecisionDefMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DecisionDefMutation) UpdatedAtCleared

func (m *DecisionDefMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*DecisionDefMutation) UpdatedBy

func (m *DecisionDefMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*DecisionDefMutation) UpdatedByCleared

func (m *DecisionDefMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*DecisionDefMutation) Version

func (m *DecisionDefMutation) Version() (r int32, exists bool)

Version returns the value of the "version" field in the mutation.

func (*DecisionDefMutation) VersionTag

func (m *DecisionDefMutation) VersionTag() (r string, exists bool)

VersionTag returns the value of the "version_tag" field in the mutation.

func (*DecisionDefMutation) VersionTagCleared

func (m *DecisionDefMutation) VersionTagCleared() bool

VersionTagCleared returns if the "version_tag" field was cleared in this mutation.

func (*DecisionDefMutation) Where

func (m *DecisionDefMutation) Where(ps ...predicate.DecisionDef)

Where appends a list predicates to the DecisionDefMutation builder.

func (*DecisionDefMutation) WhereP

func (m *DecisionDefMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DecisionDefMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DecisionDefOrder

type DecisionDefOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *DecisionDefOrderField `json:"field"`
}

DecisionDefOrder defines the ordering of DecisionDef.

type DecisionDefOrderField

type DecisionDefOrderField struct {
	// Value extracts the ordering value from the given DecisionDef.
	Value func(*DecisionDef) (ent.Value, error)
	// contains filtered or unexported fields
}

DecisionDefOrderField defines the ordering field of DecisionDef.

func (DecisionDefOrderField) MarshalGQL

func (f DecisionDefOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (DecisionDefOrderField) String

func (f DecisionDefOrderField) String() string

String implement fmt.Stringer interface.

func (*DecisionDefOrderField) UnmarshalGQL

func (f *DecisionDefOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type DecisionDefPaginateOption

type DecisionDefPaginateOption func(*decisiondefPager) error

DecisionDefPaginateOption enables pagination customization.

func WithDecisionDefFilter

func WithDecisionDefFilter(filter func(*DecisionDefQuery) (*DecisionDefQuery, error)) DecisionDefPaginateOption

WithDecisionDefFilter configures pagination filter.

func WithDecisionDefOrder

func WithDecisionDefOrder(order *DecisionDefOrder) DecisionDefPaginateOption

WithDecisionDefOrder configures pagination ordering.

type DecisionDefQuery

type DecisionDefQuery struct {
	// contains filtered or unexported fields
}

DecisionDefQuery is the builder for querying DecisionDef entities.

func (*DecisionDefQuery) Aggregate

func (ddq *DecisionDefQuery) Aggregate(fns ...AggregateFunc) *DecisionDefSelect

Aggregate returns a DecisionDefSelect configured with the given aggregations.

func (*DecisionDefQuery) All

func (ddq *DecisionDefQuery) All(ctx context.Context) ([]*DecisionDef, error)

All executes the query and returns a list of DecisionDefs.

func (*DecisionDefQuery) AllX

func (ddq *DecisionDefQuery) AllX(ctx context.Context) []*DecisionDef

AllX is like All, but panics if an error occurs.

func (*DecisionDefQuery) Clone

func (ddq *DecisionDefQuery) Clone() *DecisionDefQuery

Clone returns a duplicate of the DecisionDefQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DecisionDefQuery) CollectFields

func (dd *DecisionDefQuery) CollectFields(ctx context.Context, satisfies ...string) (*DecisionDefQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*DecisionDefQuery) Count

func (ddq *DecisionDefQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DecisionDefQuery) CountX

func (ddq *DecisionDefQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DecisionDefQuery) Exist

func (ddq *DecisionDefQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DecisionDefQuery) ExistX

func (ddq *DecisionDefQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DecisionDefQuery) First

func (ddq *DecisionDefQuery) First(ctx context.Context) (*DecisionDef, error)

First returns the first DecisionDef entity from the query. Returns a *NotFoundError when no DecisionDef was found.

func (*DecisionDefQuery) FirstID

func (ddq *DecisionDefQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DecisionDef ID from the query. Returns a *NotFoundError when no DecisionDef ID was found.

func (*DecisionDefQuery) FirstIDX

func (ddq *DecisionDefQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DecisionDefQuery) FirstX

func (ddq *DecisionDefQuery) FirstX(ctx context.Context) *DecisionDef

FirstX is like First, but panics if an error occurs.

func (*DecisionDefQuery) GroupBy

func (ddq *DecisionDefQuery) GroupBy(field string, fields ...string) *DecisionDefGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DecisionDef.Query().
	GroupBy(decisiondef.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DecisionDefQuery) IDs

func (ddq *DecisionDefQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of DecisionDef IDs.

func (*DecisionDefQuery) IDsX

func (ddq *DecisionDefQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DecisionDefQuery) Limit

func (ddq *DecisionDefQuery) Limit(limit int) *DecisionDefQuery

Limit the number of records to be returned by this query.

func (*DecisionDefQuery) Offset

func (ddq *DecisionDefQuery) Offset(offset int) *DecisionDefQuery

Offset to start from.

func (*DecisionDefQuery) Only

func (ddq *DecisionDefQuery) Only(ctx context.Context) (*DecisionDef, error)

Only returns a single DecisionDef entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DecisionDef entity is found. Returns a *NotFoundError when no DecisionDef entities are found.

func (*DecisionDefQuery) OnlyID

func (ddq *DecisionDefQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DecisionDef ID in the query. Returns a *NotSingularError when more than one DecisionDef ID is found. Returns a *NotFoundError when no entities are found.

func (*DecisionDefQuery) OnlyIDX

func (ddq *DecisionDefQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DecisionDefQuery) OnlyX

func (ddq *DecisionDefQuery) OnlyX(ctx context.Context) *DecisionDef

OnlyX is like Only, but panics if an error occurs.

func (*DecisionDefQuery) Order

Order specifies how the records should be ordered.

func (*DecisionDefQuery) Paginate

func (dd *DecisionDefQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DecisionDefPaginateOption,
) (*DecisionDefConnection, error)

Paginate executes the query and returns a relay based cursor connection to DecisionDef.

func (*DecisionDefQuery) QueryReqDef

func (ddq *DecisionDefQuery) QueryReqDef() *DecisionReqDefQuery

QueryReqDef chains the current query on the "req_def" edge.

func (*DecisionDefQuery) Select

func (ddq *DecisionDefQuery) Select(fields ...string) *DecisionDefSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.DecisionDef.Query().
	Select(decisiondef.FieldCreatedBy).
	Scan(ctx, &v)

func (*DecisionDefQuery) Unique

func (ddq *DecisionDefQuery) Unique(unique bool) *DecisionDefQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DecisionDefQuery) Where

Where adds a new predicate for the DecisionDefQuery builder.

func (*DecisionDefQuery) WithReqDef

func (ddq *DecisionDefQuery) WithReqDef(opts ...func(*DecisionReqDefQuery)) *DecisionDefQuery

WithReqDef tells the query-builder to eager-load the nodes that are connected to the "req_def" edge. The optional arguments are used to configure the query builder of the edge.

type DecisionDefSelect

type DecisionDefSelect struct {
	*DecisionDefQuery
	// contains filtered or unexported fields
}

DecisionDefSelect is the builder for selecting fields of DecisionDef entities.

func (*DecisionDefSelect) Aggregate

func (dds *DecisionDefSelect) Aggregate(fns ...AggregateFunc) *DecisionDefSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DecisionDefSelect) Bool

func (s *DecisionDefSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) BoolX

func (s *DecisionDefSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DecisionDefSelect) Bools

func (s *DecisionDefSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) BoolsX

func (s *DecisionDefSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DecisionDefSelect) Float64

func (s *DecisionDefSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) Float64X

func (s *DecisionDefSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DecisionDefSelect) Float64s

func (s *DecisionDefSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) Float64sX

func (s *DecisionDefSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DecisionDefSelect) Int

func (s *DecisionDefSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) IntX

func (s *DecisionDefSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DecisionDefSelect) Ints

func (s *DecisionDefSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) IntsX

func (s *DecisionDefSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DecisionDefSelect) Scan

func (dds *DecisionDefSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DecisionDefSelect) ScanX

func (s *DecisionDefSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DecisionDefSelect) String

func (s *DecisionDefSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) StringX

func (s *DecisionDefSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DecisionDefSelect) Strings

func (s *DecisionDefSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DecisionDefSelect) StringsX

func (s *DecisionDefSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DecisionDefUpdate

type DecisionDefUpdate struct {
	// contains filtered or unexported fields
}

DecisionDefUpdate is the builder for updating DecisionDef entities.

func (*DecisionDefUpdate) AddRevision

func (ddu *DecisionDefUpdate) AddRevision(i int32) *DecisionDefUpdate

AddRevision adds i to the "revision" field.

func (*DecisionDefUpdate) AddUpdatedBy

func (ddu *DecisionDefUpdate) AddUpdatedBy(i int) *DecisionDefUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*DecisionDefUpdate) AddVersion

func (ddu *DecisionDefUpdate) AddVersion(i int32) *DecisionDefUpdate

AddVersion adds i to the "version" field.

func (*DecisionDefUpdate) ClearCategory

func (ddu *DecisionDefUpdate) ClearCategory() *DecisionDefUpdate

ClearCategory clears the value of the "category" field.

func (*DecisionDefUpdate) ClearName

func (ddu *DecisionDefUpdate) ClearName() *DecisionDefUpdate

ClearName clears the value of the "name" field.

func (*DecisionDefUpdate) ClearReqDef

func (ddu *DecisionDefUpdate) ClearReqDef() *DecisionDefUpdate

ClearReqDef clears the "req_def" edge to the DecisionReqDef entity.

func (*DecisionDefUpdate) ClearRevision

func (ddu *DecisionDefUpdate) ClearRevision() *DecisionDefUpdate

ClearRevision clears the value of the "revision" field.

func (*DecisionDefUpdate) ClearUpdatedAt

func (ddu *DecisionDefUpdate) ClearUpdatedAt() *DecisionDefUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionDefUpdate) ClearUpdatedBy

func (ddu *DecisionDefUpdate) ClearUpdatedBy() *DecisionDefUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionDefUpdate) ClearVersionTag

func (ddu *DecisionDefUpdate) ClearVersionTag() *DecisionDefUpdate

ClearVersionTag clears the value of the "version_tag" field.

func (*DecisionDefUpdate) Exec

func (ddu *DecisionDefUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DecisionDefUpdate) ExecX

func (ddu *DecisionDefUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefUpdate) Mutation

func (ddu *DecisionDefUpdate) Mutation() *DecisionDefMutation

Mutation returns the DecisionDefMutation object of the builder.

func (*DecisionDefUpdate) Save

func (ddu *DecisionDefUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DecisionDefUpdate) SaveX

func (ddu *DecisionDefUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DecisionDefUpdate) SetCategory

func (ddu *DecisionDefUpdate) SetCategory(s string) *DecisionDefUpdate

SetCategory sets the "category" field.

func (*DecisionDefUpdate) SetKey

func (ddu *DecisionDefUpdate) SetKey(s string) *DecisionDefUpdate

SetKey sets the "key" field.

func (*DecisionDefUpdate) SetName

func (ddu *DecisionDefUpdate) SetName(s string) *DecisionDefUpdate

SetName sets the "name" field.

func (*DecisionDefUpdate) SetNillableCategory

func (ddu *DecisionDefUpdate) SetNillableCategory(s *string) *DecisionDefUpdate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*DecisionDefUpdate) SetNillableName

func (ddu *DecisionDefUpdate) SetNillableName(s *string) *DecisionDefUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*DecisionDefUpdate) SetNillableRevision

func (ddu *DecisionDefUpdate) SetNillableRevision(i *int32) *DecisionDefUpdate

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*DecisionDefUpdate) SetNillableUpdatedAt

func (ddu *DecisionDefUpdate) SetNillableUpdatedAt(t *time.Time) *DecisionDefUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DecisionDefUpdate) SetNillableUpdatedBy

func (ddu *DecisionDefUpdate) SetNillableUpdatedBy(i *int) *DecisionDefUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DecisionDefUpdate) SetNillableVersionTag

func (ddu *DecisionDefUpdate) SetNillableVersionTag(s *string) *DecisionDefUpdate

SetNillableVersionTag sets the "version_tag" field if the given value is not nil.

func (*DecisionDefUpdate) SetReqDef

SetReqDef sets the "req_def" edge to the DecisionReqDef entity.

func (*DecisionDefUpdate) SetReqDefID

func (ddu *DecisionDefUpdate) SetReqDefID(i int) *DecisionDefUpdate

SetReqDefID sets the "req_def_id" field.

func (*DecisionDefUpdate) SetReqDefKey

func (ddu *DecisionDefUpdate) SetReqDefKey(s string) *DecisionDefUpdate

SetReqDefKey sets the "req_def_key" field.

func (*DecisionDefUpdate) SetRevision

func (ddu *DecisionDefUpdate) SetRevision(i int32) *DecisionDefUpdate

SetRevision sets the "revision" field.

func (*DecisionDefUpdate) SetUpdatedAt

func (ddu *DecisionDefUpdate) SetUpdatedAt(t time.Time) *DecisionDefUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DecisionDefUpdate) SetUpdatedBy

func (ddu *DecisionDefUpdate) SetUpdatedBy(i int) *DecisionDefUpdate

SetUpdatedBy sets the "updated_by" field.

func (*DecisionDefUpdate) SetVersion

func (ddu *DecisionDefUpdate) SetVersion(i int32) *DecisionDefUpdate

SetVersion sets the "version" field.

func (*DecisionDefUpdate) SetVersionTag

func (ddu *DecisionDefUpdate) SetVersionTag(s string) *DecisionDefUpdate

SetVersionTag sets the "version_tag" field.

func (*DecisionDefUpdate) Where

Where appends a list predicates to the DecisionDefUpdate builder.

type DecisionDefUpdateOne

type DecisionDefUpdateOne struct {
	// contains filtered or unexported fields
}

DecisionDefUpdateOne is the builder for updating a single DecisionDef entity.

func (*DecisionDefUpdateOne) AddRevision

func (dduo *DecisionDefUpdateOne) AddRevision(i int32) *DecisionDefUpdateOne

AddRevision adds i to the "revision" field.

func (*DecisionDefUpdateOne) AddUpdatedBy

func (dduo *DecisionDefUpdateOne) AddUpdatedBy(i int) *DecisionDefUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*DecisionDefUpdateOne) AddVersion

func (dduo *DecisionDefUpdateOne) AddVersion(i int32) *DecisionDefUpdateOne

AddVersion adds i to the "version" field.

func (*DecisionDefUpdateOne) ClearCategory

func (dduo *DecisionDefUpdateOne) ClearCategory() *DecisionDefUpdateOne

ClearCategory clears the value of the "category" field.

func (*DecisionDefUpdateOne) ClearName

func (dduo *DecisionDefUpdateOne) ClearName() *DecisionDefUpdateOne

ClearName clears the value of the "name" field.

func (*DecisionDefUpdateOne) ClearReqDef

func (dduo *DecisionDefUpdateOne) ClearReqDef() *DecisionDefUpdateOne

ClearReqDef clears the "req_def" edge to the DecisionReqDef entity.

func (*DecisionDefUpdateOne) ClearRevision

func (dduo *DecisionDefUpdateOne) ClearRevision() *DecisionDefUpdateOne

ClearRevision clears the value of the "revision" field.

func (*DecisionDefUpdateOne) ClearUpdatedAt

func (dduo *DecisionDefUpdateOne) ClearUpdatedAt() *DecisionDefUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionDefUpdateOne) ClearUpdatedBy

func (dduo *DecisionDefUpdateOne) ClearUpdatedBy() *DecisionDefUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionDefUpdateOne) ClearVersionTag

func (dduo *DecisionDefUpdateOne) ClearVersionTag() *DecisionDefUpdateOne

ClearVersionTag clears the value of the "version_tag" field.

func (*DecisionDefUpdateOne) Exec

func (dduo *DecisionDefUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DecisionDefUpdateOne) ExecX

func (dduo *DecisionDefUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefUpdateOne) Mutation

func (dduo *DecisionDefUpdateOne) Mutation() *DecisionDefMutation

Mutation returns the DecisionDefMutation object of the builder.

func (*DecisionDefUpdateOne) Save

Save executes the query and returns the updated DecisionDef entity.

func (*DecisionDefUpdateOne) SaveX

func (dduo *DecisionDefUpdateOne) SaveX(ctx context.Context) *DecisionDef

SaveX is like Save, but panics if an error occurs.

func (*DecisionDefUpdateOne) Select

func (dduo *DecisionDefUpdateOne) Select(field string, fields ...string) *DecisionDefUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DecisionDefUpdateOne) SetCategory

func (dduo *DecisionDefUpdateOne) SetCategory(s string) *DecisionDefUpdateOne

SetCategory sets the "category" field.

func (*DecisionDefUpdateOne) SetKey

SetKey sets the "key" field.

func (*DecisionDefUpdateOne) SetName

SetName sets the "name" field.

func (*DecisionDefUpdateOne) SetNillableCategory

func (dduo *DecisionDefUpdateOne) SetNillableCategory(s *string) *DecisionDefUpdateOne

SetNillableCategory sets the "category" field if the given value is not nil.

func (*DecisionDefUpdateOne) SetNillableName

func (dduo *DecisionDefUpdateOne) SetNillableName(s *string) *DecisionDefUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*DecisionDefUpdateOne) SetNillableRevision

func (dduo *DecisionDefUpdateOne) SetNillableRevision(i *int32) *DecisionDefUpdateOne

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*DecisionDefUpdateOne) SetNillableUpdatedAt

func (dduo *DecisionDefUpdateOne) SetNillableUpdatedAt(t *time.Time) *DecisionDefUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DecisionDefUpdateOne) SetNillableUpdatedBy

func (dduo *DecisionDefUpdateOne) SetNillableUpdatedBy(i *int) *DecisionDefUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DecisionDefUpdateOne) SetNillableVersionTag

func (dduo *DecisionDefUpdateOne) SetNillableVersionTag(s *string) *DecisionDefUpdateOne

SetNillableVersionTag sets the "version_tag" field if the given value is not nil.

func (*DecisionDefUpdateOne) SetReqDef

SetReqDef sets the "req_def" edge to the DecisionReqDef entity.

func (*DecisionDefUpdateOne) SetReqDefID

func (dduo *DecisionDefUpdateOne) SetReqDefID(i int) *DecisionDefUpdateOne

SetReqDefID sets the "req_def_id" field.

func (*DecisionDefUpdateOne) SetReqDefKey

func (dduo *DecisionDefUpdateOne) SetReqDefKey(s string) *DecisionDefUpdateOne

SetReqDefKey sets the "req_def_key" field.

func (*DecisionDefUpdateOne) SetRevision

func (dduo *DecisionDefUpdateOne) SetRevision(i int32) *DecisionDefUpdateOne

SetRevision sets the "revision" field.

func (*DecisionDefUpdateOne) SetUpdatedAt

func (dduo *DecisionDefUpdateOne) SetUpdatedAt(t time.Time) *DecisionDefUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*DecisionDefUpdateOne) SetUpdatedBy

func (dduo *DecisionDefUpdateOne) SetUpdatedBy(i int) *DecisionDefUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*DecisionDefUpdateOne) SetVersion

func (dduo *DecisionDefUpdateOne) SetVersion(i int32) *DecisionDefUpdateOne

SetVersion sets the "version" field.

func (*DecisionDefUpdateOne) SetVersionTag

func (dduo *DecisionDefUpdateOne) SetVersionTag(s string) *DecisionDefUpdateOne

SetVersionTag sets the "version_tag" field.

func (*DecisionDefUpdateOne) Where

Where appends a list predicates to the DecisionDefUpdate builder.

type DecisionDefUpsert

type DecisionDefUpsert struct {
	*sql.UpdateSet
}

DecisionDefUpsert is the "OnConflict" setter.

func (*DecisionDefUpsert) AddRevision

func (u *DecisionDefUpsert) AddRevision(v int32) *DecisionDefUpsert

AddRevision adds v to the "revision" field.

func (*DecisionDefUpsert) AddUpdatedBy

func (u *DecisionDefUpsert) AddUpdatedBy(v int) *DecisionDefUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*DecisionDefUpsert) AddVersion

func (u *DecisionDefUpsert) AddVersion(v int32) *DecisionDefUpsert

AddVersion adds v to the "version" field.

func (*DecisionDefUpsert) ClearCategory

func (u *DecisionDefUpsert) ClearCategory() *DecisionDefUpsert

ClearCategory clears the value of the "category" field.

func (*DecisionDefUpsert) ClearName

func (u *DecisionDefUpsert) ClearName() *DecisionDefUpsert

ClearName clears the value of the "name" field.

func (*DecisionDefUpsert) ClearRevision

func (u *DecisionDefUpsert) ClearRevision() *DecisionDefUpsert

ClearRevision clears the value of the "revision" field.

func (*DecisionDefUpsert) ClearUpdatedAt

func (u *DecisionDefUpsert) ClearUpdatedAt() *DecisionDefUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionDefUpsert) ClearUpdatedBy

func (u *DecisionDefUpsert) ClearUpdatedBy() *DecisionDefUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionDefUpsert) ClearVersionTag

func (u *DecisionDefUpsert) ClearVersionTag() *DecisionDefUpsert

ClearVersionTag clears the value of the "version_tag" field.

func (*DecisionDefUpsert) SetCategory

func (u *DecisionDefUpsert) SetCategory(v string) *DecisionDefUpsert

SetCategory sets the "category" field.

func (*DecisionDefUpsert) SetKey

SetKey sets the "key" field.

func (*DecisionDefUpsert) SetName

SetName sets the "name" field.

func (*DecisionDefUpsert) SetReqDefID

func (u *DecisionDefUpsert) SetReqDefID(v int) *DecisionDefUpsert

SetReqDefID sets the "req_def_id" field.

func (*DecisionDefUpsert) SetReqDefKey

func (u *DecisionDefUpsert) SetReqDefKey(v string) *DecisionDefUpsert

SetReqDefKey sets the "req_def_key" field.

func (*DecisionDefUpsert) SetRevision

func (u *DecisionDefUpsert) SetRevision(v int32) *DecisionDefUpsert

SetRevision sets the "revision" field.

func (*DecisionDefUpsert) SetUpdatedAt

func (u *DecisionDefUpsert) SetUpdatedAt(v time.Time) *DecisionDefUpsert

SetUpdatedAt sets the "updated_at" field.

func (*DecisionDefUpsert) SetUpdatedBy

func (u *DecisionDefUpsert) SetUpdatedBy(v int) *DecisionDefUpsert

SetUpdatedBy sets the "updated_by" field.

func (*DecisionDefUpsert) SetVersion

func (u *DecisionDefUpsert) SetVersion(v int32) *DecisionDefUpsert

SetVersion sets the "version" field.

func (*DecisionDefUpsert) SetVersionTag

func (u *DecisionDefUpsert) SetVersionTag(v string) *DecisionDefUpsert

SetVersionTag sets the "version_tag" field.

func (*DecisionDefUpsert) UpdateCategory

func (u *DecisionDefUpsert) UpdateCategory() *DecisionDefUpsert

UpdateCategory sets the "category" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateKey

func (u *DecisionDefUpsert) UpdateKey() *DecisionDefUpsert

UpdateKey sets the "key" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateName

func (u *DecisionDefUpsert) UpdateName() *DecisionDefUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateReqDefID

func (u *DecisionDefUpsert) UpdateReqDefID() *DecisionDefUpsert

UpdateReqDefID sets the "req_def_id" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateReqDefKey

func (u *DecisionDefUpsert) UpdateReqDefKey() *DecisionDefUpsert

UpdateReqDefKey sets the "req_def_key" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateRevision

func (u *DecisionDefUpsert) UpdateRevision() *DecisionDefUpsert

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateUpdatedAt

func (u *DecisionDefUpsert) UpdateUpdatedAt() *DecisionDefUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateUpdatedBy

func (u *DecisionDefUpsert) UpdateUpdatedBy() *DecisionDefUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateVersion

func (u *DecisionDefUpsert) UpdateVersion() *DecisionDefUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

func (*DecisionDefUpsert) UpdateVersionTag

func (u *DecisionDefUpsert) UpdateVersionTag() *DecisionDefUpsert

UpdateVersionTag sets the "version_tag" field to the value that was provided on create.

type DecisionDefUpsertBulk

type DecisionDefUpsertBulk struct {
	// contains filtered or unexported fields
}

DecisionDefUpsertBulk is the builder for "upsert"-ing a bulk of DecisionDef nodes.

func (*DecisionDefUpsertBulk) AddRevision

AddRevision adds v to the "revision" field.

func (*DecisionDefUpsertBulk) AddUpdatedBy

func (u *DecisionDefUpsertBulk) AddUpdatedBy(v int) *DecisionDefUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*DecisionDefUpsertBulk) AddVersion

AddVersion adds v to the "version" field.

func (*DecisionDefUpsertBulk) ClearCategory

func (u *DecisionDefUpsertBulk) ClearCategory() *DecisionDefUpsertBulk

ClearCategory clears the value of the "category" field.

func (*DecisionDefUpsertBulk) ClearName

ClearName clears the value of the "name" field.

func (*DecisionDefUpsertBulk) ClearRevision

func (u *DecisionDefUpsertBulk) ClearRevision() *DecisionDefUpsertBulk

ClearRevision clears the value of the "revision" field.

func (*DecisionDefUpsertBulk) ClearUpdatedAt

func (u *DecisionDefUpsertBulk) ClearUpdatedAt() *DecisionDefUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionDefUpsertBulk) ClearUpdatedBy

func (u *DecisionDefUpsertBulk) ClearUpdatedBy() *DecisionDefUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionDefUpsertBulk) ClearVersionTag

func (u *DecisionDefUpsertBulk) ClearVersionTag() *DecisionDefUpsertBulk

ClearVersionTag clears the value of the "version_tag" field.

func (*DecisionDefUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DecisionDefUpsertBulk) Exec

Exec executes the query.

func (*DecisionDefUpsertBulk) ExecX

func (u *DecisionDefUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DecisionDef.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DecisionDefUpsertBulk) SetCategory

SetCategory sets the "category" field.

func (*DecisionDefUpsertBulk) SetKey

SetKey sets the "key" field.

func (*DecisionDefUpsertBulk) SetName

SetName sets the "name" field.

func (*DecisionDefUpsertBulk) SetReqDefID

func (u *DecisionDefUpsertBulk) SetReqDefID(v int) *DecisionDefUpsertBulk

SetReqDefID sets the "req_def_id" field.

func (*DecisionDefUpsertBulk) SetReqDefKey

SetReqDefKey sets the "req_def_key" field.

func (*DecisionDefUpsertBulk) SetRevision

SetRevision sets the "revision" field.

func (*DecisionDefUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DecisionDefUpsertBulk) SetUpdatedBy

func (u *DecisionDefUpsertBulk) SetUpdatedBy(v int) *DecisionDefUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*DecisionDefUpsertBulk) SetVersion

SetVersion sets the "version" field.

func (*DecisionDefUpsertBulk) SetVersionTag

func (u *DecisionDefUpsertBulk) SetVersionTag(v string) *DecisionDefUpsertBulk

SetVersionTag sets the "version_tag" field.

func (*DecisionDefUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DecisionDefCreateBulk.OnConflict documentation for more info.

func (*DecisionDefUpsertBulk) UpdateCategory

func (u *DecisionDefUpsertBulk) UpdateCategory() *DecisionDefUpsertBulk

UpdateCategory sets the "category" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateNewValues

func (u *DecisionDefUpsertBulk) UpdateNewValues() *DecisionDefUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DecisionDef.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(decisiondef.FieldID)
		}),
	).
	Exec(ctx)

func (*DecisionDefUpsertBulk) UpdateReqDefID

func (u *DecisionDefUpsertBulk) UpdateReqDefID() *DecisionDefUpsertBulk

UpdateReqDefID sets the "req_def_id" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateReqDefKey

func (u *DecisionDefUpsertBulk) UpdateReqDefKey() *DecisionDefUpsertBulk

UpdateReqDefKey sets the "req_def_key" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateRevision

func (u *DecisionDefUpsertBulk) UpdateRevision() *DecisionDefUpsertBulk

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateUpdatedAt

func (u *DecisionDefUpsertBulk) UpdateUpdatedAt() *DecisionDefUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateUpdatedBy

func (u *DecisionDefUpsertBulk) UpdateUpdatedBy() *DecisionDefUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateVersion

func (u *DecisionDefUpsertBulk) UpdateVersion() *DecisionDefUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

func (*DecisionDefUpsertBulk) UpdateVersionTag

func (u *DecisionDefUpsertBulk) UpdateVersionTag() *DecisionDefUpsertBulk

UpdateVersionTag sets the "version_tag" field to the value that was provided on create.

type DecisionDefUpsertOne

type DecisionDefUpsertOne struct {
	// contains filtered or unexported fields
}

DecisionDefUpsertOne is the builder for "upsert"-ing

one DecisionDef node.

func (*DecisionDefUpsertOne) AddRevision

func (u *DecisionDefUpsertOne) AddRevision(v int32) *DecisionDefUpsertOne

AddRevision adds v to the "revision" field.

func (*DecisionDefUpsertOne) AddUpdatedBy

func (u *DecisionDefUpsertOne) AddUpdatedBy(v int) *DecisionDefUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*DecisionDefUpsertOne) AddVersion

AddVersion adds v to the "version" field.

func (*DecisionDefUpsertOne) ClearCategory

func (u *DecisionDefUpsertOne) ClearCategory() *DecisionDefUpsertOne

ClearCategory clears the value of the "category" field.

func (*DecisionDefUpsertOne) ClearName

ClearName clears the value of the "name" field.

func (*DecisionDefUpsertOne) ClearRevision

func (u *DecisionDefUpsertOne) ClearRevision() *DecisionDefUpsertOne

ClearRevision clears the value of the "revision" field.

func (*DecisionDefUpsertOne) ClearUpdatedAt

func (u *DecisionDefUpsertOne) ClearUpdatedAt() *DecisionDefUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionDefUpsertOne) ClearUpdatedBy

func (u *DecisionDefUpsertOne) ClearUpdatedBy() *DecisionDefUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionDefUpsertOne) ClearVersionTag

func (u *DecisionDefUpsertOne) ClearVersionTag() *DecisionDefUpsertOne

ClearVersionTag clears the value of the "version_tag" field.

func (*DecisionDefUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DecisionDefUpsertOne) Exec

Exec executes the query.

func (*DecisionDefUpsertOne) ExecX

func (u *DecisionDefUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionDefUpsertOne) ID

func (u *DecisionDefUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DecisionDefUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DecisionDefUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DecisionDef.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DecisionDefUpsertOne) SetCategory

SetCategory sets the "category" field.

func (*DecisionDefUpsertOne) SetKey

SetKey sets the "key" field.

func (*DecisionDefUpsertOne) SetName

SetName sets the "name" field.

func (*DecisionDefUpsertOne) SetReqDefID

func (u *DecisionDefUpsertOne) SetReqDefID(v int) *DecisionDefUpsertOne

SetReqDefID sets the "req_def_id" field.

func (*DecisionDefUpsertOne) SetReqDefKey

func (u *DecisionDefUpsertOne) SetReqDefKey(v string) *DecisionDefUpsertOne

SetReqDefKey sets the "req_def_key" field.

func (*DecisionDefUpsertOne) SetRevision

func (u *DecisionDefUpsertOne) SetRevision(v int32) *DecisionDefUpsertOne

SetRevision sets the "revision" field.

func (*DecisionDefUpsertOne) SetUpdatedAt

func (u *DecisionDefUpsertOne) SetUpdatedAt(v time.Time) *DecisionDefUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*DecisionDefUpsertOne) SetUpdatedBy

func (u *DecisionDefUpsertOne) SetUpdatedBy(v int) *DecisionDefUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*DecisionDefUpsertOne) SetVersion

SetVersion sets the "version" field.

func (*DecisionDefUpsertOne) SetVersionTag

func (u *DecisionDefUpsertOne) SetVersionTag(v string) *DecisionDefUpsertOne

SetVersionTag sets the "version_tag" field.

func (*DecisionDefUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DecisionDefCreate.OnConflict documentation for more info.

func (*DecisionDefUpsertOne) UpdateCategory

func (u *DecisionDefUpsertOne) UpdateCategory() *DecisionDefUpsertOne

UpdateCategory sets the "category" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateName

func (u *DecisionDefUpsertOne) UpdateName() *DecisionDefUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateNewValues

func (u *DecisionDefUpsertOne) UpdateNewValues() *DecisionDefUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DecisionDef.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(decisiondef.FieldID)
		}),
	).
	Exec(ctx)

func (*DecisionDefUpsertOne) UpdateReqDefID

func (u *DecisionDefUpsertOne) UpdateReqDefID() *DecisionDefUpsertOne

UpdateReqDefID sets the "req_def_id" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateReqDefKey

func (u *DecisionDefUpsertOne) UpdateReqDefKey() *DecisionDefUpsertOne

UpdateReqDefKey sets the "req_def_key" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateRevision

func (u *DecisionDefUpsertOne) UpdateRevision() *DecisionDefUpsertOne

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateUpdatedAt

func (u *DecisionDefUpsertOne) UpdateUpdatedAt() *DecisionDefUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateUpdatedBy

func (u *DecisionDefUpsertOne) UpdateUpdatedBy() *DecisionDefUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateVersion

func (u *DecisionDefUpsertOne) UpdateVersion() *DecisionDefUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

func (*DecisionDefUpsertOne) UpdateVersionTag

func (u *DecisionDefUpsertOne) UpdateVersionTag() *DecisionDefUpsertOne

UpdateVersionTag sets the "version_tag" field to the value that was provided on create.

type DecisionDefWhereInput

type DecisionDefWhereInput struct {
	Predicates []predicate.DecisionDef  `json:"-"`
	Not        *DecisionDefWhereInput   `json:"not,omitempty"`
	Or         []*DecisionDefWhereInput `json:"or,omitempty"`
	And        []*DecisionDefWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "deployment_id" field predicates.
	DeploymentID      *int  `json:"deploymentID,omitempty"`
	DeploymentIDNEQ   *int  `json:"deploymentIDNEQ,omitempty"`
	DeploymentIDIn    []int `json:"deploymentIDIn,omitempty"`
	DeploymentIDNotIn []int `json:"deploymentIDNotIn,omitempty"`
	DeploymentIDGT    *int  `json:"deploymentIDGT,omitempty"`
	DeploymentIDGTE   *int  `json:"deploymentIDGTE,omitempty"`
	DeploymentIDLT    *int  `json:"deploymentIDLT,omitempty"`
	DeploymentIDLTE   *int  `json:"deploymentIDLTE,omitempty"`

	// "app_id" field predicates.
	AppID      *int  `json:"appID,omitempty"`
	AppIDNEQ   *int  `json:"appIDNEQ,omitempty"`
	AppIDIn    []int `json:"appIDIn,omitempty"`
	AppIDNotIn []int `json:"appIDNotIn,omitempty"`
	AppIDGT    *int  `json:"appIDGT,omitempty"`
	AppIDGTE   *int  `json:"appIDGTE,omitempty"`
	AppIDLT    *int  `json:"appIDLT,omitempty"`
	AppIDLTE   *int  `json:"appIDLTE,omitempty"`

	// "req_def_id" field predicates.
	ReqDefID      *int  `json:"reqDefID,omitempty"`
	ReqDefIDNEQ   *int  `json:"reqDefIDNEQ,omitempty"`
	ReqDefIDIn    []int `json:"reqDefIDIn,omitempty"`
	ReqDefIDNotIn []int `json:"reqDefIDNotIn,omitempty"`

	// "category" field predicates.
	Category             *string  `json:"category,omitempty"`
	CategoryNEQ          *string  `json:"categoryNEQ,omitempty"`
	CategoryIn           []string `json:"categoryIn,omitempty"`
	CategoryNotIn        []string `json:"categoryNotIn,omitempty"`
	CategoryGT           *string  `json:"categoryGT,omitempty"`
	CategoryGTE          *string  `json:"categoryGTE,omitempty"`
	CategoryLT           *string  `json:"categoryLT,omitempty"`
	CategoryLTE          *string  `json:"categoryLTE,omitempty"`
	CategoryContains     *string  `json:"categoryContains,omitempty"`
	CategoryHasPrefix    *string  `json:"categoryHasPrefix,omitempty"`
	CategoryHasSuffix    *string  `json:"categoryHasSuffix,omitempty"`
	CategoryIsNil        bool     `json:"categoryIsNil,omitempty"`
	CategoryNotNil       bool     `json:"categoryNotNil,omitempty"`
	CategoryEqualFold    *string  `json:"categoryEqualFold,omitempty"`
	CategoryContainsFold *string  `json:"categoryContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "req_def_key" field predicates.
	ReqDefKey             *string  `json:"reqDefKey,omitempty"`
	ReqDefKeyNEQ          *string  `json:"reqDefKeyNEQ,omitempty"`
	ReqDefKeyIn           []string `json:"reqDefKeyIn,omitempty"`
	ReqDefKeyNotIn        []string `json:"reqDefKeyNotIn,omitempty"`
	ReqDefKeyGT           *string  `json:"reqDefKeyGT,omitempty"`
	ReqDefKeyGTE          *string  `json:"reqDefKeyGTE,omitempty"`
	ReqDefKeyLT           *string  `json:"reqDefKeyLT,omitempty"`
	ReqDefKeyLTE          *string  `json:"reqDefKeyLTE,omitempty"`
	ReqDefKeyContains     *string  `json:"reqDefKeyContains,omitempty"`
	ReqDefKeyHasPrefix    *string  `json:"reqDefKeyHasPrefix,omitempty"`
	ReqDefKeyHasSuffix    *string  `json:"reqDefKeyHasSuffix,omitempty"`
	ReqDefKeyEqualFold    *string  `json:"reqDefKeyEqualFold,omitempty"`
	ReqDefKeyContainsFold *string  `json:"reqDefKeyContainsFold,omitempty"`

	// "version" field predicates.
	Version      *int32  `json:"version,omitempty"`
	VersionNEQ   *int32  `json:"versionNEQ,omitempty"`
	VersionIn    []int32 `json:"versionIn,omitempty"`
	VersionNotIn []int32 `json:"versionNotIn,omitempty"`
	VersionGT    *int32  `json:"versionGT,omitempty"`
	VersionGTE   *int32  `json:"versionGTE,omitempty"`
	VersionLT    *int32  `json:"versionLT,omitempty"`
	VersionLTE   *int32  `json:"versionLTE,omitempty"`

	// "revision" field predicates.
	Revision       *int32  `json:"revision,omitempty"`
	RevisionNEQ    *int32  `json:"revisionNEQ,omitempty"`
	RevisionIn     []int32 `json:"revisionIn,omitempty"`
	RevisionNotIn  []int32 `json:"revisionNotIn,omitempty"`
	RevisionGT     *int32  `json:"revisionGT,omitempty"`
	RevisionGTE    *int32  `json:"revisionGTE,omitempty"`
	RevisionLT     *int32  `json:"revisionLT,omitempty"`
	RevisionLTE    *int32  `json:"revisionLTE,omitempty"`
	RevisionIsNil  bool    `json:"revisionIsNil,omitempty"`
	RevisionNotNil bool    `json:"revisionNotNil,omitempty"`

	// "version_tag" field predicates.
	VersionTag             *string  `json:"versionTag,omitempty"`
	VersionTagNEQ          *string  `json:"versionTagNEQ,omitempty"`
	VersionTagIn           []string `json:"versionTagIn,omitempty"`
	VersionTagNotIn        []string `json:"versionTagNotIn,omitempty"`
	VersionTagGT           *string  `json:"versionTagGT,omitempty"`
	VersionTagGTE          *string  `json:"versionTagGTE,omitempty"`
	VersionTagLT           *string  `json:"versionTagLT,omitempty"`
	VersionTagLTE          *string  `json:"versionTagLTE,omitempty"`
	VersionTagContains     *string  `json:"versionTagContains,omitempty"`
	VersionTagHasPrefix    *string  `json:"versionTagHasPrefix,omitempty"`
	VersionTagHasSuffix    *string  `json:"versionTagHasSuffix,omitempty"`
	VersionTagIsNil        bool     `json:"versionTagIsNil,omitempty"`
	VersionTagNotNil       bool     `json:"versionTagNotNil,omitempty"`
	VersionTagEqualFold    *string  `json:"versionTagEqualFold,omitempty"`
	VersionTagContainsFold *string  `json:"versionTagContainsFold,omitempty"`

	// "req_def" edge predicates.
	HasReqDef     *bool                       `json:"hasReqDef,omitempty"`
	HasReqDefWith []*DecisionReqDefWhereInput `json:"hasReqDefWith,omitempty"`
}

DecisionDefWhereInput represents a where input for filtering DecisionDef queries.

func (*DecisionDefWhereInput) AddPredicates

func (i *DecisionDefWhereInput) AddPredicates(predicates ...predicate.DecisionDef)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*DecisionDefWhereInput) Filter

Filter applies the DecisionDefWhereInput filter on the DecisionDefQuery builder.

func (*DecisionDefWhereInput) P

P returns a predicate for filtering decisiondefs. An error is returned if the input is empty or invalid.

type DecisionDefs

type DecisionDefs []*DecisionDef

DecisionDefs is a parsable slice of DecisionDef.

type DecisionReqDef

type DecisionReqDef struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 部署ID
	DeploymentID int `json:"deployment_id,omitempty"`
	// 所属应用ID
	AppID int `json:"app_id,omitempty"`
	// 分类
	Category string `json:"category,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// KEY
	Key string `json:"key,omitempty"`
	// 版本
	Version int32 `json:"version,omitempty"`
	// 小版本
	Revision int32 `json:"revision,omitempty"`
	// 流程文件key
	ResourceKey string `json:"resource_key,omitempty"`
	// 流程文件id
	ResourceID int `json:"resource_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DecisionReqDefQuery when eager-loading is set.
	Edges DecisionReqDefEdges `json:"edges"`
	// contains filtered or unexported fields
}

DecisionReqDef is the model entity for the DecisionReqDef schema.

func (*DecisionReqDef) DecisionDefs

func (drd *DecisionReqDef) DecisionDefs(ctx context.Context) (result []*DecisionDef, err error)

func (*DecisionReqDef) Deployment

func (drd *DecisionReqDef) Deployment(ctx context.Context) (*Deployment, error)

func (*DecisionReqDef) GlobalID

func (drd *DecisionReqDef) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given DecisionReqDef node.

func (*DecisionReqDef) IsNode

func (*DecisionReqDef) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*DecisionReqDef) NamedDecisionDefs

func (drd *DecisionReqDef) NamedDecisionDefs(name string) ([]*DecisionDef, error)

NamedDecisionDefs returns the DecisionDefs named value or an error if the edge was not loaded in eager-loading with this name.

func (*DecisionReqDef) QueryDecisionDefs

func (drd *DecisionReqDef) QueryDecisionDefs() *DecisionDefQuery

QueryDecisionDefs queries the "decision_defs" edge of the DecisionReqDef entity.

func (*DecisionReqDef) QueryDeployment

func (drd *DecisionReqDef) QueryDeployment() *DeploymentQuery

QueryDeployment queries the "deployment" edge of the DecisionReqDef entity.

func (*DecisionReqDef) String

func (drd *DecisionReqDef) String() string

String implements the fmt.Stringer.

func (*DecisionReqDef) ToEdge

ToEdge converts DecisionReqDef into DecisionReqDefEdge.

func (*DecisionReqDef) Unwrap

func (drd *DecisionReqDef) Unwrap() *DecisionReqDef

Unwrap unwraps the DecisionReqDef entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DecisionReqDef) Update

func (drd *DecisionReqDef) Update() *DecisionReqDefUpdateOne

Update returns a builder for updating this DecisionReqDef. Note that you need to call DecisionReqDef.Unwrap() before calling this method if this DecisionReqDef was returned from a transaction, and the transaction was committed or rolled back.

func (*DecisionReqDef) Value

func (drd *DecisionReqDef) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DecisionReqDef. This includes values selected through modifiers, order, etc.

type DecisionReqDefClient

type DecisionReqDefClient struct {
	// contains filtered or unexported fields
}

DecisionReqDefClient is a client for the DecisionReqDef schema.

func NewDecisionReqDefClient

func NewDecisionReqDefClient(c config) *DecisionReqDefClient

NewDecisionReqDefClient returns a client for the DecisionReqDef from the given config.

func (*DecisionReqDefClient) Create

Create returns a builder for creating a DecisionReqDef entity.

func (*DecisionReqDefClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DecisionReqDef entities.

func (*DecisionReqDefClient) Delete

Delete returns a delete builder for DecisionReqDef.

func (*DecisionReqDefClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DecisionReqDefClient) DeleteOneID

func (c *DecisionReqDefClient) DeleteOneID(id int) *DecisionReqDefDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DecisionReqDefClient) Get

Get returns a DecisionReqDef entity by its id.

func (*DecisionReqDefClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DecisionReqDefClient) Hooks

func (c *DecisionReqDefClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DecisionReqDefClient) Intercept

func (c *DecisionReqDefClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `decisionreqdef.Intercept(f(g(h())))`.

func (*DecisionReqDefClient) Interceptors

func (c *DecisionReqDefClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DecisionReqDefClient) Query

Query returns a query builder for DecisionReqDef.

func (*DecisionReqDefClient) QueryDecisionDefs

func (c *DecisionReqDefClient) QueryDecisionDefs(drd *DecisionReqDef) *DecisionDefQuery

QueryDecisionDefs queries the decision_defs edge of a DecisionReqDef.

func (*DecisionReqDefClient) QueryDeployment

func (c *DecisionReqDefClient) QueryDeployment(drd *DecisionReqDef) *DeploymentQuery

QueryDeployment queries the deployment edge of a DecisionReqDef.

func (*DecisionReqDefClient) Update

Update returns an update builder for DecisionReqDef.

func (*DecisionReqDefClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DecisionReqDefClient) UpdateOneID

func (c *DecisionReqDefClient) UpdateOneID(id int) *DecisionReqDefUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DecisionReqDefClient) Use

func (c *DecisionReqDefClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `decisionreqdef.Hooks(f(g(h())))`.

type DecisionReqDefConnection

type DecisionReqDefConnection struct {
	Edges      []*DecisionReqDefEdge `json:"edges"`
	PageInfo   PageInfo              `json:"pageInfo"`
	TotalCount int                   `json:"totalCount"`
}

DecisionReqDefConnection is the connection containing edges to DecisionReqDef.

type DecisionReqDefCreate

type DecisionReqDefCreate struct {
	// contains filtered or unexported fields
}

DecisionReqDefCreate is the builder for creating a DecisionReqDef entity.

func (*DecisionReqDefCreate) AddDecisionDefIDs

func (drdc *DecisionReqDefCreate) AddDecisionDefIDs(ids ...int) *DecisionReqDefCreate

AddDecisionDefIDs adds the "decision_defs" edge to the DecisionDef entity by IDs.

func (*DecisionReqDefCreate) AddDecisionDefs

func (drdc *DecisionReqDefCreate) AddDecisionDefs(d ...*DecisionDef) *DecisionReqDefCreate

AddDecisionDefs adds the "decision_defs" edges to the DecisionDef entity.

func (*DecisionReqDefCreate) Exec

func (drdc *DecisionReqDefCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DecisionReqDefCreate) ExecX

func (drdc *DecisionReqDefCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefCreate) Mutation

func (drdc *DecisionReqDefCreate) Mutation() *DecisionReqDefMutation

Mutation returns the DecisionReqDefMutation object of the builder.

func (*DecisionReqDefCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DecisionReqDef.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DecisionReqDefUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*DecisionReqDefCreate) OnConflictColumns

func (drdc *DecisionReqDefCreate) OnConflictColumns(columns ...string) *DecisionReqDefUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DecisionReqDef.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DecisionReqDefCreate) Save

Save creates the DecisionReqDef in the database.

func (*DecisionReqDefCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DecisionReqDefCreate) SetAppID

func (drdc *DecisionReqDefCreate) SetAppID(i int) *DecisionReqDefCreate

SetAppID sets the "app_id" field.

func (*DecisionReqDefCreate) SetCategory

func (drdc *DecisionReqDefCreate) SetCategory(s string) *DecisionReqDefCreate

SetCategory sets the "category" field.

func (*DecisionReqDefCreate) SetCreatedAt

func (drdc *DecisionReqDefCreate) SetCreatedAt(t time.Time) *DecisionReqDefCreate

SetCreatedAt sets the "created_at" field.

func (*DecisionReqDefCreate) SetCreatedBy

func (drdc *DecisionReqDefCreate) SetCreatedBy(i int) *DecisionReqDefCreate

SetCreatedBy sets the "created_by" field.

func (*DecisionReqDefCreate) SetDeployment

func (drdc *DecisionReqDefCreate) SetDeployment(d *Deployment) *DecisionReqDefCreate

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*DecisionReqDefCreate) SetDeploymentID

func (drdc *DecisionReqDefCreate) SetDeploymentID(i int) *DecisionReqDefCreate

SetDeploymentID sets the "deployment_id" field.

func (*DecisionReqDefCreate) SetID

SetID sets the "id" field.

func (*DecisionReqDefCreate) SetKey

SetKey sets the "key" field.

func (*DecisionReqDefCreate) SetName

SetName sets the "name" field.

func (*DecisionReqDefCreate) SetNillableCategory

func (drdc *DecisionReqDefCreate) SetNillableCategory(s *string) *DecisionReqDefCreate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableCreatedAt

func (drdc *DecisionReqDefCreate) SetNillableCreatedAt(t *time.Time) *DecisionReqDefCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableID

func (drdc *DecisionReqDefCreate) SetNillableID(i *int) *DecisionReqDefCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableName

func (drdc *DecisionReqDefCreate) SetNillableName(s *string) *DecisionReqDefCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableResourceID

func (drdc *DecisionReqDefCreate) SetNillableResourceID(i *int) *DecisionReqDefCreate

SetNillableResourceID sets the "resource_id" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableResourceKey

func (drdc *DecisionReqDefCreate) SetNillableResourceKey(s *string) *DecisionReqDefCreate

SetNillableResourceKey sets the "resource_key" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableRevision

func (drdc *DecisionReqDefCreate) SetNillableRevision(i *int32) *DecisionReqDefCreate

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableUpdatedAt

func (drdc *DecisionReqDefCreate) SetNillableUpdatedAt(t *time.Time) *DecisionReqDefCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DecisionReqDefCreate) SetNillableUpdatedBy

func (drdc *DecisionReqDefCreate) SetNillableUpdatedBy(i *int) *DecisionReqDefCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DecisionReqDefCreate) SetResourceID

func (drdc *DecisionReqDefCreate) SetResourceID(i int) *DecisionReqDefCreate

SetResourceID sets the "resource_id" field.

func (*DecisionReqDefCreate) SetResourceKey

func (drdc *DecisionReqDefCreate) SetResourceKey(s string) *DecisionReqDefCreate

SetResourceKey sets the "resource_key" field.

func (*DecisionReqDefCreate) SetRevision

func (drdc *DecisionReqDefCreate) SetRevision(i int32) *DecisionReqDefCreate

SetRevision sets the "revision" field.

func (*DecisionReqDefCreate) SetTenantID

func (drdc *DecisionReqDefCreate) SetTenantID(i int) *DecisionReqDefCreate

SetTenantID sets the "tenant_id" field.

func (*DecisionReqDefCreate) SetUpdatedAt

func (drdc *DecisionReqDefCreate) SetUpdatedAt(t time.Time) *DecisionReqDefCreate

SetUpdatedAt sets the "updated_at" field.

func (*DecisionReqDefCreate) SetUpdatedBy

func (drdc *DecisionReqDefCreate) SetUpdatedBy(i int) *DecisionReqDefCreate

SetUpdatedBy sets the "updated_by" field.

func (*DecisionReqDefCreate) SetVersion

func (drdc *DecisionReqDefCreate) SetVersion(i int32) *DecisionReqDefCreate

SetVersion sets the "version" field.

type DecisionReqDefCreateBulk

type DecisionReqDefCreateBulk struct {
	// contains filtered or unexported fields
}

DecisionReqDefCreateBulk is the builder for creating many DecisionReqDef entities in bulk.

func (*DecisionReqDefCreateBulk) Exec

func (drdcb *DecisionReqDefCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DecisionReqDefCreateBulk) ExecX

func (drdcb *DecisionReqDefCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DecisionReqDef.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DecisionReqDefUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*DecisionReqDefCreateBulk) OnConflictColumns

func (drdcb *DecisionReqDefCreateBulk) OnConflictColumns(columns ...string) *DecisionReqDefUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DecisionReqDef.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DecisionReqDefCreateBulk) Save

Save creates the DecisionReqDef entities in the database.

func (*DecisionReqDefCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DecisionReqDefDelete

type DecisionReqDefDelete struct {
	// contains filtered or unexported fields
}

DecisionReqDefDelete is the builder for deleting a DecisionReqDef entity.

func (*DecisionReqDefDelete) Exec

func (drdd *DecisionReqDefDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DecisionReqDefDelete) ExecX

func (drdd *DecisionReqDefDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefDelete) Where

Where appends a list predicates to the DecisionReqDefDelete builder.

type DecisionReqDefDeleteOne

type DecisionReqDefDeleteOne struct {
	// contains filtered or unexported fields
}

DecisionReqDefDeleteOne is the builder for deleting a single DecisionReqDef entity.

func (*DecisionReqDefDeleteOne) Exec

func (drddo *DecisionReqDefDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DecisionReqDefDeleteOne) ExecX

func (drddo *DecisionReqDefDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefDeleteOne) Where

Where appends a list predicates to the DecisionReqDefDelete builder.

type DecisionReqDefEdge

type DecisionReqDefEdge struct {
	Node   *DecisionReqDef `json:"node"`
	Cursor Cursor          `json:"cursor"`
}

DecisionReqDefEdge is the edge representation of DecisionReqDef.

type DecisionReqDefEdges

type DecisionReqDefEdges struct {
	// Deployment holds the value of the deployment edge.
	Deployment *Deployment `json:"deployment,omitempty"`
	// DecisionDefs holds the value of the decision_defs edge.
	DecisionDefs []*DecisionDef `json:"decision_defs,omitempty"`
	// contains filtered or unexported fields
}

DecisionReqDefEdges holds the relations/edges for other nodes in the graph.

func (DecisionReqDefEdges) DecisionDefsOrErr

func (e DecisionReqDefEdges) DecisionDefsOrErr() ([]*DecisionDef, error)

DecisionDefsOrErr returns the DecisionDefs value or an error if the edge was not loaded in eager-loading.

func (DecisionReqDefEdges) DeploymentOrErr

func (e DecisionReqDefEdges) DeploymentOrErr() (*Deployment, error)

DeploymentOrErr returns the Deployment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DecisionReqDefGroupBy

type DecisionReqDefGroupBy struct {
	// contains filtered or unexported fields
}

DecisionReqDefGroupBy is the group-by builder for DecisionReqDef entities.

func (*DecisionReqDefGroupBy) Aggregate

func (drdgb *DecisionReqDefGroupBy) Aggregate(fns ...AggregateFunc) *DecisionReqDefGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DecisionReqDefGroupBy) Bool

func (s *DecisionReqDefGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) BoolX

func (s *DecisionReqDefGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DecisionReqDefGroupBy) Bools

func (s *DecisionReqDefGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) BoolsX

func (s *DecisionReqDefGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DecisionReqDefGroupBy) Float64

func (s *DecisionReqDefGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) Float64X

func (s *DecisionReqDefGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DecisionReqDefGroupBy) Float64s

func (s *DecisionReqDefGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) Float64sX

func (s *DecisionReqDefGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DecisionReqDefGroupBy) Int

func (s *DecisionReqDefGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) IntX

func (s *DecisionReqDefGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DecisionReqDefGroupBy) Ints

func (s *DecisionReqDefGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) IntsX

func (s *DecisionReqDefGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DecisionReqDefGroupBy) Scan

func (drdgb *DecisionReqDefGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DecisionReqDefGroupBy) ScanX

func (s *DecisionReqDefGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DecisionReqDefGroupBy) String

func (s *DecisionReqDefGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) StringX

func (s *DecisionReqDefGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DecisionReqDefGroupBy) Strings

func (s *DecisionReqDefGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefGroupBy) StringsX

func (s *DecisionReqDefGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DecisionReqDefMutation

type DecisionReqDefMutation struct {
	// contains filtered or unexported fields
}

DecisionReqDefMutation represents an operation that mutates the DecisionReqDef nodes in the graph.

func (*DecisionReqDefMutation) AddAppID

func (m *DecisionReqDefMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*DecisionReqDefMutation) AddCreatedBy

func (m *DecisionReqDefMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*DecisionReqDefMutation) AddDecisionDefIDs

func (m *DecisionReqDefMutation) AddDecisionDefIDs(ids ...int)

AddDecisionDefIDs adds the "decision_defs" edge to the DecisionDef entity by ids.

func (*DecisionReqDefMutation) AddField

func (m *DecisionReqDefMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DecisionReqDefMutation) AddResourceID

func (m *DecisionReqDefMutation) AddResourceID(i int)

AddResourceID adds i to the "resource_id" field.

func (*DecisionReqDefMutation) AddRevision

func (m *DecisionReqDefMutation) AddRevision(i int32)

AddRevision adds i to the "revision" field.

func (*DecisionReqDefMutation) AddTenantID

func (m *DecisionReqDefMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*DecisionReqDefMutation) AddUpdatedBy

func (m *DecisionReqDefMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*DecisionReqDefMutation) AddVersion

func (m *DecisionReqDefMutation) AddVersion(i int32)

AddVersion adds i to the "version" field.

func (*DecisionReqDefMutation) AddedAppID

func (m *DecisionReqDefMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*DecisionReqDefMutation) AddedCreatedBy

func (m *DecisionReqDefMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*DecisionReqDefMutation) AddedEdges

func (m *DecisionReqDefMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DecisionReqDefMutation) AddedField

func (m *DecisionReqDefMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DecisionReqDefMutation) AddedFields

func (m *DecisionReqDefMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DecisionReqDefMutation) AddedIDs

func (m *DecisionReqDefMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DecisionReqDefMutation) AddedResourceID

func (m *DecisionReqDefMutation) AddedResourceID() (r int, exists bool)

AddedResourceID returns the value that was added to the "resource_id" field in this mutation.

func (*DecisionReqDefMutation) AddedRevision

func (m *DecisionReqDefMutation) AddedRevision() (r int32, exists bool)

AddedRevision returns the value that was added to the "revision" field in this mutation.

func (*DecisionReqDefMutation) AddedTenantID

func (m *DecisionReqDefMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*DecisionReqDefMutation) AddedUpdatedBy

func (m *DecisionReqDefMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*DecisionReqDefMutation) AddedVersion

func (m *DecisionReqDefMutation) AddedVersion() (r int32, exists bool)

AddedVersion returns the value that was added to the "version" field in this mutation.

func (*DecisionReqDefMutation) AppID

func (m *DecisionReqDefMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*DecisionReqDefMutation) Category

func (m *DecisionReqDefMutation) Category() (r string, exists bool)

Category returns the value of the "category" field in the mutation.

func (*DecisionReqDefMutation) CategoryCleared

func (m *DecisionReqDefMutation) CategoryCleared() bool

CategoryCleared returns if the "category" field was cleared in this mutation.

func (*DecisionReqDefMutation) ClearCategory

func (m *DecisionReqDefMutation) ClearCategory()

ClearCategory clears the value of the "category" field.

func (*DecisionReqDefMutation) ClearDecisionDefs

func (m *DecisionReqDefMutation) ClearDecisionDefs()

ClearDecisionDefs clears the "decision_defs" edge to the DecisionDef entity.

func (*DecisionReqDefMutation) ClearDeployment

func (m *DecisionReqDefMutation) ClearDeployment()

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*DecisionReqDefMutation) ClearEdge

func (m *DecisionReqDefMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DecisionReqDefMutation) ClearField

func (m *DecisionReqDefMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DecisionReqDefMutation) ClearName

func (m *DecisionReqDefMutation) ClearName()

ClearName clears the value of the "name" field.

func (*DecisionReqDefMutation) ClearResourceID

func (m *DecisionReqDefMutation) ClearResourceID()

ClearResourceID clears the value of the "resource_id" field.

func (*DecisionReqDefMutation) ClearResourceKey

func (m *DecisionReqDefMutation) ClearResourceKey()

ClearResourceKey clears the value of the "resource_key" field.

func (*DecisionReqDefMutation) ClearRevision

func (m *DecisionReqDefMutation) ClearRevision()

ClearRevision clears the value of the "revision" field.

func (*DecisionReqDefMutation) ClearUpdatedAt

func (m *DecisionReqDefMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionReqDefMutation) ClearUpdatedBy

func (m *DecisionReqDefMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionReqDefMutation) ClearedEdges

func (m *DecisionReqDefMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DecisionReqDefMutation) ClearedFields

func (m *DecisionReqDefMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DecisionReqDefMutation) Client

func (m DecisionReqDefMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DecisionReqDefMutation) CreatedAt

func (m *DecisionReqDefMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DecisionReqDefMutation) CreatedBy

func (m *DecisionReqDefMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*DecisionReqDefMutation) DecisionDefsCleared

func (m *DecisionReqDefMutation) DecisionDefsCleared() bool

DecisionDefsCleared reports if the "decision_defs" edge to the DecisionDef entity was cleared.

func (*DecisionReqDefMutation) DecisionDefsIDs

func (m *DecisionReqDefMutation) DecisionDefsIDs() (ids []int)

DecisionDefsIDs returns the "decision_defs" edge IDs in the mutation.

func (*DecisionReqDefMutation) DeploymentCleared

func (m *DecisionReqDefMutation) DeploymentCleared() bool

DeploymentCleared reports if the "deployment" edge to the Deployment entity was cleared.

func (*DecisionReqDefMutation) DeploymentID

func (m *DecisionReqDefMutation) DeploymentID() (r int, exists bool)

DeploymentID returns the value of the "deployment_id" field in the mutation.

func (*DecisionReqDefMutation) DeploymentIDs

func (m *DecisionReqDefMutation) DeploymentIDs() (ids []int)

DeploymentIDs returns the "deployment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeploymentID instead. It exists only for internal usage by the builders.

func (*DecisionReqDefMutation) EdgeCleared

func (m *DecisionReqDefMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DecisionReqDefMutation) Field

func (m *DecisionReqDefMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DecisionReqDefMutation) FieldCleared

func (m *DecisionReqDefMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DecisionReqDefMutation) Fields

func (m *DecisionReqDefMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DecisionReqDefMutation) ID

func (m *DecisionReqDefMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DecisionReqDefMutation) IDs

func (m *DecisionReqDefMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DecisionReqDefMutation) Key

func (m *DecisionReqDefMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*DecisionReqDefMutation) Name

func (m *DecisionReqDefMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*DecisionReqDefMutation) NameCleared

func (m *DecisionReqDefMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*DecisionReqDefMutation) OldAppID

func (m *DecisionReqDefMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldCategory

func (m *DecisionReqDefMutation) OldCategory(ctx context.Context) (v string, err error)

OldCategory returns the old "category" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldCreatedAt

func (m *DecisionReqDefMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldCreatedBy

func (m *DecisionReqDefMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldDeploymentID

func (m *DecisionReqDefMutation) OldDeploymentID(ctx context.Context) (v int, err error)

OldDeploymentID returns the old "deployment_id" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldField

func (m *DecisionReqDefMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DecisionReqDefMutation) OldKey

func (m *DecisionReqDefMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldName

func (m *DecisionReqDefMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldResourceID

func (m *DecisionReqDefMutation) OldResourceID(ctx context.Context) (v int, err error)

OldResourceID returns the old "resource_id" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldResourceKey

func (m *DecisionReqDefMutation) OldResourceKey(ctx context.Context) (v string, err error)

OldResourceKey returns the old "resource_key" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldRevision

func (m *DecisionReqDefMutation) OldRevision(ctx context.Context) (v int32, err error)

OldRevision returns the old "revision" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldTenantID

func (m *DecisionReqDefMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldUpdatedAt

func (m *DecisionReqDefMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldUpdatedBy

func (m *DecisionReqDefMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) OldVersion

func (m *DecisionReqDefMutation) OldVersion(ctx context.Context) (v int32, err error)

OldVersion returns the old "version" field's value of the DecisionReqDef entity. If the DecisionReqDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DecisionReqDefMutation) Op

func (m *DecisionReqDefMutation) Op() Op

Op returns the operation name.

func (*DecisionReqDefMutation) RemoveDecisionDefIDs

func (m *DecisionReqDefMutation) RemoveDecisionDefIDs(ids ...int)

RemoveDecisionDefIDs removes the "decision_defs" edge to the DecisionDef entity by IDs.

func (*DecisionReqDefMutation) RemovedDecisionDefsIDs

func (m *DecisionReqDefMutation) RemovedDecisionDefsIDs() (ids []int)

RemovedDecisionDefs returns the removed IDs of the "decision_defs" edge to the DecisionDef entity.

func (*DecisionReqDefMutation) RemovedEdges

func (m *DecisionReqDefMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DecisionReqDefMutation) RemovedIDs

func (m *DecisionReqDefMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DecisionReqDefMutation) ResetAppID

func (m *DecisionReqDefMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*DecisionReqDefMutation) ResetCategory

func (m *DecisionReqDefMutation) ResetCategory()

ResetCategory resets all changes to the "category" field.

func (*DecisionReqDefMutation) ResetCreatedAt

func (m *DecisionReqDefMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DecisionReqDefMutation) ResetCreatedBy

func (m *DecisionReqDefMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*DecisionReqDefMutation) ResetDecisionDefs

func (m *DecisionReqDefMutation) ResetDecisionDefs()

ResetDecisionDefs resets all changes to the "decision_defs" edge.

func (*DecisionReqDefMutation) ResetDeployment

func (m *DecisionReqDefMutation) ResetDeployment()

ResetDeployment resets all changes to the "deployment" edge.

func (*DecisionReqDefMutation) ResetDeploymentID

func (m *DecisionReqDefMutation) ResetDeploymentID()

ResetDeploymentID resets all changes to the "deployment_id" field.

func (*DecisionReqDefMutation) ResetEdge

func (m *DecisionReqDefMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DecisionReqDefMutation) ResetField

func (m *DecisionReqDefMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DecisionReqDefMutation) ResetKey

func (m *DecisionReqDefMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*DecisionReqDefMutation) ResetName

func (m *DecisionReqDefMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*DecisionReqDefMutation) ResetResourceID

func (m *DecisionReqDefMutation) ResetResourceID()

ResetResourceID resets all changes to the "resource_id" field.

func (*DecisionReqDefMutation) ResetResourceKey

func (m *DecisionReqDefMutation) ResetResourceKey()

ResetResourceKey resets all changes to the "resource_key" field.

func (*DecisionReqDefMutation) ResetRevision

func (m *DecisionReqDefMutation) ResetRevision()

ResetRevision resets all changes to the "revision" field.

func (*DecisionReqDefMutation) ResetTenantID

func (m *DecisionReqDefMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*DecisionReqDefMutation) ResetUpdatedAt

func (m *DecisionReqDefMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DecisionReqDefMutation) ResetUpdatedBy

func (m *DecisionReqDefMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*DecisionReqDefMutation) ResetVersion

func (m *DecisionReqDefMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*DecisionReqDefMutation) ResourceID

func (m *DecisionReqDefMutation) ResourceID() (r int, exists bool)

ResourceID returns the value of the "resource_id" field in the mutation.

func (*DecisionReqDefMutation) ResourceIDCleared

func (m *DecisionReqDefMutation) ResourceIDCleared() bool

ResourceIDCleared returns if the "resource_id" field was cleared in this mutation.

func (*DecisionReqDefMutation) ResourceKey

func (m *DecisionReqDefMutation) ResourceKey() (r string, exists bool)

ResourceKey returns the value of the "resource_key" field in the mutation.

func (*DecisionReqDefMutation) ResourceKeyCleared

func (m *DecisionReqDefMutation) ResourceKeyCleared() bool

ResourceKeyCleared returns if the "resource_key" field was cleared in this mutation.

func (*DecisionReqDefMutation) Revision

func (m *DecisionReqDefMutation) Revision() (r int32, exists bool)

Revision returns the value of the "revision" field in the mutation.

func (*DecisionReqDefMutation) RevisionCleared

func (m *DecisionReqDefMutation) RevisionCleared() bool

RevisionCleared returns if the "revision" field was cleared in this mutation.

func (*DecisionReqDefMutation) SetAppID

func (m *DecisionReqDefMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*DecisionReqDefMutation) SetCategory

func (m *DecisionReqDefMutation) SetCategory(s string)

SetCategory sets the "category" field.

func (*DecisionReqDefMutation) SetCreatedAt

func (m *DecisionReqDefMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DecisionReqDefMutation) SetCreatedBy

func (m *DecisionReqDefMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*DecisionReqDefMutation) SetDeploymentID

func (m *DecisionReqDefMutation) SetDeploymentID(i int)

SetDeploymentID sets the "deployment_id" field.

func (*DecisionReqDefMutation) SetField

func (m *DecisionReqDefMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DecisionReqDefMutation) SetID

func (m *DecisionReqDefMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DecisionReqDef entities.

func (*DecisionReqDefMutation) SetKey

func (m *DecisionReqDefMutation) SetKey(s string)

SetKey sets the "key" field.

func (*DecisionReqDefMutation) SetName

func (m *DecisionReqDefMutation) SetName(s string)

SetName sets the "name" field.

func (*DecisionReqDefMutation) SetOp

func (m *DecisionReqDefMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DecisionReqDefMutation) SetResourceID

func (m *DecisionReqDefMutation) SetResourceID(i int)

SetResourceID sets the "resource_id" field.

func (*DecisionReqDefMutation) SetResourceKey

func (m *DecisionReqDefMutation) SetResourceKey(s string)

SetResourceKey sets the "resource_key" field.

func (*DecisionReqDefMutation) SetRevision

func (m *DecisionReqDefMutation) SetRevision(i int32)

SetRevision sets the "revision" field.

func (*DecisionReqDefMutation) SetTenantID

func (m *DecisionReqDefMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*DecisionReqDefMutation) SetUpdatedAt

func (m *DecisionReqDefMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DecisionReqDefMutation) SetUpdatedBy

func (m *DecisionReqDefMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*DecisionReqDefMutation) SetVersion

func (m *DecisionReqDefMutation) SetVersion(i int32)

SetVersion sets the "version" field.

func (*DecisionReqDefMutation) TenantID

func (m *DecisionReqDefMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (DecisionReqDefMutation) Tx

func (m DecisionReqDefMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DecisionReqDefMutation) Type

func (m *DecisionReqDefMutation) Type() string

Type returns the node type of this mutation (DecisionReqDef).

func (*DecisionReqDefMutation) UpdatedAt

func (m *DecisionReqDefMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DecisionReqDefMutation) UpdatedAtCleared

func (m *DecisionReqDefMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*DecisionReqDefMutation) UpdatedBy

func (m *DecisionReqDefMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*DecisionReqDefMutation) UpdatedByCleared

func (m *DecisionReqDefMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*DecisionReqDefMutation) Version

func (m *DecisionReqDefMutation) Version() (r int32, exists bool)

Version returns the value of the "version" field in the mutation.

func (*DecisionReqDefMutation) Where

Where appends a list predicates to the DecisionReqDefMutation builder.

func (*DecisionReqDefMutation) WhereP

func (m *DecisionReqDefMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DecisionReqDefMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DecisionReqDefOrder

type DecisionReqDefOrder struct {
	Direction OrderDirection            `json:"direction"`
	Field     *DecisionReqDefOrderField `json:"field"`
}

DecisionReqDefOrder defines the ordering of DecisionReqDef.

type DecisionReqDefOrderField

type DecisionReqDefOrderField struct {
	// Value extracts the ordering value from the given DecisionReqDef.
	Value func(*DecisionReqDef) (ent.Value, error)
	// contains filtered or unexported fields
}

DecisionReqDefOrderField defines the ordering field of DecisionReqDef.

func (DecisionReqDefOrderField) MarshalGQL

func (f DecisionReqDefOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (DecisionReqDefOrderField) String

func (f DecisionReqDefOrderField) String() string

String implement fmt.Stringer interface.

func (*DecisionReqDefOrderField) UnmarshalGQL

func (f *DecisionReqDefOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type DecisionReqDefPaginateOption

type DecisionReqDefPaginateOption func(*decisionreqdefPager) error

DecisionReqDefPaginateOption enables pagination customization.

func WithDecisionReqDefFilter

func WithDecisionReqDefFilter(filter func(*DecisionReqDefQuery) (*DecisionReqDefQuery, error)) DecisionReqDefPaginateOption

WithDecisionReqDefFilter configures pagination filter.

func WithDecisionReqDefOrder

func WithDecisionReqDefOrder(order *DecisionReqDefOrder) DecisionReqDefPaginateOption

WithDecisionReqDefOrder configures pagination ordering.

type DecisionReqDefQuery

type DecisionReqDefQuery struct {
	// contains filtered or unexported fields
}

DecisionReqDefQuery is the builder for querying DecisionReqDef entities.

func (*DecisionReqDefQuery) Aggregate

func (drdq *DecisionReqDefQuery) Aggregate(fns ...AggregateFunc) *DecisionReqDefSelect

Aggregate returns a DecisionReqDefSelect configured with the given aggregations.

func (*DecisionReqDefQuery) All

All executes the query and returns a list of DecisionReqDefs.

func (*DecisionReqDefQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DecisionReqDefQuery) Clone

Clone returns a duplicate of the DecisionReqDefQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DecisionReqDefQuery) CollectFields

func (drd *DecisionReqDefQuery) CollectFields(ctx context.Context, satisfies ...string) (*DecisionReqDefQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*DecisionReqDefQuery) Count

func (drdq *DecisionReqDefQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DecisionReqDefQuery) CountX

func (drdq *DecisionReqDefQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DecisionReqDefQuery) Exist

func (drdq *DecisionReqDefQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DecisionReqDefQuery) ExistX

func (drdq *DecisionReqDefQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DecisionReqDefQuery) First

First returns the first DecisionReqDef entity from the query. Returns a *NotFoundError when no DecisionReqDef was found.

func (*DecisionReqDefQuery) FirstID

func (drdq *DecisionReqDefQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DecisionReqDef ID from the query. Returns a *NotFoundError when no DecisionReqDef ID was found.

func (*DecisionReqDefQuery) FirstIDX

func (drdq *DecisionReqDefQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DecisionReqDefQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DecisionReqDefQuery) GroupBy

func (drdq *DecisionReqDefQuery) GroupBy(field string, fields ...string) *DecisionReqDefGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DecisionReqDef.Query().
	GroupBy(decisionreqdef.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DecisionReqDefQuery) IDs

func (drdq *DecisionReqDefQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of DecisionReqDef IDs.

func (*DecisionReqDefQuery) IDsX

func (drdq *DecisionReqDefQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DecisionReqDefQuery) Limit

func (drdq *DecisionReqDefQuery) Limit(limit int) *DecisionReqDefQuery

Limit the number of records to be returned by this query.

func (*DecisionReqDefQuery) Offset

func (drdq *DecisionReqDefQuery) Offset(offset int) *DecisionReqDefQuery

Offset to start from.

func (*DecisionReqDefQuery) Only

Only returns a single DecisionReqDef entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DecisionReqDef entity is found. Returns a *NotFoundError when no DecisionReqDef entities are found.

func (*DecisionReqDefQuery) OnlyID

func (drdq *DecisionReqDefQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DecisionReqDef ID in the query. Returns a *NotSingularError when more than one DecisionReqDef ID is found. Returns a *NotFoundError when no entities are found.

func (*DecisionReqDefQuery) OnlyIDX

func (drdq *DecisionReqDefQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DecisionReqDefQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DecisionReqDefQuery) Order

Order specifies how the records should be ordered.

func (*DecisionReqDefQuery) Paginate

func (drd *DecisionReqDefQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DecisionReqDefPaginateOption,
) (*DecisionReqDefConnection, error)

Paginate executes the query and returns a relay based cursor connection to DecisionReqDef.

func (*DecisionReqDefQuery) QueryDecisionDefs

func (drdq *DecisionReqDefQuery) QueryDecisionDefs() *DecisionDefQuery

QueryDecisionDefs chains the current query on the "decision_defs" edge.

func (*DecisionReqDefQuery) QueryDeployment

func (drdq *DecisionReqDefQuery) QueryDeployment() *DeploymentQuery

QueryDeployment chains the current query on the "deployment" edge.

func (*DecisionReqDefQuery) Select

func (drdq *DecisionReqDefQuery) Select(fields ...string) *DecisionReqDefSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.DecisionReqDef.Query().
	Select(decisionreqdef.FieldCreatedBy).
	Scan(ctx, &v)

func (*DecisionReqDefQuery) Unique

func (drdq *DecisionReqDefQuery) Unique(unique bool) *DecisionReqDefQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DecisionReqDefQuery) Where

Where adds a new predicate for the DecisionReqDefQuery builder.

func (*DecisionReqDefQuery) WithDecisionDefs

func (drdq *DecisionReqDefQuery) WithDecisionDefs(opts ...func(*DecisionDefQuery)) *DecisionReqDefQuery

WithDecisionDefs tells the query-builder to eager-load the nodes that are connected to the "decision_defs" edge. The optional arguments are used to configure the query builder of the edge.

func (*DecisionReqDefQuery) WithDeployment

func (drdq *DecisionReqDefQuery) WithDeployment(opts ...func(*DeploymentQuery)) *DecisionReqDefQuery

WithDeployment tells the query-builder to eager-load the nodes that are connected to the "deployment" edge. The optional arguments are used to configure the query builder of the edge.

func (*DecisionReqDefQuery) WithNamedDecisionDefs

func (drdq *DecisionReqDefQuery) WithNamedDecisionDefs(name string, opts ...func(*DecisionDefQuery)) *DecisionReqDefQuery

WithNamedDecisionDefs tells the query-builder to eager-load the nodes that are connected to the "decision_defs" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type DecisionReqDefSelect

type DecisionReqDefSelect struct {
	*DecisionReqDefQuery
	// contains filtered or unexported fields
}

DecisionReqDefSelect is the builder for selecting fields of DecisionReqDef entities.

func (*DecisionReqDefSelect) Aggregate

func (drds *DecisionReqDefSelect) Aggregate(fns ...AggregateFunc) *DecisionReqDefSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DecisionReqDefSelect) Bool

func (s *DecisionReqDefSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) BoolX

func (s *DecisionReqDefSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DecisionReqDefSelect) Bools

func (s *DecisionReqDefSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) BoolsX

func (s *DecisionReqDefSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DecisionReqDefSelect) Float64

func (s *DecisionReqDefSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) Float64X

func (s *DecisionReqDefSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DecisionReqDefSelect) Float64s

func (s *DecisionReqDefSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) Float64sX

func (s *DecisionReqDefSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DecisionReqDefSelect) Int

func (s *DecisionReqDefSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) IntX

func (s *DecisionReqDefSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DecisionReqDefSelect) Ints

func (s *DecisionReqDefSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) IntsX

func (s *DecisionReqDefSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DecisionReqDefSelect) Scan

func (drds *DecisionReqDefSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DecisionReqDefSelect) ScanX

func (s *DecisionReqDefSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DecisionReqDefSelect) String

func (s *DecisionReqDefSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) StringX

func (s *DecisionReqDefSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DecisionReqDefSelect) Strings

func (s *DecisionReqDefSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DecisionReqDefSelect) StringsX

func (s *DecisionReqDefSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DecisionReqDefUpdate

type DecisionReqDefUpdate struct {
	// contains filtered or unexported fields
}

DecisionReqDefUpdate is the builder for updating DecisionReqDef entities.

func (*DecisionReqDefUpdate) AddDecisionDefIDs

func (drdu *DecisionReqDefUpdate) AddDecisionDefIDs(ids ...int) *DecisionReqDefUpdate

AddDecisionDefIDs adds the "decision_defs" edge to the DecisionDef entity by IDs.

func (*DecisionReqDefUpdate) AddDecisionDefs

func (drdu *DecisionReqDefUpdate) AddDecisionDefs(d ...*DecisionDef) *DecisionReqDefUpdate

AddDecisionDefs adds the "decision_defs" edges to the DecisionDef entity.

func (*DecisionReqDefUpdate) AddResourceID

func (drdu *DecisionReqDefUpdate) AddResourceID(i int) *DecisionReqDefUpdate

AddResourceID adds i to the "resource_id" field.

func (*DecisionReqDefUpdate) AddRevision

func (drdu *DecisionReqDefUpdate) AddRevision(i int32) *DecisionReqDefUpdate

AddRevision adds i to the "revision" field.

func (*DecisionReqDefUpdate) AddUpdatedBy

func (drdu *DecisionReqDefUpdate) AddUpdatedBy(i int) *DecisionReqDefUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*DecisionReqDefUpdate) AddVersion

func (drdu *DecisionReqDefUpdate) AddVersion(i int32) *DecisionReqDefUpdate

AddVersion adds i to the "version" field.

func (*DecisionReqDefUpdate) ClearCategory

func (drdu *DecisionReqDefUpdate) ClearCategory() *DecisionReqDefUpdate

ClearCategory clears the value of the "category" field.

func (*DecisionReqDefUpdate) ClearDecisionDefs

func (drdu *DecisionReqDefUpdate) ClearDecisionDefs() *DecisionReqDefUpdate

ClearDecisionDefs clears all "decision_defs" edges to the DecisionDef entity.

func (*DecisionReqDefUpdate) ClearName

func (drdu *DecisionReqDefUpdate) ClearName() *DecisionReqDefUpdate

ClearName clears the value of the "name" field.

func (*DecisionReqDefUpdate) ClearResourceID

func (drdu *DecisionReqDefUpdate) ClearResourceID() *DecisionReqDefUpdate

ClearResourceID clears the value of the "resource_id" field.

func (*DecisionReqDefUpdate) ClearResourceKey

func (drdu *DecisionReqDefUpdate) ClearResourceKey() *DecisionReqDefUpdate

ClearResourceKey clears the value of the "resource_key" field.

func (*DecisionReqDefUpdate) ClearRevision

func (drdu *DecisionReqDefUpdate) ClearRevision() *DecisionReqDefUpdate

ClearRevision clears the value of the "revision" field.

func (*DecisionReqDefUpdate) ClearUpdatedAt

func (drdu *DecisionReqDefUpdate) ClearUpdatedAt() *DecisionReqDefUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionReqDefUpdate) ClearUpdatedBy

func (drdu *DecisionReqDefUpdate) ClearUpdatedBy() *DecisionReqDefUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionReqDefUpdate) Exec

func (drdu *DecisionReqDefUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DecisionReqDefUpdate) ExecX

func (drdu *DecisionReqDefUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefUpdate) Mutation

func (drdu *DecisionReqDefUpdate) Mutation() *DecisionReqDefMutation

Mutation returns the DecisionReqDefMutation object of the builder.

func (*DecisionReqDefUpdate) RemoveDecisionDefIDs

func (drdu *DecisionReqDefUpdate) RemoveDecisionDefIDs(ids ...int) *DecisionReqDefUpdate

RemoveDecisionDefIDs removes the "decision_defs" edge to DecisionDef entities by IDs.

func (*DecisionReqDefUpdate) RemoveDecisionDefs

func (drdu *DecisionReqDefUpdate) RemoveDecisionDefs(d ...*DecisionDef) *DecisionReqDefUpdate

RemoveDecisionDefs removes "decision_defs" edges to DecisionDef entities.

func (*DecisionReqDefUpdate) Save

func (drdu *DecisionReqDefUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DecisionReqDefUpdate) SaveX

func (drdu *DecisionReqDefUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DecisionReqDefUpdate) SetCategory

func (drdu *DecisionReqDefUpdate) SetCategory(s string) *DecisionReqDefUpdate

SetCategory sets the "category" field.

func (*DecisionReqDefUpdate) SetKey

SetKey sets the "key" field.

func (*DecisionReqDefUpdate) SetName

SetName sets the "name" field.

func (*DecisionReqDefUpdate) SetNillableCategory

func (drdu *DecisionReqDefUpdate) SetNillableCategory(s *string) *DecisionReqDefUpdate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*DecisionReqDefUpdate) SetNillableName

func (drdu *DecisionReqDefUpdate) SetNillableName(s *string) *DecisionReqDefUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*DecisionReqDefUpdate) SetNillableResourceID

func (drdu *DecisionReqDefUpdate) SetNillableResourceID(i *int) *DecisionReqDefUpdate

SetNillableResourceID sets the "resource_id" field if the given value is not nil.

func (*DecisionReqDefUpdate) SetNillableResourceKey

func (drdu *DecisionReqDefUpdate) SetNillableResourceKey(s *string) *DecisionReqDefUpdate

SetNillableResourceKey sets the "resource_key" field if the given value is not nil.

func (*DecisionReqDefUpdate) SetNillableRevision

func (drdu *DecisionReqDefUpdate) SetNillableRevision(i *int32) *DecisionReqDefUpdate

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*DecisionReqDefUpdate) SetNillableUpdatedAt

func (drdu *DecisionReqDefUpdate) SetNillableUpdatedAt(t *time.Time) *DecisionReqDefUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DecisionReqDefUpdate) SetNillableUpdatedBy

func (drdu *DecisionReqDefUpdate) SetNillableUpdatedBy(i *int) *DecisionReqDefUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DecisionReqDefUpdate) SetResourceID

func (drdu *DecisionReqDefUpdate) SetResourceID(i int) *DecisionReqDefUpdate

SetResourceID sets the "resource_id" field.

func (*DecisionReqDefUpdate) SetResourceKey

func (drdu *DecisionReqDefUpdate) SetResourceKey(s string) *DecisionReqDefUpdate

SetResourceKey sets the "resource_key" field.

func (*DecisionReqDefUpdate) SetRevision

func (drdu *DecisionReqDefUpdate) SetRevision(i int32) *DecisionReqDefUpdate

SetRevision sets the "revision" field.

func (*DecisionReqDefUpdate) SetUpdatedAt

func (drdu *DecisionReqDefUpdate) SetUpdatedAt(t time.Time) *DecisionReqDefUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DecisionReqDefUpdate) SetUpdatedBy

func (drdu *DecisionReqDefUpdate) SetUpdatedBy(i int) *DecisionReqDefUpdate

SetUpdatedBy sets the "updated_by" field.

func (*DecisionReqDefUpdate) SetVersion

func (drdu *DecisionReqDefUpdate) SetVersion(i int32) *DecisionReqDefUpdate

SetVersion sets the "version" field.

func (*DecisionReqDefUpdate) Where

Where appends a list predicates to the DecisionReqDefUpdate builder.

type DecisionReqDefUpdateOne

type DecisionReqDefUpdateOne struct {
	// contains filtered or unexported fields
}

DecisionReqDefUpdateOne is the builder for updating a single DecisionReqDef entity.

func (*DecisionReqDefUpdateOne) AddDecisionDefIDs

func (drduo *DecisionReqDefUpdateOne) AddDecisionDefIDs(ids ...int) *DecisionReqDefUpdateOne

AddDecisionDefIDs adds the "decision_defs" edge to the DecisionDef entity by IDs.

func (*DecisionReqDefUpdateOne) AddDecisionDefs

func (drduo *DecisionReqDefUpdateOne) AddDecisionDefs(d ...*DecisionDef) *DecisionReqDefUpdateOne

AddDecisionDefs adds the "decision_defs" edges to the DecisionDef entity.

func (*DecisionReqDefUpdateOne) AddResourceID

func (drduo *DecisionReqDefUpdateOne) AddResourceID(i int) *DecisionReqDefUpdateOne

AddResourceID adds i to the "resource_id" field.

func (*DecisionReqDefUpdateOne) AddRevision

func (drduo *DecisionReqDefUpdateOne) AddRevision(i int32) *DecisionReqDefUpdateOne

AddRevision adds i to the "revision" field.

func (*DecisionReqDefUpdateOne) AddUpdatedBy

func (drduo *DecisionReqDefUpdateOne) AddUpdatedBy(i int) *DecisionReqDefUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*DecisionReqDefUpdateOne) AddVersion

AddVersion adds i to the "version" field.

func (*DecisionReqDefUpdateOne) ClearCategory

func (drduo *DecisionReqDefUpdateOne) ClearCategory() *DecisionReqDefUpdateOne

ClearCategory clears the value of the "category" field.

func (*DecisionReqDefUpdateOne) ClearDecisionDefs

func (drduo *DecisionReqDefUpdateOne) ClearDecisionDefs() *DecisionReqDefUpdateOne

ClearDecisionDefs clears all "decision_defs" edges to the DecisionDef entity.

func (*DecisionReqDefUpdateOne) ClearName

ClearName clears the value of the "name" field.

func (*DecisionReqDefUpdateOne) ClearResourceID

func (drduo *DecisionReqDefUpdateOne) ClearResourceID() *DecisionReqDefUpdateOne

ClearResourceID clears the value of the "resource_id" field.

func (*DecisionReqDefUpdateOne) ClearResourceKey

func (drduo *DecisionReqDefUpdateOne) ClearResourceKey() *DecisionReqDefUpdateOne

ClearResourceKey clears the value of the "resource_key" field.

func (*DecisionReqDefUpdateOne) ClearRevision

func (drduo *DecisionReqDefUpdateOne) ClearRevision() *DecisionReqDefUpdateOne

ClearRevision clears the value of the "revision" field.

func (*DecisionReqDefUpdateOne) ClearUpdatedAt

func (drduo *DecisionReqDefUpdateOne) ClearUpdatedAt() *DecisionReqDefUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionReqDefUpdateOne) ClearUpdatedBy

func (drduo *DecisionReqDefUpdateOne) ClearUpdatedBy() *DecisionReqDefUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionReqDefUpdateOne) Exec

func (drduo *DecisionReqDefUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DecisionReqDefUpdateOne) ExecX

func (drduo *DecisionReqDefUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefUpdateOne) Mutation

Mutation returns the DecisionReqDefMutation object of the builder.

func (*DecisionReqDefUpdateOne) RemoveDecisionDefIDs

func (drduo *DecisionReqDefUpdateOne) RemoveDecisionDefIDs(ids ...int) *DecisionReqDefUpdateOne

RemoveDecisionDefIDs removes the "decision_defs" edge to DecisionDef entities by IDs.

func (*DecisionReqDefUpdateOne) RemoveDecisionDefs

func (drduo *DecisionReqDefUpdateOne) RemoveDecisionDefs(d ...*DecisionDef) *DecisionReqDefUpdateOne

RemoveDecisionDefs removes "decision_defs" edges to DecisionDef entities.

func (*DecisionReqDefUpdateOne) Save

Save executes the query and returns the updated DecisionReqDef entity.

func (*DecisionReqDefUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DecisionReqDefUpdateOne) Select

func (drduo *DecisionReqDefUpdateOne) Select(field string, fields ...string) *DecisionReqDefUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DecisionReqDefUpdateOne) SetCategory

SetCategory sets the "category" field.

func (*DecisionReqDefUpdateOne) SetKey

SetKey sets the "key" field.

func (*DecisionReqDefUpdateOne) SetName

SetName sets the "name" field.

func (*DecisionReqDefUpdateOne) SetNillableCategory

func (drduo *DecisionReqDefUpdateOne) SetNillableCategory(s *string) *DecisionReqDefUpdateOne

SetNillableCategory sets the "category" field if the given value is not nil.

func (*DecisionReqDefUpdateOne) SetNillableName

func (drduo *DecisionReqDefUpdateOne) SetNillableName(s *string) *DecisionReqDefUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*DecisionReqDefUpdateOne) SetNillableResourceID

func (drduo *DecisionReqDefUpdateOne) SetNillableResourceID(i *int) *DecisionReqDefUpdateOne

SetNillableResourceID sets the "resource_id" field if the given value is not nil.

func (*DecisionReqDefUpdateOne) SetNillableResourceKey

func (drduo *DecisionReqDefUpdateOne) SetNillableResourceKey(s *string) *DecisionReqDefUpdateOne

SetNillableResourceKey sets the "resource_key" field if the given value is not nil.

func (*DecisionReqDefUpdateOne) SetNillableRevision

func (drduo *DecisionReqDefUpdateOne) SetNillableRevision(i *int32) *DecisionReqDefUpdateOne

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*DecisionReqDefUpdateOne) SetNillableUpdatedAt

func (drduo *DecisionReqDefUpdateOne) SetNillableUpdatedAt(t *time.Time) *DecisionReqDefUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DecisionReqDefUpdateOne) SetNillableUpdatedBy

func (drduo *DecisionReqDefUpdateOne) SetNillableUpdatedBy(i *int) *DecisionReqDefUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DecisionReqDefUpdateOne) SetResourceID

func (drduo *DecisionReqDefUpdateOne) SetResourceID(i int) *DecisionReqDefUpdateOne

SetResourceID sets the "resource_id" field.

func (*DecisionReqDefUpdateOne) SetResourceKey

func (drduo *DecisionReqDefUpdateOne) SetResourceKey(s string) *DecisionReqDefUpdateOne

SetResourceKey sets the "resource_key" field.

func (*DecisionReqDefUpdateOne) SetRevision

func (drduo *DecisionReqDefUpdateOne) SetRevision(i int32) *DecisionReqDefUpdateOne

SetRevision sets the "revision" field.

func (*DecisionReqDefUpdateOne) SetUpdatedAt

func (drduo *DecisionReqDefUpdateOne) SetUpdatedAt(t time.Time) *DecisionReqDefUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*DecisionReqDefUpdateOne) SetUpdatedBy

func (drduo *DecisionReqDefUpdateOne) SetUpdatedBy(i int) *DecisionReqDefUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*DecisionReqDefUpdateOne) SetVersion

SetVersion sets the "version" field.

func (*DecisionReqDefUpdateOne) Where

Where appends a list predicates to the DecisionReqDefUpdate builder.

type DecisionReqDefUpsert

type DecisionReqDefUpsert struct {
	*sql.UpdateSet
}

DecisionReqDefUpsert is the "OnConflict" setter.

func (*DecisionReqDefUpsert) AddResourceID

func (u *DecisionReqDefUpsert) AddResourceID(v int) *DecisionReqDefUpsert

AddResourceID adds v to the "resource_id" field.

func (*DecisionReqDefUpsert) AddRevision

func (u *DecisionReqDefUpsert) AddRevision(v int32) *DecisionReqDefUpsert

AddRevision adds v to the "revision" field.

func (*DecisionReqDefUpsert) AddUpdatedBy

func (u *DecisionReqDefUpsert) AddUpdatedBy(v int) *DecisionReqDefUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*DecisionReqDefUpsert) AddVersion

AddVersion adds v to the "version" field.

func (*DecisionReqDefUpsert) ClearCategory

func (u *DecisionReqDefUpsert) ClearCategory() *DecisionReqDefUpsert

ClearCategory clears the value of the "category" field.

func (*DecisionReqDefUpsert) ClearName

ClearName clears the value of the "name" field.

func (*DecisionReqDefUpsert) ClearResourceID

func (u *DecisionReqDefUpsert) ClearResourceID() *DecisionReqDefUpsert

ClearResourceID clears the value of the "resource_id" field.

func (*DecisionReqDefUpsert) ClearResourceKey

func (u *DecisionReqDefUpsert) ClearResourceKey() *DecisionReqDefUpsert

ClearResourceKey clears the value of the "resource_key" field.

func (*DecisionReqDefUpsert) ClearRevision

func (u *DecisionReqDefUpsert) ClearRevision() *DecisionReqDefUpsert

ClearRevision clears the value of the "revision" field.

func (*DecisionReqDefUpsert) ClearUpdatedAt

func (u *DecisionReqDefUpsert) ClearUpdatedAt() *DecisionReqDefUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionReqDefUpsert) ClearUpdatedBy

func (u *DecisionReqDefUpsert) ClearUpdatedBy() *DecisionReqDefUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionReqDefUpsert) SetCategory

SetCategory sets the "category" field.

func (*DecisionReqDefUpsert) SetKey

SetKey sets the "key" field.

func (*DecisionReqDefUpsert) SetName

SetName sets the "name" field.

func (*DecisionReqDefUpsert) SetResourceID

func (u *DecisionReqDefUpsert) SetResourceID(v int) *DecisionReqDefUpsert

SetResourceID sets the "resource_id" field.

func (*DecisionReqDefUpsert) SetResourceKey

func (u *DecisionReqDefUpsert) SetResourceKey(v string) *DecisionReqDefUpsert

SetResourceKey sets the "resource_key" field.

func (*DecisionReqDefUpsert) SetRevision

func (u *DecisionReqDefUpsert) SetRevision(v int32) *DecisionReqDefUpsert

SetRevision sets the "revision" field.

func (*DecisionReqDefUpsert) SetUpdatedAt

func (u *DecisionReqDefUpsert) SetUpdatedAt(v time.Time) *DecisionReqDefUpsert

SetUpdatedAt sets the "updated_at" field.

func (*DecisionReqDefUpsert) SetUpdatedBy

func (u *DecisionReqDefUpsert) SetUpdatedBy(v int) *DecisionReqDefUpsert

SetUpdatedBy sets the "updated_by" field.

func (*DecisionReqDefUpsert) SetVersion

SetVersion sets the "version" field.

func (*DecisionReqDefUpsert) UpdateCategory

func (u *DecisionReqDefUpsert) UpdateCategory() *DecisionReqDefUpsert

UpdateCategory sets the "category" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateName

func (u *DecisionReqDefUpsert) UpdateName() *DecisionReqDefUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateResourceID

func (u *DecisionReqDefUpsert) UpdateResourceID() *DecisionReqDefUpsert

UpdateResourceID sets the "resource_id" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateResourceKey

func (u *DecisionReqDefUpsert) UpdateResourceKey() *DecisionReqDefUpsert

UpdateResourceKey sets the "resource_key" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateRevision

func (u *DecisionReqDefUpsert) UpdateRevision() *DecisionReqDefUpsert

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateUpdatedAt

func (u *DecisionReqDefUpsert) UpdateUpdatedAt() *DecisionReqDefUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateUpdatedBy

func (u *DecisionReqDefUpsert) UpdateUpdatedBy() *DecisionReqDefUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*DecisionReqDefUpsert) UpdateVersion

func (u *DecisionReqDefUpsert) UpdateVersion() *DecisionReqDefUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type DecisionReqDefUpsertBulk

type DecisionReqDefUpsertBulk struct {
	// contains filtered or unexported fields
}

DecisionReqDefUpsertBulk is the builder for "upsert"-ing a bulk of DecisionReqDef nodes.

func (*DecisionReqDefUpsertBulk) AddResourceID

AddResourceID adds v to the "resource_id" field.

func (*DecisionReqDefUpsertBulk) AddRevision

AddRevision adds v to the "revision" field.

func (*DecisionReqDefUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*DecisionReqDefUpsertBulk) AddVersion

AddVersion adds v to the "version" field.

func (*DecisionReqDefUpsertBulk) ClearCategory

ClearCategory clears the value of the "category" field.

func (*DecisionReqDefUpsertBulk) ClearName

ClearName clears the value of the "name" field.

func (*DecisionReqDefUpsertBulk) ClearResourceID

func (u *DecisionReqDefUpsertBulk) ClearResourceID() *DecisionReqDefUpsertBulk

ClearResourceID clears the value of the "resource_id" field.

func (*DecisionReqDefUpsertBulk) ClearResourceKey

func (u *DecisionReqDefUpsertBulk) ClearResourceKey() *DecisionReqDefUpsertBulk

ClearResourceKey clears the value of the "resource_key" field.

func (*DecisionReqDefUpsertBulk) ClearRevision

ClearRevision clears the value of the "revision" field.

func (*DecisionReqDefUpsertBulk) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionReqDefUpsertBulk) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionReqDefUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DecisionReqDefUpsertBulk) Exec

Exec executes the query.

func (*DecisionReqDefUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DecisionReqDef.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DecisionReqDefUpsertBulk) SetCategory

SetCategory sets the "category" field.

func (*DecisionReqDefUpsertBulk) SetKey

SetKey sets the "key" field.

func (*DecisionReqDefUpsertBulk) SetName

SetName sets the "name" field.

func (*DecisionReqDefUpsertBulk) SetResourceID

SetResourceID sets the "resource_id" field.

func (*DecisionReqDefUpsertBulk) SetResourceKey

SetResourceKey sets the "resource_key" field.

func (*DecisionReqDefUpsertBulk) SetRevision

SetRevision sets the "revision" field.

func (*DecisionReqDefUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DecisionReqDefUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*DecisionReqDefUpsertBulk) SetVersion

SetVersion sets the "version" field.

func (*DecisionReqDefUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DecisionReqDefCreateBulk.OnConflict documentation for more info.

func (*DecisionReqDefUpsertBulk) UpdateCategory

UpdateCategory sets the "category" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateNewValues

func (u *DecisionReqDefUpsertBulk) UpdateNewValues() *DecisionReqDefUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DecisionReqDef.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(decisionreqdef.FieldID)
		}),
	).
	Exec(ctx)

func (*DecisionReqDefUpsertBulk) UpdateResourceID

func (u *DecisionReqDefUpsertBulk) UpdateResourceID() *DecisionReqDefUpsertBulk

UpdateResourceID sets the "resource_id" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateResourceKey

func (u *DecisionReqDefUpsertBulk) UpdateResourceKey() *DecisionReqDefUpsertBulk

UpdateResourceKey sets the "resource_key" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateRevision

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateUpdatedAt

func (u *DecisionReqDefUpsertBulk) UpdateUpdatedAt() *DecisionReqDefUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateUpdatedBy

func (u *DecisionReqDefUpsertBulk) UpdateUpdatedBy() *DecisionReqDefUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*DecisionReqDefUpsertBulk) UpdateVersion

UpdateVersion sets the "version" field to the value that was provided on create.

type DecisionReqDefUpsertOne

type DecisionReqDefUpsertOne struct {
	// contains filtered or unexported fields
}

DecisionReqDefUpsertOne is the builder for "upsert"-ing

one DecisionReqDef node.

func (*DecisionReqDefUpsertOne) AddResourceID

AddResourceID adds v to the "resource_id" field.

func (*DecisionReqDefUpsertOne) AddRevision

AddRevision adds v to the "revision" field.

func (*DecisionReqDefUpsertOne) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*DecisionReqDefUpsertOne) AddVersion

AddVersion adds v to the "version" field.

func (*DecisionReqDefUpsertOne) ClearCategory

ClearCategory clears the value of the "category" field.

func (*DecisionReqDefUpsertOne) ClearName

ClearName clears the value of the "name" field.

func (*DecisionReqDefUpsertOne) ClearResourceID

func (u *DecisionReqDefUpsertOne) ClearResourceID() *DecisionReqDefUpsertOne

ClearResourceID clears the value of the "resource_id" field.

func (*DecisionReqDefUpsertOne) ClearResourceKey

func (u *DecisionReqDefUpsertOne) ClearResourceKey() *DecisionReqDefUpsertOne

ClearResourceKey clears the value of the "resource_key" field.

func (*DecisionReqDefUpsertOne) ClearRevision

ClearRevision clears the value of the "revision" field.

func (*DecisionReqDefUpsertOne) ClearUpdatedAt

func (u *DecisionReqDefUpsertOne) ClearUpdatedAt() *DecisionReqDefUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DecisionReqDefUpsertOne) ClearUpdatedBy

func (u *DecisionReqDefUpsertOne) ClearUpdatedBy() *DecisionReqDefUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DecisionReqDefUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DecisionReqDefUpsertOne) Exec

Exec executes the query.

func (*DecisionReqDefUpsertOne) ExecX

func (u *DecisionReqDefUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DecisionReqDefUpsertOne) ID

func (u *DecisionReqDefUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DecisionReqDefUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DecisionReqDefUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DecisionReqDef.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DecisionReqDefUpsertOne) SetCategory

SetCategory sets the "category" field.

func (*DecisionReqDefUpsertOne) SetKey

SetKey sets the "key" field.

func (*DecisionReqDefUpsertOne) SetName

SetName sets the "name" field.

func (*DecisionReqDefUpsertOne) SetResourceID

SetResourceID sets the "resource_id" field.

func (*DecisionReqDefUpsertOne) SetResourceKey

SetResourceKey sets the "resource_key" field.

func (*DecisionReqDefUpsertOne) SetRevision

SetRevision sets the "revision" field.

func (*DecisionReqDefUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DecisionReqDefUpsertOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*DecisionReqDefUpsertOne) SetVersion

SetVersion sets the "version" field.

func (*DecisionReqDefUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DecisionReqDefCreate.OnConflict documentation for more info.

func (*DecisionReqDefUpsertOne) UpdateCategory

func (u *DecisionReqDefUpsertOne) UpdateCategory() *DecisionReqDefUpsertOne

UpdateCategory sets the "category" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateNewValues

func (u *DecisionReqDefUpsertOne) UpdateNewValues() *DecisionReqDefUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DecisionReqDef.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(decisionreqdef.FieldID)
		}),
	).
	Exec(ctx)

func (*DecisionReqDefUpsertOne) UpdateResourceID

func (u *DecisionReqDefUpsertOne) UpdateResourceID() *DecisionReqDefUpsertOne

UpdateResourceID sets the "resource_id" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateResourceKey

func (u *DecisionReqDefUpsertOne) UpdateResourceKey() *DecisionReqDefUpsertOne

UpdateResourceKey sets the "resource_key" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateRevision

func (u *DecisionReqDefUpsertOne) UpdateRevision() *DecisionReqDefUpsertOne

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateUpdatedAt

func (u *DecisionReqDefUpsertOne) UpdateUpdatedAt() *DecisionReqDefUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateUpdatedBy

func (u *DecisionReqDefUpsertOne) UpdateUpdatedBy() *DecisionReqDefUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*DecisionReqDefUpsertOne) UpdateVersion

UpdateVersion sets the "version" field to the value that was provided on create.

type DecisionReqDefWhereInput

type DecisionReqDefWhereInput struct {
	Predicates []predicate.DecisionReqDef  `json:"-"`
	Not        *DecisionReqDefWhereInput   `json:"not,omitempty"`
	Or         []*DecisionReqDefWhereInput `json:"or,omitempty"`
	And        []*DecisionReqDefWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "deployment_id" field predicates.
	DeploymentID      *int  `json:"deploymentID,omitempty"`
	DeploymentIDNEQ   *int  `json:"deploymentIDNEQ,omitempty"`
	DeploymentIDIn    []int `json:"deploymentIDIn,omitempty"`
	DeploymentIDNotIn []int `json:"deploymentIDNotIn,omitempty"`

	// "app_id" field predicates.
	AppID      *int  `json:"appID,omitempty"`
	AppIDNEQ   *int  `json:"appIDNEQ,omitempty"`
	AppIDIn    []int `json:"appIDIn,omitempty"`
	AppIDNotIn []int `json:"appIDNotIn,omitempty"`
	AppIDGT    *int  `json:"appIDGT,omitempty"`
	AppIDGTE   *int  `json:"appIDGTE,omitempty"`
	AppIDLT    *int  `json:"appIDLT,omitempty"`
	AppIDLTE   *int  `json:"appIDLTE,omitempty"`

	// "category" field predicates.
	Category             *string  `json:"category,omitempty"`
	CategoryNEQ          *string  `json:"categoryNEQ,omitempty"`
	CategoryIn           []string `json:"categoryIn,omitempty"`
	CategoryNotIn        []string `json:"categoryNotIn,omitempty"`
	CategoryGT           *string  `json:"categoryGT,omitempty"`
	CategoryGTE          *string  `json:"categoryGTE,omitempty"`
	CategoryLT           *string  `json:"categoryLT,omitempty"`
	CategoryLTE          *string  `json:"categoryLTE,omitempty"`
	CategoryContains     *string  `json:"categoryContains,omitempty"`
	CategoryHasPrefix    *string  `json:"categoryHasPrefix,omitempty"`
	CategoryHasSuffix    *string  `json:"categoryHasSuffix,omitempty"`
	CategoryIsNil        bool     `json:"categoryIsNil,omitempty"`
	CategoryNotNil       bool     `json:"categoryNotNil,omitempty"`
	CategoryEqualFold    *string  `json:"categoryEqualFold,omitempty"`
	CategoryContainsFold *string  `json:"categoryContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "version" field predicates.
	Version      *int32  `json:"version,omitempty"`
	VersionNEQ   *int32  `json:"versionNEQ,omitempty"`
	VersionIn    []int32 `json:"versionIn,omitempty"`
	VersionNotIn []int32 `json:"versionNotIn,omitempty"`
	VersionGT    *int32  `json:"versionGT,omitempty"`
	VersionGTE   *int32  `json:"versionGTE,omitempty"`
	VersionLT    *int32  `json:"versionLT,omitempty"`
	VersionLTE   *int32  `json:"versionLTE,omitempty"`

	// "revision" field predicates.
	Revision       *int32  `json:"revision,omitempty"`
	RevisionNEQ    *int32  `json:"revisionNEQ,omitempty"`
	RevisionIn     []int32 `json:"revisionIn,omitempty"`
	RevisionNotIn  []int32 `json:"revisionNotIn,omitempty"`
	RevisionGT     *int32  `json:"revisionGT,omitempty"`
	RevisionGTE    *int32  `json:"revisionGTE,omitempty"`
	RevisionLT     *int32  `json:"revisionLT,omitempty"`
	RevisionLTE    *int32  `json:"revisionLTE,omitempty"`
	RevisionIsNil  bool    `json:"revisionIsNil,omitempty"`
	RevisionNotNil bool    `json:"revisionNotNil,omitempty"`

	// "deployment" edge predicates.
	HasDeployment     *bool                   `json:"hasDeployment,omitempty"`
	HasDeploymentWith []*DeploymentWhereInput `json:"hasDeploymentWith,omitempty"`

	// "decision_defs" edge predicates.
	HasDecisionDefs     *bool                    `json:"hasDecisionDefs,omitempty"`
	HasDecisionDefsWith []*DecisionDefWhereInput `json:"hasDecisionDefsWith,omitempty"`
}

DecisionReqDefWhereInput represents a where input for filtering DecisionReqDef queries.

func (*DecisionReqDefWhereInput) AddPredicates

func (i *DecisionReqDefWhereInput) AddPredicates(predicates ...predicate.DecisionReqDef)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*DecisionReqDefWhereInput) Filter

Filter applies the DecisionReqDefWhereInput filter on the DecisionReqDefQuery builder.

func (*DecisionReqDefWhereInput) P

P returns a predicate for filtering decisionreqdefs. An error is returned if the input is empty or invalid.

type DecisionReqDefs

type DecisionReqDefs []*DecisionReqDef

DecisionReqDefs is a parsable slice of DecisionReqDef.

type Deployment

type Deployment struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 所属应用ID
	AppID int `json:"app_id,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// 来源
	Source string `json:"source,omitempty"`
	// 部署时间
	DeployTime time.Time `json:"deploy_time,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DeploymentQuery when eager-loading is set.
	Edges DeploymentEdges `json:"edges"`
	// contains filtered or unexported fields
}

Deployment is the model entity for the Deployment schema.

func (*Deployment) DecisionReqs

func (d *Deployment) DecisionReqs(ctx context.Context) (result []*DecisionReqDef, err error)

func (*Deployment) GlobalID

func (d *Deployment) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Deployment node.

func (*Deployment) IsNode

func (*Deployment) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Deployment) NamedDecisionReqs

func (d *Deployment) NamedDecisionReqs(name string) ([]*DecisionReqDef, error)

NamedDecisionReqs returns the DecisionReqs named value or an error if the edge was not loaded in eager-loading with this name.

func (*Deployment) NamedProcDefs

func (d *Deployment) NamedProcDefs(name string) ([]*ProcDef, error)

NamedProcDefs returns the ProcDefs named value or an error if the edge was not loaded in eager-loading with this name.

func (*Deployment) ProcDefs

func (d *Deployment) ProcDefs(ctx context.Context) (result []*ProcDef, err error)

func (*Deployment) QueryDecisionReqs

func (d *Deployment) QueryDecisionReqs() *DecisionReqDefQuery

QueryDecisionReqs queries the "decision_reqs" edge of the Deployment entity.

func (*Deployment) QueryProcDefs

func (d *Deployment) QueryProcDefs() *ProcDefQuery

QueryProcDefs queries the "proc_defs" edge of the Deployment entity.

func (*Deployment) String

func (d *Deployment) String() string

String implements the fmt.Stringer.

func (*Deployment) ToEdge

func (d *Deployment) ToEdge(order *DeploymentOrder) *DeploymentEdge

ToEdge converts Deployment into DeploymentEdge.

func (*Deployment) Unwrap

func (d *Deployment) Unwrap() *Deployment

Unwrap unwraps the Deployment entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Deployment) Update

func (d *Deployment) Update() *DeploymentUpdateOne

Update returns a builder for updating this Deployment. Note that you need to call Deployment.Unwrap() before calling this method if this Deployment was returned from a transaction, and the transaction was committed or rolled back.

func (*Deployment) Value

func (d *Deployment) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Deployment. This includes values selected through modifiers, order, etc.

type DeploymentClient

type DeploymentClient struct {
	// contains filtered or unexported fields
}

DeploymentClient is a client for the Deployment schema.

func NewDeploymentClient

func NewDeploymentClient(c config) *DeploymentClient

NewDeploymentClient returns a client for the Deployment from the given config.

func (*DeploymentClient) Create

func (c *DeploymentClient) Create() *DeploymentCreate

Create returns a builder for creating a Deployment entity.

func (*DeploymentClient) CreateBulk

func (c *DeploymentClient) CreateBulk(builders ...*DeploymentCreate) *DeploymentCreateBulk

CreateBulk returns a builder for creating a bulk of Deployment entities.

func (*DeploymentClient) Delete

func (c *DeploymentClient) Delete() *DeploymentDelete

Delete returns a delete builder for Deployment.

func (*DeploymentClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeploymentClient) DeleteOneID

func (c *DeploymentClient) DeleteOneID(id int) *DeploymentDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeploymentClient) Get

func (c *DeploymentClient) Get(ctx context.Context, id int) (*Deployment, error)

Get returns a Deployment entity by its id.

func (*DeploymentClient) GetX

func (c *DeploymentClient) GetX(ctx context.Context, id int) *Deployment

GetX is like Get, but panics if an error occurs.

func (*DeploymentClient) Hooks

func (c *DeploymentClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeploymentClient) Intercept

func (c *DeploymentClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deployment.Intercept(f(g(h())))`.

func (*DeploymentClient) Interceptors

func (c *DeploymentClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeploymentClient) Query

func (c *DeploymentClient) Query() *DeploymentQuery

Query returns a query builder for Deployment.

func (*DeploymentClient) QueryDecisionReqs

func (c *DeploymentClient) QueryDecisionReqs(d *Deployment) *DecisionReqDefQuery

QueryDecisionReqs queries the decision_reqs edge of a Deployment.

func (*DeploymentClient) QueryProcDefs

func (c *DeploymentClient) QueryProcDefs(d *Deployment) *ProcDefQuery

QueryProcDefs queries the proc_defs edge of a Deployment.

func (*DeploymentClient) Update

func (c *DeploymentClient) Update() *DeploymentUpdate

Update returns an update builder for Deployment.

func (*DeploymentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeploymentClient) UpdateOneID

func (c *DeploymentClient) UpdateOneID(id int) *DeploymentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeploymentClient) Use

func (c *DeploymentClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deployment.Hooks(f(g(h())))`.

type DeploymentConnection

type DeploymentConnection struct {
	Edges      []*DeploymentEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

DeploymentConnection is the connection containing edges to Deployment.

type DeploymentCreate

type DeploymentCreate struct {
	// contains filtered or unexported fields
}

DeploymentCreate is the builder for creating a Deployment entity.

func (*DeploymentCreate) AddDecisionReqIDs

func (dc *DeploymentCreate) AddDecisionReqIDs(ids ...int) *DeploymentCreate

AddDecisionReqIDs adds the "decision_reqs" edge to the DecisionReqDef entity by IDs.

func (*DeploymentCreate) AddDecisionReqs

func (dc *DeploymentCreate) AddDecisionReqs(d ...*DecisionReqDef) *DeploymentCreate

AddDecisionReqs adds the "decision_reqs" edges to the DecisionReqDef entity.

func (*DeploymentCreate) AddProcDefIDs

func (dc *DeploymentCreate) AddProcDefIDs(ids ...int) *DeploymentCreate

AddProcDefIDs adds the "proc_defs" edge to the ProcDef entity by IDs.

func (*DeploymentCreate) AddProcDefs

func (dc *DeploymentCreate) AddProcDefs(p ...*ProcDef) *DeploymentCreate

AddProcDefs adds the "proc_defs" edges to the ProcDef entity.

func (*DeploymentCreate) Exec

func (dc *DeploymentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentCreate) ExecX

func (dc *DeploymentCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentCreate) Mutation

func (dc *DeploymentCreate) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentCreate) OnConflict

func (dc *DeploymentCreate) OnConflict(opts ...sql.ConflictOption) *DeploymentUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Deployment.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeploymentUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*DeploymentCreate) OnConflictColumns

func (dc *DeploymentCreate) OnConflictColumns(columns ...string) *DeploymentUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Deployment.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeploymentCreate) Save

func (dc *DeploymentCreate) Save(ctx context.Context) (*Deployment, error)

Save creates the Deployment in the database.

func (*DeploymentCreate) SaveX

func (dc *DeploymentCreate) SaveX(ctx context.Context) *Deployment

SaveX calls Save and panics if Save returns an error.

func (*DeploymentCreate) SetAppID

func (dc *DeploymentCreate) SetAppID(i int) *DeploymentCreate

SetAppID sets the "app_id" field.

func (*DeploymentCreate) SetCreatedAt

func (dc *DeploymentCreate) SetCreatedAt(t time.Time) *DeploymentCreate

SetCreatedAt sets the "created_at" field.

func (*DeploymentCreate) SetCreatedBy

func (dc *DeploymentCreate) SetCreatedBy(i int) *DeploymentCreate

SetCreatedBy sets the "created_by" field.

func (*DeploymentCreate) SetDeployTime

func (dc *DeploymentCreate) SetDeployTime(t time.Time) *DeploymentCreate

SetDeployTime sets the "deploy_time" field.

func (*DeploymentCreate) SetID

func (dc *DeploymentCreate) SetID(i int) *DeploymentCreate

SetID sets the "id" field.

func (*DeploymentCreate) SetInput

SetInput applies the change-set in the CreateDeploymentInput on the DeploymentCreate builder.

func (*DeploymentCreate) SetName

func (dc *DeploymentCreate) SetName(s string) *DeploymentCreate

SetName sets the "name" field.

func (*DeploymentCreate) SetNillableCreatedAt

func (dc *DeploymentCreate) SetNillableCreatedAt(t *time.Time) *DeploymentCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentCreate) SetNillableDeployTime

func (dc *DeploymentCreate) SetNillableDeployTime(t *time.Time) *DeploymentCreate

SetNillableDeployTime sets the "deploy_time" field if the given value is not nil.

func (*DeploymentCreate) SetNillableID

func (dc *DeploymentCreate) SetNillableID(i *int) *DeploymentCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*DeploymentCreate) SetNillableName

func (dc *DeploymentCreate) SetNillableName(s *string) *DeploymentCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*DeploymentCreate) SetNillableSource

func (dc *DeploymentCreate) SetNillableSource(s *string) *DeploymentCreate

SetNillableSource sets the "source" field if the given value is not nil.

func (*DeploymentCreate) SetNillableUpdatedAt

func (dc *DeploymentCreate) SetNillableUpdatedAt(t *time.Time) *DeploymentCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeploymentCreate) SetNillableUpdatedBy

func (dc *DeploymentCreate) SetNillableUpdatedBy(i *int) *DeploymentCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DeploymentCreate) SetSource

func (dc *DeploymentCreate) SetSource(s string) *DeploymentCreate

SetSource sets the "source" field.

func (*DeploymentCreate) SetTenantID

func (dc *DeploymentCreate) SetTenantID(i int) *DeploymentCreate

SetTenantID sets the "tenant_id" field.

func (*DeploymentCreate) SetUpdatedAt

func (dc *DeploymentCreate) SetUpdatedAt(t time.Time) *DeploymentCreate

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentCreate) SetUpdatedBy

func (dc *DeploymentCreate) SetUpdatedBy(i int) *DeploymentCreate

SetUpdatedBy sets the "updated_by" field.

type DeploymentCreateBulk

type DeploymentCreateBulk struct {
	// contains filtered or unexported fields
}

DeploymentCreateBulk is the builder for creating many Deployment entities in bulk.

func (*DeploymentCreateBulk) Exec

func (dcb *DeploymentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentCreateBulk) ExecX

func (dcb *DeploymentCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentCreateBulk) OnConflict

func (dcb *DeploymentCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeploymentUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Deployment.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeploymentUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*DeploymentCreateBulk) OnConflictColumns

func (dcb *DeploymentCreateBulk) OnConflictColumns(columns ...string) *DeploymentUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Deployment.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeploymentCreateBulk) Save

func (dcb *DeploymentCreateBulk) Save(ctx context.Context) ([]*Deployment, error)

Save creates the Deployment entities in the database.

func (*DeploymentCreateBulk) SaveX

func (dcb *DeploymentCreateBulk) SaveX(ctx context.Context) []*Deployment

SaveX is like Save, but panics if an error occurs.

type DeploymentDelete

type DeploymentDelete struct {
	// contains filtered or unexported fields
}

DeploymentDelete is the builder for deleting a Deployment entity.

func (*DeploymentDelete) Exec

func (dd *DeploymentDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeploymentDelete) ExecX

func (dd *DeploymentDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentDelete) Where

Where appends a list predicates to the DeploymentDelete builder.

type DeploymentDeleteOne

type DeploymentDeleteOne struct {
	// contains filtered or unexported fields
}

DeploymentDeleteOne is the builder for deleting a single Deployment entity.

func (*DeploymentDeleteOne) Exec

func (ddo *DeploymentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeploymentDeleteOne) ExecX

func (ddo *DeploymentDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentDeleteOne) Where

Where appends a list predicates to the DeploymentDelete builder.

type DeploymentEdge

type DeploymentEdge struct {
	Node   *Deployment `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

DeploymentEdge is the edge representation of Deployment.

type DeploymentEdges

type DeploymentEdges struct {
	// ProcDefs holds the value of the proc_defs edge.
	ProcDefs []*ProcDef `json:"proc_defs,omitempty"`
	// DecisionReqs holds the value of the decision_reqs edge.
	DecisionReqs []*DecisionReqDef `json:"decision_reqs,omitempty"`
	// contains filtered or unexported fields
}

DeploymentEdges holds the relations/edges for other nodes in the graph.

func (DeploymentEdges) DecisionReqsOrErr

func (e DeploymentEdges) DecisionReqsOrErr() ([]*DecisionReqDef, error)

DecisionReqsOrErr returns the DecisionReqs value or an error if the edge was not loaded in eager-loading.

func (DeploymentEdges) ProcDefsOrErr

func (e DeploymentEdges) ProcDefsOrErr() ([]*ProcDef, error)

ProcDefsOrErr returns the ProcDefs value or an error if the edge was not loaded in eager-loading.

type DeploymentGroupBy

type DeploymentGroupBy struct {
	// contains filtered or unexported fields
}

DeploymentGroupBy is the group-by builder for Deployment entities.

func (*DeploymentGroupBy) Aggregate

func (dgb *DeploymentGroupBy) Aggregate(fns ...AggregateFunc) *DeploymentGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DeploymentGroupBy) Bool

func (s *DeploymentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) BoolX

func (s *DeploymentGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentGroupBy) Bools

func (s *DeploymentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) BoolsX

func (s *DeploymentGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentGroupBy) Float64

func (s *DeploymentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) Float64X

func (s *DeploymentGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentGroupBy) Float64s

func (s *DeploymentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) Float64sX

func (s *DeploymentGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentGroupBy) Int

func (s *DeploymentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) IntX

func (s *DeploymentGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeploymentGroupBy) Ints

func (s *DeploymentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) IntsX

func (s *DeploymentGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentGroupBy) Scan

func (dgb *DeploymentGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeploymentGroupBy) ScanX

func (s *DeploymentGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentGroupBy) String

func (s *DeploymentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) StringX

func (s *DeploymentGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeploymentGroupBy) Strings

func (s *DeploymentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeploymentGroupBy) StringsX

func (s *DeploymentGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentMutation

type DeploymentMutation struct {
	// contains filtered or unexported fields
}

DeploymentMutation represents an operation that mutates the Deployment nodes in the graph.

func (*DeploymentMutation) AddAppID

func (m *DeploymentMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*DeploymentMutation) AddCreatedBy

func (m *DeploymentMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*DeploymentMutation) AddDecisionReqIDs

func (m *DeploymentMutation) AddDecisionReqIDs(ids ...int)

AddDecisionReqIDs adds the "decision_reqs" edge to the DecisionReqDef entity by ids.

func (*DeploymentMutation) AddField

func (m *DeploymentMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentMutation) AddProcDefIDs

func (m *DeploymentMutation) AddProcDefIDs(ids ...int)

AddProcDefIDs adds the "proc_defs" edge to the ProcDef entity by ids.

func (*DeploymentMutation) AddTenantID

func (m *DeploymentMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*DeploymentMutation) AddUpdatedBy

func (m *DeploymentMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*DeploymentMutation) AddedAppID

func (m *DeploymentMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*DeploymentMutation) AddedCreatedBy

func (m *DeploymentMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*DeploymentMutation) AddedEdges

func (m *DeploymentMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeploymentMutation) AddedField

func (m *DeploymentMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentMutation) AddedFields

func (m *DeploymentMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeploymentMutation) AddedIDs

func (m *DeploymentMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeploymentMutation) AddedTenantID

func (m *DeploymentMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*DeploymentMutation) AddedUpdatedBy

func (m *DeploymentMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*DeploymentMutation) AppID

func (m *DeploymentMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*DeploymentMutation) ClearDecisionReqs

func (m *DeploymentMutation) ClearDecisionReqs()

ClearDecisionReqs clears the "decision_reqs" edge to the DecisionReqDef entity.

func (*DeploymentMutation) ClearEdge

func (m *DeploymentMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeploymentMutation) ClearField

func (m *DeploymentMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentMutation) ClearName

func (m *DeploymentMutation) ClearName()

ClearName clears the value of the "name" field.

func (*DeploymentMutation) ClearProcDefs

func (m *DeploymentMutation) ClearProcDefs()

ClearProcDefs clears the "proc_defs" edge to the ProcDef entity.

func (*DeploymentMutation) ClearSource

func (m *DeploymentMutation) ClearSource()

ClearSource clears the value of the "source" field.

func (*DeploymentMutation) ClearUpdatedAt

func (m *DeploymentMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DeploymentMutation) ClearUpdatedBy

func (m *DeploymentMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DeploymentMutation) ClearedEdges

func (m *DeploymentMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeploymentMutation) ClearedFields

func (m *DeploymentMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeploymentMutation) Client

func (m DeploymentMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DeploymentMutation) CreatedAt

func (m *DeploymentMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeploymentMutation) CreatedBy

func (m *DeploymentMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*DeploymentMutation) DecisionReqsCleared

func (m *DeploymentMutation) DecisionReqsCleared() bool

DecisionReqsCleared reports if the "decision_reqs" edge to the DecisionReqDef entity was cleared.

func (*DeploymentMutation) DecisionReqsIDs

func (m *DeploymentMutation) DecisionReqsIDs() (ids []int)

DecisionReqsIDs returns the "decision_reqs" edge IDs in the mutation.

func (*DeploymentMutation) DeployTime

func (m *DeploymentMutation) DeployTime() (r time.Time, exists bool)

DeployTime returns the value of the "deploy_time" field in the mutation.

func (*DeploymentMutation) EdgeCleared

func (m *DeploymentMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeploymentMutation) Field

func (m *DeploymentMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentMutation) FieldCleared

func (m *DeploymentMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeploymentMutation) Fields

func (m *DeploymentMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeploymentMutation) ID

func (m *DeploymentMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeploymentMutation) IDs

func (m *DeploymentMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeploymentMutation) Name

func (m *DeploymentMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*DeploymentMutation) NameCleared

func (m *DeploymentMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*DeploymentMutation) OldAppID

func (m *DeploymentMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldCreatedAt

func (m *DeploymentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldCreatedBy

func (m *DeploymentMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldDeployTime

func (m *DeploymentMutation) OldDeployTime(ctx context.Context) (v time.Time, err error)

OldDeployTime returns the old "deploy_time" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldField

func (m *DeploymentMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeploymentMutation) OldName

func (m *DeploymentMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldSource

func (m *DeploymentMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldTenantID

func (m *DeploymentMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldUpdatedAt

func (m *DeploymentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldUpdatedBy

func (m *DeploymentMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) Op

func (m *DeploymentMutation) Op() Op

Op returns the operation name.

func (*DeploymentMutation) ProcDefsCleared

func (m *DeploymentMutation) ProcDefsCleared() bool

ProcDefsCleared reports if the "proc_defs" edge to the ProcDef entity was cleared.

func (*DeploymentMutation) ProcDefsIDs

func (m *DeploymentMutation) ProcDefsIDs() (ids []int)

ProcDefsIDs returns the "proc_defs" edge IDs in the mutation.

func (*DeploymentMutation) RemoveDecisionReqIDs

func (m *DeploymentMutation) RemoveDecisionReqIDs(ids ...int)

RemoveDecisionReqIDs removes the "decision_reqs" edge to the DecisionReqDef entity by IDs.

func (*DeploymentMutation) RemoveProcDefIDs

func (m *DeploymentMutation) RemoveProcDefIDs(ids ...int)

RemoveProcDefIDs removes the "proc_defs" edge to the ProcDef entity by IDs.

func (*DeploymentMutation) RemovedDecisionReqsIDs

func (m *DeploymentMutation) RemovedDecisionReqsIDs() (ids []int)

RemovedDecisionReqs returns the removed IDs of the "decision_reqs" edge to the DecisionReqDef entity.

func (*DeploymentMutation) RemovedEdges

func (m *DeploymentMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeploymentMutation) RemovedIDs

func (m *DeploymentMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeploymentMutation) RemovedProcDefsIDs

func (m *DeploymentMutation) RemovedProcDefsIDs() (ids []int)

RemovedProcDefs returns the removed IDs of the "proc_defs" edge to the ProcDef entity.

func (*DeploymentMutation) ResetAppID

func (m *DeploymentMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*DeploymentMutation) ResetCreatedAt

func (m *DeploymentMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeploymentMutation) ResetCreatedBy

func (m *DeploymentMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*DeploymentMutation) ResetDecisionReqs

func (m *DeploymentMutation) ResetDecisionReqs()

ResetDecisionReqs resets all changes to the "decision_reqs" edge.

func (*DeploymentMutation) ResetDeployTime

func (m *DeploymentMutation) ResetDeployTime()

ResetDeployTime resets all changes to the "deploy_time" field.

func (*DeploymentMutation) ResetEdge

func (m *DeploymentMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeploymentMutation) ResetField

func (m *DeploymentMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentMutation) ResetName

func (m *DeploymentMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*DeploymentMutation) ResetProcDefs

func (m *DeploymentMutation) ResetProcDefs()

ResetProcDefs resets all changes to the "proc_defs" edge.

func (*DeploymentMutation) ResetSource

func (m *DeploymentMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*DeploymentMutation) ResetTenantID

func (m *DeploymentMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*DeploymentMutation) ResetUpdatedAt

func (m *DeploymentMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeploymentMutation) ResetUpdatedBy

func (m *DeploymentMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*DeploymentMutation) SetAppID

func (m *DeploymentMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*DeploymentMutation) SetCreatedAt

func (m *DeploymentMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeploymentMutation) SetCreatedBy

func (m *DeploymentMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*DeploymentMutation) SetDeployTime

func (m *DeploymentMutation) SetDeployTime(t time.Time)

SetDeployTime sets the "deploy_time" field.

func (*DeploymentMutation) SetField

func (m *DeploymentMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentMutation) SetID

func (m *DeploymentMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Deployment entities.

func (*DeploymentMutation) SetName

func (m *DeploymentMutation) SetName(s string)

SetName sets the "name" field.

func (*DeploymentMutation) SetOp

func (m *DeploymentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeploymentMutation) SetSource

func (m *DeploymentMutation) SetSource(s string)

SetSource sets the "source" field.

func (*DeploymentMutation) SetTenantID

func (m *DeploymentMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*DeploymentMutation) SetUpdatedAt

func (m *DeploymentMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentMutation) SetUpdatedBy

func (m *DeploymentMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*DeploymentMutation) Source

func (m *DeploymentMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*DeploymentMutation) SourceCleared

func (m *DeploymentMutation) SourceCleared() bool

SourceCleared returns if the "source" field was cleared in this mutation.

func (*DeploymentMutation) TenantID

func (m *DeploymentMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (DeploymentMutation) Tx

func (m DeploymentMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeploymentMutation) Type

func (m *DeploymentMutation) Type() string

Type returns the node type of this mutation (Deployment).

func (*DeploymentMutation) UpdatedAt

func (m *DeploymentMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeploymentMutation) UpdatedAtCleared

func (m *DeploymentMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*DeploymentMutation) UpdatedBy

func (m *DeploymentMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*DeploymentMutation) UpdatedByCleared

func (m *DeploymentMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*DeploymentMutation) Where

func (m *DeploymentMutation) Where(ps ...predicate.Deployment)

Where appends a list predicates to the DeploymentMutation builder.

func (*DeploymentMutation) WhereP

func (m *DeploymentMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeploymentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeploymentOrder

type DeploymentOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *DeploymentOrderField `json:"field"`
}

DeploymentOrder defines the ordering of Deployment.

type DeploymentOrderField

type DeploymentOrderField struct {
	// Value extracts the ordering value from the given Deployment.
	Value func(*Deployment) (ent.Value, error)
	// contains filtered or unexported fields
}

DeploymentOrderField defines the ordering field of Deployment.

func (DeploymentOrderField) MarshalGQL

func (f DeploymentOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (DeploymentOrderField) String

func (f DeploymentOrderField) String() string

String implement fmt.Stringer interface.

func (*DeploymentOrderField) UnmarshalGQL

func (f *DeploymentOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type DeploymentPaginateOption

type DeploymentPaginateOption func(*deploymentPager) error

DeploymentPaginateOption enables pagination customization.

func WithDeploymentFilter

func WithDeploymentFilter(filter func(*DeploymentQuery) (*DeploymentQuery, error)) DeploymentPaginateOption

WithDeploymentFilter configures pagination filter.

func WithDeploymentOrder

func WithDeploymentOrder(order *DeploymentOrder) DeploymentPaginateOption

WithDeploymentOrder configures pagination ordering.

type DeploymentQuery

type DeploymentQuery struct {
	// contains filtered or unexported fields
}

DeploymentQuery is the builder for querying Deployment entities.

func (*DeploymentQuery) Aggregate

func (dq *DeploymentQuery) Aggregate(fns ...AggregateFunc) *DeploymentSelect

Aggregate returns a DeploymentSelect configured with the given aggregations.

func (*DeploymentQuery) All

func (dq *DeploymentQuery) All(ctx context.Context) ([]*Deployment, error)

All executes the query and returns a list of Deployments.

func (*DeploymentQuery) AllX

func (dq *DeploymentQuery) AllX(ctx context.Context) []*Deployment

AllX is like All, but panics if an error occurs.

func (*DeploymentQuery) Clone

func (dq *DeploymentQuery) Clone() *DeploymentQuery

Clone returns a duplicate of the DeploymentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeploymentQuery) CollectFields

func (d *DeploymentQuery) CollectFields(ctx context.Context, satisfies ...string) (*DeploymentQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*DeploymentQuery) Count

func (dq *DeploymentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeploymentQuery) CountX

func (dq *DeploymentQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeploymentQuery) Exist

func (dq *DeploymentQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeploymentQuery) ExistX

func (dq *DeploymentQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeploymentQuery) First

func (dq *DeploymentQuery) First(ctx context.Context) (*Deployment, error)

First returns the first Deployment entity from the query. Returns a *NotFoundError when no Deployment was found.

func (*DeploymentQuery) FirstID

func (dq *DeploymentQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Deployment ID from the query. Returns a *NotFoundError when no Deployment ID was found.

func (*DeploymentQuery) FirstIDX

func (dq *DeploymentQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeploymentQuery) FirstX

func (dq *DeploymentQuery) FirstX(ctx context.Context) *Deployment

FirstX is like First, but panics if an error occurs.

func (*DeploymentQuery) GroupBy

func (dq *DeploymentQuery) GroupBy(field string, fields ...string) *DeploymentGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Deployment.Query().
	GroupBy(deployment.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeploymentQuery) IDs

func (dq *DeploymentQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Deployment IDs.

func (*DeploymentQuery) IDsX

func (dq *DeploymentQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DeploymentQuery) Limit

func (dq *DeploymentQuery) Limit(limit int) *DeploymentQuery

Limit the number of records to be returned by this query.

func (*DeploymentQuery) Offset

func (dq *DeploymentQuery) Offset(offset int) *DeploymentQuery

Offset to start from.

func (*DeploymentQuery) Only

func (dq *DeploymentQuery) Only(ctx context.Context) (*Deployment, error)

Only returns a single Deployment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Deployment entity is found. Returns a *NotFoundError when no Deployment entities are found.

func (*DeploymentQuery) OnlyID

func (dq *DeploymentQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Deployment ID in the query. Returns a *NotSingularError when more than one Deployment ID is found. Returns a *NotFoundError when no entities are found.

func (*DeploymentQuery) OnlyIDX

func (dq *DeploymentQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeploymentQuery) OnlyX

func (dq *DeploymentQuery) OnlyX(ctx context.Context) *Deployment

OnlyX is like Only, but panics if an error occurs.

func (*DeploymentQuery) Order

Order specifies how the records should be ordered.

func (*DeploymentQuery) Paginate

func (d *DeploymentQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DeploymentPaginateOption,
) (*DeploymentConnection, error)

Paginate executes the query and returns a relay based cursor connection to Deployment.

func (*DeploymentQuery) QueryDecisionReqs

func (dq *DeploymentQuery) QueryDecisionReqs() *DecisionReqDefQuery

QueryDecisionReqs chains the current query on the "decision_reqs" edge.

func (*DeploymentQuery) QueryProcDefs

func (dq *DeploymentQuery) QueryProcDefs() *ProcDefQuery

QueryProcDefs chains the current query on the "proc_defs" edge.

func (*DeploymentQuery) Select

func (dq *DeploymentQuery) Select(fields ...string) *DeploymentSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.Deployment.Query().
	Select(deployment.FieldCreatedBy).
	Scan(ctx, &v)

func (*DeploymentQuery) Unique

func (dq *DeploymentQuery) Unique(unique bool) *DeploymentQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeploymentQuery) Where

Where adds a new predicate for the DeploymentQuery builder.

func (*DeploymentQuery) WithDecisionReqs

func (dq *DeploymentQuery) WithDecisionReqs(opts ...func(*DecisionReqDefQuery)) *DeploymentQuery

WithDecisionReqs tells the query-builder to eager-load the nodes that are connected to the "decision_reqs" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentQuery) WithNamedDecisionReqs

func (dq *DeploymentQuery) WithNamedDecisionReqs(name string, opts ...func(*DecisionReqDefQuery)) *DeploymentQuery

WithNamedDecisionReqs tells the query-builder to eager-load the nodes that are connected to the "decision_reqs" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentQuery) WithNamedProcDefs

func (dq *DeploymentQuery) WithNamedProcDefs(name string, opts ...func(*ProcDefQuery)) *DeploymentQuery

WithNamedProcDefs tells the query-builder to eager-load the nodes that are connected to the "proc_defs" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentQuery) WithProcDefs

func (dq *DeploymentQuery) WithProcDefs(opts ...func(*ProcDefQuery)) *DeploymentQuery

WithProcDefs tells the query-builder to eager-load the nodes that are connected to the "proc_defs" edge. The optional arguments are used to configure the query builder of the edge.

type DeploymentSelect

type DeploymentSelect struct {
	*DeploymentQuery
	// contains filtered or unexported fields
}

DeploymentSelect is the builder for selecting fields of Deployment entities.

func (*DeploymentSelect) Aggregate

func (ds *DeploymentSelect) Aggregate(fns ...AggregateFunc) *DeploymentSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeploymentSelect) Bool

func (s *DeploymentSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) BoolX

func (s *DeploymentSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentSelect) Bools

func (s *DeploymentSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) BoolsX

func (s *DeploymentSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentSelect) Float64

func (s *DeploymentSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) Float64X

func (s *DeploymentSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentSelect) Float64s

func (s *DeploymentSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) Float64sX

func (s *DeploymentSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentSelect) Int

func (s *DeploymentSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) IntX

func (s *DeploymentSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeploymentSelect) Ints

func (s *DeploymentSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) IntsX

func (s *DeploymentSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentSelect) Scan

func (ds *DeploymentSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeploymentSelect) ScanX

func (s *DeploymentSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentSelect) String

func (s *DeploymentSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) StringX

func (s *DeploymentSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeploymentSelect) Strings

func (s *DeploymentSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) StringsX

func (s *DeploymentSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentUpdate

type DeploymentUpdate struct {
	// contains filtered or unexported fields
}

DeploymentUpdate is the builder for updating Deployment entities.

func (*DeploymentUpdate) AddDecisionReqIDs

func (du *DeploymentUpdate) AddDecisionReqIDs(ids ...int) *DeploymentUpdate

AddDecisionReqIDs adds the "decision_reqs" edge to the DecisionReqDef entity by IDs.

func (*DeploymentUpdate) AddDecisionReqs

func (du *DeploymentUpdate) AddDecisionReqs(d ...*DecisionReqDef) *DeploymentUpdate

AddDecisionReqs adds the "decision_reqs" edges to the DecisionReqDef entity.

func (*DeploymentUpdate) AddProcDefIDs

func (du *DeploymentUpdate) AddProcDefIDs(ids ...int) *DeploymentUpdate

AddProcDefIDs adds the "proc_defs" edge to the ProcDef entity by IDs.

func (*DeploymentUpdate) AddProcDefs

func (du *DeploymentUpdate) AddProcDefs(p ...*ProcDef) *DeploymentUpdate

AddProcDefs adds the "proc_defs" edges to the ProcDef entity.

func (*DeploymentUpdate) AddUpdatedBy

func (du *DeploymentUpdate) AddUpdatedBy(i int) *DeploymentUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*DeploymentUpdate) ClearDecisionReqs

func (du *DeploymentUpdate) ClearDecisionReqs() *DeploymentUpdate

ClearDecisionReqs clears all "decision_reqs" edges to the DecisionReqDef entity.

func (*DeploymentUpdate) ClearName

func (du *DeploymentUpdate) ClearName() *DeploymentUpdate

ClearName clears the value of the "name" field.

func (*DeploymentUpdate) ClearProcDefs

func (du *DeploymentUpdate) ClearProcDefs() *DeploymentUpdate

ClearProcDefs clears all "proc_defs" edges to the ProcDef entity.

func (*DeploymentUpdate) ClearSource

func (du *DeploymentUpdate) ClearSource() *DeploymentUpdate

ClearSource clears the value of the "source" field.

func (*DeploymentUpdate) ClearUpdatedAt

func (du *DeploymentUpdate) ClearUpdatedAt() *DeploymentUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DeploymentUpdate) ClearUpdatedBy

func (du *DeploymentUpdate) ClearUpdatedBy() *DeploymentUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DeploymentUpdate) Exec

func (du *DeploymentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentUpdate) ExecX

func (du *DeploymentUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentUpdate) Mutation

func (du *DeploymentUpdate) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentUpdate) RemoveDecisionReqIDs

func (du *DeploymentUpdate) RemoveDecisionReqIDs(ids ...int) *DeploymentUpdate

RemoveDecisionReqIDs removes the "decision_reqs" edge to DecisionReqDef entities by IDs.

func (*DeploymentUpdate) RemoveDecisionReqs

func (du *DeploymentUpdate) RemoveDecisionReqs(d ...*DecisionReqDef) *DeploymentUpdate

RemoveDecisionReqs removes "decision_reqs" edges to DecisionReqDef entities.

func (*DeploymentUpdate) RemoveProcDefIDs

func (du *DeploymentUpdate) RemoveProcDefIDs(ids ...int) *DeploymentUpdate

RemoveProcDefIDs removes the "proc_defs" edge to ProcDef entities by IDs.

func (*DeploymentUpdate) RemoveProcDefs

func (du *DeploymentUpdate) RemoveProcDefs(p ...*ProcDef) *DeploymentUpdate

RemoveProcDefs removes "proc_defs" edges to ProcDef entities.

func (*DeploymentUpdate) Save

func (du *DeploymentUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeploymentUpdate) SaveX

func (du *DeploymentUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeploymentUpdate) SetInput

SetInput applies the change-set in the UpdateDeploymentInput on the DeploymentUpdate builder.

func (*DeploymentUpdate) SetName

func (du *DeploymentUpdate) SetName(s string) *DeploymentUpdate

SetName sets the "name" field.

func (*DeploymentUpdate) SetNillableName

func (du *DeploymentUpdate) SetNillableName(s *string) *DeploymentUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableSource

func (du *DeploymentUpdate) SetNillableSource(s *string) *DeploymentUpdate

SetNillableSource sets the "source" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableUpdatedAt

func (du *DeploymentUpdate) SetNillableUpdatedAt(t *time.Time) *DeploymentUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableUpdatedBy

func (du *DeploymentUpdate) SetNillableUpdatedBy(i *int) *DeploymentUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DeploymentUpdate) SetSource

func (du *DeploymentUpdate) SetSource(s string) *DeploymentUpdate

SetSource sets the "source" field.

func (*DeploymentUpdate) SetUpdatedAt

func (du *DeploymentUpdate) SetUpdatedAt(t time.Time) *DeploymentUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpdate) SetUpdatedBy

func (du *DeploymentUpdate) SetUpdatedBy(i int) *DeploymentUpdate

SetUpdatedBy sets the "updated_by" field.

func (*DeploymentUpdate) Where

Where appends a list predicates to the DeploymentUpdate builder.

type DeploymentUpdateOne

type DeploymentUpdateOne struct {
	// contains filtered or unexported fields
}

DeploymentUpdateOne is the builder for updating a single Deployment entity.

func (*DeploymentUpdateOne) AddDecisionReqIDs

func (duo *DeploymentUpdateOne) AddDecisionReqIDs(ids ...int) *DeploymentUpdateOne

AddDecisionReqIDs adds the "decision_reqs" edge to the DecisionReqDef entity by IDs.

func (*DeploymentUpdateOne) AddDecisionReqs

func (duo *DeploymentUpdateOne) AddDecisionReqs(d ...*DecisionReqDef) *DeploymentUpdateOne

AddDecisionReqs adds the "decision_reqs" edges to the DecisionReqDef entity.

func (*DeploymentUpdateOne) AddProcDefIDs

func (duo *DeploymentUpdateOne) AddProcDefIDs(ids ...int) *DeploymentUpdateOne

AddProcDefIDs adds the "proc_defs" edge to the ProcDef entity by IDs.

func (*DeploymentUpdateOne) AddProcDefs

func (duo *DeploymentUpdateOne) AddProcDefs(p ...*ProcDef) *DeploymentUpdateOne

AddProcDefs adds the "proc_defs" edges to the ProcDef entity.

func (*DeploymentUpdateOne) AddUpdatedBy

func (duo *DeploymentUpdateOne) AddUpdatedBy(i int) *DeploymentUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*DeploymentUpdateOne) ClearDecisionReqs

func (duo *DeploymentUpdateOne) ClearDecisionReqs() *DeploymentUpdateOne

ClearDecisionReqs clears all "decision_reqs" edges to the DecisionReqDef entity.

func (*DeploymentUpdateOne) ClearName

func (duo *DeploymentUpdateOne) ClearName() *DeploymentUpdateOne

ClearName clears the value of the "name" field.

func (*DeploymentUpdateOne) ClearProcDefs

func (duo *DeploymentUpdateOne) ClearProcDefs() *DeploymentUpdateOne

ClearProcDefs clears all "proc_defs" edges to the ProcDef entity.

func (*DeploymentUpdateOne) ClearSource

func (duo *DeploymentUpdateOne) ClearSource() *DeploymentUpdateOne

ClearSource clears the value of the "source" field.

func (*DeploymentUpdateOne) ClearUpdatedAt

func (duo *DeploymentUpdateOne) ClearUpdatedAt() *DeploymentUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DeploymentUpdateOne) ClearUpdatedBy

func (duo *DeploymentUpdateOne) ClearUpdatedBy() *DeploymentUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DeploymentUpdateOne) Exec

func (duo *DeploymentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeploymentUpdateOne) ExecX

func (duo *DeploymentUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentUpdateOne) Mutation

func (duo *DeploymentUpdateOne) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentUpdateOne) RemoveDecisionReqIDs

func (duo *DeploymentUpdateOne) RemoveDecisionReqIDs(ids ...int) *DeploymentUpdateOne

RemoveDecisionReqIDs removes the "decision_reqs" edge to DecisionReqDef entities by IDs.

func (*DeploymentUpdateOne) RemoveDecisionReqs

func (duo *DeploymentUpdateOne) RemoveDecisionReqs(d ...*DecisionReqDef) *DeploymentUpdateOne

RemoveDecisionReqs removes "decision_reqs" edges to DecisionReqDef entities.

func (*DeploymentUpdateOne) RemoveProcDefIDs

func (duo *DeploymentUpdateOne) RemoveProcDefIDs(ids ...int) *DeploymentUpdateOne

RemoveProcDefIDs removes the "proc_defs" edge to ProcDef entities by IDs.

func (*DeploymentUpdateOne) RemoveProcDefs

func (duo *DeploymentUpdateOne) RemoveProcDefs(p ...*ProcDef) *DeploymentUpdateOne

RemoveProcDefs removes "proc_defs" edges to ProcDef entities.

func (*DeploymentUpdateOne) Save

func (duo *DeploymentUpdateOne) Save(ctx context.Context) (*Deployment, error)

Save executes the query and returns the updated Deployment entity.

func (*DeploymentUpdateOne) SaveX

func (duo *DeploymentUpdateOne) SaveX(ctx context.Context) *Deployment

SaveX is like Save, but panics if an error occurs.

func (*DeploymentUpdateOne) Select

func (duo *DeploymentUpdateOne) Select(field string, fields ...string) *DeploymentUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeploymentUpdateOne) SetInput

SetInput applies the change-set in the UpdateDeploymentInput on the DeploymentUpdateOne builder.

func (*DeploymentUpdateOne) SetName

SetName sets the "name" field.

func (*DeploymentUpdateOne) SetNillableName

func (duo *DeploymentUpdateOne) SetNillableName(s *string) *DeploymentUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableSource

func (duo *DeploymentUpdateOne) SetNillableSource(s *string) *DeploymentUpdateOne

SetNillableSource sets the "source" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableUpdatedAt

func (duo *DeploymentUpdateOne) SetNillableUpdatedAt(t *time.Time) *DeploymentUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableUpdatedBy

func (duo *DeploymentUpdateOne) SetNillableUpdatedBy(i *int) *DeploymentUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*DeploymentUpdateOne) SetSource

func (duo *DeploymentUpdateOne) SetSource(s string) *DeploymentUpdateOne

SetSource sets the "source" field.

func (*DeploymentUpdateOne) SetUpdatedAt

func (duo *DeploymentUpdateOne) SetUpdatedAt(t time.Time) *DeploymentUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpdateOne) SetUpdatedBy

func (duo *DeploymentUpdateOne) SetUpdatedBy(i int) *DeploymentUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*DeploymentUpdateOne) Where

Where appends a list predicates to the DeploymentUpdate builder.

type DeploymentUpsert

type DeploymentUpsert struct {
	*sql.UpdateSet
}

DeploymentUpsert is the "OnConflict" setter.

func (*DeploymentUpsert) AddUpdatedBy

func (u *DeploymentUpsert) AddUpdatedBy(v int) *DeploymentUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*DeploymentUpsert) ClearName

func (u *DeploymentUpsert) ClearName() *DeploymentUpsert

ClearName clears the value of the "name" field.

func (*DeploymentUpsert) ClearSource

func (u *DeploymentUpsert) ClearSource() *DeploymentUpsert

ClearSource clears the value of the "source" field.

func (*DeploymentUpsert) ClearUpdatedAt

func (u *DeploymentUpsert) ClearUpdatedAt() *DeploymentUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DeploymentUpsert) ClearUpdatedBy

func (u *DeploymentUpsert) ClearUpdatedBy() *DeploymentUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DeploymentUpsert) SetName

func (u *DeploymentUpsert) SetName(v string) *DeploymentUpsert

SetName sets the "name" field.

func (*DeploymentUpsert) SetSource

func (u *DeploymentUpsert) SetSource(v string) *DeploymentUpsert

SetSource sets the "source" field.

func (*DeploymentUpsert) SetUpdatedAt

func (u *DeploymentUpsert) SetUpdatedAt(v time.Time) *DeploymentUpsert

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpsert) SetUpdatedBy

func (u *DeploymentUpsert) SetUpdatedBy(v int) *DeploymentUpsert

SetUpdatedBy sets the "updated_by" field.

func (*DeploymentUpsert) UpdateName

func (u *DeploymentUpsert) UpdateName() *DeploymentUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*DeploymentUpsert) UpdateSource

func (u *DeploymentUpsert) UpdateSource() *DeploymentUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*DeploymentUpsert) UpdateUpdatedAt

func (u *DeploymentUpsert) UpdateUpdatedAt() *DeploymentUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeploymentUpsert) UpdateUpdatedBy

func (u *DeploymentUpsert) UpdateUpdatedBy() *DeploymentUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type DeploymentUpsertBulk

type DeploymentUpsertBulk struct {
	// contains filtered or unexported fields
}

DeploymentUpsertBulk is the builder for "upsert"-ing a bulk of Deployment nodes.

func (*DeploymentUpsertBulk) AddUpdatedBy

func (u *DeploymentUpsertBulk) AddUpdatedBy(v int) *DeploymentUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*DeploymentUpsertBulk) ClearName

ClearName clears the value of the "name" field.

func (*DeploymentUpsertBulk) ClearSource

func (u *DeploymentUpsertBulk) ClearSource() *DeploymentUpsertBulk

ClearSource clears the value of the "source" field.

func (*DeploymentUpsertBulk) ClearUpdatedAt

func (u *DeploymentUpsertBulk) ClearUpdatedAt() *DeploymentUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DeploymentUpsertBulk) ClearUpdatedBy

func (u *DeploymentUpsertBulk) ClearUpdatedBy() *DeploymentUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DeploymentUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeploymentUpsertBulk) Exec

Exec executes the query.

func (*DeploymentUpsertBulk) ExecX

func (u *DeploymentUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Deployment.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeploymentUpsertBulk) SetName

SetName sets the "name" field.

func (*DeploymentUpsertBulk) SetSource

SetSource sets the "source" field.

func (*DeploymentUpsertBulk) SetUpdatedAt

func (u *DeploymentUpsertBulk) SetUpdatedAt(v time.Time) *DeploymentUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpsertBulk) SetUpdatedBy

func (u *DeploymentUpsertBulk) SetUpdatedBy(v int) *DeploymentUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*DeploymentUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeploymentCreateBulk.OnConflict documentation for more info.

func (*DeploymentUpsertBulk) UpdateName

func (u *DeploymentUpsertBulk) UpdateName() *DeploymentUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*DeploymentUpsertBulk) UpdateNewValues

func (u *DeploymentUpsertBulk) UpdateNewValues() *DeploymentUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Deployment.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deployment.FieldID)
		}),
	).
	Exec(ctx)

func (*DeploymentUpsertBulk) UpdateSource

func (u *DeploymentUpsertBulk) UpdateSource() *DeploymentUpsertBulk

UpdateSource sets the "source" field to the value that was provided on create.

func (*DeploymentUpsertBulk) UpdateUpdatedAt

func (u *DeploymentUpsertBulk) UpdateUpdatedAt() *DeploymentUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeploymentUpsertBulk) UpdateUpdatedBy

func (u *DeploymentUpsertBulk) UpdateUpdatedBy() *DeploymentUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type DeploymentUpsertOne

type DeploymentUpsertOne struct {
	// contains filtered or unexported fields
}

DeploymentUpsertOne is the builder for "upsert"-ing

one Deployment node.

func (*DeploymentUpsertOne) AddUpdatedBy

func (u *DeploymentUpsertOne) AddUpdatedBy(v int) *DeploymentUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*DeploymentUpsertOne) ClearName

func (u *DeploymentUpsertOne) ClearName() *DeploymentUpsertOne

ClearName clears the value of the "name" field.

func (*DeploymentUpsertOne) ClearSource

func (u *DeploymentUpsertOne) ClearSource() *DeploymentUpsertOne

ClearSource clears the value of the "source" field.

func (*DeploymentUpsertOne) ClearUpdatedAt

func (u *DeploymentUpsertOne) ClearUpdatedAt() *DeploymentUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*DeploymentUpsertOne) ClearUpdatedBy

func (u *DeploymentUpsertOne) ClearUpdatedBy() *DeploymentUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*DeploymentUpsertOne) DoNothing

func (u *DeploymentUpsertOne) DoNothing() *DeploymentUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeploymentUpsertOne) Exec

Exec executes the query.

func (*DeploymentUpsertOne) ExecX

func (u *DeploymentUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentUpsertOne) ID

func (u *DeploymentUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeploymentUpsertOne) IDX

func (u *DeploymentUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*DeploymentUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Deployment.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeploymentUpsertOne) SetName

SetName sets the "name" field.

func (*DeploymentUpsertOne) SetSource

SetSource sets the "source" field.

func (*DeploymentUpsertOne) SetUpdatedAt

func (u *DeploymentUpsertOne) SetUpdatedAt(v time.Time) *DeploymentUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpsertOne) SetUpdatedBy

func (u *DeploymentUpsertOne) SetUpdatedBy(v int) *DeploymentUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*DeploymentUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeploymentCreate.OnConflict documentation for more info.

func (*DeploymentUpsertOne) UpdateName

func (u *DeploymentUpsertOne) UpdateName() *DeploymentUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*DeploymentUpsertOne) UpdateNewValues

func (u *DeploymentUpsertOne) UpdateNewValues() *DeploymentUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Deployment.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deployment.FieldID)
		}),
	).
	Exec(ctx)

func (*DeploymentUpsertOne) UpdateSource

func (u *DeploymentUpsertOne) UpdateSource() *DeploymentUpsertOne

UpdateSource sets the "source" field to the value that was provided on create.

func (*DeploymentUpsertOne) UpdateUpdatedAt

func (u *DeploymentUpsertOne) UpdateUpdatedAt() *DeploymentUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeploymentUpsertOne) UpdateUpdatedBy

func (u *DeploymentUpsertOne) UpdateUpdatedBy() *DeploymentUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type DeploymentWhereInput

type DeploymentWhereInput struct {
	Predicates []predicate.Deployment  `json:"-"`
	Not        *DeploymentWhereInput   `json:"not,omitempty"`
	Or         []*DeploymentWhereInput `json:"or,omitempty"`
	And        []*DeploymentWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "app_id" field predicates.
	AppID      *int  `json:"appID,omitempty"`
	AppIDNEQ   *int  `json:"appIDNEQ,omitempty"`
	AppIDIn    []int `json:"appIDIn,omitempty"`
	AppIDNotIn []int `json:"appIDNotIn,omitempty"`
	AppIDGT    *int  `json:"appIDGT,omitempty"`
	AppIDGTE   *int  `json:"appIDGTE,omitempty"`
	AppIDLT    *int  `json:"appIDLT,omitempty"`
	AppIDLTE   *int  `json:"appIDLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "source" field predicates.
	Source             *string  `json:"source,omitempty"`
	SourceNEQ          *string  `json:"sourceNEQ,omitempty"`
	SourceIn           []string `json:"sourceIn,omitempty"`
	SourceNotIn        []string `json:"sourceNotIn,omitempty"`
	SourceGT           *string  `json:"sourceGT,omitempty"`
	SourceGTE          *string  `json:"sourceGTE,omitempty"`
	SourceLT           *string  `json:"sourceLT,omitempty"`
	SourceLTE          *string  `json:"sourceLTE,omitempty"`
	SourceContains     *string  `json:"sourceContains,omitempty"`
	SourceHasPrefix    *string  `json:"sourceHasPrefix,omitempty"`
	SourceHasSuffix    *string  `json:"sourceHasSuffix,omitempty"`
	SourceIsNil        bool     `json:"sourceIsNil,omitempty"`
	SourceNotNil       bool     `json:"sourceNotNil,omitempty"`
	SourceEqualFold    *string  `json:"sourceEqualFold,omitempty"`
	SourceContainsFold *string  `json:"sourceContainsFold,omitempty"`

	// "deploy_time" field predicates.
	DeployTime      *time.Time  `json:"deployTime,omitempty"`
	DeployTimeNEQ   *time.Time  `json:"deployTimeNEQ,omitempty"`
	DeployTimeIn    []time.Time `json:"deployTimeIn,omitempty"`
	DeployTimeNotIn []time.Time `json:"deployTimeNotIn,omitempty"`
	DeployTimeGT    *time.Time  `json:"deployTimeGT,omitempty"`
	DeployTimeGTE   *time.Time  `json:"deployTimeGTE,omitempty"`
	DeployTimeLT    *time.Time  `json:"deployTimeLT,omitempty"`
	DeployTimeLTE   *time.Time  `json:"deployTimeLTE,omitempty"`

	// "proc_defs" edge predicates.
	HasProcDefs     *bool                `json:"hasProcDefs,omitempty"`
	HasProcDefsWith []*ProcDefWhereInput `json:"hasProcDefsWith,omitempty"`

	// "decision_reqs" edge predicates.
	HasDecisionReqs     *bool                       `json:"hasDecisionReqs,omitempty"`
	HasDecisionReqsWith []*DecisionReqDefWhereInput `json:"hasDecisionReqsWith,omitempty"`
}

DeploymentWhereInput represents a where input for filtering Deployment queries.

func (*DeploymentWhereInput) AddPredicates

func (i *DeploymentWhereInput) AddPredicates(predicates ...predicate.Deployment)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*DeploymentWhereInput) Filter

Filter applies the DeploymentWhereInput filter on the DeploymentQuery builder.

func (*DeploymentWhereInput) P

P returns a predicate for filtering deployments. An error is returned if the input is empty or invalid.

type Deployments

type Deployments []*Deployment

Deployments is a parsable slice of Deployment.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type IdentityLink struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 流程实例ID
	TaskID int `json:"task_id,omitempty"`
	// 流程定义ID
	ProcDefID int `json:"proc_def_id,omitempty"`
	// 组ID
	GroupID int `json:"group_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// 分配人
	AssignerID int `json:"assigner_id,omitempty"`
	// 分配,候选,参与,上级,抄送
	LinkType identitylink.LinkType `json:"link_type,omitempty"`
	// 初始化,认领,删除,通过,驳回
	OperationType identitylink.OperationType `json:"operation_type,omitempty"`
	// 评论
	Comments string `json:"comments,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the IdentityLinkQuery when eager-loading is set.
	Edges IdentityLinkEdges `json:"edges"`
	// contains filtered or unexported fields
}

IdentityLink is the model entity for the IdentityLink schema.

func (*IdentityLink) GlobalID

func (il *IdentityLink) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given IdentityLink node.

func (*IdentityLink) IsNode

func (*IdentityLink) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*IdentityLink) QueryTask

func (il *IdentityLink) QueryTask() *TaskQuery

QueryTask queries the "task" edge of the IdentityLink entity.

func (*IdentityLink) String

func (il *IdentityLink) String() string

String implements the fmt.Stringer.

func (*IdentityLink) Task

func (il *IdentityLink) Task(ctx context.Context) (*Task, error)

func (*IdentityLink) ToEdge

func (il *IdentityLink) ToEdge(order *IdentityLinkOrder) *IdentityLinkEdge

ToEdge converts IdentityLink into IdentityLinkEdge.

func (*IdentityLink) Unwrap

func (il *IdentityLink) Unwrap() *IdentityLink

Unwrap unwraps the IdentityLink entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*IdentityLink) Update

func (il *IdentityLink) Update() *IdentityLinkUpdateOne

Update returns a builder for updating this IdentityLink. Note that you need to call IdentityLink.Unwrap() before calling this method if this IdentityLink was returned from a transaction, and the transaction was committed or rolled back.

func (*IdentityLink) Value

func (il *IdentityLink) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the IdentityLink. This includes values selected through modifiers, order, etc.

type IdentityLinkClient

type IdentityLinkClient struct {
	// contains filtered or unexported fields
}

IdentityLinkClient is a client for the IdentityLink schema.

func NewIdentityLinkClient

func NewIdentityLinkClient(c config) *IdentityLinkClient

NewIdentityLinkClient returns a client for the IdentityLink from the given config.

func (*IdentityLinkClient) Create

Create returns a builder for creating a IdentityLink entity.

func (*IdentityLinkClient) CreateBulk

func (c *IdentityLinkClient) CreateBulk(builders ...*IdentityLinkCreate) *IdentityLinkCreateBulk

CreateBulk returns a builder for creating a bulk of IdentityLink entities.

func (*IdentityLinkClient) Delete

Delete returns a delete builder for IdentityLink.

func (*IdentityLinkClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IdentityLinkClient) DeleteOneID

func (c *IdentityLinkClient) DeleteOneID(id int) *IdentityLinkDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*IdentityLinkClient) Get

Get returns a IdentityLink entity by its id.

func (*IdentityLinkClient) GetX

GetX is like Get, but panics if an error occurs.

func (*IdentityLinkClient) Hooks

func (c *IdentityLinkClient) Hooks() []Hook

Hooks returns the client hooks.

func (*IdentityLinkClient) Intercept

func (c *IdentityLinkClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `identitylink.Intercept(f(g(h())))`.

func (*IdentityLinkClient) Interceptors

func (c *IdentityLinkClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*IdentityLinkClient) Query

Query returns a query builder for IdentityLink.

func (*IdentityLinkClient) QueryTask

func (c *IdentityLinkClient) QueryTask(il *IdentityLink) *TaskQuery

QueryTask queries the task edge of a IdentityLink.

func (*IdentityLinkClient) Update

Update returns an update builder for IdentityLink.

func (*IdentityLinkClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IdentityLinkClient) UpdateOneID

func (c *IdentityLinkClient) UpdateOneID(id int) *IdentityLinkUpdateOne

UpdateOneID returns an update builder for the given id.

func (*IdentityLinkClient) Use

func (c *IdentityLinkClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `identitylink.Hooks(f(g(h())))`.

type IdentityLinkConnection

type IdentityLinkConnection struct {
	Edges      []*IdentityLinkEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

IdentityLinkConnection is the connection containing edges to IdentityLink.

type IdentityLinkCreate

type IdentityLinkCreate struct {
	// contains filtered or unexported fields
}

IdentityLinkCreate is the builder for creating a IdentityLink entity.

func (*IdentityLinkCreate) Exec

func (ilc *IdentityLinkCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IdentityLinkCreate) ExecX

func (ilc *IdentityLinkCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkCreate) Mutation

func (ilc *IdentityLinkCreate) Mutation() *IdentityLinkMutation

Mutation returns the IdentityLinkMutation object of the builder.

func (*IdentityLinkCreate) OnConflict

func (ilc *IdentityLinkCreate) OnConflict(opts ...sql.ConflictOption) *IdentityLinkUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdentityLink.Create().
	SetTenantID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.IdentityLinkUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*IdentityLinkCreate) OnConflictColumns

func (ilc *IdentityLinkCreate) OnConflictColumns(columns ...string) *IdentityLinkUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdentityLink.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdentityLinkCreate) Save

Save creates the IdentityLink in the database.

func (*IdentityLinkCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*IdentityLinkCreate) SetAssignerID

func (ilc *IdentityLinkCreate) SetAssignerID(i int) *IdentityLinkCreate

SetAssignerID sets the "assigner_id" field.

func (*IdentityLinkCreate) SetComments

func (ilc *IdentityLinkCreate) SetComments(s string) *IdentityLinkCreate

SetComments sets the "comments" field.

func (*IdentityLinkCreate) SetGroupID

func (ilc *IdentityLinkCreate) SetGroupID(i int) *IdentityLinkCreate

SetGroupID sets the "group_id" field.

func (*IdentityLinkCreate) SetID

func (ilc *IdentityLinkCreate) SetID(i int) *IdentityLinkCreate

SetID sets the "id" field.

func (*IdentityLinkCreate) SetInput

SetInput applies the change-set in the CreateIdentityLinkInput on the IdentityLinkCreate builder.

func (*IdentityLinkCreate) SetLinkType

SetLinkType sets the "link_type" field.

func (*IdentityLinkCreate) SetNillableAssignerID

func (ilc *IdentityLinkCreate) SetNillableAssignerID(i *int) *IdentityLinkCreate

SetNillableAssignerID sets the "assigner_id" field if the given value is not nil.

func (*IdentityLinkCreate) SetNillableComments

func (ilc *IdentityLinkCreate) SetNillableComments(s *string) *IdentityLinkCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*IdentityLinkCreate) SetNillableGroupID

func (ilc *IdentityLinkCreate) SetNillableGroupID(i *int) *IdentityLinkCreate

SetNillableGroupID sets the "group_id" field if the given value is not nil.

func (*IdentityLinkCreate) SetNillableID

func (ilc *IdentityLinkCreate) SetNillableID(i *int) *IdentityLinkCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*IdentityLinkCreate) SetNillableUserID

func (ilc *IdentityLinkCreate) SetNillableUserID(i *int) *IdentityLinkCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*IdentityLinkCreate) SetOperationType

SetOperationType sets the "operation_type" field.

func (*IdentityLinkCreate) SetProcDefID

func (ilc *IdentityLinkCreate) SetProcDefID(i int) *IdentityLinkCreate

SetProcDefID sets the "proc_def_id" field.

func (*IdentityLinkCreate) SetTask

func (ilc *IdentityLinkCreate) SetTask(t *Task) *IdentityLinkCreate

SetTask sets the "task" edge to the Task entity.

func (*IdentityLinkCreate) SetTaskID

func (ilc *IdentityLinkCreate) SetTaskID(i int) *IdentityLinkCreate

SetTaskID sets the "task_id" field.

func (*IdentityLinkCreate) SetTenantID

func (ilc *IdentityLinkCreate) SetTenantID(i int) *IdentityLinkCreate

SetTenantID sets the "tenant_id" field.

func (*IdentityLinkCreate) SetUserID

func (ilc *IdentityLinkCreate) SetUserID(i int) *IdentityLinkCreate

SetUserID sets the "user_id" field.

type IdentityLinkCreateBulk

type IdentityLinkCreateBulk struct {
	// contains filtered or unexported fields
}

IdentityLinkCreateBulk is the builder for creating many IdentityLink entities in bulk.

func (*IdentityLinkCreateBulk) Exec

func (ilcb *IdentityLinkCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IdentityLinkCreateBulk) ExecX

func (ilcb *IdentityLinkCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdentityLink.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.IdentityLinkUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*IdentityLinkCreateBulk) OnConflictColumns

func (ilcb *IdentityLinkCreateBulk) OnConflictColumns(columns ...string) *IdentityLinkUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdentityLink.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdentityLinkCreateBulk) Save

Save creates the IdentityLink entities in the database.

func (*IdentityLinkCreateBulk) SaveX

func (ilcb *IdentityLinkCreateBulk) SaveX(ctx context.Context) []*IdentityLink

SaveX is like Save, but panics if an error occurs.

type IdentityLinkDelete

type IdentityLinkDelete struct {
	// contains filtered or unexported fields
}

IdentityLinkDelete is the builder for deleting a IdentityLink entity.

func (*IdentityLinkDelete) Exec

func (ild *IdentityLinkDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*IdentityLinkDelete) ExecX

func (ild *IdentityLinkDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkDelete) Where

Where appends a list predicates to the IdentityLinkDelete builder.

type IdentityLinkDeleteOne

type IdentityLinkDeleteOne struct {
	// contains filtered or unexported fields
}

IdentityLinkDeleteOne is the builder for deleting a single IdentityLink entity.

func (*IdentityLinkDeleteOne) Exec

func (ildo *IdentityLinkDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*IdentityLinkDeleteOne) ExecX

func (ildo *IdentityLinkDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkDeleteOne) Where

Where appends a list predicates to the IdentityLinkDelete builder.

type IdentityLinkEdge

type IdentityLinkEdge struct {
	Node   *IdentityLink `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

IdentityLinkEdge is the edge representation of IdentityLink.

type IdentityLinkEdges

type IdentityLinkEdges struct {
	// 流程任务
	Task *Task `json:"task,omitempty"`
	// contains filtered or unexported fields
}

IdentityLinkEdges holds the relations/edges for other nodes in the graph.

func (IdentityLinkEdges) TaskOrErr

func (e IdentityLinkEdges) TaskOrErr() (*Task, error)

TaskOrErr returns the Task value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type IdentityLinkGroupBy

type IdentityLinkGroupBy struct {
	// contains filtered or unexported fields
}

IdentityLinkGroupBy is the group-by builder for IdentityLink entities.

func (*IdentityLinkGroupBy) Aggregate

func (ilgb *IdentityLinkGroupBy) Aggregate(fns ...AggregateFunc) *IdentityLinkGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*IdentityLinkGroupBy) Bool

func (s *IdentityLinkGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) BoolX

func (s *IdentityLinkGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdentityLinkGroupBy) Bools

func (s *IdentityLinkGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) BoolsX

func (s *IdentityLinkGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdentityLinkGroupBy) Float64

func (s *IdentityLinkGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) Float64X

func (s *IdentityLinkGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdentityLinkGroupBy) Float64s

func (s *IdentityLinkGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) Float64sX

func (s *IdentityLinkGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdentityLinkGroupBy) Int

func (s *IdentityLinkGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) IntX

func (s *IdentityLinkGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdentityLinkGroupBy) Ints

func (s *IdentityLinkGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) IntsX

func (s *IdentityLinkGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdentityLinkGroupBy) Scan

func (ilgb *IdentityLinkGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdentityLinkGroupBy) ScanX

func (s *IdentityLinkGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdentityLinkGroupBy) String

func (s *IdentityLinkGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) StringX

func (s *IdentityLinkGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdentityLinkGroupBy) Strings

func (s *IdentityLinkGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdentityLinkGroupBy) StringsX

func (s *IdentityLinkGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdentityLinkMutation

type IdentityLinkMutation struct {
	// contains filtered or unexported fields
}

IdentityLinkMutation represents an operation that mutates the IdentityLink nodes in the graph.

func (*IdentityLinkMutation) AddAssignerID

func (m *IdentityLinkMutation) AddAssignerID(i int)

AddAssignerID adds i to the "assigner_id" field.

func (*IdentityLinkMutation) AddField

func (m *IdentityLinkMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*IdentityLinkMutation) AddGroupID

func (m *IdentityLinkMutation) AddGroupID(i int)

AddGroupID adds i to the "group_id" field.

func (*IdentityLinkMutation) AddProcDefID

func (m *IdentityLinkMutation) AddProcDefID(i int)

AddProcDefID adds i to the "proc_def_id" field.

func (*IdentityLinkMutation) AddTenantID

func (m *IdentityLinkMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*IdentityLinkMutation) AddUserID

func (m *IdentityLinkMutation) AddUserID(i int)

AddUserID adds i to the "user_id" field.

func (*IdentityLinkMutation) AddedAssignerID

func (m *IdentityLinkMutation) AddedAssignerID() (r int, exists bool)

AddedAssignerID returns the value that was added to the "assigner_id" field in this mutation.

func (*IdentityLinkMutation) AddedEdges

func (m *IdentityLinkMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*IdentityLinkMutation) AddedField

func (m *IdentityLinkMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*IdentityLinkMutation) AddedFields

func (m *IdentityLinkMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*IdentityLinkMutation) AddedGroupID

func (m *IdentityLinkMutation) AddedGroupID() (r int, exists bool)

AddedGroupID returns the value that was added to the "group_id" field in this mutation.

func (*IdentityLinkMutation) AddedIDs

func (m *IdentityLinkMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*IdentityLinkMutation) AddedProcDefID

func (m *IdentityLinkMutation) AddedProcDefID() (r int, exists bool)

AddedProcDefID returns the value that was added to the "proc_def_id" field in this mutation.

func (*IdentityLinkMutation) AddedTenantID

func (m *IdentityLinkMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*IdentityLinkMutation) AddedUserID

func (m *IdentityLinkMutation) AddedUserID() (r int, exists bool)

AddedUserID returns the value that was added to the "user_id" field in this mutation.

func (*IdentityLinkMutation) AssignerID

func (m *IdentityLinkMutation) AssignerID() (r int, exists bool)

AssignerID returns the value of the "assigner_id" field in the mutation.

func (*IdentityLinkMutation) AssignerIDCleared

func (m *IdentityLinkMutation) AssignerIDCleared() bool

AssignerIDCleared returns if the "assigner_id" field was cleared in this mutation.

func (*IdentityLinkMutation) ClearAssignerID

func (m *IdentityLinkMutation) ClearAssignerID()

ClearAssignerID clears the value of the "assigner_id" field.

func (*IdentityLinkMutation) ClearComments

func (m *IdentityLinkMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*IdentityLinkMutation) ClearEdge

func (m *IdentityLinkMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*IdentityLinkMutation) ClearField

func (m *IdentityLinkMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*IdentityLinkMutation) ClearGroupID

func (m *IdentityLinkMutation) ClearGroupID()

ClearGroupID clears the value of the "group_id" field.

func (*IdentityLinkMutation) ClearTask

func (m *IdentityLinkMutation) ClearTask()

ClearTask clears the "task" edge to the Task entity.

func (*IdentityLinkMutation) ClearUserID

func (m *IdentityLinkMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*IdentityLinkMutation) ClearedEdges

func (m *IdentityLinkMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*IdentityLinkMutation) ClearedFields

func (m *IdentityLinkMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (IdentityLinkMutation) Client

func (m IdentityLinkMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*IdentityLinkMutation) Comments

func (m *IdentityLinkMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*IdentityLinkMutation) CommentsCleared

func (m *IdentityLinkMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*IdentityLinkMutation) EdgeCleared

func (m *IdentityLinkMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*IdentityLinkMutation) Field

func (m *IdentityLinkMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*IdentityLinkMutation) FieldCleared

func (m *IdentityLinkMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*IdentityLinkMutation) Fields

func (m *IdentityLinkMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*IdentityLinkMutation) GroupID

func (m *IdentityLinkMutation) GroupID() (r int, exists bool)

GroupID returns the value of the "group_id" field in the mutation.

func (*IdentityLinkMutation) GroupIDCleared

func (m *IdentityLinkMutation) GroupIDCleared() bool

GroupIDCleared returns if the "group_id" field was cleared in this mutation.

func (*IdentityLinkMutation) ID

func (m *IdentityLinkMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*IdentityLinkMutation) IDs

func (m *IdentityLinkMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*IdentityLinkMutation) LinkType

func (m *IdentityLinkMutation) LinkType() (r identitylink.LinkType, exists bool)

LinkType returns the value of the "link_type" field in the mutation.

func (*IdentityLinkMutation) OldAssignerID

func (m *IdentityLinkMutation) OldAssignerID(ctx context.Context) (v int, err error)

OldAssignerID returns the old "assigner_id" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldComments

func (m *IdentityLinkMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldField

func (m *IdentityLinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*IdentityLinkMutation) OldGroupID

func (m *IdentityLinkMutation) OldGroupID(ctx context.Context) (v int, err error)

OldGroupID returns the old "group_id" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldLinkType

func (m *IdentityLinkMutation) OldLinkType(ctx context.Context) (v identitylink.LinkType, err error)

OldLinkType returns the old "link_type" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldOperationType

func (m *IdentityLinkMutation) OldOperationType(ctx context.Context) (v identitylink.OperationType, err error)

OldOperationType returns the old "operation_type" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldProcDefID

func (m *IdentityLinkMutation) OldProcDefID(ctx context.Context) (v int, err error)

OldProcDefID returns the old "proc_def_id" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldTaskID

func (m *IdentityLinkMutation) OldTaskID(ctx context.Context) (v int, err error)

OldTaskID returns the old "task_id" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldTenantID

func (m *IdentityLinkMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) OldUserID

func (m *IdentityLinkMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the IdentityLink entity. If the IdentityLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*IdentityLinkMutation) Op

func (m *IdentityLinkMutation) Op() Op

Op returns the operation name.

func (*IdentityLinkMutation) OperationType

func (m *IdentityLinkMutation) OperationType() (r identitylink.OperationType, exists bool)

OperationType returns the value of the "operation_type" field in the mutation.

func (*IdentityLinkMutation) ProcDefID

func (m *IdentityLinkMutation) ProcDefID() (r int, exists bool)

ProcDefID returns the value of the "proc_def_id" field in the mutation.

func (*IdentityLinkMutation) RemovedEdges

func (m *IdentityLinkMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*IdentityLinkMutation) RemovedIDs

func (m *IdentityLinkMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*IdentityLinkMutation) ResetAssignerID

func (m *IdentityLinkMutation) ResetAssignerID()

ResetAssignerID resets all changes to the "assigner_id" field.

func (*IdentityLinkMutation) ResetComments

func (m *IdentityLinkMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*IdentityLinkMutation) ResetEdge

func (m *IdentityLinkMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*IdentityLinkMutation) ResetField

func (m *IdentityLinkMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*IdentityLinkMutation) ResetGroupID

func (m *IdentityLinkMutation) ResetGroupID()

ResetGroupID resets all changes to the "group_id" field.

func (*IdentityLinkMutation) ResetLinkType

func (m *IdentityLinkMutation) ResetLinkType()

ResetLinkType resets all changes to the "link_type" field.

func (*IdentityLinkMutation) ResetOperationType

func (m *IdentityLinkMutation) ResetOperationType()

ResetOperationType resets all changes to the "operation_type" field.

func (*IdentityLinkMutation) ResetProcDefID

func (m *IdentityLinkMutation) ResetProcDefID()

ResetProcDefID resets all changes to the "proc_def_id" field.

func (*IdentityLinkMutation) ResetTask

func (m *IdentityLinkMutation) ResetTask()

ResetTask resets all changes to the "task" edge.

func (*IdentityLinkMutation) ResetTaskID

func (m *IdentityLinkMutation) ResetTaskID()

ResetTaskID resets all changes to the "task_id" field.

func (*IdentityLinkMutation) ResetTenantID

func (m *IdentityLinkMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*IdentityLinkMutation) ResetUserID

func (m *IdentityLinkMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*IdentityLinkMutation) SetAssignerID

func (m *IdentityLinkMutation) SetAssignerID(i int)

SetAssignerID sets the "assigner_id" field.

func (*IdentityLinkMutation) SetComments

func (m *IdentityLinkMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*IdentityLinkMutation) SetField

func (m *IdentityLinkMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*IdentityLinkMutation) SetGroupID

func (m *IdentityLinkMutation) SetGroupID(i int)

SetGroupID sets the "group_id" field.

func (*IdentityLinkMutation) SetID

func (m *IdentityLinkMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of IdentityLink entities.

func (*IdentityLinkMutation) SetLinkType

func (m *IdentityLinkMutation) SetLinkType(it identitylink.LinkType)

SetLinkType sets the "link_type" field.

func (*IdentityLinkMutation) SetOp

func (m *IdentityLinkMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IdentityLinkMutation) SetOperationType

func (m *IdentityLinkMutation) SetOperationType(it identitylink.OperationType)

SetOperationType sets the "operation_type" field.

func (*IdentityLinkMutation) SetProcDefID

func (m *IdentityLinkMutation) SetProcDefID(i int)

SetProcDefID sets the "proc_def_id" field.

func (*IdentityLinkMutation) SetTaskID

func (m *IdentityLinkMutation) SetTaskID(i int)

SetTaskID sets the "task_id" field.

func (*IdentityLinkMutation) SetTenantID

func (m *IdentityLinkMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*IdentityLinkMutation) SetUserID

func (m *IdentityLinkMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*IdentityLinkMutation) TaskCleared

func (m *IdentityLinkMutation) TaskCleared() bool

TaskCleared reports if the "task" edge to the Task entity was cleared.

func (*IdentityLinkMutation) TaskID

func (m *IdentityLinkMutation) TaskID() (r int, exists bool)

TaskID returns the value of the "task_id" field in the mutation.

func (*IdentityLinkMutation) TaskIDs

func (m *IdentityLinkMutation) TaskIDs() (ids []int)

TaskIDs returns the "task" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TaskID instead. It exists only for internal usage by the builders.

func (*IdentityLinkMutation) TenantID

func (m *IdentityLinkMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (IdentityLinkMutation) Tx

func (m IdentityLinkMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*IdentityLinkMutation) Type

func (m *IdentityLinkMutation) Type() string

Type returns the node type of this mutation (IdentityLink).

func (*IdentityLinkMutation) UserID

func (m *IdentityLinkMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*IdentityLinkMutation) UserIDCleared

func (m *IdentityLinkMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*IdentityLinkMutation) Where

Where appends a list predicates to the IdentityLinkMutation builder.

func (*IdentityLinkMutation) WhereP

func (m *IdentityLinkMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IdentityLinkMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IdentityLinkOrder

type IdentityLinkOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *IdentityLinkOrderField `json:"field"`
}

IdentityLinkOrder defines the ordering of IdentityLink.

type IdentityLinkOrderField

type IdentityLinkOrderField struct {
	// Value extracts the ordering value from the given IdentityLink.
	Value func(*IdentityLink) (ent.Value, error)
	// contains filtered or unexported fields
}

IdentityLinkOrderField defines the ordering field of IdentityLink.

type IdentityLinkPaginateOption

type IdentityLinkPaginateOption func(*identitylinkPager) error

IdentityLinkPaginateOption enables pagination customization.

func WithIdentityLinkFilter

func WithIdentityLinkFilter(filter func(*IdentityLinkQuery) (*IdentityLinkQuery, error)) IdentityLinkPaginateOption

WithIdentityLinkFilter configures pagination filter.

func WithIdentityLinkOrder

func WithIdentityLinkOrder(order *IdentityLinkOrder) IdentityLinkPaginateOption

WithIdentityLinkOrder configures pagination ordering.

type IdentityLinkQuery

type IdentityLinkQuery struct {
	// contains filtered or unexported fields
}

IdentityLinkQuery is the builder for querying IdentityLink entities.

func (*IdentityLinkQuery) Aggregate

func (ilq *IdentityLinkQuery) Aggregate(fns ...AggregateFunc) *IdentityLinkSelect

Aggregate returns a IdentityLinkSelect configured with the given aggregations.

func (*IdentityLinkQuery) All

func (ilq *IdentityLinkQuery) All(ctx context.Context) ([]*IdentityLink, error)

All executes the query and returns a list of IdentityLinks.

func (*IdentityLinkQuery) AllX

func (ilq *IdentityLinkQuery) AllX(ctx context.Context) []*IdentityLink

AllX is like All, but panics if an error occurs.

func (*IdentityLinkQuery) Clone

func (ilq *IdentityLinkQuery) Clone() *IdentityLinkQuery

Clone returns a duplicate of the IdentityLinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*IdentityLinkQuery) CollectFields

func (il *IdentityLinkQuery) CollectFields(ctx context.Context, satisfies ...string) (*IdentityLinkQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*IdentityLinkQuery) Count

func (ilq *IdentityLinkQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IdentityLinkQuery) CountX

func (ilq *IdentityLinkQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*IdentityLinkQuery) Exist

func (ilq *IdentityLinkQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*IdentityLinkQuery) ExistX

func (ilq *IdentityLinkQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*IdentityLinkQuery) First

func (ilq *IdentityLinkQuery) First(ctx context.Context) (*IdentityLink, error)

First returns the first IdentityLink entity from the query. Returns a *NotFoundError when no IdentityLink was found.

func (*IdentityLinkQuery) FirstID

func (ilq *IdentityLinkQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first IdentityLink ID from the query. Returns a *NotFoundError when no IdentityLink ID was found.

func (*IdentityLinkQuery) FirstIDX

func (ilq *IdentityLinkQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*IdentityLinkQuery) FirstX

func (ilq *IdentityLinkQuery) FirstX(ctx context.Context) *IdentityLink

FirstX is like First, but panics if an error occurs.

func (*IdentityLinkQuery) GroupBy

func (ilq *IdentityLinkQuery) GroupBy(field string, fields ...string) *IdentityLinkGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	TenantID int `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IdentityLink.Query().
	GroupBy(identitylink.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IdentityLinkQuery) IDs

func (ilq *IdentityLinkQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of IdentityLink IDs.

func (*IdentityLinkQuery) IDsX

func (ilq *IdentityLinkQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*IdentityLinkQuery) Limit

func (ilq *IdentityLinkQuery) Limit(limit int) *IdentityLinkQuery

Limit the number of records to be returned by this query.

func (*IdentityLinkQuery) Offset

func (ilq *IdentityLinkQuery) Offset(offset int) *IdentityLinkQuery

Offset to start from.

func (*IdentityLinkQuery) Only

func (ilq *IdentityLinkQuery) Only(ctx context.Context) (*IdentityLink, error)

Only returns a single IdentityLink entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IdentityLink entity is found. Returns a *NotFoundError when no IdentityLink entities are found.

func (*IdentityLinkQuery) OnlyID

func (ilq *IdentityLinkQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only IdentityLink ID in the query. Returns a *NotSingularError when more than one IdentityLink ID is found. Returns a *NotFoundError when no entities are found.

func (*IdentityLinkQuery) OnlyIDX

func (ilq *IdentityLinkQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*IdentityLinkQuery) OnlyX

func (ilq *IdentityLinkQuery) OnlyX(ctx context.Context) *IdentityLink

OnlyX is like Only, but panics if an error occurs.

func (*IdentityLinkQuery) Order

Order specifies how the records should be ordered.

func (*IdentityLinkQuery) Paginate

func (il *IdentityLinkQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...IdentityLinkPaginateOption,
) (*IdentityLinkConnection, error)

Paginate executes the query and returns a relay based cursor connection to IdentityLink.

func (*IdentityLinkQuery) QueryTask

func (ilq *IdentityLinkQuery) QueryTask() *TaskQuery

QueryTask chains the current query on the "task" edge.

func (*IdentityLinkQuery) Select

func (ilq *IdentityLinkQuery) Select(fields ...string) *IdentityLinkSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	TenantID int `json:"tenant_id,omitempty"`
}

client.IdentityLink.Query().
	Select(identitylink.FieldTenantID).
	Scan(ctx, &v)

func (*IdentityLinkQuery) Unique

func (ilq *IdentityLinkQuery) Unique(unique bool) *IdentityLinkQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*IdentityLinkQuery) Where

Where adds a new predicate for the IdentityLinkQuery builder.

func (*IdentityLinkQuery) WithTask

func (ilq *IdentityLinkQuery) WithTask(opts ...func(*TaskQuery)) *IdentityLinkQuery

WithTask tells the query-builder to eager-load the nodes that are connected to the "task" edge. The optional arguments are used to configure the query builder of the edge.

type IdentityLinkSelect

type IdentityLinkSelect struct {
	*IdentityLinkQuery
	// contains filtered or unexported fields
}

IdentityLinkSelect is the builder for selecting fields of IdentityLink entities.

func (*IdentityLinkSelect) Aggregate

func (ils *IdentityLinkSelect) Aggregate(fns ...AggregateFunc) *IdentityLinkSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IdentityLinkSelect) Bool

func (s *IdentityLinkSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) BoolX

func (s *IdentityLinkSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdentityLinkSelect) Bools

func (s *IdentityLinkSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) BoolsX

func (s *IdentityLinkSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdentityLinkSelect) Float64

func (s *IdentityLinkSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) Float64X

func (s *IdentityLinkSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdentityLinkSelect) Float64s

func (s *IdentityLinkSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) Float64sX

func (s *IdentityLinkSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdentityLinkSelect) Int

func (s *IdentityLinkSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) IntX

func (s *IdentityLinkSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdentityLinkSelect) Ints

func (s *IdentityLinkSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) IntsX

func (s *IdentityLinkSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdentityLinkSelect) Scan

func (ils *IdentityLinkSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdentityLinkSelect) ScanX

func (s *IdentityLinkSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdentityLinkSelect) String

func (s *IdentityLinkSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) StringX

func (s *IdentityLinkSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdentityLinkSelect) Strings

func (s *IdentityLinkSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdentityLinkSelect) StringsX

func (s *IdentityLinkSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdentityLinkUpdate

type IdentityLinkUpdate struct {
	// contains filtered or unexported fields
}

IdentityLinkUpdate is the builder for updating IdentityLink entities.

func (*IdentityLinkUpdate) AddAssignerID

func (ilu *IdentityLinkUpdate) AddAssignerID(i int) *IdentityLinkUpdate

AddAssignerID adds i to the "assigner_id" field.

func (*IdentityLinkUpdate) AddGroupID

func (ilu *IdentityLinkUpdate) AddGroupID(i int) *IdentityLinkUpdate

AddGroupID adds i to the "group_id" field.

func (*IdentityLinkUpdate) AddUserID

func (ilu *IdentityLinkUpdate) AddUserID(i int) *IdentityLinkUpdate

AddUserID adds i to the "user_id" field.

func (*IdentityLinkUpdate) ClearAssignerID

func (ilu *IdentityLinkUpdate) ClearAssignerID() *IdentityLinkUpdate

ClearAssignerID clears the value of the "assigner_id" field.

func (*IdentityLinkUpdate) ClearComments

func (ilu *IdentityLinkUpdate) ClearComments() *IdentityLinkUpdate

ClearComments clears the value of the "comments" field.

func (*IdentityLinkUpdate) ClearGroupID

func (ilu *IdentityLinkUpdate) ClearGroupID() *IdentityLinkUpdate

ClearGroupID clears the value of the "group_id" field.

func (*IdentityLinkUpdate) ClearTask

func (ilu *IdentityLinkUpdate) ClearTask() *IdentityLinkUpdate

ClearTask clears the "task" edge to the Task entity.

func (*IdentityLinkUpdate) ClearUserID

func (ilu *IdentityLinkUpdate) ClearUserID() *IdentityLinkUpdate

ClearUserID clears the value of the "user_id" field.

func (*IdentityLinkUpdate) Exec

func (ilu *IdentityLinkUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IdentityLinkUpdate) ExecX

func (ilu *IdentityLinkUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkUpdate) Mutation

func (ilu *IdentityLinkUpdate) Mutation() *IdentityLinkMutation

Mutation returns the IdentityLinkMutation object of the builder.

func (*IdentityLinkUpdate) Save

func (ilu *IdentityLinkUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*IdentityLinkUpdate) SaveX

func (ilu *IdentityLinkUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*IdentityLinkUpdate) SetAssignerID

func (ilu *IdentityLinkUpdate) SetAssignerID(i int) *IdentityLinkUpdate

SetAssignerID sets the "assigner_id" field.

func (*IdentityLinkUpdate) SetComments

func (ilu *IdentityLinkUpdate) SetComments(s string) *IdentityLinkUpdate

SetComments sets the "comments" field.

func (*IdentityLinkUpdate) SetGroupID

func (ilu *IdentityLinkUpdate) SetGroupID(i int) *IdentityLinkUpdate

SetGroupID sets the "group_id" field.

func (*IdentityLinkUpdate) SetInput

SetInput applies the change-set in the UpdateIdentityLinkInput on the IdentityLinkUpdate builder.

func (*IdentityLinkUpdate) SetLinkType

SetLinkType sets the "link_type" field.

func (*IdentityLinkUpdate) SetNillableAssignerID

func (ilu *IdentityLinkUpdate) SetNillableAssignerID(i *int) *IdentityLinkUpdate

SetNillableAssignerID sets the "assigner_id" field if the given value is not nil.

func (*IdentityLinkUpdate) SetNillableComments

func (ilu *IdentityLinkUpdate) SetNillableComments(s *string) *IdentityLinkUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*IdentityLinkUpdate) SetNillableGroupID

func (ilu *IdentityLinkUpdate) SetNillableGroupID(i *int) *IdentityLinkUpdate

SetNillableGroupID sets the "group_id" field if the given value is not nil.

func (*IdentityLinkUpdate) SetNillableUserID

func (ilu *IdentityLinkUpdate) SetNillableUserID(i *int) *IdentityLinkUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*IdentityLinkUpdate) SetOperationType

SetOperationType sets the "operation_type" field.

func (*IdentityLinkUpdate) SetTask

func (ilu *IdentityLinkUpdate) SetTask(t *Task) *IdentityLinkUpdate

SetTask sets the "task" edge to the Task entity.

func (*IdentityLinkUpdate) SetTaskID

func (ilu *IdentityLinkUpdate) SetTaskID(i int) *IdentityLinkUpdate

SetTaskID sets the "task_id" field.

func (*IdentityLinkUpdate) SetUserID

func (ilu *IdentityLinkUpdate) SetUserID(i int) *IdentityLinkUpdate

SetUserID sets the "user_id" field.

func (*IdentityLinkUpdate) Where

Where appends a list predicates to the IdentityLinkUpdate builder.

type IdentityLinkUpdateOne

type IdentityLinkUpdateOne struct {
	// contains filtered or unexported fields
}

IdentityLinkUpdateOne is the builder for updating a single IdentityLink entity.

func (*IdentityLinkUpdateOne) AddAssignerID

func (iluo *IdentityLinkUpdateOne) AddAssignerID(i int) *IdentityLinkUpdateOne

AddAssignerID adds i to the "assigner_id" field.

func (*IdentityLinkUpdateOne) AddGroupID

func (iluo *IdentityLinkUpdateOne) AddGroupID(i int) *IdentityLinkUpdateOne

AddGroupID adds i to the "group_id" field.

func (*IdentityLinkUpdateOne) AddUserID

func (iluo *IdentityLinkUpdateOne) AddUserID(i int) *IdentityLinkUpdateOne

AddUserID adds i to the "user_id" field.

func (*IdentityLinkUpdateOne) ClearAssignerID

func (iluo *IdentityLinkUpdateOne) ClearAssignerID() *IdentityLinkUpdateOne

ClearAssignerID clears the value of the "assigner_id" field.

func (*IdentityLinkUpdateOne) ClearComments

func (iluo *IdentityLinkUpdateOne) ClearComments() *IdentityLinkUpdateOne

ClearComments clears the value of the "comments" field.

func (*IdentityLinkUpdateOne) ClearGroupID

func (iluo *IdentityLinkUpdateOne) ClearGroupID() *IdentityLinkUpdateOne

ClearGroupID clears the value of the "group_id" field.

func (*IdentityLinkUpdateOne) ClearTask

func (iluo *IdentityLinkUpdateOne) ClearTask() *IdentityLinkUpdateOne

ClearTask clears the "task" edge to the Task entity.

func (*IdentityLinkUpdateOne) ClearUserID

func (iluo *IdentityLinkUpdateOne) ClearUserID() *IdentityLinkUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*IdentityLinkUpdateOne) Exec

func (iluo *IdentityLinkUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*IdentityLinkUpdateOne) ExecX

func (iluo *IdentityLinkUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkUpdateOne) Mutation

func (iluo *IdentityLinkUpdateOne) Mutation() *IdentityLinkMutation

Mutation returns the IdentityLinkMutation object of the builder.

func (*IdentityLinkUpdateOne) Save

Save executes the query and returns the updated IdentityLink entity.

func (*IdentityLinkUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*IdentityLinkUpdateOne) Select

func (iluo *IdentityLinkUpdateOne) Select(field string, fields ...string) *IdentityLinkUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IdentityLinkUpdateOne) SetAssignerID

func (iluo *IdentityLinkUpdateOne) SetAssignerID(i int) *IdentityLinkUpdateOne

SetAssignerID sets the "assigner_id" field.

func (*IdentityLinkUpdateOne) SetComments

func (iluo *IdentityLinkUpdateOne) SetComments(s string) *IdentityLinkUpdateOne

SetComments sets the "comments" field.

func (*IdentityLinkUpdateOne) SetGroupID

func (iluo *IdentityLinkUpdateOne) SetGroupID(i int) *IdentityLinkUpdateOne

SetGroupID sets the "group_id" field.

func (*IdentityLinkUpdateOne) SetInput

SetInput applies the change-set in the UpdateIdentityLinkInput on the IdentityLinkUpdateOne builder.

func (*IdentityLinkUpdateOne) SetLinkType

SetLinkType sets the "link_type" field.

func (*IdentityLinkUpdateOne) SetNillableAssignerID

func (iluo *IdentityLinkUpdateOne) SetNillableAssignerID(i *int) *IdentityLinkUpdateOne

SetNillableAssignerID sets the "assigner_id" field if the given value is not nil.

func (*IdentityLinkUpdateOne) SetNillableComments

func (iluo *IdentityLinkUpdateOne) SetNillableComments(s *string) *IdentityLinkUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*IdentityLinkUpdateOne) SetNillableGroupID

func (iluo *IdentityLinkUpdateOne) SetNillableGroupID(i *int) *IdentityLinkUpdateOne

SetNillableGroupID sets the "group_id" field if the given value is not nil.

func (*IdentityLinkUpdateOne) SetNillableUserID

func (iluo *IdentityLinkUpdateOne) SetNillableUserID(i *int) *IdentityLinkUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*IdentityLinkUpdateOne) SetOperationType

SetOperationType sets the "operation_type" field.

func (*IdentityLinkUpdateOne) SetTask

SetTask sets the "task" edge to the Task entity.

func (*IdentityLinkUpdateOne) SetTaskID

func (iluo *IdentityLinkUpdateOne) SetTaskID(i int) *IdentityLinkUpdateOne

SetTaskID sets the "task_id" field.

func (*IdentityLinkUpdateOne) SetUserID

func (iluo *IdentityLinkUpdateOne) SetUserID(i int) *IdentityLinkUpdateOne

SetUserID sets the "user_id" field.

func (*IdentityLinkUpdateOne) Where

Where appends a list predicates to the IdentityLinkUpdate builder.

type IdentityLinkUpsert

type IdentityLinkUpsert struct {
	*sql.UpdateSet
}

IdentityLinkUpsert is the "OnConflict" setter.

func (*IdentityLinkUpsert) AddAssignerID

func (u *IdentityLinkUpsert) AddAssignerID(v int) *IdentityLinkUpsert

AddAssignerID adds v to the "assigner_id" field.

func (*IdentityLinkUpsert) AddGroupID

func (u *IdentityLinkUpsert) AddGroupID(v int) *IdentityLinkUpsert

AddGroupID adds v to the "group_id" field.

func (*IdentityLinkUpsert) AddUserID

func (u *IdentityLinkUpsert) AddUserID(v int) *IdentityLinkUpsert

AddUserID adds v to the "user_id" field.

func (*IdentityLinkUpsert) ClearAssignerID

func (u *IdentityLinkUpsert) ClearAssignerID() *IdentityLinkUpsert

ClearAssignerID clears the value of the "assigner_id" field.

func (*IdentityLinkUpsert) ClearComments

func (u *IdentityLinkUpsert) ClearComments() *IdentityLinkUpsert

ClearComments clears the value of the "comments" field.

func (*IdentityLinkUpsert) ClearGroupID

func (u *IdentityLinkUpsert) ClearGroupID() *IdentityLinkUpsert

ClearGroupID clears the value of the "group_id" field.

func (*IdentityLinkUpsert) ClearUserID

func (u *IdentityLinkUpsert) ClearUserID() *IdentityLinkUpsert

ClearUserID clears the value of the "user_id" field.

func (*IdentityLinkUpsert) SetAssignerID

func (u *IdentityLinkUpsert) SetAssignerID(v int) *IdentityLinkUpsert

SetAssignerID sets the "assigner_id" field.

func (*IdentityLinkUpsert) SetComments

func (u *IdentityLinkUpsert) SetComments(v string) *IdentityLinkUpsert

SetComments sets the "comments" field.

func (*IdentityLinkUpsert) SetGroupID

func (u *IdentityLinkUpsert) SetGroupID(v int) *IdentityLinkUpsert

SetGroupID sets the "group_id" field.

func (*IdentityLinkUpsert) SetLinkType

SetLinkType sets the "link_type" field.

func (*IdentityLinkUpsert) SetOperationType

SetOperationType sets the "operation_type" field.

func (*IdentityLinkUpsert) SetTaskID

func (u *IdentityLinkUpsert) SetTaskID(v int) *IdentityLinkUpsert

SetTaskID sets the "task_id" field.

func (*IdentityLinkUpsert) SetUserID

func (u *IdentityLinkUpsert) SetUserID(v int) *IdentityLinkUpsert

SetUserID sets the "user_id" field.

func (*IdentityLinkUpsert) UpdateAssignerID

func (u *IdentityLinkUpsert) UpdateAssignerID() *IdentityLinkUpsert

UpdateAssignerID sets the "assigner_id" field to the value that was provided on create.

func (*IdentityLinkUpsert) UpdateComments

func (u *IdentityLinkUpsert) UpdateComments() *IdentityLinkUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*IdentityLinkUpsert) UpdateGroupID

func (u *IdentityLinkUpsert) UpdateGroupID() *IdentityLinkUpsert

UpdateGroupID sets the "group_id" field to the value that was provided on create.

func (*IdentityLinkUpsert) UpdateLinkType

func (u *IdentityLinkUpsert) UpdateLinkType() *IdentityLinkUpsert

UpdateLinkType sets the "link_type" field to the value that was provided on create.

func (*IdentityLinkUpsert) UpdateOperationType

func (u *IdentityLinkUpsert) UpdateOperationType() *IdentityLinkUpsert

UpdateOperationType sets the "operation_type" field to the value that was provided on create.

func (*IdentityLinkUpsert) UpdateTaskID

func (u *IdentityLinkUpsert) UpdateTaskID() *IdentityLinkUpsert

UpdateTaskID sets the "task_id" field to the value that was provided on create.

func (*IdentityLinkUpsert) UpdateUserID

func (u *IdentityLinkUpsert) UpdateUserID() *IdentityLinkUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type IdentityLinkUpsertBulk

type IdentityLinkUpsertBulk struct {
	// contains filtered or unexported fields
}

IdentityLinkUpsertBulk is the builder for "upsert"-ing a bulk of IdentityLink nodes.

func (*IdentityLinkUpsertBulk) AddAssignerID

func (u *IdentityLinkUpsertBulk) AddAssignerID(v int) *IdentityLinkUpsertBulk

AddAssignerID adds v to the "assigner_id" field.

func (*IdentityLinkUpsertBulk) AddGroupID

AddGroupID adds v to the "group_id" field.

func (*IdentityLinkUpsertBulk) AddUserID

AddUserID adds v to the "user_id" field.

func (*IdentityLinkUpsertBulk) ClearAssignerID

func (u *IdentityLinkUpsertBulk) ClearAssignerID() *IdentityLinkUpsertBulk

ClearAssignerID clears the value of the "assigner_id" field.

func (*IdentityLinkUpsertBulk) ClearComments

func (u *IdentityLinkUpsertBulk) ClearComments() *IdentityLinkUpsertBulk

ClearComments clears the value of the "comments" field.

func (*IdentityLinkUpsertBulk) ClearGroupID

ClearGroupID clears the value of the "group_id" field.

func (*IdentityLinkUpsertBulk) ClearUserID

ClearUserID clears the value of the "user_id" field.

func (*IdentityLinkUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdentityLinkUpsertBulk) Exec

Exec executes the query.

func (*IdentityLinkUpsertBulk) ExecX

func (u *IdentityLinkUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdentityLink.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*IdentityLinkUpsertBulk) SetAssignerID

func (u *IdentityLinkUpsertBulk) SetAssignerID(v int) *IdentityLinkUpsertBulk

SetAssignerID sets the "assigner_id" field.

func (*IdentityLinkUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*IdentityLinkUpsertBulk) SetGroupID

SetGroupID sets the "group_id" field.

func (*IdentityLinkUpsertBulk) SetLinkType

SetLinkType sets the "link_type" field.

func (*IdentityLinkUpsertBulk) SetOperationType

SetOperationType sets the "operation_type" field.

func (*IdentityLinkUpsertBulk) SetTaskID

SetTaskID sets the "task_id" field.

func (*IdentityLinkUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*IdentityLinkUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the IdentityLinkCreateBulk.OnConflict documentation for more info.

func (*IdentityLinkUpsertBulk) UpdateAssignerID

func (u *IdentityLinkUpsertBulk) UpdateAssignerID() *IdentityLinkUpsertBulk

UpdateAssignerID sets the "assigner_id" field to the value that was provided on create.

func (*IdentityLinkUpsertBulk) UpdateComments

func (u *IdentityLinkUpsertBulk) UpdateComments() *IdentityLinkUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*IdentityLinkUpsertBulk) UpdateGroupID

func (u *IdentityLinkUpsertBulk) UpdateGroupID() *IdentityLinkUpsertBulk

UpdateGroupID sets the "group_id" field to the value that was provided on create.

func (*IdentityLinkUpsertBulk) UpdateLinkType

func (u *IdentityLinkUpsertBulk) UpdateLinkType() *IdentityLinkUpsertBulk

UpdateLinkType sets the "link_type" field to the value that was provided on create.

func (*IdentityLinkUpsertBulk) UpdateNewValues

func (u *IdentityLinkUpsertBulk) UpdateNewValues() *IdentityLinkUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.IdentityLink.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(identitylink.FieldID)
		}),
	).
	Exec(ctx)

func (*IdentityLinkUpsertBulk) UpdateOperationType

func (u *IdentityLinkUpsertBulk) UpdateOperationType() *IdentityLinkUpsertBulk

UpdateOperationType sets the "operation_type" field to the value that was provided on create.

func (*IdentityLinkUpsertBulk) UpdateTaskID

UpdateTaskID sets the "task_id" field to the value that was provided on create.

func (*IdentityLinkUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type IdentityLinkUpsertOne

type IdentityLinkUpsertOne struct {
	// contains filtered or unexported fields
}

IdentityLinkUpsertOne is the builder for "upsert"-ing

one IdentityLink node.

func (*IdentityLinkUpsertOne) AddAssignerID

func (u *IdentityLinkUpsertOne) AddAssignerID(v int) *IdentityLinkUpsertOne

AddAssignerID adds v to the "assigner_id" field.

func (*IdentityLinkUpsertOne) AddGroupID

AddGroupID adds v to the "group_id" field.

func (*IdentityLinkUpsertOne) AddUserID

AddUserID adds v to the "user_id" field.

func (*IdentityLinkUpsertOne) ClearAssignerID

func (u *IdentityLinkUpsertOne) ClearAssignerID() *IdentityLinkUpsertOne

ClearAssignerID clears the value of the "assigner_id" field.

func (*IdentityLinkUpsertOne) ClearComments

func (u *IdentityLinkUpsertOne) ClearComments() *IdentityLinkUpsertOne

ClearComments clears the value of the "comments" field.

func (*IdentityLinkUpsertOne) ClearGroupID

func (u *IdentityLinkUpsertOne) ClearGroupID() *IdentityLinkUpsertOne

ClearGroupID clears the value of the "group_id" field.

func (*IdentityLinkUpsertOne) ClearUserID

func (u *IdentityLinkUpsertOne) ClearUserID() *IdentityLinkUpsertOne

ClearUserID clears the value of the "user_id" field.

func (*IdentityLinkUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdentityLinkUpsertOne) Exec

Exec executes the query.

func (*IdentityLinkUpsertOne) ExecX

func (u *IdentityLinkUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdentityLinkUpsertOne) ID

func (u *IdentityLinkUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*IdentityLinkUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*IdentityLinkUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdentityLink.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*IdentityLinkUpsertOne) SetAssignerID

func (u *IdentityLinkUpsertOne) SetAssignerID(v int) *IdentityLinkUpsertOne

SetAssignerID sets the "assigner_id" field.

func (*IdentityLinkUpsertOne) SetComments

SetComments sets the "comments" field.

func (*IdentityLinkUpsertOne) SetGroupID

SetGroupID sets the "group_id" field.

func (*IdentityLinkUpsertOne) SetLinkType

SetLinkType sets the "link_type" field.

func (*IdentityLinkUpsertOne) SetOperationType

SetOperationType sets the "operation_type" field.

func (*IdentityLinkUpsertOne) SetTaskID

SetTaskID sets the "task_id" field.

func (*IdentityLinkUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*IdentityLinkUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the IdentityLinkCreate.OnConflict documentation for more info.

func (*IdentityLinkUpsertOne) UpdateAssignerID

func (u *IdentityLinkUpsertOne) UpdateAssignerID() *IdentityLinkUpsertOne

UpdateAssignerID sets the "assigner_id" field to the value that was provided on create.

func (*IdentityLinkUpsertOne) UpdateComments

func (u *IdentityLinkUpsertOne) UpdateComments() *IdentityLinkUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*IdentityLinkUpsertOne) UpdateGroupID

func (u *IdentityLinkUpsertOne) UpdateGroupID() *IdentityLinkUpsertOne

UpdateGroupID sets the "group_id" field to the value that was provided on create.

func (*IdentityLinkUpsertOne) UpdateLinkType

func (u *IdentityLinkUpsertOne) UpdateLinkType() *IdentityLinkUpsertOne

UpdateLinkType sets the "link_type" field to the value that was provided on create.

func (*IdentityLinkUpsertOne) UpdateNewValues

func (u *IdentityLinkUpsertOne) UpdateNewValues() *IdentityLinkUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.IdentityLink.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(identitylink.FieldID)
		}),
	).
	Exec(ctx)

func (*IdentityLinkUpsertOne) UpdateOperationType

func (u *IdentityLinkUpsertOne) UpdateOperationType() *IdentityLinkUpsertOne

UpdateOperationType sets the "operation_type" field to the value that was provided on create.

func (*IdentityLinkUpsertOne) UpdateTaskID

func (u *IdentityLinkUpsertOne) UpdateTaskID() *IdentityLinkUpsertOne

UpdateTaskID sets the "task_id" field to the value that was provided on create.

func (*IdentityLinkUpsertOne) UpdateUserID

func (u *IdentityLinkUpsertOne) UpdateUserID() *IdentityLinkUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type IdentityLinkWhereInput

type IdentityLinkWhereInput struct {
	Predicates []predicate.IdentityLink  `json:"-"`
	Not        *IdentityLinkWhereInput   `json:"not,omitempty"`
	Or         []*IdentityLinkWhereInput `json:"or,omitempty"`
	And        []*IdentityLinkWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "task_id" field predicates.
	TaskID      *int  `json:"taskID,omitempty"`
	TaskIDNEQ   *int  `json:"taskIDNEQ,omitempty"`
	TaskIDIn    []int `json:"taskIDIn,omitempty"`
	TaskIDNotIn []int `json:"taskIDNotIn,omitempty"`

	// "proc_def_id" field predicates.
	ProcDefID      *int  `json:"procDefID,omitempty"`
	ProcDefIDNEQ   *int  `json:"procDefIDNEQ,omitempty"`
	ProcDefIDIn    []int `json:"procDefIDIn,omitempty"`
	ProcDefIDNotIn []int `json:"procDefIDNotIn,omitempty"`
	ProcDefIDGT    *int  `json:"procDefIDGT,omitempty"`
	ProcDefIDGTE   *int  `json:"procDefIDGTE,omitempty"`
	ProcDefIDLT    *int  `json:"procDefIDLT,omitempty"`
	ProcDefIDLTE   *int  `json:"procDefIDLTE,omitempty"`

	// "group_id" field predicates.
	GroupID       *int  `json:"groupID,omitempty"`
	GroupIDNEQ    *int  `json:"groupIDNEQ,omitempty"`
	GroupIDIn     []int `json:"groupIDIn,omitempty"`
	GroupIDNotIn  []int `json:"groupIDNotIn,omitempty"`
	GroupIDGT     *int  `json:"groupIDGT,omitempty"`
	GroupIDGTE    *int  `json:"groupIDGTE,omitempty"`
	GroupIDLT     *int  `json:"groupIDLT,omitempty"`
	GroupIDLTE    *int  `json:"groupIDLTE,omitempty"`
	GroupIDIsNil  bool  `json:"groupIDIsNil,omitempty"`
	GroupIDNotNil bool  `json:"groupIDNotNil,omitempty"`

	// "user_id" field predicates.
	UserID       *int  `json:"userID,omitempty"`
	UserIDNEQ    *int  `json:"userIDNEQ,omitempty"`
	UserIDIn     []int `json:"userIDIn,omitempty"`
	UserIDNotIn  []int `json:"userIDNotIn,omitempty"`
	UserIDGT     *int  `json:"userIDGT,omitempty"`
	UserIDGTE    *int  `json:"userIDGTE,omitempty"`
	UserIDLT     *int  `json:"userIDLT,omitempty"`
	UserIDLTE    *int  `json:"userIDLTE,omitempty"`
	UserIDIsNil  bool  `json:"userIDIsNil,omitempty"`
	UserIDNotNil bool  `json:"userIDNotNil,omitempty"`

	// "assigner_id" field predicates.
	AssignerID       *int  `json:"assignerID,omitempty"`
	AssignerIDNEQ    *int  `json:"assignerIDNEQ,omitempty"`
	AssignerIDIn     []int `json:"assignerIDIn,omitempty"`
	AssignerIDNotIn  []int `json:"assignerIDNotIn,omitempty"`
	AssignerIDGT     *int  `json:"assignerIDGT,omitempty"`
	AssignerIDGTE    *int  `json:"assignerIDGTE,omitempty"`
	AssignerIDLT     *int  `json:"assignerIDLT,omitempty"`
	AssignerIDLTE    *int  `json:"assignerIDLTE,omitempty"`
	AssignerIDIsNil  bool  `json:"assignerIDIsNil,omitempty"`
	AssignerIDNotNil bool  `json:"assignerIDNotNil,omitempty"`

	// "link_type" field predicates.
	LinkType      *identitylink.LinkType  `json:"linkType,omitempty"`
	LinkTypeNEQ   *identitylink.LinkType  `json:"linkTypeNEQ,omitempty"`
	LinkTypeIn    []identitylink.LinkType `json:"linkTypeIn,omitempty"`
	LinkTypeNotIn []identitylink.LinkType `json:"linkTypeNotIn,omitempty"`

	// "operation_type" field predicates.
	OperationType      *identitylink.OperationType  `json:"operationType,omitempty"`
	OperationTypeNEQ   *identitylink.OperationType  `json:"operationTypeNEQ,omitempty"`
	OperationTypeIn    []identitylink.OperationType `json:"operationTypeIn,omitempty"`
	OperationTypeNotIn []identitylink.OperationType `json:"operationTypeNotIn,omitempty"`

	// "task" edge predicates.
	HasTask     *bool             `json:"hasTask,omitempty"`
	HasTaskWith []*TaskWhereInput `json:"hasTaskWith,omitempty"`
}

IdentityLinkWhereInput represents a where input for filtering IdentityLink queries.

func (*IdentityLinkWhereInput) AddPredicates

func (i *IdentityLinkWhereInput) AddPredicates(predicates ...predicate.IdentityLink)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*IdentityLinkWhereInput) Filter

Filter applies the IdentityLinkWhereInput filter on the IdentityLinkQuery builder.

func (*IdentityLinkWhereInput) P

P returns a predicate for filtering identitylinks. An error is returned if the input is empty or invalid.

type IdentityLinks []*IdentityLink

IdentityLinks is a parsable slice of IdentityLink.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func AlternateSchema

func AlternateSchema(schemaConfig SchemaConfig) Option

AlternateSchemas allows alternate schema names to be passed into ent operations.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type OrgApp

type OrgApp struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 应用ID
	AppID int `json:"app_id,omitempty"`
	// contains filtered or unexported fields
}

OrgApp is the model entity for the OrgApp schema.

func (*OrgApp) String

func (oa *OrgApp) String() string

String implements the fmt.Stringer.

func (*OrgApp) Unwrap

func (oa *OrgApp) Unwrap() *OrgApp

Unwrap unwraps the OrgApp entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgApp) Update

func (oa *OrgApp) Update() *OrgAppUpdateOne

Update returns a builder for updating this OrgApp. Note that you need to call OrgApp.Unwrap() before calling this method if this OrgApp was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgApp) Value

func (oa *OrgApp) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgApp. This includes values selected through modifiers, order, etc.

type OrgAppClient

type OrgAppClient struct {
	// contains filtered or unexported fields
}

OrgAppClient is a client for the OrgApp schema.

func NewOrgAppClient

func NewOrgAppClient(c config) *OrgAppClient

NewOrgAppClient returns a client for the OrgApp from the given config.

func (*OrgAppClient) Create

func (c *OrgAppClient) Create() *OrgAppCreate

Create returns a builder for creating a OrgApp entity.

func (*OrgAppClient) CreateBulk

func (c *OrgAppClient) CreateBulk(builders ...*OrgAppCreate) *OrgAppCreateBulk

CreateBulk returns a builder for creating a bulk of OrgApp entities.

func (*OrgAppClient) Delete

func (c *OrgAppClient) Delete() *OrgAppDelete

Delete returns a delete builder for OrgApp.

func (*OrgAppClient) DeleteOne

func (c *OrgAppClient) DeleteOne(oa *OrgApp) *OrgAppDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgAppClient) DeleteOneID

func (c *OrgAppClient) DeleteOneID(id int) *OrgAppDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgAppClient) Get

func (c *OrgAppClient) Get(ctx context.Context, id int) (*OrgApp, error)

Get returns a OrgApp entity by its id.

func (*OrgAppClient) GetX

func (c *OrgAppClient) GetX(ctx context.Context, id int) *OrgApp

GetX is like Get, but panics if an error occurs.

func (*OrgAppClient) Hooks

func (c *OrgAppClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgAppClient) Intercept

func (c *OrgAppClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgapp.Intercept(f(g(h())))`.

func (*OrgAppClient) Interceptors

func (c *OrgAppClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgAppClient) Query

func (c *OrgAppClient) Query() *OrgAppQuery

Query returns a query builder for OrgApp.

func (*OrgAppClient) Update

func (c *OrgAppClient) Update() *OrgAppUpdate

Update returns an update builder for OrgApp.

func (*OrgAppClient) UpdateOne

func (c *OrgAppClient) UpdateOne(oa *OrgApp) *OrgAppUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgAppClient) UpdateOneID

func (c *OrgAppClient) UpdateOneID(id int) *OrgAppUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgAppClient) Use

func (c *OrgAppClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgapp.Hooks(f(g(h())))`.

type OrgAppCreate

type OrgAppCreate struct {
	// contains filtered or unexported fields
}

OrgAppCreate is the builder for creating a OrgApp entity.

func (*OrgAppCreate) Exec

func (oac *OrgAppCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppCreate) ExecX

func (oac *OrgAppCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppCreate) Mutation

func (oac *OrgAppCreate) Mutation() *OrgAppMutation

Mutation returns the OrgAppMutation object of the builder.

func (*OrgAppCreate) OnConflict

func (oac *OrgAppCreate) OnConflict(opts ...sql.ConflictOption) *OrgAppUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgApp.Create().
	SetOrgID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgAppUpsert) {
		SetOrgID(v+v).
	}).
	Exec(ctx)

func (*OrgAppCreate) OnConflictColumns

func (oac *OrgAppCreate) OnConflictColumns(columns ...string) *OrgAppUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgAppCreate) Save

func (oac *OrgAppCreate) Save(ctx context.Context) (*OrgApp, error)

Save creates the OrgApp in the database.

func (*OrgAppCreate) SaveX

func (oac *OrgAppCreate) SaveX(ctx context.Context) *OrgApp

SaveX calls Save and panics if Save returns an error.

func (*OrgAppCreate) SetAppID

func (oac *OrgAppCreate) SetAppID(i int) *OrgAppCreate

SetAppID sets the "app_id" field.

func (*OrgAppCreate) SetID

func (oac *OrgAppCreate) SetID(i int) *OrgAppCreate

SetID sets the "id" field.

func (*OrgAppCreate) SetOrgID

func (oac *OrgAppCreate) SetOrgID(i int) *OrgAppCreate

SetOrgID sets the "org_id" field.

type OrgAppCreateBulk

type OrgAppCreateBulk struct {
	// contains filtered or unexported fields
}

OrgAppCreateBulk is the builder for creating many OrgApp entities in bulk.

func (*OrgAppCreateBulk) Exec

func (oacb *OrgAppCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppCreateBulk) ExecX

func (oacb *OrgAppCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppCreateBulk) OnConflict

func (oacb *OrgAppCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgAppUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgApp.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgAppUpsert) {
		SetOrgID(v+v).
	}).
	Exec(ctx)

func (*OrgAppCreateBulk) OnConflictColumns

func (oacb *OrgAppCreateBulk) OnConflictColumns(columns ...string) *OrgAppUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgAppCreateBulk) Save

func (oacb *OrgAppCreateBulk) Save(ctx context.Context) ([]*OrgApp, error)

Save creates the OrgApp entities in the database.

func (*OrgAppCreateBulk) SaveX

func (oacb *OrgAppCreateBulk) SaveX(ctx context.Context) []*OrgApp

SaveX is like Save, but panics if an error occurs.

type OrgAppDelete

type OrgAppDelete struct {
	// contains filtered or unexported fields
}

OrgAppDelete is the builder for deleting a OrgApp entity.

func (*OrgAppDelete) Exec

func (oad *OrgAppDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgAppDelete) ExecX

func (oad *OrgAppDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppDelete) Where

func (oad *OrgAppDelete) Where(ps ...predicate.OrgApp) *OrgAppDelete

Where appends a list predicates to the OrgAppDelete builder.

type OrgAppDeleteOne

type OrgAppDeleteOne struct {
	// contains filtered or unexported fields
}

OrgAppDeleteOne is the builder for deleting a single OrgApp entity.

func (*OrgAppDeleteOne) Exec

func (oado *OrgAppDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgAppDeleteOne) ExecX

func (oado *OrgAppDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppDeleteOne) Where

func (oado *OrgAppDeleteOne) Where(ps ...predicate.OrgApp) *OrgAppDeleteOne

Where appends a list predicates to the OrgAppDelete builder.

type OrgAppGroupBy

type OrgAppGroupBy struct {
	// contains filtered or unexported fields
}

OrgAppGroupBy is the group-by builder for OrgApp entities.

func (*OrgAppGroupBy) Aggregate

func (oagb *OrgAppGroupBy) Aggregate(fns ...AggregateFunc) *OrgAppGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgAppGroupBy) Bool

func (s *OrgAppGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) BoolX

func (s *OrgAppGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgAppGroupBy) Bools

func (s *OrgAppGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) BoolsX

func (s *OrgAppGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgAppGroupBy) Float64

func (s *OrgAppGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) Float64X

func (s *OrgAppGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgAppGroupBy) Float64s

func (s *OrgAppGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) Float64sX

func (s *OrgAppGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgAppGroupBy) Int

func (s *OrgAppGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) IntX

func (s *OrgAppGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgAppGroupBy) Ints

func (s *OrgAppGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) IntsX

func (s *OrgAppGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgAppGroupBy) Scan

func (oagb *OrgAppGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgAppGroupBy) ScanX

func (s *OrgAppGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgAppGroupBy) String

func (s *OrgAppGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) StringX

func (s *OrgAppGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgAppGroupBy) Strings

func (s *OrgAppGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) StringsX

func (s *OrgAppGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgAppMutation

type OrgAppMutation struct {
	// contains filtered or unexported fields
}

OrgAppMutation represents an operation that mutates the OrgApp nodes in the graph.

func (*OrgAppMutation) AddAppID

func (m *OrgAppMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*OrgAppMutation) AddField

func (m *OrgAppMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgAppMutation) AddOrgID

func (m *OrgAppMutation) AddOrgID(i int)

AddOrgID adds i to the "org_id" field.

func (*OrgAppMutation) AddedAppID

func (m *OrgAppMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*OrgAppMutation) AddedEdges

func (m *OrgAppMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgAppMutation) AddedField

func (m *OrgAppMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgAppMutation) AddedFields

func (m *OrgAppMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgAppMutation) AddedIDs

func (m *OrgAppMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgAppMutation) AddedOrgID

func (m *OrgAppMutation) AddedOrgID() (r int, exists bool)

AddedOrgID returns the value that was added to the "org_id" field in this mutation.

func (*OrgAppMutation) AppID

func (m *OrgAppMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*OrgAppMutation) ClearEdge

func (m *OrgAppMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgAppMutation) ClearField

func (m *OrgAppMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgAppMutation) ClearedEdges

func (m *OrgAppMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgAppMutation) ClearedFields

func (m *OrgAppMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgAppMutation) Client

func (m OrgAppMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgAppMutation) EdgeCleared

func (m *OrgAppMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgAppMutation) Field

func (m *OrgAppMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgAppMutation) FieldCleared

func (m *OrgAppMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgAppMutation) Fields

func (m *OrgAppMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgAppMutation) ID

func (m *OrgAppMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgAppMutation) IDs

func (m *OrgAppMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgAppMutation) OldAppID

func (m *OrgAppMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) OldField

func (m *OrgAppMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgAppMutation) OldOrgID

func (m *OrgAppMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) Op

func (m *OrgAppMutation) Op() Op

Op returns the operation name.

func (*OrgAppMutation) OrgID

func (m *OrgAppMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgAppMutation) RemovedEdges

func (m *OrgAppMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgAppMutation) RemovedIDs

func (m *OrgAppMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgAppMutation) ResetAppID

func (m *OrgAppMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OrgAppMutation) ResetEdge

func (m *OrgAppMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgAppMutation) ResetField

func (m *OrgAppMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgAppMutation) ResetOrgID

func (m *OrgAppMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgAppMutation) SetAppID

func (m *OrgAppMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*OrgAppMutation) SetField

func (m *OrgAppMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgAppMutation) SetID

func (m *OrgAppMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgApp entities.

func (*OrgAppMutation) SetOp

func (m *OrgAppMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgAppMutation) SetOrgID

func (m *OrgAppMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (OrgAppMutation) Tx

func (m OrgAppMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgAppMutation) Type

func (m *OrgAppMutation) Type() string

Type returns the node type of this mutation (OrgApp).

func (*OrgAppMutation) Where

func (m *OrgAppMutation) Where(ps ...predicate.OrgApp)

Where appends a list predicates to the OrgAppMutation builder.

func (*OrgAppMutation) WhereP

func (m *OrgAppMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgAppMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgAppQuery

type OrgAppQuery struct {
	// contains filtered or unexported fields
}

OrgAppQuery is the builder for querying OrgApp entities.

func (*OrgAppQuery) Aggregate

func (oaq *OrgAppQuery) Aggregate(fns ...AggregateFunc) *OrgAppSelect

Aggregate returns a OrgAppSelect configured with the given aggregations.

func (*OrgAppQuery) All

func (oaq *OrgAppQuery) All(ctx context.Context) ([]*OrgApp, error)

All executes the query and returns a list of OrgApps.

func (*OrgAppQuery) AllX

func (oaq *OrgAppQuery) AllX(ctx context.Context) []*OrgApp

AllX is like All, but panics if an error occurs.

func (*OrgAppQuery) Clone

func (oaq *OrgAppQuery) Clone() *OrgAppQuery

Clone returns a duplicate of the OrgAppQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgAppQuery) Count

func (oaq *OrgAppQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgAppQuery) CountX

func (oaq *OrgAppQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgAppQuery) Exist

func (oaq *OrgAppQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgAppQuery) ExistX

func (oaq *OrgAppQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgAppQuery) First

func (oaq *OrgAppQuery) First(ctx context.Context) (*OrgApp, error)

First returns the first OrgApp entity from the query. Returns a *NotFoundError when no OrgApp was found.

func (*OrgAppQuery) FirstID

func (oaq *OrgAppQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgApp ID from the query. Returns a *NotFoundError when no OrgApp ID was found.

func (*OrgAppQuery) FirstIDX

func (oaq *OrgAppQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgAppQuery) FirstX

func (oaq *OrgAppQuery) FirstX(ctx context.Context) *OrgApp

FirstX is like First, but panics if an error occurs.

func (*OrgAppQuery) GroupBy

func (oaq *OrgAppQuery) GroupBy(field string, fields ...string) *OrgAppGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	OrgID int `json:"org_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgApp.Query().
	GroupBy(orgapp.FieldOrgID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgAppQuery) IDs

func (oaq *OrgAppQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgApp IDs.

func (*OrgAppQuery) IDsX

func (oaq *OrgAppQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgAppQuery) Limit

func (oaq *OrgAppQuery) Limit(limit int) *OrgAppQuery

Limit the number of records to be returned by this query.

func (*OrgAppQuery) Offset

func (oaq *OrgAppQuery) Offset(offset int) *OrgAppQuery

Offset to start from.

func (*OrgAppQuery) Only

func (oaq *OrgAppQuery) Only(ctx context.Context) (*OrgApp, error)

Only returns a single OrgApp entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgApp entity is found. Returns a *NotFoundError when no OrgApp entities are found.

func (*OrgAppQuery) OnlyID

func (oaq *OrgAppQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgApp ID in the query. Returns a *NotSingularError when more than one OrgApp ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgAppQuery) OnlyIDX

func (oaq *OrgAppQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgAppQuery) OnlyX

func (oaq *OrgAppQuery) OnlyX(ctx context.Context) *OrgApp

OnlyX is like Only, but panics if an error occurs.

func (*OrgAppQuery) Order

func (oaq *OrgAppQuery) Order(o ...orgapp.OrderOption) *OrgAppQuery

Order specifies how the records should be ordered.

func (*OrgAppQuery) Select

func (oaq *OrgAppQuery) Select(fields ...string) *OrgAppSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	OrgID int `json:"org_id,omitempty"`
}

client.OrgApp.Query().
	Select(orgapp.FieldOrgID).
	Scan(ctx, &v)

func (*OrgAppQuery) Unique

func (oaq *OrgAppQuery) Unique(unique bool) *OrgAppQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgAppQuery) Where

func (oaq *OrgAppQuery) Where(ps ...predicate.OrgApp) *OrgAppQuery

Where adds a new predicate for the OrgAppQuery builder.

type OrgAppSelect

type OrgAppSelect struct {
	*OrgAppQuery
	// contains filtered or unexported fields
}

OrgAppSelect is the builder for selecting fields of OrgApp entities.

func (*OrgAppSelect) Aggregate

func (oas *OrgAppSelect) Aggregate(fns ...AggregateFunc) *OrgAppSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgAppSelect) Bool

func (s *OrgAppSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) BoolX

func (s *OrgAppSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgAppSelect) Bools

func (s *OrgAppSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) BoolsX

func (s *OrgAppSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgAppSelect) Float64

func (s *OrgAppSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) Float64X

func (s *OrgAppSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgAppSelect) Float64s

func (s *OrgAppSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) Float64sX

func (s *OrgAppSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgAppSelect) Int

func (s *OrgAppSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) IntX

func (s *OrgAppSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgAppSelect) Ints

func (s *OrgAppSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) IntsX

func (s *OrgAppSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgAppSelect) Scan

func (oas *OrgAppSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgAppSelect) ScanX

func (s *OrgAppSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgAppSelect) String

func (s *OrgAppSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) StringX

func (s *OrgAppSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgAppSelect) Strings

func (s *OrgAppSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) StringsX

func (s *OrgAppSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgAppUpdate

type OrgAppUpdate struct {
	// contains filtered or unexported fields
}

OrgAppUpdate is the builder for updating OrgApp entities.

func (*OrgAppUpdate) AddAppID

func (oau *OrgAppUpdate) AddAppID(i int) *OrgAppUpdate

AddAppID adds i to the "app_id" field.

func (*OrgAppUpdate) AddOrgID

func (oau *OrgAppUpdate) AddOrgID(i int) *OrgAppUpdate

AddOrgID adds i to the "org_id" field.

func (*OrgAppUpdate) Exec

func (oau *OrgAppUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppUpdate) ExecX

func (oau *OrgAppUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpdate) Mutation

func (oau *OrgAppUpdate) Mutation() *OrgAppMutation

Mutation returns the OrgAppMutation object of the builder.

func (*OrgAppUpdate) Save

func (oau *OrgAppUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgAppUpdate) SaveX

func (oau *OrgAppUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgAppUpdate) SetAppID

func (oau *OrgAppUpdate) SetAppID(i int) *OrgAppUpdate

SetAppID sets the "app_id" field.

func (*OrgAppUpdate) SetOrgID

func (oau *OrgAppUpdate) SetOrgID(i int) *OrgAppUpdate

SetOrgID sets the "org_id" field.

func (*OrgAppUpdate) Where

func (oau *OrgAppUpdate) Where(ps ...predicate.OrgApp) *OrgAppUpdate

Where appends a list predicates to the OrgAppUpdate builder.

type OrgAppUpdateOne

type OrgAppUpdateOne struct {
	// contains filtered or unexported fields
}

OrgAppUpdateOne is the builder for updating a single OrgApp entity.

func (*OrgAppUpdateOne) AddAppID

func (oauo *OrgAppUpdateOne) AddAppID(i int) *OrgAppUpdateOne

AddAppID adds i to the "app_id" field.

func (*OrgAppUpdateOne) AddOrgID

func (oauo *OrgAppUpdateOne) AddOrgID(i int) *OrgAppUpdateOne

AddOrgID adds i to the "org_id" field.

func (*OrgAppUpdateOne) Exec

func (oauo *OrgAppUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgAppUpdateOne) ExecX

func (oauo *OrgAppUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpdateOne) Mutation

func (oauo *OrgAppUpdateOne) Mutation() *OrgAppMutation

Mutation returns the OrgAppMutation object of the builder.

func (*OrgAppUpdateOne) Save

func (oauo *OrgAppUpdateOne) Save(ctx context.Context) (*OrgApp, error)

Save executes the query and returns the updated OrgApp entity.

func (*OrgAppUpdateOne) SaveX

func (oauo *OrgAppUpdateOne) SaveX(ctx context.Context) *OrgApp

SaveX is like Save, but panics if an error occurs.

func (*OrgAppUpdateOne) Select

func (oauo *OrgAppUpdateOne) Select(field string, fields ...string) *OrgAppUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgAppUpdateOne) SetAppID

func (oauo *OrgAppUpdateOne) SetAppID(i int) *OrgAppUpdateOne

SetAppID sets the "app_id" field.

func (*OrgAppUpdateOne) SetOrgID

func (oauo *OrgAppUpdateOne) SetOrgID(i int) *OrgAppUpdateOne

SetOrgID sets the "org_id" field.

func (*OrgAppUpdateOne) Where

func (oauo *OrgAppUpdateOne) Where(ps ...predicate.OrgApp) *OrgAppUpdateOne

Where appends a list predicates to the OrgAppUpdate builder.

type OrgAppUpsert

type OrgAppUpsert struct {
	*sql.UpdateSet
}

OrgAppUpsert is the "OnConflict" setter.

func (*OrgAppUpsert) AddAppID

func (u *OrgAppUpsert) AddAppID(v int) *OrgAppUpsert

AddAppID adds v to the "app_id" field.

func (*OrgAppUpsert) AddOrgID

func (u *OrgAppUpsert) AddOrgID(v int) *OrgAppUpsert

AddOrgID adds v to the "org_id" field.

func (*OrgAppUpsert) SetAppID

func (u *OrgAppUpsert) SetAppID(v int) *OrgAppUpsert

SetAppID sets the "app_id" field.

func (*OrgAppUpsert) SetOrgID

func (u *OrgAppUpsert) SetOrgID(v int) *OrgAppUpsert

SetOrgID sets the "org_id" field.

func (*OrgAppUpsert) UpdateAppID

func (u *OrgAppUpsert) UpdateAppID() *OrgAppUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgAppUpsert) UpdateOrgID

func (u *OrgAppUpsert) UpdateOrgID() *OrgAppUpsert

UpdateOrgID sets the "org_id" field to the value that was provided on create.

type OrgAppUpsertBulk

type OrgAppUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgAppUpsertBulk is the builder for "upsert"-ing a bulk of OrgApp nodes.

func (*OrgAppUpsertBulk) AddAppID

func (u *OrgAppUpsertBulk) AddAppID(v int) *OrgAppUpsertBulk

AddAppID adds v to the "app_id" field.

func (*OrgAppUpsertBulk) AddOrgID

func (u *OrgAppUpsertBulk) AddOrgID(v int) *OrgAppUpsertBulk

AddOrgID adds v to the "org_id" field.

func (*OrgAppUpsertBulk) DoNothing

func (u *OrgAppUpsertBulk) DoNothing() *OrgAppUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgAppUpsertBulk) Exec

func (u *OrgAppUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppUpsertBulk) ExecX

func (u *OrgAppUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpsertBulk) Ignore

func (u *OrgAppUpsertBulk) Ignore() *OrgAppUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgAppUpsertBulk) SetAppID

func (u *OrgAppUpsertBulk) SetAppID(v int) *OrgAppUpsertBulk

SetAppID sets the "app_id" field.

func (*OrgAppUpsertBulk) SetOrgID

func (u *OrgAppUpsertBulk) SetOrgID(v int) *OrgAppUpsertBulk

SetOrgID sets the "org_id" field.

func (*OrgAppUpsertBulk) Update

func (u *OrgAppUpsertBulk) Update(set func(*OrgAppUpsert)) *OrgAppUpsertBulk

Update allows overriding fields `UPDATE` values. See the OrgAppCreateBulk.OnConflict documentation for more info.

func (*OrgAppUpsertBulk) UpdateAppID

func (u *OrgAppUpsertBulk) UpdateAppID() *OrgAppUpsertBulk

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgAppUpsertBulk) UpdateNewValues

func (u *OrgAppUpsertBulk) UpdateNewValues() *OrgAppUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgapp.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgAppUpsertBulk) UpdateOrgID

func (u *OrgAppUpsertBulk) UpdateOrgID() *OrgAppUpsertBulk

UpdateOrgID sets the "org_id" field to the value that was provided on create.

type OrgAppUpsertOne

type OrgAppUpsertOne struct {
	// contains filtered or unexported fields
}

OrgAppUpsertOne is the builder for "upsert"-ing

one OrgApp node.

func (*OrgAppUpsertOne) AddAppID

func (u *OrgAppUpsertOne) AddAppID(v int) *OrgAppUpsertOne

AddAppID adds v to the "app_id" field.

func (*OrgAppUpsertOne) AddOrgID

func (u *OrgAppUpsertOne) AddOrgID(v int) *OrgAppUpsertOne

AddOrgID adds v to the "org_id" field.

func (*OrgAppUpsertOne) DoNothing

func (u *OrgAppUpsertOne) DoNothing() *OrgAppUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgAppUpsertOne) Exec

func (u *OrgAppUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppUpsertOne) ExecX

func (u *OrgAppUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpsertOne) ID

func (u *OrgAppUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgAppUpsertOne) IDX

func (u *OrgAppUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgAppUpsertOne) Ignore

func (u *OrgAppUpsertOne) Ignore() *OrgAppUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgApp.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgAppUpsertOne) SetAppID

func (u *OrgAppUpsertOne) SetAppID(v int) *OrgAppUpsertOne

SetAppID sets the "app_id" field.

func (*OrgAppUpsertOne) SetOrgID

func (u *OrgAppUpsertOne) SetOrgID(v int) *OrgAppUpsertOne

SetOrgID sets the "org_id" field.

func (*OrgAppUpsertOne) Update

func (u *OrgAppUpsertOne) Update(set func(*OrgAppUpsert)) *OrgAppUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgAppCreate.OnConflict documentation for more info.

func (*OrgAppUpsertOne) UpdateAppID

func (u *OrgAppUpsertOne) UpdateAppID() *OrgAppUpsertOne

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgAppUpsertOne) UpdateNewValues

func (u *OrgAppUpsertOne) UpdateNewValues() *OrgAppUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgapp.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgAppUpsertOne) UpdateOrgID

func (u *OrgAppUpsertOne) UpdateOrgID() *OrgAppUpsertOne

UpdateOrgID sets the "org_id" field to the value that was provided on create.

type OrgApps

type OrgApps []*OrgApp

OrgApps is a parsable slice of OrgApp.

type OrgRole

type OrgRole struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 类型,group:组,role:角色
	Kind orgrole.Kind `json:"kind,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgRoleQuery when eager-loading is set.
	Edges OrgRoleEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgRole is the model entity for the OrgRole schema.

func (*OrgRole) GlobalID

func (or *OrgRole) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given OrgRole node.

func (*OrgRole) IsNode

func (*OrgRole) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*OrgRole) NamedOrgRoleUser

func (or *OrgRole) NamedOrgRoleUser(name string) ([]*OrgRoleUser, error)

NamedOrgRoleUser returns the OrgRoleUser named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgRole) NamedOrgUsers

func (or *OrgRole) NamedOrgUsers(name string) ([]*OrgUser, error)

NamedOrgUsers returns the OrgUsers named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgRole) QueryOrgRoleUser

func (or *OrgRole) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser queries the "org_role_user" edge of the OrgRole entity.

func (*OrgRole) QueryOrgUsers

func (or *OrgRole) QueryOrgUsers() *OrgUserQuery

QueryOrgUsers queries the "org_users" edge of the OrgRole entity.

func (*OrgRole) String

func (or *OrgRole) String() string

String implements the fmt.Stringer.

func (*OrgRole) ToEdge

func (or *OrgRole) ToEdge(order *OrgRoleOrder) *OrgRoleEdge

ToEdge converts OrgRole into OrgRoleEdge.

func (*OrgRole) Unwrap

func (or *OrgRole) Unwrap() *OrgRole

Unwrap unwraps the OrgRole entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgRole) Update

func (or *OrgRole) Update() *OrgRoleUpdateOne

Update returns a builder for updating this OrgRole. Note that you need to call OrgRole.Unwrap() before calling this method if this OrgRole was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgRole) Value

func (or *OrgRole) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgRole. This includes values selected through modifiers, order, etc.

type OrgRoleClient

type OrgRoleClient struct {
	// contains filtered or unexported fields
}

OrgRoleClient is a client for the OrgRole schema.

func NewOrgRoleClient

func NewOrgRoleClient(c config) *OrgRoleClient

NewOrgRoleClient returns a client for the OrgRole from the given config.

func (*OrgRoleClient) Create

func (c *OrgRoleClient) Create() *OrgRoleCreate

Create returns a builder for creating a OrgRole entity.

func (*OrgRoleClient) CreateBulk

func (c *OrgRoleClient) CreateBulk(builders ...*OrgRoleCreate) *OrgRoleCreateBulk

CreateBulk returns a builder for creating a bulk of OrgRole entities.

func (*OrgRoleClient) Delete

func (c *OrgRoleClient) Delete() *OrgRoleDelete

Delete returns a delete builder for OrgRole.

func (*OrgRoleClient) DeleteOne

func (c *OrgRoleClient) DeleteOne(or *OrgRole) *OrgRoleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgRoleClient) DeleteOneID

func (c *OrgRoleClient) DeleteOneID(id int) *OrgRoleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgRoleClient) Get

func (c *OrgRoleClient) Get(ctx context.Context, id int) (*OrgRole, error)

Get returns a OrgRole entity by its id.

func (*OrgRoleClient) GetX

func (c *OrgRoleClient) GetX(ctx context.Context, id int) *OrgRole

GetX is like Get, but panics if an error occurs.

func (*OrgRoleClient) Hooks

func (c *OrgRoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgRoleClient) Intercept

func (c *OrgRoleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgrole.Intercept(f(g(h())))`.

func (*OrgRoleClient) Interceptors

func (c *OrgRoleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgRoleClient) Query

func (c *OrgRoleClient) Query() *OrgRoleQuery

Query returns a query builder for OrgRole.

func (*OrgRoleClient) QueryOrgRoleUser

func (c *OrgRoleClient) QueryOrgRoleUser(or *OrgRole) *OrgRoleUserQuery

QueryOrgRoleUser queries the org_role_user edge of a OrgRole.

func (*OrgRoleClient) QueryOrgUsers

func (c *OrgRoleClient) QueryOrgUsers(or *OrgRole) *OrgUserQuery

QueryOrgUsers queries the org_users edge of a OrgRole.

func (*OrgRoleClient) Update

func (c *OrgRoleClient) Update() *OrgRoleUpdate

Update returns an update builder for OrgRole.

func (*OrgRoleClient) UpdateOne

func (c *OrgRoleClient) UpdateOne(or *OrgRole) *OrgRoleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgRoleClient) UpdateOneID

func (c *OrgRoleClient) UpdateOneID(id int) *OrgRoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgRoleClient) Use

func (c *OrgRoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgrole.Hooks(f(g(h())))`.

type OrgRoleConnection

type OrgRoleConnection struct {
	Edges      []*OrgRoleEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

OrgRoleConnection is the connection containing edges to OrgRole.

type OrgRoleCreate

type OrgRoleCreate struct {
	// contains filtered or unexported fields
}

OrgRoleCreate is the builder for creating a OrgRole entity.

func (*OrgRoleCreate) AddOrgRoleUser

func (orc *OrgRoleCreate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgRoleCreate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleCreate) AddOrgRoleUserIDs

func (orc *OrgRoleCreate) AddOrgRoleUserIDs(ids ...int) *OrgRoleCreate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleCreate) AddOrgUserIDs

func (orc *OrgRoleCreate) AddOrgUserIDs(ids ...int) *OrgRoleCreate

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleCreate) AddOrgUsers

func (orc *OrgRoleCreate) AddOrgUsers(o ...*OrgUser) *OrgRoleCreate

AddOrgUsers adds the "org_users" edges to the OrgUser entity.

func (*OrgRoleCreate) Exec

func (orc *OrgRoleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleCreate) ExecX

func (orc *OrgRoleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleCreate) Mutation

func (orc *OrgRoleCreate) Mutation() *OrgRoleMutation

Mutation returns the OrgRoleMutation object of the builder.

func (*OrgRoleCreate) OnConflict

func (orc *OrgRoleCreate) OnConflict(opts ...sql.ConflictOption) *OrgRoleUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRole.Create().
	SetOrgID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUpsert) {
		SetOrgID(v+v).
	}).
	Exec(ctx)

func (*OrgRoleCreate) OnConflictColumns

func (orc *OrgRoleCreate) OnConflictColumns(columns ...string) *OrgRoleUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleCreate) Save

func (orc *OrgRoleCreate) Save(ctx context.Context) (*OrgRole, error)

Save creates the OrgRole in the database.

func (*OrgRoleCreate) SaveX

func (orc *OrgRoleCreate) SaveX(ctx context.Context) *OrgRole

SaveX calls Save and panics if Save returns an error.

func (*OrgRoleCreate) SetID

func (orc *OrgRoleCreate) SetID(i int) *OrgRoleCreate

SetID sets the "id" field.

func (*OrgRoleCreate) SetKind

func (orc *OrgRoleCreate) SetKind(o orgrole.Kind) *OrgRoleCreate

SetKind sets the "kind" field.

func (*OrgRoleCreate) SetName

func (orc *OrgRoleCreate) SetName(s string) *OrgRoleCreate

SetName sets the "name" field.

func (*OrgRoleCreate) SetNillableOrgID

func (orc *OrgRoleCreate) SetNillableOrgID(i *int) *OrgRoleCreate

SetNillableOrgID sets the "org_id" field if the given value is not nil.

func (*OrgRoleCreate) SetOrgID

func (orc *OrgRoleCreate) SetOrgID(i int) *OrgRoleCreate

SetOrgID sets the "org_id" field.

type OrgRoleCreateBulk

type OrgRoleCreateBulk struct {
	// contains filtered or unexported fields
}

OrgRoleCreateBulk is the builder for creating many OrgRole entities in bulk.

func (*OrgRoleCreateBulk) Exec

func (orcb *OrgRoleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleCreateBulk) ExecX

func (orcb *OrgRoleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleCreateBulk) OnConflict

func (orcb *OrgRoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgRoleUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRole.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUpsert) {
		SetOrgID(v+v).
	}).
	Exec(ctx)

func (*OrgRoleCreateBulk) OnConflictColumns

func (orcb *OrgRoleCreateBulk) OnConflictColumns(columns ...string) *OrgRoleUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleCreateBulk) Save

func (orcb *OrgRoleCreateBulk) Save(ctx context.Context) ([]*OrgRole, error)

Save creates the OrgRole entities in the database.

func (*OrgRoleCreateBulk) SaveX

func (orcb *OrgRoleCreateBulk) SaveX(ctx context.Context) []*OrgRole

SaveX is like Save, but panics if an error occurs.

type OrgRoleDelete

type OrgRoleDelete struct {
	// contains filtered or unexported fields
}

OrgRoleDelete is the builder for deleting a OrgRole entity.

func (*OrgRoleDelete) Exec

func (ord *OrgRoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgRoleDelete) ExecX

func (ord *OrgRoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleDelete) Where

func (ord *OrgRoleDelete) Where(ps ...predicate.OrgRole) *OrgRoleDelete

Where appends a list predicates to the OrgRoleDelete builder.

type OrgRoleDeleteOne

type OrgRoleDeleteOne struct {
	// contains filtered or unexported fields
}

OrgRoleDeleteOne is the builder for deleting a single OrgRole entity.

func (*OrgRoleDeleteOne) Exec

func (ordo *OrgRoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgRoleDeleteOne) ExecX

func (ordo *OrgRoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleDeleteOne) Where

func (ordo *OrgRoleDeleteOne) Where(ps ...predicate.OrgRole) *OrgRoleDeleteOne

Where appends a list predicates to the OrgRoleDelete builder.

type OrgRoleEdge

type OrgRoleEdge struct {
	Node   *OrgRole `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

OrgRoleEdge is the edge representation of OrgRole.

type OrgRoleEdges

type OrgRoleEdges struct {
	// 组用户
	OrgUsers []*OrgUser `json:"org_users,omitempty"`
	// OrgRoleUser holds the value of the org_role_user edge.
	OrgRoleUser []*OrgRoleUser `json:"org_role_user,omitempty"`
	// contains filtered or unexported fields
}

OrgRoleEdges holds the relations/edges for other nodes in the graph.

func (OrgRoleEdges) OrgRoleUserOrErr

func (e OrgRoleEdges) OrgRoleUserOrErr() ([]*OrgRoleUser, error)

OrgRoleUserOrErr returns the OrgRoleUser value or an error if the edge was not loaded in eager-loading.

func (OrgRoleEdges) OrgUsersOrErr

func (e OrgRoleEdges) OrgUsersOrErr() ([]*OrgUser, error)

OrgUsersOrErr returns the OrgUsers value or an error if the edge was not loaded in eager-loading.

type OrgRoleGroupBy

type OrgRoleGroupBy struct {
	// contains filtered or unexported fields
}

OrgRoleGroupBy is the group-by builder for OrgRole entities.

func (*OrgRoleGroupBy) Aggregate

func (orgb *OrgRoleGroupBy) Aggregate(fns ...AggregateFunc) *OrgRoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgRoleGroupBy) Bool

func (s *OrgRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) BoolX

func (s *OrgRoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleGroupBy) Bools

func (s *OrgRoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) BoolsX

func (s *OrgRoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleGroupBy) Float64

func (s *OrgRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) Float64X

func (s *OrgRoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleGroupBy) Float64s

func (s *OrgRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) Float64sX

func (s *OrgRoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleGroupBy) Int

func (s *OrgRoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) IntX

func (s *OrgRoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleGroupBy) Ints

func (s *OrgRoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) IntsX

func (s *OrgRoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleGroupBy) Scan

func (orgb *OrgRoleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleGroupBy) ScanX

func (s *OrgRoleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleGroupBy) String

func (s *OrgRoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) StringX

func (s *OrgRoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleGroupBy) Strings

func (s *OrgRoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) StringsX

func (s *OrgRoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleMutation

type OrgRoleMutation struct {
	// contains filtered or unexported fields
}

OrgRoleMutation represents an operation that mutates the OrgRole nodes in the graph.

func (*OrgRoleMutation) AddField

func (m *OrgRoleMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleMutation) AddOrgID

func (m *OrgRoleMutation) AddOrgID(i int)

AddOrgID adds i to the "org_id" field.

func (*OrgRoleMutation) AddOrgRoleUserIDs

func (m *OrgRoleMutation) AddOrgRoleUserIDs(ids ...int)

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by ids.

func (*OrgRoleMutation) AddOrgUserIDs

func (m *OrgRoleMutation) AddOrgUserIDs(ids ...int)

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by ids.

func (*OrgRoleMutation) AddedEdges

func (m *OrgRoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgRoleMutation) AddedField

func (m *OrgRoleMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleMutation) AddedFields

func (m *OrgRoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgRoleMutation) AddedIDs

func (m *OrgRoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgRoleMutation) AddedOrgID

func (m *OrgRoleMutation) AddedOrgID() (r int, exists bool)

AddedOrgID returns the value that was added to the "org_id" field in this mutation.

func (*OrgRoleMutation) ClearEdge

func (m *OrgRoleMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgRoleMutation) ClearField

func (m *OrgRoleMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleMutation) ClearOrgID

func (m *OrgRoleMutation) ClearOrgID()

ClearOrgID clears the value of the "org_id" field.

func (*OrgRoleMutation) ClearOrgRoleUser

func (m *OrgRoleMutation) ClearOrgRoleUser()

ClearOrgRoleUser clears the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgRoleMutation) ClearOrgUsers

func (m *OrgRoleMutation) ClearOrgUsers()

ClearOrgUsers clears the "org_users" edge to the OrgUser entity.

func (*OrgRoleMutation) ClearedEdges

func (m *OrgRoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgRoleMutation) ClearedFields

func (m *OrgRoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgRoleMutation) Client

func (m OrgRoleMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgRoleMutation) EdgeCleared

func (m *OrgRoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgRoleMutation) Field

func (m *OrgRoleMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleMutation) FieldCleared

func (m *OrgRoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgRoleMutation) Fields

func (m *OrgRoleMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgRoleMutation) ID

func (m *OrgRoleMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgRoleMutation) IDs

func (m *OrgRoleMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgRoleMutation) Kind

func (m *OrgRoleMutation) Kind() (r orgrole.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*OrgRoleMutation) Name

func (m *OrgRoleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OrgRoleMutation) OldField

func (m *OrgRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgRoleMutation) OldKind

func (m *OrgRoleMutation) OldKind(ctx context.Context) (v orgrole.Kind, err error)

OldKind returns the old "kind" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldName

func (m *OrgRoleMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldOrgID

func (m *OrgRoleMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) Op

func (m *OrgRoleMutation) Op() Op

Op returns the operation name.

func (*OrgRoleMutation) OrgID

func (m *OrgRoleMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgRoleMutation) OrgIDCleared

func (m *OrgRoleMutation) OrgIDCleared() bool

OrgIDCleared returns if the "org_id" field was cleared in this mutation.

func (*OrgRoleMutation) OrgRoleUserCleared

func (m *OrgRoleMutation) OrgRoleUserCleared() bool

OrgRoleUserCleared reports if the "org_role_user" edge to the OrgRoleUser entity was cleared.

func (*OrgRoleMutation) OrgRoleUserIDs

func (m *OrgRoleMutation) OrgRoleUserIDs() (ids []int)

OrgRoleUserIDs returns the "org_role_user" edge IDs in the mutation.

func (*OrgRoleMutation) OrgUsersCleared

func (m *OrgRoleMutation) OrgUsersCleared() bool

OrgUsersCleared reports if the "org_users" edge to the OrgUser entity was cleared.

func (*OrgRoleMutation) OrgUsersIDs

func (m *OrgRoleMutation) OrgUsersIDs() (ids []int)

OrgUsersIDs returns the "org_users" edge IDs in the mutation.

func (*OrgRoleMutation) RemoveOrgRoleUserIDs

func (m *OrgRoleMutation) RemoveOrgRoleUserIDs(ids ...int)

RemoveOrgRoleUserIDs removes the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleMutation) RemoveOrgUserIDs

func (m *OrgRoleMutation) RemoveOrgUserIDs(ids ...int)

RemoveOrgUserIDs removes the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleMutation) RemovedEdges

func (m *OrgRoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgRoleMutation) RemovedIDs

func (m *OrgRoleMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgRoleMutation) RemovedOrgRoleUserIDs

func (m *OrgRoleMutation) RemovedOrgRoleUserIDs() (ids []int)

RemovedOrgRoleUser returns the removed IDs of the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgRoleMutation) RemovedOrgUsersIDs

func (m *OrgRoleMutation) RemovedOrgUsersIDs() (ids []int)

RemovedOrgUsers returns the removed IDs of the "org_users" edge to the OrgUser entity.

func (*OrgRoleMutation) ResetEdge

func (m *OrgRoleMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgRoleMutation) ResetField

func (m *OrgRoleMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleMutation) ResetKind

func (m *OrgRoleMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*OrgRoleMutation) ResetName

func (m *OrgRoleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OrgRoleMutation) ResetOrgID

func (m *OrgRoleMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgRoleMutation) ResetOrgRoleUser

func (m *OrgRoleMutation) ResetOrgRoleUser()

ResetOrgRoleUser resets all changes to the "org_role_user" edge.

func (*OrgRoleMutation) ResetOrgUsers

func (m *OrgRoleMutation) ResetOrgUsers()

ResetOrgUsers resets all changes to the "org_users" edge.

func (*OrgRoleMutation) SetField

func (m *OrgRoleMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleMutation) SetID

func (m *OrgRoleMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgRole entities.

func (*OrgRoleMutation) SetKind

func (m *OrgRoleMutation) SetKind(o orgrole.Kind)

SetKind sets the "kind" field.

func (*OrgRoleMutation) SetName

func (m *OrgRoleMutation) SetName(s string)

SetName sets the "name" field.

func (*OrgRoleMutation) SetOp

func (m *OrgRoleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgRoleMutation) SetOrgID

func (m *OrgRoleMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (OrgRoleMutation) Tx

func (m OrgRoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgRoleMutation) Type

func (m *OrgRoleMutation) Type() string

Type returns the node type of this mutation (OrgRole).

func (*OrgRoleMutation) Where

func (m *OrgRoleMutation) Where(ps ...predicate.OrgRole)

Where appends a list predicates to the OrgRoleMutation builder.

func (*OrgRoleMutation) WhereP

func (m *OrgRoleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgRoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgRoleOrder

type OrgRoleOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *OrgRoleOrderField `json:"field"`
}

OrgRoleOrder defines the ordering of OrgRole.

type OrgRoleOrderField

type OrgRoleOrderField struct {
	// Value extracts the ordering value from the given OrgRole.
	Value func(*OrgRole) (ent.Value, error)
	// contains filtered or unexported fields
}

OrgRoleOrderField defines the ordering field of OrgRole.

type OrgRolePaginateOption

type OrgRolePaginateOption func(*orgrolePager) error

OrgRolePaginateOption enables pagination customization.

func WithOrgRoleFilter

func WithOrgRoleFilter(filter func(*OrgRoleQuery) (*OrgRoleQuery, error)) OrgRolePaginateOption

WithOrgRoleFilter configures pagination filter.

func WithOrgRoleOrder

func WithOrgRoleOrder(order *OrgRoleOrder) OrgRolePaginateOption

WithOrgRoleOrder configures pagination ordering.

type OrgRoleQuery

type OrgRoleQuery struct {
	// contains filtered or unexported fields
}

OrgRoleQuery is the builder for querying OrgRole entities.

func (*OrgRoleQuery) Aggregate

func (orq *OrgRoleQuery) Aggregate(fns ...AggregateFunc) *OrgRoleSelect

Aggregate returns a OrgRoleSelect configured with the given aggregations.

func (*OrgRoleQuery) All

func (orq *OrgRoleQuery) All(ctx context.Context) ([]*OrgRole, error)

All executes the query and returns a list of OrgRoles.

func (*OrgRoleQuery) AllX

func (orq *OrgRoleQuery) AllX(ctx context.Context) []*OrgRole

AllX is like All, but panics if an error occurs.

func (*OrgRoleQuery) Clone

func (orq *OrgRoleQuery) Clone() *OrgRoleQuery

Clone returns a duplicate of the OrgRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgRoleQuery) CollectFields

func (or *OrgRoleQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrgRoleQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OrgRoleQuery) Count

func (orq *OrgRoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgRoleQuery) CountX

func (orq *OrgRoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgRoleQuery) Exist

func (orq *OrgRoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgRoleQuery) ExistX

func (orq *OrgRoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgRoleQuery) First

func (orq *OrgRoleQuery) First(ctx context.Context) (*OrgRole, error)

First returns the first OrgRole entity from the query. Returns a *NotFoundError when no OrgRole was found.

func (*OrgRoleQuery) FirstID

func (orq *OrgRoleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgRole ID from the query. Returns a *NotFoundError when no OrgRole ID was found.

func (*OrgRoleQuery) FirstIDX

func (orq *OrgRoleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgRoleQuery) FirstX

func (orq *OrgRoleQuery) FirstX(ctx context.Context) *OrgRole

FirstX is like First, but panics if an error occurs.

func (*OrgRoleQuery) GroupBy

func (orq *OrgRoleQuery) GroupBy(field string, fields ...string) *OrgRoleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	OrgID int `json:"org_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgRole.Query().
	GroupBy(orgrole.FieldOrgID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgRoleQuery) IDs

func (orq *OrgRoleQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgRole IDs.

func (*OrgRoleQuery) IDsX

func (orq *OrgRoleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgRoleQuery) Limit

func (orq *OrgRoleQuery) Limit(limit int) *OrgRoleQuery

Limit the number of records to be returned by this query.

func (*OrgRoleQuery) Offset

func (orq *OrgRoleQuery) Offset(offset int) *OrgRoleQuery

Offset to start from.

func (*OrgRoleQuery) Only

func (orq *OrgRoleQuery) Only(ctx context.Context) (*OrgRole, error)

Only returns a single OrgRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgRole entity is found. Returns a *NotFoundError when no OrgRole entities are found.

func (*OrgRoleQuery) OnlyID

func (orq *OrgRoleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgRole ID in the query. Returns a *NotSingularError when more than one OrgRole ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgRoleQuery) OnlyIDX

func (orq *OrgRoleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgRoleQuery) OnlyX

func (orq *OrgRoleQuery) OnlyX(ctx context.Context) *OrgRole

OnlyX is like Only, but panics if an error occurs.

func (*OrgRoleQuery) Order

func (orq *OrgRoleQuery) Order(o ...orgrole.OrderOption) *OrgRoleQuery

Order specifies how the records should be ordered.

func (*OrgRoleQuery) Paginate

func (or *OrgRoleQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OrgRolePaginateOption,
) (*OrgRoleConnection, error)

Paginate executes the query and returns a relay based cursor connection to OrgRole.

func (*OrgRoleQuery) QueryOrgRoleUser

func (orq *OrgRoleQuery) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser chains the current query on the "org_role_user" edge.

func (*OrgRoleQuery) QueryOrgUsers

func (orq *OrgRoleQuery) QueryOrgUsers() *OrgUserQuery

QueryOrgUsers chains the current query on the "org_users" edge.

func (*OrgRoleQuery) Select

func (orq *OrgRoleQuery) Select(fields ...string) *OrgRoleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	OrgID int `json:"org_id,omitempty"`
}

client.OrgRole.Query().
	Select(orgrole.FieldOrgID).
	Scan(ctx, &v)

func (*OrgRoleQuery) Unique

func (orq *OrgRoleQuery) Unique(unique bool) *OrgRoleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgRoleQuery) Where

func (orq *OrgRoleQuery) Where(ps ...predicate.OrgRole) *OrgRoleQuery

Where adds a new predicate for the OrgRoleQuery builder.

func (*OrgRoleQuery) WithNamedOrgRoleUser

func (orq *OrgRoleQuery) WithNamedOrgRoleUser(name string, opts ...func(*OrgRoleUserQuery)) *OrgRoleQuery

WithNamedOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleQuery) WithNamedOrgUsers

func (orq *OrgRoleQuery) WithNamedOrgUsers(name string, opts ...func(*OrgUserQuery)) *OrgRoleQuery

WithNamedOrgUsers tells the query-builder to eager-load the nodes that are connected to the "org_users" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleQuery) WithOrgRoleUser

func (orq *OrgRoleQuery) WithOrgRoleUser(opts ...func(*OrgRoleUserQuery)) *OrgRoleQuery

WithOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleQuery) WithOrgUsers

func (orq *OrgRoleQuery) WithOrgUsers(opts ...func(*OrgUserQuery)) *OrgRoleQuery

WithOrgUsers tells the query-builder to eager-load the nodes that are connected to the "org_users" edge. The optional arguments are used to configure the query builder of the edge.

type OrgRoleSelect

type OrgRoleSelect struct {
	*OrgRoleQuery
	// contains filtered or unexported fields
}

OrgRoleSelect is the builder for selecting fields of OrgRole entities.

func (*OrgRoleSelect) Aggregate

func (ors *OrgRoleSelect) Aggregate(fns ...AggregateFunc) *OrgRoleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgRoleSelect) Bool

func (s *OrgRoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) BoolX

func (s *OrgRoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleSelect) Bools

func (s *OrgRoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) BoolsX

func (s *OrgRoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleSelect) Float64

func (s *OrgRoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) Float64X

func (s *OrgRoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleSelect) Float64s

func (s *OrgRoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) Float64sX

func (s *OrgRoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleSelect) Int

func (s *OrgRoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) IntX

func (s *OrgRoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleSelect) Ints

func (s *OrgRoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) IntsX

func (s *OrgRoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleSelect) Scan

func (ors *OrgRoleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleSelect) ScanX

func (s *OrgRoleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleSelect) String

func (s *OrgRoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) StringX

func (s *OrgRoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleSelect) Strings

func (s *OrgRoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) StringsX

func (s *OrgRoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUpdate

type OrgRoleUpdate struct {
	// contains filtered or unexported fields
}

OrgRoleUpdate is the builder for updating OrgRole entities.

func (*OrgRoleUpdate) AddOrgRoleUser

func (oru *OrgRoleUpdate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdate) AddOrgRoleUserIDs

func (oru *OrgRoleUpdate) AddOrgRoleUserIDs(ids ...int) *OrgRoleUpdate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleUpdate) AddOrgUserIDs

func (oru *OrgRoleUpdate) AddOrgUserIDs(ids ...int) *OrgRoleUpdate

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleUpdate) AddOrgUsers

func (oru *OrgRoleUpdate) AddOrgUsers(o ...*OrgUser) *OrgRoleUpdate

AddOrgUsers adds the "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdate) ClearOrgRoleUser

func (oru *OrgRoleUpdate) ClearOrgRoleUser() *OrgRoleUpdate

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdate) ClearOrgUsers

func (oru *OrgRoleUpdate) ClearOrgUsers() *OrgRoleUpdate

ClearOrgUsers clears all "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdate) Exec

func (oru *OrgRoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUpdate) ExecX

func (oru *OrgRoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpdate) Mutation

func (oru *OrgRoleUpdate) Mutation() *OrgRoleMutation

Mutation returns the OrgRoleMutation object of the builder.

func (*OrgRoleUpdate) RemoveOrgRoleUser

func (oru *OrgRoleUpdate) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdate

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgRoleUpdate) RemoveOrgRoleUserIDs

func (oru *OrgRoleUpdate) RemoveOrgRoleUserIDs(ids ...int) *OrgRoleUpdate

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgRoleUpdate) RemoveOrgUserIDs

func (oru *OrgRoleUpdate) RemoveOrgUserIDs(ids ...int) *OrgRoleUpdate

RemoveOrgUserIDs removes the "org_users" edge to OrgUser entities by IDs.

func (*OrgRoleUpdate) RemoveOrgUsers

func (oru *OrgRoleUpdate) RemoveOrgUsers(o ...*OrgUser) *OrgRoleUpdate

RemoveOrgUsers removes "org_users" edges to OrgUser entities.

func (*OrgRoleUpdate) Save

func (oru *OrgRoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgRoleUpdate) SaveX

func (oru *OrgRoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUpdate) SetKind

func (oru *OrgRoleUpdate) SetKind(o orgrole.Kind) *OrgRoleUpdate

SetKind sets the "kind" field.

func (*OrgRoleUpdate) SetName

func (oru *OrgRoleUpdate) SetName(s string) *OrgRoleUpdate

SetName sets the "name" field.

func (*OrgRoleUpdate) Where

func (oru *OrgRoleUpdate) Where(ps ...predicate.OrgRole) *OrgRoleUpdate

Where appends a list predicates to the OrgRoleUpdate builder.

type OrgRoleUpdateOne

type OrgRoleUpdateOne struct {
	// contains filtered or unexported fields
}

OrgRoleUpdateOne is the builder for updating a single OrgRole entity.

func (*OrgRoleUpdateOne) AddOrgRoleUser

func (oruo *OrgRoleUpdateOne) AddOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdateOne

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdateOne) AddOrgRoleUserIDs

func (oruo *OrgRoleUpdateOne) AddOrgRoleUserIDs(ids ...int) *OrgRoleUpdateOne

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleUpdateOne) AddOrgUserIDs

func (oruo *OrgRoleUpdateOne) AddOrgUserIDs(ids ...int) *OrgRoleUpdateOne

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleUpdateOne) AddOrgUsers

func (oruo *OrgRoleUpdateOne) AddOrgUsers(o ...*OrgUser) *OrgRoleUpdateOne

AddOrgUsers adds the "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdateOne) ClearOrgRoleUser

func (oruo *OrgRoleUpdateOne) ClearOrgRoleUser() *OrgRoleUpdateOne

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdateOne) ClearOrgUsers

func (oruo *OrgRoleUpdateOne) ClearOrgUsers() *OrgRoleUpdateOne

ClearOrgUsers clears all "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdateOne) Exec

func (oruo *OrgRoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgRoleUpdateOne) ExecX

func (oruo *OrgRoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpdateOne) Mutation

func (oruo *OrgRoleUpdateOne) Mutation() *OrgRoleMutation

Mutation returns the OrgRoleMutation object of the builder.

func (*OrgRoleUpdateOne) RemoveOrgRoleUser

func (oruo *OrgRoleUpdateOne) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdateOne

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgRoleUpdateOne) RemoveOrgRoleUserIDs

func (oruo *OrgRoleUpdateOne) RemoveOrgRoleUserIDs(ids ...int) *OrgRoleUpdateOne

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgRoleUpdateOne) RemoveOrgUserIDs

func (oruo *OrgRoleUpdateOne) RemoveOrgUserIDs(ids ...int) *OrgRoleUpdateOne

RemoveOrgUserIDs removes the "org_users" edge to OrgUser entities by IDs.

func (*OrgRoleUpdateOne) RemoveOrgUsers

func (oruo *OrgRoleUpdateOne) RemoveOrgUsers(o ...*OrgUser) *OrgRoleUpdateOne

RemoveOrgUsers removes "org_users" edges to OrgUser entities.

func (*OrgRoleUpdateOne) Save

func (oruo *OrgRoleUpdateOne) Save(ctx context.Context) (*OrgRole, error)

Save executes the query and returns the updated OrgRole entity.

func (*OrgRoleUpdateOne) SaveX

func (oruo *OrgRoleUpdateOne) SaveX(ctx context.Context) *OrgRole

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUpdateOne) Select

func (oruo *OrgRoleUpdateOne) Select(field string, fields ...string) *OrgRoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgRoleUpdateOne) SetKind

func (oruo *OrgRoleUpdateOne) SetKind(o orgrole.Kind) *OrgRoleUpdateOne

SetKind sets the "kind" field.

func (*OrgRoleUpdateOne) SetName

func (oruo *OrgRoleUpdateOne) SetName(s string) *OrgRoleUpdateOne

SetName sets the "name" field.

func (*OrgRoleUpdateOne) Where

func (oruo *OrgRoleUpdateOne) Where(ps ...predicate.OrgRole) *OrgRoleUpdateOne

Where appends a list predicates to the OrgRoleUpdate builder.

type OrgRoleUpsert

type OrgRoleUpsert struct {
	*sql.UpdateSet
}

OrgRoleUpsert is the "OnConflict" setter.

func (*OrgRoleUpsert) SetKind

func (u *OrgRoleUpsert) SetKind(v orgrole.Kind) *OrgRoleUpsert

SetKind sets the "kind" field.

func (*OrgRoleUpsert) SetName

func (u *OrgRoleUpsert) SetName(v string) *OrgRoleUpsert

SetName sets the "name" field.

func (*OrgRoleUpsert) UpdateKind

func (u *OrgRoleUpsert) UpdateKind() *OrgRoleUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgRoleUpsert) UpdateName

func (u *OrgRoleUpsert) UpdateName() *OrgRoleUpsert

UpdateName sets the "name" field to the value that was provided on create.

type OrgRoleUpsertBulk

type OrgRoleUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUpsertBulk is the builder for "upsert"-ing a bulk of OrgRole nodes.

func (*OrgRoleUpsertBulk) DoNothing

func (u *OrgRoleUpsertBulk) DoNothing() *OrgRoleUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUpsertBulk) Exec

func (u *OrgRoleUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUpsertBulk) ExecX

func (u *OrgRoleUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpsertBulk) Ignore

func (u *OrgRoleUpsertBulk) Ignore() *OrgRoleUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgRoleUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*OrgRoleUpsertBulk) SetName

SetName sets the "name" field.

func (*OrgRoleUpsertBulk) Update

func (u *OrgRoleUpsertBulk) Update(set func(*OrgRoleUpsert)) *OrgRoleUpsertBulk

Update allows overriding fields `UPDATE` values. See the OrgRoleCreateBulk.OnConflict documentation for more info.

func (*OrgRoleUpsertBulk) UpdateKind

func (u *OrgRoleUpsertBulk) UpdateKind() *OrgRoleUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgRoleUpsertBulk) UpdateName

func (u *OrgRoleUpsertBulk) UpdateName() *OrgRoleUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgRoleUpsertBulk) UpdateNewValues

func (u *OrgRoleUpsertBulk) UpdateNewValues() *OrgRoleUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgrole.FieldID)
		}),
	).
	Exec(ctx)

type OrgRoleUpsertOne

type OrgRoleUpsertOne struct {
	// contains filtered or unexported fields
}

OrgRoleUpsertOne is the builder for "upsert"-ing

one OrgRole node.

func (*OrgRoleUpsertOne) DoNothing

func (u *OrgRoleUpsertOne) DoNothing() *OrgRoleUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUpsertOne) Exec

func (u *OrgRoleUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUpsertOne) ExecX

func (u *OrgRoleUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpsertOne) ID

func (u *OrgRoleUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgRoleUpsertOne) IDX

func (u *OrgRoleUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgRoleUpsertOne) Ignore

func (u *OrgRoleUpsertOne) Ignore() *OrgRoleUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRole.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgRoleUpsertOne) SetKind

SetKind sets the "kind" field.

func (*OrgRoleUpsertOne) SetName

func (u *OrgRoleUpsertOne) SetName(v string) *OrgRoleUpsertOne

SetName sets the "name" field.

func (*OrgRoleUpsertOne) Update

func (u *OrgRoleUpsertOne) Update(set func(*OrgRoleUpsert)) *OrgRoleUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgRoleCreate.OnConflict documentation for more info.

func (*OrgRoleUpsertOne) UpdateKind

func (u *OrgRoleUpsertOne) UpdateKind() *OrgRoleUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgRoleUpsertOne) UpdateName

func (u *OrgRoleUpsertOne) UpdateName() *OrgRoleUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgRoleUpsertOne) UpdateNewValues

func (u *OrgRoleUpsertOne) UpdateNewValues() *OrgRoleUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgrole.FieldID)
		}),
	).
	Exec(ctx)

type OrgRoleUser

type OrgRoleUser struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// 组织角色ID
	OrgRoleID int `json:"org_role_id,omitempty"`
	// 组织用户ID
	OrgUserID int `json:"org_user_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgRoleUserQuery when eager-loading is set.
	Edges OrgRoleUserEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgRoleUser is the model entity for the OrgRoleUser schema.

func (*OrgRoleUser) QueryOrgRole

func (oru *OrgRoleUser) QueryOrgRole() *OrgRoleQuery

QueryOrgRole queries the "org_role" edge of the OrgRoleUser entity.

func (*OrgRoleUser) QueryOrgUser

func (oru *OrgRoleUser) QueryOrgUser() *OrgUserQuery

QueryOrgUser queries the "org_user" edge of the OrgRoleUser entity.

func (*OrgRoleUser) String

func (oru *OrgRoleUser) String() string

String implements the fmt.Stringer.

func (*OrgRoleUser) Unwrap

func (oru *OrgRoleUser) Unwrap() *OrgRoleUser

Unwrap unwraps the OrgRoleUser entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgRoleUser) Update

func (oru *OrgRoleUser) Update() *OrgRoleUserUpdateOne

Update returns a builder for updating this OrgRoleUser. Note that you need to call OrgRoleUser.Unwrap() before calling this method if this OrgRoleUser was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgRoleUser) Value

func (oru *OrgRoleUser) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgRoleUser. This includes values selected through modifiers, order, etc.

type OrgRoleUserClient

type OrgRoleUserClient struct {
	// contains filtered or unexported fields
}

OrgRoleUserClient is a client for the OrgRoleUser schema.

func NewOrgRoleUserClient

func NewOrgRoleUserClient(c config) *OrgRoleUserClient

NewOrgRoleUserClient returns a client for the OrgRoleUser from the given config.

func (*OrgRoleUserClient) Create

func (c *OrgRoleUserClient) Create() *OrgRoleUserCreate

Create returns a builder for creating a OrgRoleUser entity.

func (*OrgRoleUserClient) CreateBulk

func (c *OrgRoleUserClient) CreateBulk(builders ...*OrgRoleUserCreate) *OrgRoleUserCreateBulk

CreateBulk returns a builder for creating a bulk of OrgRoleUser entities.

func (*OrgRoleUserClient) Delete

func (c *OrgRoleUserClient) Delete() *OrgRoleUserDelete

Delete returns a delete builder for OrgRoleUser.

func (*OrgRoleUserClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgRoleUserClient) DeleteOneID

func (c *OrgRoleUserClient) DeleteOneID(id int) *OrgRoleUserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgRoleUserClient) Get

func (c *OrgRoleUserClient) Get(ctx context.Context, id int) (*OrgRoleUser, error)

Get returns a OrgRoleUser entity by its id.

func (*OrgRoleUserClient) GetX

func (c *OrgRoleUserClient) GetX(ctx context.Context, id int) *OrgRoleUser

GetX is like Get, but panics if an error occurs.

func (*OrgRoleUserClient) Hooks

func (c *OrgRoleUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgRoleUserClient) Intercept

func (c *OrgRoleUserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgroleuser.Intercept(f(g(h())))`.

func (*OrgRoleUserClient) Interceptors

func (c *OrgRoleUserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgRoleUserClient) Query

func (c *OrgRoleUserClient) Query() *OrgRoleUserQuery

Query returns a query builder for OrgRoleUser.

func (*OrgRoleUserClient) QueryOrgRole

func (c *OrgRoleUserClient) QueryOrgRole(oru *OrgRoleUser) *OrgRoleQuery

QueryOrgRole queries the org_role edge of a OrgRoleUser.

func (*OrgRoleUserClient) QueryOrgUser

func (c *OrgRoleUserClient) QueryOrgUser(oru *OrgRoleUser) *OrgUserQuery

QueryOrgUser queries the org_user edge of a OrgRoleUser.

func (*OrgRoleUserClient) Update

func (c *OrgRoleUserClient) Update() *OrgRoleUserUpdate

Update returns an update builder for OrgRoleUser.

func (*OrgRoleUserClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgRoleUserClient) UpdateOneID

func (c *OrgRoleUserClient) UpdateOneID(id int) *OrgRoleUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgRoleUserClient) Use

func (c *OrgRoleUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgroleuser.Hooks(f(g(h())))`.

type OrgRoleUserCreate

type OrgRoleUserCreate struct {
	// contains filtered or unexported fields
}

OrgRoleUserCreate is the builder for creating a OrgRoleUser entity.

func (*OrgRoleUserCreate) Exec

func (oruc *OrgRoleUserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserCreate) ExecX

func (oruc *OrgRoleUserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserCreate) Mutation

func (oruc *OrgRoleUserCreate) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserCreate) OnConflict

func (oruc *OrgRoleUserCreate) OnConflict(opts ...sql.ConflictOption) *OrgRoleUserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRoleUser.Create().
	SetOrgRoleID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUserUpsert) {
		SetOrgRoleID(v+v).
	}).
	Exec(ctx)

func (*OrgRoleUserCreate) OnConflictColumns

func (oruc *OrgRoleUserCreate) OnConflictColumns(columns ...string) *OrgRoleUserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleUserCreate) Save

func (oruc *OrgRoleUserCreate) Save(ctx context.Context) (*OrgRoleUser, error)

Save creates the OrgRoleUser in the database.

func (*OrgRoleUserCreate) SaveX

func (oruc *OrgRoleUserCreate) SaveX(ctx context.Context) *OrgRoleUser

SaveX calls Save and panics if Save returns an error.

func (*OrgRoleUserCreate) SetID

func (oruc *OrgRoleUserCreate) SetID(i int) *OrgRoleUserCreate

SetID sets the "id" field.

func (*OrgRoleUserCreate) SetOrgID

func (oruc *OrgRoleUserCreate) SetOrgID(i int) *OrgRoleUserCreate

SetOrgID sets the "org_id" field.

func (*OrgRoleUserCreate) SetOrgRole

func (oruc *OrgRoleUserCreate) SetOrgRole(o *OrgRole) *OrgRoleUserCreate

SetOrgRole sets the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserCreate) SetOrgRoleID

func (oruc *OrgRoleUserCreate) SetOrgRoleID(i int) *OrgRoleUserCreate

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserCreate) SetOrgUser

func (oruc *OrgRoleUserCreate) SetOrgUser(o *OrgUser) *OrgRoleUserCreate

SetOrgUser sets the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserCreate) SetOrgUserID

func (oruc *OrgRoleUserCreate) SetOrgUserID(i int) *OrgRoleUserCreate

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserCreate) SetUserID

func (oruc *OrgRoleUserCreate) SetUserID(i int) *OrgRoleUserCreate

SetUserID sets the "user_id" field.

type OrgRoleUserCreateBulk

type OrgRoleUserCreateBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUserCreateBulk is the builder for creating many OrgRoleUser entities in bulk.

func (*OrgRoleUserCreateBulk) Exec

func (orucb *OrgRoleUserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserCreateBulk) ExecX

func (orucb *OrgRoleUserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserCreateBulk) OnConflict

func (orucb *OrgRoleUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgRoleUserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRoleUser.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUserUpsert) {
		SetOrgRoleID(v+v).
	}).
	Exec(ctx)

func (*OrgRoleUserCreateBulk) OnConflictColumns

func (orucb *OrgRoleUserCreateBulk) OnConflictColumns(columns ...string) *OrgRoleUserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleUserCreateBulk) Save

func (orucb *OrgRoleUserCreateBulk) Save(ctx context.Context) ([]*OrgRoleUser, error)

Save creates the OrgRoleUser entities in the database.

func (*OrgRoleUserCreateBulk) SaveX

func (orucb *OrgRoleUserCreateBulk) SaveX(ctx context.Context) []*OrgRoleUser

SaveX is like Save, but panics if an error occurs.

type OrgRoleUserDelete

type OrgRoleUserDelete struct {
	// contains filtered or unexported fields
}

OrgRoleUserDelete is the builder for deleting a OrgRoleUser entity.

func (*OrgRoleUserDelete) Exec

func (orud *OrgRoleUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgRoleUserDelete) ExecX

func (orud *OrgRoleUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserDelete) Where

Where appends a list predicates to the OrgRoleUserDelete builder.

type OrgRoleUserDeleteOne

type OrgRoleUserDeleteOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserDeleteOne is the builder for deleting a single OrgRoleUser entity.

func (*OrgRoleUserDeleteOne) Exec

func (orudo *OrgRoleUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgRoleUserDeleteOne) ExecX

func (orudo *OrgRoleUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserDeleteOne) Where

Where appends a list predicates to the OrgRoleUserDelete builder.

type OrgRoleUserEdges

type OrgRoleUserEdges struct {
	// OrgRole holds the value of the org_role edge.
	OrgRole *OrgRole `json:"org_role,omitempty"`
	// OrgUser holds the value of the org_user edge.
	OrgUser *OrgUser `json:"org_user,omitempty"`
	// contains filtered or unexported fields
}

OrgRoleUserEdges holds the relations/edges for other nodes in the graph.

func (OrgRoleUserEdges) OrgRoleOrErr

func (e OrgRoleUserEdges) OrgRoleOrErr() (*OrgRole, error)

OrgRoleOrErr returns the OrgRole value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgRoleUserEdges) OrgUserOrErr

func (e OrgRoleUserEdges) OrgUserOrErr() (*OrgUser, error)

OrgUserOrErr returns the OrgUser value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OrgRoleUserGroupBy

type OrgRoleUserGroupBy struct {
	// contains filtered or unexported fields
}

OrgRoleUserGroupBy is the group-by builder for OrgRoleUser entities.

func (*OrgRoleUserGroupBy) Aggregate

func (orugb *OrgRoleUserGroupBy) Aggregate(fns ...AggregateFunc) *OrgRoleUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgRoleUserGroupBy) Bool

func (s *OrgRoleUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) BoolX

func (s *OrgRoleUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Bools

func (s *OrgRoleUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) BoolsX

func (s *OrgRoleUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Float64

func (s *OrgRoleUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) Float64X

func (s *OrgRoleUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Float64s

func (s *OrgRoleUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) Float64sX

func (s *OrgRoleUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Int

func (s *OrgRoleUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) IntX

func (s *OrgRoleUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Ints

func (s *OrgRoleUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) IntsX

func (s *OrgRoleUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Scan

func (orugb *OrgRoleUserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleUserGroupBy) ScanX

func (s *OrgRoleUserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleUserGroupBy) String

func (s *OrgRoleUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) StringX

func (s *OrgRoleUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Strings

func (s *OrgRoleUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) StringsX

func (s *OrgRoleUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUserMutation

type OrgRoleUserMutation struct {
	// contains filtered or unexported fields
}

OrgRoleUserMutation represents an operation that mutates the OrgRoleUser nodes in the graph.

func (*OrgRoleUserMutation) AddField

func (m *OrgRoleUserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleUserMutation) AddOrgID

func (m *OrgRoleUserMutation) AddOrgID(i int)

AddOrgID adds i to the "org_id" field.

func (*OrgRoleUserMutation) AddUserID

func (m *OrgRoleUserMutation) AddUserID(i int)

AddUserID adds i to the "user_id" field.

func (*OrgRoleUserMutation) AddedEdges

func (m *OrgRoleUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgRoleUserMutation) AddedField

func (m *OrgRoleUserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleUserMutation) AddedFields

func (m *OrgRoleUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgRoleUserMutation) AddedIDs

func (m *OrgRoleUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgRoleUserMutation) AddedOrgID

func (m *OrgRoleUserMutation) AddedOrgID() (r int, exists bool)

AddedOrgID returns the value that was added to the "org_id" field in this mutation.

func (*OrgRoleUserMutation) AddedUserID

func (m *OrgRoleUserMutation) AddedUserID() (r int, exists bool)

AddedUserID returns the value that was added to the "user_id" field in this mutation.

func (*OrgRoleUserMutation) ClearEdge

func (m *OrgRoleUserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgRoleUserMutation) ClearField

func (m *OrgRoleUserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleUserMutation) ClearOrgRole

func (m *OrgRoleUserMutation) ClearOrgRole()

ClearOrgRole clears the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserMutation) ClearOrgUser

func (m *OrgRoleUserMutation) ClearOrgUser()

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserMutation) ClearedEdges

func (m *OrgRoleUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgRoleUserMutation) ClearedFields

func (m *OrgRoleUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgRoleUserMutation) Client

func (m OrgRoleUserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgRoleUserMutation) EdgeCleared

func (m *OrgRoleUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgRoleUserMutation) Field

func (m *OrgRoleUserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleUserMutation) FieldCleared

func (m *OrgRoleUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgRoleUserMutation) Fields

func (m *OrgRoleUserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgRoleUserMutation) ID

func (m *OrgRoleUserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgRoleUserMutation) IDs

func (m *OrgRoleUserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgRoleUserMutation) OldField

func (m *OrgRoleUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgRoleUserMutation) OldOrgID

func (m *OrgRoleUserMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldOrgRoleID

func (m *OrgRoleUserMutation) OldOrgRoleID(ctx context.Context) (v int, err error)

OldOrgRoleID returns the old "org_role_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldOrgUserID

func (m *OrgRoleUserMutation) OldOrgUserID(ctx context.Context) (v int, err error)

OldOrgUserID returns the old "org_user_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldUserID

func (m *OrgRoleUserMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) Op

func (m *OrgRoleUserMutation) Op() Op

Op returns the operation name.

func (*OrgRoleUserMutation) OrgID

func (m *OrgRoleUserMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgRoleUserMutation) OrgRoleCleared

func (m *OrgRoleUserMutation) OrgRoleCleared() bool

OrgRoleCleared reports if the "org_role" edge to the OrgRole entity was cleared.

func (*OrgRoleUserMutation) OrgRoleID

func (m *OrgRoleUserMutation) OrgRoleID() (r int, exists bool)

OrgRoleID returns the value of the "org_role_id" field in the mutation.

func (*OrgRoleUserMutation) OrgRoleIDs

func (m *OrgRoleUserMutation) OrgRoleIDs() (ids []int)

OrgRoleIDs returns the "org_role" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgRoleID instead. It exists only for internal usage by the builders.

func (*OrgRoleUserMutation) OrgUserCleared

func (m *OrgRoleUserMutation) OrgUserCleared() bool

OrgUserCleared reports if the "org_user" edge to the OrgUser entity was cleared.

func (*OrgRoleUserMutation) OrgUserID

func (m *OrgRoleUserMutation) OrgUserID() (r int, exists bool)

OrgUserID returns the value of the "org_user_id" field in the mutation.

func (*OrgRoleUserMutation) OrgUserIDs

func (m *OrgRoleUserMutation) OrgUserIDs() (ids []int)

OrgUserIDs returns the "org_user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgUserID instead. It exists only for internal usage by the builders.

func (*OrgRoleUserMutation) RemovedEdges

func (m *OrgRoleUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgRoleUserMutation) RemovedIDs

func (m *OrgRoleUserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgRoleUserMutation) ResetEdge

func (m *OrgRoleUserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgRoleUserMutation) ResetField

func (m *OrgRoleUserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleUserMutation) ResetOrgID

func (m *OrgRoleUserMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgRoleUserMutation) ResetOrgRole

func (m *OrgRoleUserMutation) ResetOrgRole()

ResetOrgRole resets all changes to the "org_role" edge.

func (*OrgRoleUserMutation) ResetOrgRoleID

func (m *OrgRoleUserMutation) ResetOrgRoleID()

ResetOrgRoleID resets all changes to the "org_role_id" field.

func (*OrgRoleUserMutation) ResetOrgUser

func (m *OrgRoleUserMutation) ResetOrgUser()

ResetOrgUser resets all changes to the "org_user" edge.

func (*OrgRoleUserMutation) ResetOrgUserID

func (m *OrgRoleUserMutation) ResetOrgUserID()

ResetOrgUserID resets all changes to the "org_user_id" field.

func (*OrgRoleUserMutation) ResetUserID

func (m *OrgRoleUserMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OrgRoleUserMutation) SetField

func (m *OrgRoleUserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleUserMutation) SetID

func (m *OrgRoleUserMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgRoleUser entities.

func (*OrgRoleUserMutation) SetOp

func (m *OrgRoleUserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgRoleUserMutation) SetOrgID

func (m *OrgRoleUserMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgRoleUserMutation) SetOrgRoleID

func (m *OrgRoleUserMutation) SetOrgRoleID(i int)

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserMutation) SetOrgUserID

func (m *OrgRoleUserMutation) SetOrgUserID(i int)

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserMutation) SetUserID

func (m *OrgRoleUserMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (OrgRoleUserMutation) Tx

func (m OrgRoleUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgRoleUserMutation) Type

func (m *OrgRoleUserMutation) Type() string

Type returns the node type of this mutation (OrgRoleUser).

func (*OrgRoleUserMutation) UserID

func (m *OrgRoleUserMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OrgRoleUserMutation) Where

func (m *OrgRoleUserMutation) Where(ps ...predicate.OrgRoleUser)

Where appends a list predicates to the OrgRoleUserMutation builder.

func (*OrgRoleUserMutation) WhereP

func (m *OrgRoleUserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgRoleUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgRoleUserQuery

type OrgRoleUserQuery struct {
	// contains filtered or unexported fields
}

OrgRoleUserQuery is the builder for querying OrgRoleUser entities.

func (*OrgRoleUserQuery) Aggregate

func (oruq *OrgRoleUserQuery) Aggregate(fns ...AggregateFunc) *OrgRoleUserSelect

Aggregate returns a OrgRoleUserSelect configured with the given aggregations.

func (*OrgRoleUserQuery) All

func (oruq *OrgRoleUserQuery) All(ctx context.Context) ([]*OrgRoleUser, error)

All executes the query and returns a list of OrgRoleUsers.

func (*OrgRoleUserQuery) AllX

func (oruq *OrgRoleUserQuery) AllX(ctx context.Context) []*OrgRoleUser

AllX is like All, but panics if an error occurs.

func (*OrgRoleUserQuery) Clone

func (oruq *OrgRoleUserQuery) Clone() *OrgRoleUserQuery

Clone returns a duplicate of the OrgRoleUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgRoleUserQuery) Count

func (oruq *OrgRoleUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgRoleUserQuery) CountX

func (oruq *OrgRoleUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgRoleUserQuery) Exist

func (oruq *OrgRoleUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgRoleUserQuery) ExistX

func (oruq *OrgRoleUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgRoleUserQuery) First

func (oruq *OrgRoleUserQuery) First(ctx context.Context) (*OrgRoleUser, error)

First returns the first OrgRoleUser entity from the query. Returns a *NotFoundError when no OrgRoleUser was found.

func (*OrgRoleUserQuery) FirstID

func (oruq *OrgRoleUserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgRoleUser ID from the query. Returns a *NotFoundError when no OrgRoleUser ID was found.

func (*OrgRoleUserQuery) FirstIDX

func (oruq *OrgRoleUserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgRoleUserQuery) FirstX

func (oruq *OrgRoleUserQuery) FirstX(ctx context.Context) *OrgRoleUser

FirstX is like First, but panics if an error occurs.

func (*OrgRoleUserQuery) GroupBy

func (oruq *OrgRoleUserQuery) GroupBy(field string, fields ...string) *OrgRoleUserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	OrgRoleID int `json:"org_role_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgRoleUser.Query().
	GroupBy(orgroleuser.FieldOrgRoleID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgRoleUserQuery) IDs

func (oruq *OrgRoleUserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgRoleUser IDs.

func (*OrgRoleUserQuery) IDsX

func (oruq *OrgRoleUserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgRoleUserQuery) Limit

func (oruq *OrgRoleUserQuery) Limit(limit int) *OrgRoleUserQuery

Limit the number of records to be returned by this query.

func (*OrgRoleUserQuery) Offset

func (oruq *OrgRoleUserQuery) Offset(offset int) *OrgRoleUserQuery

Offset to start from.

func (*OrgRoleUserQuery) Only

func (oruq *OrgRoleUserQuery) Only(ctx context.Context) (*OrgRoleUser, error)

Only returns a single OrgRoleUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgRoleUser entity is found. Returns a *NotFoundError when no OrgRoleUser entities are found.

func (*OrgRoleUserQuery) OnlyID

func (oruq *OrgRoleUserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgRoleUser ID in the query. Returns a *NotSingularError when more than one OrgRoleUser ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgRoleUserQuery) OnlyIDX

func (oruq *OrgRoleUserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgRoleUserQuery) OnlyX

func (oruq *OrgRoleUserQuery) OnlyX(ctx context.Context) *OrgRoleUser

OnlyX is like Only, but panics if an error occurs.

func (*OrgRoleUserQuery) Order

Order specifies how the records should be ordered.

func (*OrgRoleUserQuery) QueryOrgRole

func (oruq *OrgRoleUserQuery) QueryOrgRole() *OrgRoleQuery

QueryOrgRole chains the current query on the "org_role" edge.

func (*OrgRoleUserQuery) QueryOrgUser

func (oruq *OrgRoleUserQuery) QueryOrgUser() *OrgUserQuery

QueryOrgUser chains the current query on the "org_user" edge.

func (*OrgRoleUserQuery) Select

func (oruq *OrgRoleUserQuery) Select(fields ...string) *OrgRoleUserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	OrgRoleID int `json:"org_role_id,omitempty"`
}

client.OrgRoleUser.Query().
	Select(orgroleuser.FieldOrgRoleID).
	Scan(ctx, &v)

func (*OrgRoleUserQuery) Unique

func (oruq *OrgRoleUserQuery) Unique(unique bool) *OrgRoleUserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgRoleUserQuery) Where

Where adds a new predicate for the OrgRoleUserQuery builder.

func (*OrgRoleUserQuery) WithOrgRole

func (oruq *OrgRoleUserQuery) WithOrgRole(opts ...func(*OrgRoleQuery)) *OrgRoleUserQuery

WithOrgRole tells the query-builder to eager-load the nodes that are connected to the "org_role" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleUserQuery) WithOrgUser

func (oruq *OrgRoleUserQuery) WithOrgUser(opts ...func(*OrgUserQuery)) *OrgRoleUserQuery

WithOrgUser tells the query-builder to eager-load the nodes that are connected to the "org_user" edge. The optional arguments are used to configure the query builder of the edge.

type OrgRoleUserSelect

type OrgRoleUserSelect struct {
	*OrgRoleUserQuery
	// contains filtered or unexported fields
}

OrgRoleUserSelect is the builder for selecting fields of OrgRoleUser entities.

func (*OrgRoleUserSelect) Aggregate

func (orus *OrgRoleUserSelect) Aggregate(fns ...AggregateFunc) *OrgRoleUserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgRoleUserSelect) Bool

func (s *OrgRoleUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) BoolX

func (s *OrgRoleUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleUserSelect) Bools

func (s *OrgRoleUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) BoolsX

func (s *OrgRoleUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleUserSelect) Float64

func (s *OrgRoleUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) Float64X

func (s *OrgRoleUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleUserSelect) Float64s

func (s *OrgRoleUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) Float64sX

func (s *OrgRoleUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleUserSelect) Int

func (s *OrgRoleUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) IntX

func (s *OrgRoleUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleUserSelect) Ints

func (s *OrgRoleUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) IntsX

func (s *OrgRoleUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleUserSelect) Scan

func (orus *OrgRoleUserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleUserSelect) ScanX

func (s *OrgRoleUserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleUserSelect) String

func (s *OrgRoleUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) StringX

func (s *OrgRoleUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleUserSelect) Strings

func (s *OrgRoleUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) StringsX

func (s *OrgRoleUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUserUpdate

type OrgRoleUserUpdate struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpdate is the builder for updating OrgRoleUser entities.

func (*OrgRoleUserUpdate) AddOrgID

func (oruu *OrgRoleUserUpdate) AddOrgID(i int) *OrgRoleUserUpdate

AddOrgID adds i to the "org_id" field.

func (*OrgRoleUserUpdate) AddUserID

func (oruu *OrgRoleUserUpdate) AddUserID(i int) *OrgRoleUserUpdate

AddUserID adds i to the "user_id" field.

func (*OrgRoleUserUpdate) ClearOrgRole

func (oruu *OrgRoleUserUpdate) ClearOrgRole() *OrgRoleUserUpdate

ClearOrgRole clears the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdate) ClearOrgUser

func (oruu *OrgRoleUserUpdate) ClearOrgUser() *OrgRoleUserUpdate

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdate) Exec

func (oruu *OrgRoleUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserUpdate) ExecX

func (oruu *OrgRoleUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpdate) Mutation

func (oruu *OrgRoleUserUpdate) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserUpdate) Save

func (oruu *OrgRoleUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgRoleUserUpdate) SaveX

func (oruu *OrgRoleUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUserUpdate) SetOrgID

func (oruu *OrgRoleUserUpdate) SetOrgID(i int) *OrgRoleUserUpdate

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpdate) SetOrgRole

func (oruu *OrgRoleUserUpdate) SetOrgRole(o *OrgRole) *OrgRoleUserUpdate

SetOrgRole sets the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdate) SetOrgRoleID

func (oruu *OrgRoleUserUpdate) SetOrgRoleID(i int) *OrgRoleUserUpdate

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpdate) SetOrgUser

func (oruu *OrgRoleUserUpdate) SetOrgUser(o *OrgUser) *OrgRoleUserUpdate

SetOrgUser sets the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdate) SetOrgUserID

func (oruu *OrgRoleUserUpdate) SetOrgUserID(i int) *OrgRoleUserUpdate

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpdate) SetUserID

func (oruu *OrgRoleUserUpdate) SetUserID(i int) *OrgRoleUserUpdate

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpdate) Where

Where appends a list predicates to the OrgRoleUserUpdate builder.

type OrgRoleUserUpdateOne

type OrgRoleUserUpdateOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpdateOne is the builder for updating a single OrgRoleUser entity.

func (*OrgRoleUserUpdateOne) AddOrgID

func (oruuo *OrgRoleUserUpdateOne) AddOrgID(i int) *OrgRoleUserUpdateOne

AddOrgID adds i to the "org_id" field.

func (*OrgRoleUserUpdateOne) AddUserID

func (oruuo *OrgRoleUserUpdateOne) AddUserID(i int) *OrgRoleUserUpdateOne

AddUserID adds i to the "user_id" field.

func (*OrgRoleUserUpdateOne) ClearOrgRole

func (oruuo *OrgRoleUserUpdateOne) ClearOrgRole() *OrgRoleUserUpdateOne

ClearOrgRole clears the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdateOne) ClearOrgUser

func (oruuo *OrgRoleUserUpdateOne) ClearOrgUser() *OrgRoleUserUpdateOne

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdateOne) Exec

func (oruuo *OrgRoleUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgRoleUserUpdateOne) ExecX

func (oruuo *OrgRoleUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpdateOne) Mutation

func (oruuo *OrgRoleUserUpdateOne) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserUpdateOne) Save

func (oruuo *OrgRoleUserUpdateOne) Save(ctx context.Context) (*OrgRoleUser, error)

Save executes the query and returns the updated OrgRoleUser entity.

func (*OrgRoleUserUpdateOne) SaveX

func (oruuo *OrgRoleUserUpdateOne) SaveX(ctx context.Context) *OrgRoleUser

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUserUpdateOne) Select

func (oruuo *OrgRoleUserUpdateOne) Select(field string, fields ...string) *OrgRoleUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgRoleUserUpdateOne) SetOrgID

func (oruuo *OrgRoleUserUpdateOne) SetOrgID(i int) *OrgRoleUserUpdateOne

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpdateOne) SetOrgRole

func (oruuo *OrgRoleUserUpdateOne) SetOrgRole(o *OrgRole) *OrgRoleUserUpdateOne

SetOrgRole sets the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdateOne) SetOrgRoleID

func (oruuo *OrgRoleUserUpdateOne) SetOrgRoleID(i int) *OrgRoleUserUpdateOne

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpdateOne) SetOrgUser

func (oruuo *OrgRoleUserUpdateOne) SetOrgUser(o *OrgUser) *OrgRoleUserUpdateOne

SetOrgUser sets the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdateOne) SetOrgUserID

func (oruuo *OrgRoleUserUpdateOne) SetOrgUserID(i int) *OrgRoleUserUpdateOne

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpdateOne) SetUserID

func (oruuo *OrgRoleUserUpdateOne) SetUserID(i int) *OrgRoleUserUpdateOne

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpdateOne) Where

Where appends a list predicates to the OrgRoleUserUpdate builder.

type OrgRoleUserUpsert

type OrgRoleUserUpsert struct {
	*sql.UpdateSet
}

OrgRoleUserUpsert is the "OnConflict" setter.

func (*OrgRoleUserUpsert) AddOrgID

func (u *OrgRoleUserUpsert) AddOrgID(v int) *OrgRoleUserUpsert

AddOrgID adds v to the "org_id" field.

func (*OrgRoleUserUpsert) AddUserID

func (u *OrgRoleUserUpsert) AddUserID(v int) *OrgRoleUserUpsert

AddUserID adds v to the "user_id" field.

func (*OrgRoleUserUpsert) SetOrgID

func (u *OrgRoleUserUpsert) SetOrgID(v int) *OrgRoleUserUpsert

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsert) SetOrgRoleID

func (u *OrgRoleUserUpsert) SetOrgRoleID(v int) *OrgRoleUserUpsert

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsert) SetOrgUserID

func (u *OrgRoleUserUpsert) SetOrgUserID(v int) *OrgRoleUserUpsert

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsert) SetUserID

func (u *OrgRoleUserUpsert) SetUserID(v int) *OrgRoleUserUpsert

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsert) UpdateOrgID

func (u *OrgRoleUserUpsert) UpdateOrgID() *OrgRoleUserUpsert

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateOrgRoleID

func (u *OrgRoleUserUpsert) UpdateOrgRoleID() *OrgRoleUserUpsert

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateOrgUserID

func (u *OrgRoleUserUpsert) UpdateOrgUserID() *OrgRoleUserUpsert

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateUserID

func (u *OrgRoleUserUpsert) UpdateUserID() *OrgRoleUserUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUserUpsertBulk

type OrgRoleUserUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpsertBulk is the builder for "upsert"-ing a bulk of OrgRoleUser nodes.

func (*OrgRoleUserUpsertBulk) AddOrgID

AddOrgID adds v to the "org_id" field.

func (*OrgRoleUserUpsertBulk) AddUserID

AddUserID adds v to the "user_id" field.

func (*OrgRoleUserUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUserUpsertBulk) Exec

Exec executes the query.

func (*OrgRoleUserUpsertBulk) ExecX

func (u *OrgRoleUserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgRoleUserUpsertBulk) SetOrgID

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsertBulk) SetOrgRoleID

func (u *OrgRoleUserUpsertBulk) SetOrgRoleID(v int) *OrgRoleUserUpsertBulk

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsertBulk) SetOrgUserID

func (u *OrgRoleUserUpsertBulk) SetOrgUserID(v int) *OrgRoleUserUpsertBulk

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OrgRoleUserCreateBulk.OnConflict documentation for more info.

func (*OrgRoleUserUpsertBulk) UpdateNewValues

func (u *OrgRoleUserUpsertBulk) UpdateNewValues() *OrgRoleUserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgroleuser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUserUpsertBulk) UpdateOrgID

func (u *OrgRoleUserUpsertBulk) UpdateOrgID() *OrgRoleUserUpsertBulk

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateOrgRoleID

func (u *OrgRoleUserUpsertBulk) UpdateOrgRoleID() *OrgRoleUserUpsertBulk

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateOrgUserID

func (u *OrgRoleUserUpsertBulk) UpdateOrgUserID() *OrgRoleUserUpsertBulk

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateUserID

func (u *OrgRoleUserUpsertBulk) UpdateUserID() *OrgRoleUserUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUserUpsertOne

type OrgRoleUserUpsertOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpsertOne is the builder for "upsert"-ing

one OrgRoleUser node.

func (*OrgRoleUserUpsertOne) AddOrgID

AddOrgID adds v to the "org_id" field.

func (*OrgRoleUserUpsertOne) AddUserID

AddUserID adds v to the "user_id" field.

func (*OrgRoleUserUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUserUpsertOne) Exec

Exec executes the query.

func (*OrgRoleUserUpsertOne) ExecX

func (u *OrgRoleUserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpsertOne) ID

func (u *OrgRoleUserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgRoleUserUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OrgRoleUserUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRoleUser.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgRoleUserUpsertOne) SetOrgID

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsertOne) SetOrgRoleID

func (u *OrgRoleUserUpsertOne) SetOrgRoleID(v int) *OrgRoleUserUpsertOne

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsertOne) SetOrgUserID

func (u *OrgRoleUserUpsertOne) SetOrgUserID(v int) *OrgRoleUserUpsertOne

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OrgRoleUserCreate.OnConflict documentation for more info.

func (*OrgRoleUserUpsertOne) UpdateNewValues

func (u *OrgRoleUserUpsertOne) UpdateNewValues() *OrgRoleUserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgroleuser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUserUpsertOne) UpdateOrgID

func (u *OrgRoleUserUpsertOne) UpdateOrgID() *OrgRoleUserUpsertOne

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateOrgRoleID

func (u *OrgRoleUserUpsertOne) UpdateOrgRoleID() *OrgRoleUserUpsertOne

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateOrgUserID

func (u *OrgRoleUserUpsertOne) UpdateOrgUserID() *OrgRoleUserUpsertOne

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateUserID

func (u *OrgRoleUserUpsertOne) UpdateUserID() *OrgRoleUserUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUsers

type OrgRoleUsers []*OrgRoleUser

OrgRoleUsers is a parsable slice of OrgRoleUser.

type OrgRoleWhereInput

type OrgRoleWhereInput struct {
	Predicates []predicate.OrgRole  `json:"-"`
	Not        *OrgRoleWhereInput   `json:"not,omitempty"`
	Or         []*OrgRoleWhereInput `json:"or,omitempty"`
	And        []*OrgRoleWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "org_id" field predicates.
	OrgID       *int  `json:"orgID,omitempty"`
	OrgIDNEQ    *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn     []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn  []int `json:"orgIDNotIn,omitempty"`
	OrgIDGT     *int  `json:"orgIDGT,omitempty"`
	OrgIDGTE    *int  `json:"orgIDGTE,omitempty"`
	OrgIDLT     *int  `json:"orgIDLT,omitempty"`
	OrgIDLTE    *int  `json:"orgIDLTE,omitempty"`
	OrgIDIsNil  bool  `json:"orgIDIsNil,omitempty"`
	OrgIDNotNil bool  `json:"orgIDNotNil,omitempty"`

	// "kind" field predicates.
	Kind      *orgrole.Kind  `json:"kind,omitempty"`
	KindNEQ   *orgrole.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []orgrole.Kind `json:"kindIn,omitempty"`
	KindNotIn []orgrole.Kind `json:"kindNotIn,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`
}

OrgRoleWhereInput represents a where input for filtering OrgRole queries.

func (*OrgRoleWhereInput) AddPredicates

func (i *OrgRoleWhereInput) AddPredicates(predicates ...predicate.OrgRole)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgRoleWhereInput) Filter

Filter applies the OrgRoleWhereInput filter on the OrgRoleQuery builder.

func (*OrgRoleWhereInput) P

P returns a predicate for filtering orgroles. An error is returned if the input is empty or invalid.

type OrgRoles

type OrgRoles []*OrgRole

OrgRoles is a parsable slice of OrgRole.

type OrgUser

type OrgUser struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// 加入时间
	JoinedAt time.Time `json:"joined_at,omitempty"`
	// 在组织内的显示名称
	DisplayName string `json:"display_name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgUserQuery when eager-loading is set.
	Edges OrgUserEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgUser is the model entity for the OrgUser schema.

func (*OrgUser) GlobalID

func (ou *OrgUser) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given OrgUser node.

func (*OrgUser) IsNode

func (*OrgUser) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*OrgUser) NamedOrgRoleUser

func (ou *OrgUser) NamedOrgRoleUser(name string) ([]*OrgRoleUser, error)

NamedOrgRoleUser returns the OrgRoleUser named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgUser) NamedOrgRoles

func (ou *OrgUser) NamedOrgRoles(name string) ([]*OrgRole, error)

NamedOrgRoles returns the OrgRoles named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgUser) QueryOrgRoleUser

func (ou *OrgUser) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser queries the "org_role_user" edge of the OrgUser entity.

func (*OrgUser) QueryOrgRoles

func (ou *OrgUser) QueryOrgRoles() *OrgRoleQuery

QueryOrgRoles queries the "org_roles" edge of the OrgUser entity.

func (*OrgUser) String

func (ou *OrgUser) String() string

String implements the fmt.Stringer.

func (*OrgUser) ToEdge

func (ou *OrgUser) ToEdge(order *OrgUserOrder) *OrgUserEdge

ToEdge converts OrgUser into OrgUserEdge.

func (*OrgUser) Unwrap

func (ou *OrgUser) Unwrap() *OrgUser

Unwrap unwraps the OrgUser entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgUser) Update

func (ou *OrgUser) Update() *OrgUserUpdateOne

Update returns a builder for updating this OrgUser. Note that you need to call OrgUser.Unwrap() before calling this method if this OrgUser was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgUser) Value

func (ou *OrgUser) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgUser. This includes values selected through modifiers, order, etc.

type OrgUserClient

type OrgUserClient struct {
	// contains filtered or unexported fields
}

OrgUserClient is a client for the OrgUser schema.

func NewOrgUserClient

func NewOrgUserClient(c config) *OrgUserClient

NewOrgUserClient returns a client for the OrgUser from the given config.

func (*OrgUserClient) Create

func (c *OrgUserClient) Create() *OrgUserCreate

Create returns a builder for creating a OrgUser entity.

func (*OrgUserClient) CreateBulk

func (c *OrgUserClient) CreateBulk(builders ...*OrgUserCreate) *OrgUserCreateBulk

CreateBulk returns a builder for creating a bulk of OrgUser entities.

func (*OrgUserClient) Delete

func (c *OrgUserClient) Delete() *OrgUserDelete

Delete returns a delete builder for OrgUser.

func (*OrgUserClient) DeleteOne

func (c *OrgUserClient) DeleteOne(ou *OrgUser) *OrgUserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgUserClient) DeleteOneID

func (c *OrgUserClient) DeleteOneID(id int) *OrgUserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgUserClient) Get

func (c *OrgUserClient) Get(ctx context.Context, id int) (*OrgUser, error)

Get returns a OrgUser entity by its id.

func (*OrgUserClient) GetX

func (c *OrgUserClient) GetX(ctx context.Context, id int) *OrgUser

GetX is like Get, but panics if an error occurs.

func (*OrgUserClient) Hooks

func (c *OrgUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgUserClient) Intercept

func (c *OrgUserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orguser.Intercept(f(g(h())))`.

func (*OrgUserClient) Interceptors

func (c *OrgUserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgUserClient) Query

func (c *OrgUserClient) Query() *OrgUserQuery

Query returns a query builder for OrgUser.

func (*OrgUserClient) QueryOrgRoleUser

func (c *OrgUserClient) QueryOrgRoleUser(ou *OrgUser) *OrgRoleUserQuery

QueryOrgRoleUser queries the org_role_user edge of a OrgUser.

func (*OrgUserClient) QueryOrgRoles

func (c *OrgUserClient) QueryOrgRoles(ou *OrgUser) *OrgRoleQuery

QueryOrgRoles queries the org_roles edge of a OrgUser.

func (*OrgUserClient) Update

func (c *OrgUserClient) Update() *OrgUserUpdate

Update returns an update builder for OrgUser.

func (*OrgUserClient) UpdateOne

func (c *OrgUserClient) UpdateOne(ou *OrgUser) *OrgUserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgUserClient) UpdateOneID

func (c *OrgUserClient) UpdateOneID(id int) *OrgUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgUserClient) Use

func (c *OrgUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orguser.Hooks(f(g(h())))`.

type OrgUserConnection

type OrgUserConnection struct {
	Edges      []*OrgUserEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

OrgUserConnection is the connection containing edges to OrgUser.

type OrgUserCreate

type OrgUserCreate struct {
	// contains filtered or unexported fields
}

OrgUserCreate is the builder for creating a OrgUser entity.

func (*OrgUserCreate) AddOrgRoleIDs

func (ouc *OrgUserCreate) AddOrgRoleIDs(ids ...int) *OrgUserCreate

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserCreate) AddOrgRoleUser

func (ouc *OrgUserCreate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgUserCreate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserCreate) AddOrgRoleUserIDs

func (ouc *OrgUserCreate) AddOrgRoleUserIDs(ids ...int) *OrgUserCreate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserCreate) AddOrgRoles

func (ouc *OrgUserCreate) AddOrgRoles(o ...*OrgRole) *OrgUserCreate

AddOrgRoles adds the "org_roles" edges to the OrgRole entity.

func (*OrgUserCreate) Exec

func (ouc *OrgUserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserCreate) ExecX

func (ouc *OrgUserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserCreate) Mutation

func (ouc *OrgUserCreate) Mutation() *OrgUserMutation

Mutation returns the OrgUserMutation object of the builder.

func (*OrgUserCreate) OnConflict

func (ouc *OrgUserCreate) OnConflict(opts ...sql.ConflictOption) *OrgUserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgUser.Create().
	SetOrgID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUserUpsert) {
		SetOrgID(v+v).
	}).
	Exec(ctx)

func (*OrgUserCreate) OnConflictColumns

func (ouc *OrgUserCreate) OnConflictColumns(columns ...string) *OrgUserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgUserCreate) Save

func (ouc *OrgUserCreate) Save(ctx context.Context) (*OrgUser, error)

Save creates the OrgUser in the database.

func (*OrgUserCreate) SaveX

func (ouc *OrgUserCreate) SaveX(ctx context.Context) *OrgUser

SaveX calls Save and panics if Save returns an error.

func (*OrgUserCreate) SetDisplayName

func (ouc *OrgUserCreate) SetDisplayName(s string) *OrgUserCreate

SetDisplayName sets the "display_name" field.

func (*OrgUserCreate) SetID

func (ouc *OrgUserCreate) SetID(i int) *OrgUserCreate

SetID sets the "id" field.

func (*OrgUserCreate) SetJoinedAt

func (ouc *OrgUserCreate) SetJoinedAt(t time.Time) *OrgUserCreate

SetJoinedAt sets the "joined_at" field.

func (*OrgUserCreate) SetNillableJoinedAt

func (ouc *OrgUserCreate) SetNillableJoinedAt(t *time.Time) *OrgUserCreate

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*OrgUserCreate) SetOrgID

func (ouc *OrgUserCreate) SetOrgID(i int) *OrgUserCreate

SetOrgID sets the "org_id" field.

func (*OrgUserCreate) SetUserID

func (ouc *OrgUserCreate) SetUserID(i int) *OrgUserCreate

SetUserID sets the "user_id" field.

type OrgUserCreateBulk

type OrgUserCreateBulk struct {
	// contains filtered or unexported fields
}

OrgUserCreateBulk is the builder for creating many OrgUser entities in bulk.

func (*OrgUserCreateBulk) Exec

func (oucb *OrgUserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserCreateBulk) ExecX

func (oucb *OrgUserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserCreateBulk) OnConflict

func (oucb *OrgUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgUserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgUser.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUserUpsert) {
		SetOrgID(v+v).
	}).
	Exec(ctx)

func (*OrgUserCreateBulk) OnConflictColumns

func (oucb *OrgUserCreateBulk) OnConflictColumns(columns ...string) *OrgUserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgUserCreateBulk) Save

func (oucb *OrgUserCreateBulk) Save(ctx context.Context) ([]*OrgUser, error)

Save creates the OrgUser entities in the database.

func (*OrgUserCreateBulk) SaveX

func (oucb *OrgUserCreateBulk) SaveX(ctx context.Context) []*OrgUser

SaveX is like Save, but panics if an error occurs.

type OrgUserDelete

type OrgUserDelete struct {
	// contains filtered or unexported fields
}

OrgUserDelete is the builder for deleting a OrgUser entity.

func (*OrgUserDelete) Exec

func (oud *OrgUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgUserDelete) ExecX

func (oud *OrgUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserDelete) Where

func (oud *OrgUserDelete) Where(ps ...predicate.OrgUser) *OrgUserDelete

Where appends a list predicates to the OrgUserDelete builder.

type OrgUserDeleteOne

type OrgUserDeleteOne struct {
	// contains filtered or unexported fields
}

OrgUserDeleteOne is the builder for deleting a single OrgUser entity.

func (*OrgUserDeleteOne) Exec

func (oudo *OrgUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgUserDeleteOne) ExecX

func (oudo *OrgUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserDeleteOne) Where

func (oudo *OrgUserDeleteOne) Where(ps ...predicate.OrgUser) *OrgUserDeleteOne

Where appends a list predicates to the OrgUserDelete builder.

type OrgUserEdge

type OrgUserEdge struct {
	Node   *OrgUser `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

OrgUserEdge is the edge representation of OrgUser.

type OrgUserEdges

type OrgUserEdges struct {
	// OrgRoles holds the value of the org_roles edge.
	OrgRoles []*OrgRole `json:"org_roles,omitempty"`
	// OrgRoleUser holds the value of the org_role_user edge.
	OrgRoleUser []*OrgRoleUser `json:"org_role_user,omitempty"`
	// contains filtered or unexported fields
}

OrgUserEdges holds the relations/edges for other nodes in the graph.

func (OrgUserEdges) OrgRoleUserOrErr

func (e OrgUserEdges) OrgRoleUserOrErr() ([]*OrgRoleUser, error)

OrgRoleUserOrErr returns the OrgRoleUser value or an error if the edge was not loaded in eager-loading.

func (OrgUserEdges) OrgRolesOrErr

func (e OrgUserEdges) OrgRolesOrErr() ([]*OrgRole, error)

OrgRolesOrErr returns the OrgRoles value or an error if the edge was not loaded in eager-loading.

type OrgUserGroupBy

type OrgUserGroupBy struct {
	// contains filtered or unexported fields
}

OrgUserGroupBy is the group-by builder for OrgUser entities.

func (*OrgUserGroupBy) Aggregate

func (ougb *OrgUserGroupBy) Aggregate(fns ...AggregateFunc) *OrgUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgUserGroupBy) Bool

func (s *OrgUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) BoolX

func (s *OrgUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgUserGroupBy) Bools

func (s *OrgUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) BoolsX

func (s *OrgUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgUserGroupBy) Float64

func (s *OrgUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) Float64X

func (s *OrgUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgUserGroupBy) Float64s

func (s *OrgUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) Float64sX

func (s *OrgUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgUserGroupBy) Int

func (s *OrgUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) IntX

func (s *OrgUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgUserGroupBy) Ints

func (s *OrgUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) IntsX

func (s *OrgUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgUserGroupBy) Scan

func (ougb *OrgUserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgUserGroupBy) ScanX

func (s *OrgUserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgUserGroupBy) String

func (s *OrgUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) StringX

func (s *OrgUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgUserGroupBy) Strings

func (s *OrgUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) StringsX

func (s *OrgUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgUserMutation

type OrgUserMutation struct {
	// contains filtered or unexported fields
}

OrgUserMutation represents an operation that mutates the OrgUser nodes in the graph.

func (*OrgUserMutation) AddField

func (m *OrgUserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgUserMutation) AddOrgID

func (m *OrgUserMutation) AddOrgID(i int)

AddOrgID adds i to the "org_id" field.

func (*OrgUserMutation) AddOrgRoleIDs

func (m *OrgUserMutation) AddOrgRoleIDs(ids ...int)

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by ids.

func (*OrgUserMutation) AddOrgRoleUserIDs

func (m *OrgUserMutation) AddOrgRoleUserIDs(ids ...int)

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by ids.

func (*OrgUserMutation) AddUserID

func (m *OrgUserMutation) AddUserID(i int)

AddUserID adds i to the "user_id" field.

func (*OrgUserMutation) AddedEdges

func (m *OrgUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgUserMutation) AddedField

func (m *OrgUserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgUserMutation) AddedFields

func (m *OrgUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgUserMutation) AddedIDs

func (m *OrgUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgUserMutation) AddedOrgID

func (m *OrgUserMutation) AddedOrgID() (r int, exists bool)

AddedOrgID returns the value that was added to the "org_id" field in this mutation.

func (*OrgUserMutation) AddedUserID

func (m *OrgUserMutation) AddedUserID() (r int, exists bool)

AddedUserID returns the value that was added to the "user_id" field in this mutation.

func (*OrgUserMutation) ClearEdge

func (m *OrgUserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgUserMutation) ClearField

func (m *OrgUserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgUserMutation) ClearOrgRoleUser

func (m *OrgUserMutation) ClearOrgRoleUser()

ClearOrgRoleUser clears the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgUserMutation) ClearOrgRoles

func (m *OrgUserMutation) ClearOrgRoles()

ClearOrgRoles clears the "org_roles" edge to the OrgRole entity.

func (*OrgUserMutation) ClearedEdges

func (m *OrgUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgUserMutation) ClearedFields

func (m *OrgUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgUserMutation) Client

func (m OrgUserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgUserMutation) DisplayName

func (m *OrgUserMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*OrgUserMutation) EdgeCleared

func (m *OrgUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgUserMutation) Field

func (m *OrgUserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgUserMutation) FieldCleared

func (m *OrgUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgUserMutation) Fields

func (m *OrgUserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgUserMutation) ID

func (m *OrgUserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgUserMutation) IDs

func (m *OrgUserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgUserMutation) JoinedAt

func (m *OrgUserMutation) JoinedAt() (r time.Time, exists bool)

JoinedAt returns the value of the "joined_at" field in the mutation.

func (*OrgUserMutation) OldDisplayName

func (m *OrgUserMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldField

func (m *OrgUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgUserMutation) OldJoinedAt

func (m *OrgUserMutation) OldJoinedAt(ctx context.Context) (v time.Time, err error)

OldJoinedAt returns the old "joined_at" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldOrgID

func (m *OrgUserMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldUserID

func (m *OrgUserMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) Op

func (m *OrgUserMutation) Op() Op

Op returns the operation name.

func (*OrgUserMutation) OrgID

func (m *OrgUserMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgUserMutation) OrgRoleUserCleared

func (m *OrgUserMutation) OrgRoleUserCleared() bool

OrgRoleUserCleared reports if the "org_role_user" edge to the OrgRoleUser entity was cleared.

func (*OrgUserMutation) OrgRoleUserIDs

func (m *OrgUserMutation) OrgRoleUserIDs() (ids []int)

OrgRoleUserIDs returns the "org_role_user" edge IDs in the mutation.

func (*OrgUserMutation) OrgRolesCleared

func (m *OrgUserMutation) OrgRolesCleared() bool

OrgRolesCleared reports if the "org_roles" edge to the OrgRole entity was cleared.

func (*OrgUserMutation) OrgRolesIDs

func (m *OrgUserMutation) OrgRolesIDs() (ids []int)

OrgRolesIDs returns the "org_roles" edge IDs in the mutation.

func (*OrgUserMutation) RemoveOrgRoleIDs

func (m *OrgUserMutation) RemoveOrgRoleIDs(ids ...int)

RemoveOrgRoleIDs removes the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserMutation) RemoveOrgRoleUserIDs

func (m *OrgUserMutation) RemoveOrgRoleUserIDs(ids ...int)

RemoveOrgRoleUserIDs removes the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserMutation) RemovedEdges

func (m *OrgUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgUserMutation) RemovedIDs

func (m *OrgUserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgUserMutation) RemovedOrgRoleUserIDs

func (m *OrgUserMutation) RemovedOrgRoleUserIDs() (ids []int)

RemovedOrgRoleUser returns the removed IDs of the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgUserMutation) RemovedOrgRolesIDs

func (m *OrgUserMutation) RemovedOrgRolesIDs() (ids []int)

RemovedOrgRoles returns the removed IDs of the "org_roles" edge to the OrgRole entity.

func (*OrgUserMutation) ResetDisplayName

func (m *OrgUserMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*OrgUserMutation) ResetEdge

func (m *OrgUserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgUserMutation) ResetField

func (m *OrgUserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgUserMutation) ResetJoinedAt

func (m *OrgUserMutation) ResetJoinedAt()

ResetJoinedAt resets all changes to the "joined_at" field.

func (*OrgUserMutation) ResetOrgID

func (m *OrgUserMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgUserMutation) ResetOrgRoleUser

func (m *OrgUserMutation) ResetOrgRoleUser()

ResetOrgRoleUser resets all changes to the "org_role_user" edge.

func (*OrgUserMutation) ResetOrgRoles

func (m *OrgUserMutation) ResetOrgRoles()

ResetOrgRoles resets all changes to the "org_roles" edge.

func (*OrgUserMutation) ResetUserID

func (m *OrgUserMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OrgUserMutation) SetDisplayName

func (m *OrgUserMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*OrgUserMutation) SetField

func (m *OrgUserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgUserMutation) SetID

func (m *OrgUserMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgUser entities.

func (*OrgUserMutation) SetJoinedAt

func (m *OrgUserMutation) SetJoinedAt(t time.Time)

SetJoinedAt sets the "joined_at" field.

func (*OrgUserMutation) SetOp

func (m *OrgUserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgUserMutation) SetOrgID

func (m *OrgUserMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgUserMutation) SetUserID

func (m *OrgUserMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (OrgUserMutation) Tx

func (m OrgUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgUserMutation) Type

func (m *OrgUserMutation) Type() string

Type returns the node type of this mutation (OrgUser).

func (*OrgUserMutation) UserID

func (m *OrgUserMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OrgUserMutation) Where

func (m *OrgUserMutation) Where(ps ...predicate.OrgUser)

Where appends a list predicates to the OrgUserMutation builder.

func (*OrgUserMutation) WhereP

func (m *OrgUserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgUserOrder

type OrgUserOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *OrgUserOrderField `json:"field"`
}

OrgUserOrder defines the ordering of OrgUser.

type OrgUserOrderField

type OrgUserOrderField struct {
	// Value extracts the ordering value from the given OrgUser.
	Value func(*OrgUser) (ent.Value, error)
	// contains filtered or unexported fields
}

OrgUserOrderField defines the ordering field of OrgUser.

type OrgUserPaginateOption

type OrgUserPaginateOption func(*orguserPager) error

OrgUserPaginateOption enables pagination customization.

func WithOrgUserFilter

func WithOrgUserFilter(filter func(*OrgUserQuery) (*OrgUserQuery, error)) OrgUserPaginateOption

WithOrgUserFilter configures pagination filter.

func WithOrgUserOrder

func WithOrgUserOrder(order *OrgUserOrder) OrgUserPaginateOption

WithOrgUserOrder configures pagination ordering.

type OrgUserQuery

type OrgUserQuery struct {
	// contains filtered or unexported fields
}

OrgUserQuery is the builder for querying OrgUser entities.

func (*OrgUserQuery) Aggregate

func (ouq *OrgUserQuery) Aggregate(fns ...AggregateFunc) *OrgUserSelect

Aggregate returns a OrgUserSelect configured with the given aggregations.

func (*OrgUserQuery) All

func (ouq *OrgUserQuery) All(ctx context.Context) ([]*OrgUser, error)

All executes the query and returns a list of OrgUsers.

func (*OrgUserQuery) AllX

func (ouq *OrgUserQuery) AllX(ctx context.Context) []*OrgUser

AllX is like All, but panics if an error occurs.

func (*OrgUserQuery) Clone

func (ouq *OrgUserQuery) Clone() *OrgUserQuery

Clone returns a duplicate of the OrgUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgUserQuery) CollectFields

func (ou *OrgUserQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrgUserQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OrgUserQuery) Count

func (ouq *OrgUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgUserQuery) CountX

func (ouq *OrgUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgUserQuery) Exist

func (ouq *OrgUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgUserQuery) ExistX

func (ouq *OrgUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgUserQuery) First

func (ouq *OrgUserQuery) First(ctx context.Context) (*OrgUser, error)

First returns the first OrgUser entity from the query. Returns a *NotFoundError when no OrgUser was found.

func (*OrgUserQuery) FirstID

func (ouq *OrgUserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgUser ID from the query. Returns a *NotFoundError when no OrgUser ID was found.

func (*OrgUserQuery) FirstIDX

func (ouq *OrgUserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgUserQuery) FirstX

func (ouq *OrgUserQuery) FirstX(ctx context.Context) *OrgUser

FirstX is like First, but panics if an error occurs.

func (*OrgUserQuery) GroupBy

func (ouq *OrgUserQuery) GroupBy(field string, fields ...string) *OrgUserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	OrgID int `json:"org_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgUser.Query().
	GroupBy(orguser.FieldOrgID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgUserQuery) IDs

func (ouq *OrgUserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgUser IDs.

func (*OrgUserQuery) IDsX

func (ouq *OrgUserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgUserQuery) Limit

func (ouq *OrgUserQuery) Limit(limit int) *OrgUserQuery

Limit the number of records to be returned by this query.

func (*OrgUserQuery) Offset

func (ouq *OrgUserQuery) Offset(offset int) *OrgUserQuery

Offset to start from.

func (*OrgUserQuery) Only

func (ouq *OrgUserQuery) Only(ctx context.Context) (*OrgUser, error)

Only returns a single OrgUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgUser entity is found. Returns a *NotFoundError when no OrgUser entities are found.

func (*OrgUserQuery) OnlyID

func (ouq *OrgUserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgUser ID in the query. Returns a *NotSingularError when more than one OrgUser ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgUserQuery) OnlyIDX

func (ouq *OrgUserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgUserQuery) OnlyX

func (ouq *OrgUserQuery) OnlyX(ctx context.Context) *OrgUser

OnlyX is like Only, but panics if an error occurs.

func (*OrgUserQuery) Order

func (ouq *OrgUserQuery) Order(o ...orguser.OrderOption) *OrgUserQuery

Order specifies how the records should be ordered.

func (*OrgUserQuery) Paginate

func (ou *OrgUserQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OrgUserPaginateOption,
) (*OrgUserConnection, error)

Paginate executes the query and returns a relay based cursor connection to OrgUser.

func (*OrgUserQuery) QueryOrgRoleUser

func (ouq *OrgUserQuery) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser chains the current query on the "org_role_user" edge.

func (*OrgUserQuery) QueryOrgRoles

func (ouq *OrgUserQuery) QueryOrgRoles() *OrgRoleQuery

QueryOrgRoles chains the current query on the "org_roles" edge.

func (*OrgUserQuery) Select

func (ouq *OrgUserQuery) Select(fields ...string) *OrgUserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	OrgID int `json:"org_id,omitempty"`
}

client.OrgUser.Query().
	Select(orguser.FieldOrgID).
	Scan(ctx, &v)

func (*OrgUserQuery) Unique

func (ouq *OrgUserQuery) Unique(unique bool) *OrgUserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgUserQuery) Where

func (ouq *OrgUserQuery) Where(ps ...predicate.OrgUser) *OrgUserQuery

Where adds a new predicate for the OrgUserQuery builder.

func (*OrgUserQuery) WithNamedOrgRoleUser

func (ouq *OrgUserQuery) WithNamedOrgRoleUser(name string, opts ...func(*OrgRoleUserQuery)) *OrgUserQuery

WithNamedOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithNamedOrgRoles

func (ouq *OrgUserQuery) WithNamedOrgRoles(name string, opts ...func(*OrgRoleQuery)) *OrgUserQuery

WithNamedOrgRoles tells the query-builder to eager-load the nodes that are connected to the "org_roles" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithOrgRoleUser

func (ouq *OrgUserQuery) WithOrgRoleUser(opts ...func(*OrgRoleUserQuery)) *OrgUserQuery

WithOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithOrgRoles

func (ouq *OrgUserQuery) WithOrgRoles(opts ...func(*OrgRoleQuery)) *OrgUserQuery

WithOrgRoles tells the query-builder to eager-load the nodes that are connected to the "org_roles" edge. The optional arguments are used to configure the query builder of the edge.

type OrgUserSelect

type OrgUserSelect struct {
	*OrgUserQuery
	// contains filtered or unexported fields
}

OrgUserSelect is the builder for selecting fields of OrgUser entities.

func (*OrgUserSelect) Aggregate

func (ous *OrgUserSelect) Aggregate(fns ...AggregateFunc) *OrgUserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgUserSelect) Bool

func (s *OrgUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) BoolX

func (s *OrgUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgUserSelect) Bools

func (s *OrgUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) BoolsX

func (s *OrgUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgUserSelect) Float64

func (s *OrgUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) Float64X

func (s *OrgUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgUserSelect) Float64s

func (s *OrgUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) Float64sX

func (s *OrgUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgUserSelect) Int

func (s *OrgUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) IntX

func (s *OrgUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgUserSelect) Ints

func (s *OrgUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) IntsX

func (s *OrgUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgUserSelect) Scan

func (ous *OrgUserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgUserSelect) ScanX

func (s *OrgUserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgUserSelect) String

func (s *OrgUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) StringX

func (s *OrgUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgUserSelect) Strings

func (s *OrgUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) StringsX

func (s *OrgUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgUserUpdate

type OrgUserUpdate struct {
	// contains filtered or unexported fields
}

OrgUserUpdate is the builder for updating OrgUser entities.

func (*OrgUserUpdate) AddOrgID

func (ouu *OrgUserUpdate) AddOrgID(i int) *OrgUserUpdate

AddOrgID adds i to the "org_id" field.

func (*OrgUserUpdate) AddOrgRoleIDs

func (ouu *OrgUserUpdate) AddOrgRoleIDs(ids ...int) *OrgUserUpdate

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserUpdate) AddOrgRoleUser

func (ouu *OrgUserUpdate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdate) AddOrgRoleUserIDs

func (ouu *OrgUserUpdate) AddOrgRoleUserIDs(ids ...int) *OrgUserUpdate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserUpdate) AddOrgRoles

func (ouu *OrgUserUpdate) AddOrgRoles(o ...*OrgRole) *OrgUserUpdate

AddOrgRoles adds the "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdate) AddUserID

func (ouu *OrgUserUpdate) AddUserID(i int) *OrgUserUpdate

AddUserID adds i to the "user_id" field.

func (*OrgUserUpdate) ClearOrgRoleUser

func (ouu *OrgUserUpdate) ClearOrgRoleUser() *OrgUserUpdate

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdate) ClearOrgRoles

func (ouu *OrgUserUpdate) ClearOrgRoles() *OrgUserUpdate

ClearOrgRoles clears all "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdate) Exec

func (ouu *OrgUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserUpdate) ExecX

func (ouu *OrgUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpdate) Mutation

func (ouu *OrgUserUpdate) Mutation() *OrgUserMutation

Mutation returns the OrgUserMutation object of the builder.

func (*OrgUserUpdate) RemoveOrgRoleIDs

func (ouu *OrgUserUpdate) RemoveOrgRoleIDs(ids ...int) *OrgUserUpdate

RemoveOrgRoleIDs removes the "org_roles" edge to OrgRole entities by IDs.

func (*OrgUserUpdate) RemoveOrgRoleUser

func (ouu *OrgUserUpdate) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdate

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgUserUpdate) RemoveOrgRoleUserIDs

func (ouu *OrgUserUpdate) RemoveOrgRoleUserIDs(ids ...int) *OrgUserUpdate

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgUserUpdate) RemoveOrgRoles

func (ouu *OrgUserUpdate) RemoveOrgRoles(o ...*OrgRole) *OrgUserUpdate

RemoveOrgRoles removes "org_roles" edges to OrgRole entities.

func (*OrgUserUpdate) Save

func (ouu *OrgUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgUserUpdate) SaveX

func (ouu *OrgUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgUserUpdate) SetDisplayName

func (ouu *OrgUserUpdate) SetDisplayName(s string) *OrgUserUpdate

SetDisplayName sets the "display_name" field.

func (*OrgUserUpdate) SetJoinedAt

func (ouu *OrgUserUpdate) SetJoinedAt(t time.Time) *OrgUserUpdate

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpdate) SetNillableJoinedAt

func (ouu *OrgUserUpdate) SetNillableJoinedAt(t *time.Time) *OrgUserUpdate

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*OrgUserUpdate) SetOrgID

func (ouu *OrgUserUpdate) SetOrgID(i int) *OrgUserUpdate

SetOrgID sets the "org_id" field.

func (*OrgUserUpdate) SetUserID

func (ouu *OrgUserUpdate) SetUserID(i int) *OrgUserUpdate

SetUserID sets the "user_id" field.

func (*OrgUserUpdate) Where

func (ouu *OrgUserUpdate) Where(ps ...predicate.OrgUser) *OrgUserUpdate

Where appends a list predicates to the OrgUserUpdate builder.

type OrgUserUpdateOne

type OrgUserUpdateOne struct {
	// contains filtered or unexported fields
}

OrgUserUpdateOne is the builder for updating a single OrgUser entity.

func (*OrgUserUpdateOne) AddOrgID

func (ouuo *OrgUserUpdateOne) AddOrgID(i int) *OrgUserUpdateOne

AddOrgID adds i to the "org_id" field.

func (*OrgUserUpdateOne) AddOrgRoleIDs

func (ouuo *OrgUserUpdateOne) AddOrgRoleIDs(ids ...int) *OrgUserUpdateOne

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserUpdateOne) AddOrgRoleUser

func (ouuo *OrgUserUpdateOne) AddOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdateOne

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdateOne) AddOrgRoleUserIDs

func (ouuo *OrgUserUpdateOne) AddOrgRoleUserIDs(ids ...int) *OrgUserUpdateOne

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserUpdateOne) AddOrgRoles

func (ouuo *OrgUserUpdateOne) AddOrgRoles(o ...*OrgRole) *OrgUserUpdateOne

AddOrgRoles adds the "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdateOne) AddUserID

func (ouuo *OrgUserUpdateOne) AddUserID(i int) *OrgUserUpdateOne

AddUserID adds i to the "user_id" field.

func (*OrgUserUpdateOne) ClearOrgRoleUser

func (ouuo *OrgUserUpdateOne) ClearOrgRoleUser() *OrgUserUpdateOne

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdateOne) ClearOrgRoles

func (ouuo *OrgUserUpdateOne) ClearOrgRoles() *OrgUserUpdateOne

ClearOrgRoles clears all "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdateOne) Exec

func (ouuo *OrgUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgUserUpdateOne) ExecX

func (ouuo *OrgUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpdateOne) Mutation

func (ouuo *OrgUserUpdateOne) Mutation() *OrgUserMutation

Mutation returns the OrgUserMutation object of the builder.

func (*OrgUserUpdateOne) RemoveOrgRoleIDs

func (ouuo *OrgUserUpdateOne) RemoveOrgRoleIDs(ids ...int) *OrgUserUpdateOne

RemoveOrgRoleIDs removes the "org_roles" edge to OrgRole entities by IDs.

func (*OrgUserUpdateOne) RemoveOrgRoleUser

func (ouuo *OrgUserUpdateOne) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdateOne

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgUserUpdateOne) RemoveOrgRoleUserIDs

func (ouuo *OrgUserUpdateOne) RemoveOrgRoleUserIDs(ids ...int) *OrgUserUpdateOne

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgUserUpdateOne) RemoveOrgRoles

func (ouuo *OrgUserUpdateOne) RemoveOrgRoles(o ...*OrgRole) *OrgUserUpdateOne

RemoveOrgRoles removes "org_roles" edges to OrgRole entities.

func (*OrgUserUpdateOne) Save

func (ouuo *OrgUserUpdateOne) Save(ctx context.Context) (*OrgUser, error)

Save executes the query and returns the updated OrgUser entity.

func (*OrgUserUpdateOne) SaveX

func (ouuo *OrgUserUpdateOne) SaveX(ctx context.Context) *OrgUser

SaveX is like Save, but panics if an error occurs.

func (*OrgUserUpdateOne) Select

func (ouuo *OrgUserUpdateOne) Select(field string, fields ...string) *OrgUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgUserUpdateOne) SetDisplayName

func (ouuo *OrgUserUpdateOne) SetDisplayName(s string) *OrgUserUpdateOne

SetDisplayName sets the "display_name" field.

func (*OrgUserUpdateOne) SetJoinedAt

func (ouuo *OrgUserUpdateOne) SetJoinedAt(t time.Time) *OrgUserUpdateOne

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpdateOne) SetNillableJoinedAt

func (ouuo *OrgUserUpdateOne) SetNillableJoinedAt(t *time.Time) *OrgUserUpdateOne

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*OrgUserUpdateOne) SetOrgID

func (ouuo *OrgUserUpdateOne) SetOrgID(i int) *OrgUserUpdateOne

SetOrgID sets the "org_id" field.

func (*OrgUserUpdateOne) SetUserID

func (ouuo *OrgUserUpdateOne) SetUserID(i int) *OrgUserUpdateOne

SetUserID sets the "user_id" field.

func (*OrgUserUpdateOne) Where

func (ouuo *OrgUserUpdateOne) Where(ps ...predicate.OrgUser) *OrgUserUpdateOne

Where appends a list predicates to the OrgUserUpdate builder.

type OrgUserUpsert

type OrgUserUpsert struct {
	*sql.UpdateSet
}

OrgUserUpsert is the "OnConflict" setter.

func (*OrgUserUpsert) AddOrgID

func (u *OrgUserUpsert) AddOrgID(v int) *OrgUserUpsert

AddOrgID adds v to the "org_id" field.

func (*OrgUserUpsert) AddUserID

func (u *OrgUserUpsert) AddUserID(v int) *OrgUserUpsert

AddUserID adds v to the "user_id" field.

func (*OrgUserUpsert) SetDisplayName

func (u *OrgUserUpsert) SetDisplayName(v string) *OrgUserUpsert

SetDisplayName sets the "display_name" field.

func (*OrgUserUpsert) SetJoinedAt

func (u *OrgUserUpsert) SetJoinedAt(v time.Time) *OrgUserUpsert

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpsert) SetOrgID

func (u *OrgUserUpsert) SetOrgID(v int) *OrgUserUpsert

SetOrgID sets the "org_id" field.

func (*OrgUserUpsert) SetUserID

func (u *OrgUserUpsert) SetUserID(v int) *OrgUserUpsert

SetUserID sets the "user_id" field.

func (*OrgUserUpsert) UpdateDisplayName

func (u *OrgUserUpsert) UpdateDisplayName() *OrgUserUpsert

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateJoinedAt

func (u *OrgUserUpsert) UpdateJoinedAt() *OrgUserUpsert

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateOrgID

func (u *OrgUserUpsert) UpdateOrgID() *OrgUserUpsert

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateUserID

func (u *OrgUserUpsert) UpdateUserID() *OrgUserUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserUpsertBulk

type OrgUserUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgUserUpsertBulk is the builder for "upsert"-ing a bulk of OrgUser nodes.

func (*OrgUserUpsertBulk) AddOrgID

func (u *OrgUserUpsertBulk) AddOrgID(v int) *OrgUserUpsertBulk

AddOrgID adds v to the "org_id" field.

func (*OrgUserUpsertBulk) AddUserID

func (u *OrgUserUpsertBulk) AddUserID(v int) *OrgUserUpsertBulk

AddUserID adds v to the "user_id" field.

func (*OrgUserUpsertBulk) DoNothing

func (u *OrgUserUpsertBulk) DoNothing() *OrgUserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUserUpsertBulk) Exec

func (u *OrgUserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserUpsertBulk) ExecX

func (u *OrgUserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpsertBulk) Ignore

func (u *OrgUserUpsertBulk) Ignore() *OrgUserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgUserUpsertBulk) SetDisplayName

func (u *OrgUserUpsertBulk) SetDisplayName(v string) *OrgUserUpsertBulk

SetDisplayName sets the "display_name" field.

func (*OrgUserUpsertBulk) SetJoinedAt

func (u *OrgUserUpsertBulk) SetJoinedAt(v time.Time) *OrgUserUpsertBulk

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpsertBulk) SetOrgID

func (u *OrgUserUpsertBulk) SetOrgID(v int) *OrgUserUpsertBulk

SetOrgID sets the "org_id" field.

func (*OrgUserUpsertBulk) SetUserID

func (u *OrgUserUpsertBulk) SetUserID(v int) *OrgUserUpsertBulk

SetUserID sets the "user_id" field.

func (*OrgUserUpsertBulk) Update

func (u *OrgUserUpsertBulk) Update(set func(*OrgUserUpsert)) *OrgUserUpsertBulk

Update allows overriding fields `UPDATE` values. See the OrgUserCreateBulk.OnConflict documentation for more info.

func (*OrgUserUpsertBulk) UpdateDisplayName

func (u *OrgUserUpsertBulk) UpdateDisplayName() *OrgUserUpsertBulk

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateJoinedAt

func (u *OrgUserUpsertBulk) UpdateJoinedAt() *OrgUserUpsertBulk

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateNewValues

func (u *OrgUserUpsertBulk) UpdateNewValues() *OrgUserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orguser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUserUpsertBulk) UpdateOrgID

func (u *OrgUserUpsertBulk) UpdateOrgID() *OrgUserUpsertBulk

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateUserID

func (u *OrgUserUpsertBulk) UpdateUserID() *OrgUserUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserUpsertOne

type OrgUserUpsertOne struct {
	// contains filtered or unexported fields
}

OrgUserUpsertOne is the builder for "upsert"-ing

one OrgUser node.

func (*OrgUserUpsertOne) AddOrgID

func (u *OrgUserUpsertOne) AddOrgID(v int) *OrgUserUpsertOne

AddOrgID adds v to the "org_id" field.

func (*OrgUserUpsertOne) AddUserID

func (u *OrgUserUpsertOne) AddUserID(v int) *OrgUserUpsertOne

AddUserID adds v to the "user_id" field.

func (*OrgUserUpsertOne) DoNothing

func (u *OrgUserUpsertOne) DoNothing() *OrgUserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUserUpsertOne) Exec

func (u *OrgUserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserUpsertOne) ExecX

func (u *OrgUserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpsertOne) ID

func (u *OrgUserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgUserUpsertOne) IDX

func (u *OrgUserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgUserUpsertOne) Ignore

func (u *OrgUserUpsertOne) Ignore() *OrgUserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgUser.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgUserUpsertOne) SetDisplayName

func (u *OrgUserUpsertOne) SetDisplayName(v string) *OrgUserUpsertOne

SetDisplayName sets the "display_name" field.

func (*OrgUserUpsertOne) SetJoinedAt

func (u *OrgUserUpsertOne) SetJoinedAt(v time.Time) *OrgUserUpsertOne

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpsertOne) SetOrgID

func (u *OrgUserUpsertOne) SetOrgID(v int) *OrgUserUpsertOne

SetOrgID sets the "org_id" field.

func (*OrgUserUpsertOne) SetUserID

func (u *OrgUserUpsertOne) SetUserID(v int) *OrgUserUpsertOne

SetUserID sets the "user_id" field.

func (*OrgUserUpsertOne) Update

func (u *OrgUserUpsertOne) Update(set func(*OrgUserUpsert)) *OrgUserUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgUserCreate.OnConflict documentation for more info.

func (*OrgUserUpsertOne) UpdateDisplayName

func (u *OrgUserUpsertOne) UpdateDisplayName() *OrgUserUpsertOne

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateJoinedAt

func (u *OrgUserUpsertOne) UpdateJoinedAt() *OrgUserUpsertOne

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateNewValues

func (u *OrgUserUpsertOne) UpdateNewValues() *OrgUserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orguser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUserUpsertOne) UpdateOrgID

func (u *OrgUserUpsertOne) UpdateOrgID() *OrgUserUpsertOne

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateUserID

func (u *OrgUserUpsertOne) UpdateUserID() *OrgUserUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserWhereInput

type OrgUserWhereInput struct {
	Predicates []predicate.OrgUser  `json:"-"`
	Not        *OrgUserWhereInput   `json:"not,omitempty"`
	Or         []*OrgUserWhereInput `json:"or,omitempty"`
	And        []*OrgUserWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "org_id" field predicates.
	OrgID      *int  `json:"orgID,omitempty"`
	OrgIDNEQ   *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn    []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn []int `json:"orgIDNotIn,omitempty"`
	OrgIDGT    *int  `json:"orgIDGT,omitempty"`
	OrgIDGTE   *int  `json:"orgIDGTE,omitempty"`
	OrgIDLT    *int  `json:"orgIDLT,omitempty"`
	OrgIDLTE   *int  `json:"orgIDLTE,omitempty"`

	// "user_id" field predicates.
	UserID      *int  `json:"userID,omitempty"`
	UserIDNEQ   *int  `json:"userIDNEQ,omitempty"`
	UserIDIn    []int `json:"userIDIn,omitempty"`
	UserIDNotIn []int `json:"userIDNotIn,omitempty"`
	UserIDGT    *int  `json:"userIDGT,omitempty"`
	UserIDGTE   *int  `json:"userIDGTE,omitempty"`
	UserIDLT    *int  `json:"userIDLT,omitempty"`
	UserIDLTE   *int  `json:"userIDLTE,omitempty"`

	// "joined_at" field predicates.
	JoinedAt      *time.Time  `json:"joinedAt,omitempty"`
	JoinedAtNEQ   *time.Time  `json:"joinedAtNEQ,omitempty"`
	JoinedAtIn    []time.Time `json:"joinedAtIn,omitempty"`
	JoinedAtNotIn []time.Time `json:"joinedAtNotIn,omitempty"`
	JoinedAtGT    *time.Time  `json:"joinedAtGT,omitempty"`
	JoinedAtGTE   *time.Time  `json:"joinedAtGTE,omitempty"`
	JoinedAtLT    *time.Time  `json:"joinedAtLT,omitempty"`
	JoinedAtLTE   *time.Time  `json:"joinedAtLTE,omitempty"`

	// "display_name" field predicates.
	DisplayName             *string  `json:"displayName,omitempty"`
	DisplayNameNEQ          *string  `json:"displayNameNEQ,omitempty"`
	DisplayNameIn           []string `json:"displayNameIn,omitempty"`
	DisplayNameNotIn        []string `json:"displayNameNotIn,omitempty"`
	DisplayNameGT           *string  `json:"displayNameGT,omitempty"`
	DisplayNameGTE          *string  `json:"displayNameGTE,omitempty"`
	DisplayNameLT           *string  `json:"displayNameLT,omitempty"`
	DisplayNameLTE          *string  `json:"displayNameLTE,omitempty"`
	DisplayNameContains     *string  `json:"displayNameContains,omitempty"`
	DisplayNameHasPrefix    *string  `json:"displayNameHasPrefix,omitempty"`
	DisplayNameHasSuffix    *string  `json:"displayNameHasSuffix,omitempty"`
	DisplayNameEqualFold    *string  `json:"displayNameEqualFold,omitempty"`
	DisplayNameContainsFold *string  `json:"displayNameContainsFold,omitempty"`
}

OrgUserWhereInput represents a where input for filtering OrgUser queries.

func (*OrgUserWhereInput) AddPredicates

func (i *OrgUserWhereInput) AddPredicates(predicates ...predicate.OrgUser)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgUserWhereInput) Filter

Filter applies the OrgUserWhereInput filter on the OrgUserQuery builder.

func (*OrgUserWhereInput) P

P returns a predicate for filtering orgusers. An error is returned if the input is empty or invalid.

type OrgUsers

type OrgUsers []*OrgUser

OrgUsers is a parsable slice of OrgUser.

type PageInfo

type PageInfo = entgql.PageInfo[int]

Common entgql types.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type ProcDef

type ProcDef struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 部署ID
	DeploymentID int `json:"deployment_id,omitempty"`
	// 所属应用ID
	AppID int `json:"app_id,omitempty"`
	// 分类
	Category string `json:"category,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// process id
	Key string `json:"key,omitempty"`
	// 版本
	Version int32 `json:"version,omitempty"`
	// 小版本
	Revision int32 `json:"revision,omitempty"`
	// 版本标签
	VersionTag string `json:"version_tag,omitempty"`
	// 流程文件key
	ResourceKey string `json:"resource_key,omitempty"`
	// 流程文件id
	ResourceID int `json:"resource_id,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProcDefQuery when eager-loading is set.
	Edges ProcDefEdges `json:"edges"`
	// contains filtered or unexported fields
}

ProcDef is the model entity for the ProcDef schema.

func (*ProcDef) Deployment

func (pd *ProcDef) Deployment(ctx context.Context) (*Deployment, error)

func (*ProcDef) GlobalID

func (pd *ProcDef) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given ProcDef node.

func (*ProcDef) IsNode

func (*ProcDef) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*ProcDef) NamedProcInstances

func (pd *ProcDef) NamedProcInstances(name string) ([]*ProcInst, error)

NamedProcInstances returns the ProcInstances named value or an error if the edge was not loaded in eager-loading with this name.

func (*ProcDef) ProcInstances

func (pd *ProcDef) ProcInstances(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *ProcInstOrder, where *ProcInstWhereInput,
) (*ProcInstConnection, error)

func (*ProcDef) QueryDeployment

func (pd *ProcDef) QueryDeployment() *DeploymentQuery

QueryDeployment queries the "deployment" edge of the ProcDef entity.

func (*ProcDef) QueryProcInstances

func (pd *ProcDef) QueryProcInstances() *ProcInstQuery

QueryProcInstances queries the "proc_instances" edge of the ProcDef entity.

func (*ProcDef) String

func (pd *ProcDef) String() string

String implements the fmt.Stringer.

func (*ProcDef) ToEdge

func (pd *ProcDef) ToEdge(order *ProcDefOrder) *ProcDefEdge

ToEdge converts ProcDef into ProcDefEdge.

func (*ProcDef) Unwrap

func (pd *ProcDef) Unwrap() *ProcDef

Unwrap unwraps the ProcDef entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*ProcDef) Update

func (pd *ProcDef) Update() *ProcDefUpdateOne

Update returns a builder for updating this ProcDef. Note that you need to call ProcDef.Unwrap() before calling this method if this ProcDef was returned from a transaction, and the transaction was committed or rolled back.

func (*ProcDef) Value

func (pd *ProcDef) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ProcDef. This includes values selected through modifiers, order, etc.

type ProcDefClient

type ProcDefClient struct {
	// contains filtered or unexported fields
}

ProcDefClient is a client for the ProcDef schema.

func NewProcDefClient

func NewProcDefClient(c config) *ProcDefClient

NewProcDefClient returns a client for the ProcDef from the given config.

func (*ProcDefClient) Create

func (c *ProcDefClient) Create() *ProcDefCreate

Create returns a builder for creating a ProcDef entity.

func (*ProcDefClient) CreateBulk

func (c *ProcDefClient) CreateBulk(builders ...*ProcDefCreate) *ProcDefCreateBulk

CreateBulk returns a builder for creating a bulk of ProcDef entities.

func (*ProcDefClient) Delete

func (c *ProcDefClient) Delete() *ProcDefDelete

Delete returns a delete builder for ProcDef.

func (*ProcDefClient) DeleteOne

func (c *ProcDefClient) DeleteOne(pd *ProcDef) *ProcDefDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProcDefClient) DeleteOneID

func (c *ProcDefClient) DeleteOneID(id int) *ProcDefDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProcDefClient) Get

func (c *ProcDefClient) Get(ctx context.Context, id int) (*ProcDef, error)

Get returns a ProcDef entity by its id.

func (*ProcDefClient) GetX

func (c *ProcDefClient) GetX(ctx context.Context, id int) *ProcDef

GetX is like Get, but panics if an error occurs.

func (*ProcDefClient) Hooks

func (c *ProcDefClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProcDefClient) Intercept

func (c *ProcDefClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `procdef.Intercept(f(g(h())))`.

func (*ProcDefClient) Interceptors

func (c *ProcDefClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProcDefClient) Query

func (c *ProcDefClient) Query() *ProcDefQuery

Query returns a query builder for ProcDef.

func (*ProcDefClient) QueryDeployment

func (c *ProcDefClient) QueryDeployment(pd *ProcDef) *DeploymentQuery

QueryDeployment queries the deployment edge of a ProcDef.

func (*ProcDefClient) QueryProcInstances

func (c *ProcDefClient) QueryProcInstances(pd *ProcDef) *ProcInstQuery

QueryProcInstances queries the proc_instances edge of a ProcDef.

func (*ProcDefClient) Update

func (c *ProcDefClient) Update() *ProcDefUpdate

Update returns an update builder for ProcDef.

func (*ProcDefClient) UpdateOne

func (c *ProcDefClient) UpdateOne(pd *ProcDef) *ProcDefUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProcDefClient) UpdateOneID

func (c *ProcDefClient) UpdateOneID(id int) *ProcDefUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProcDefClient) Use

func (c *ProcDefClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `procdef.Hooks(f(g(h())))`.

type ProcDefConnection

type ProcDefConnection struct {
	Edges      []*ProcDefEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

ProcDefConnection is the connection containing edges to ProcDef.

type ProcDefCreate

type ProcDefCreate struct {
	// contains filtered or unexported fields
}

ProcDefCreate is the builder for creating a ProcDef entity.

func (*ProcDefCreate) AddProcInstanceIDs

func (pdc *ProcDefCreate) AddProcInstanceIDs(ids ...int) *ProcDefCreate

AddProcInstanceIDs adds the "proc_instances" edge to the ProcInst entity by IDs.

func (*ProcDefCreate) AddProcInstances

func (pdc *ProcDefCreate) AddProcInstances(p ...*ProcInst) *ProcDefCreate

AddProcInstances adds the "proc_instances" edges to the ProcInst entity.

func (*ProcDefCreate) Exec

func (pdc *ProcDefCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcDefCreate) ExecX

func (pdc *ProcDefCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefCreate) Mutation

func (pdc *ProcDefCreate) Mutation() *ProcDefMutation

Mutation returns the ProcDefMutation object of the builder.

func (*ProcDefCreate) OnConflict

func (pdc *ProcDefCreate) OnConflict(opts ...sql.ConflictOption) *ProcDefUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ProcDef.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProcDefUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*ProcDefCreate) OnConflictColumns

func (pdc *ProcDefCreate) OnConflictColumns(columns ...string) *ProcDefUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ProcDef.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProcDefCreate) Save

func (pdc *ProcDefCreate) Save(ctx context.Context) (*ProcDef, error)

Save creates the ProcDef in the database.

func (*ProcDefCreate) SaveX

func (pdc *ProcDefCreate) SaveX(ctx context.Context) *ProcDef

SaveX calls Save and panics if Save returns an error.

func (*ProcDefCreate) SetAppID

func (pdc *ProcDefCreate) SetAppID(i int) *ProcDefCreate

SetAppID sets the "app_id" field.

func (*ProcDefCreate) SetCategory

func (pdc *ProcDefCreate) SetCategory(s string) *ProcDefCreate

SetCategory sets the "category" field.

func (*ProcDefCreate) SetCreatedAt

func (pdc *ProcDefCreate) SetCreatedAt(t time.Time) *ProcDefCreate

SetCreatedAt sets the "created_at" field.

func (*ProcDefCreate) SetCreatedBy

func (pdc *ProcDefCreate) SetCreatedBy(i int) *ProcDefCreate

SetCreatedBy sets the "created_by" field.

func (*ProcDefCreate) SetDeployment

func (pdc *ProcDefCreate) SetDeployment(d *Deployment) *ProcDefCreate

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*ProcDefCreate) SetDeploymentID

func (pdc *ProcDefCreate) SetDeploymentID(i int) *ProcDefCreate

SetDeploymentID sets the "deployment_id" field.

func (*ProcDefCreate) SetID

func (pdc *ProcDefCreate) SetID(i int) *ProcDefCreate

SetID sets the "id" field.

func (*ProcDefCreate) SetKey

func (pdc *ProcDefCreate) SetKey(s string) *ProcDefCreate

SetKey sets the "key" field.

func (*ProcDefCreate) SetName

func (pdc *ProcDefCreate) SetName(s string) *ProcDefCreate

SetName sets the "name" field.

func (*ProcDefCreate) SetNillableCategory

func (pdc *ProcDefCreate) SetNillableCategory(s *string) *ProcDefCreate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*ProcDefCreate) SetNillableCreatedAt

func (pdc *ProcDefCreate) SetNillableCreatedAt(t *time.Time) *ProcDefCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProcDefCreate) SetNillableID

func (pdc *ProcDefCreate) SetNillableID(i *int) *ProcDefCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ProcDefCreate) SetNillableName

func (pdc *ProcDefCreate) SetNillableName(s *string) *ProcDefCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*ProcDefCreate) SetNillableResourceID

func (pdc *ProcDefCreate) SetNillableResourceID(i *int) *ProcDefCreate

SetNillableResourceID sets the "resource_id" field if the given value is not nil.

func (*ProcDefCreate) SetNillableResourceKey

func (pdc *ProcDefCreate) SetNillableResourceKey(s *string) *ProcDefCreate

SetNillableResourceKey sets the "resource_key" field if the given value is not nil.

func (*ProcDefCreate) SetNillableRevision

func (pdc *ProcDefCreate) SetNillableRevision(i *int32) *ProcDefCreate

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*ProcDefCreate) SetNillableStatus

func (pdc *ProcDefCreate) SetNillableStatus(ts *typex.SimpleStatus) *ProcDefCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ProcDefCreate) SetNillableUpdatedAt

func (pdc *ProcDefCreate) SetNillableUpdatedAt(t *time.Time) *ProcDefCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProcDefCreate) SetNillableUpdatedBy

func (pdc *ProcDefCreate) SetNillableUpdatedBy(i *int) *ProcDefCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*ProcDefCreate) SetNillableVersion

func (pdc *ProcDefCreate) SetNillableVersion(i *int32) *ProcDefCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*ProcDefCreate) SetNillableVersionTag

func (pdc *ProcDefCreate) SetNillableVersionTag(s *string) *ProcDefCreate

SetNillableVersionTag sets the "version_tag" field if the given value is not nil.

func (*ProcDefCreate) SetResourceID

func (pdc *ProcDefCreate) SetResourceID(i int) *ProcDefCreate

SetResourceID sets the "resource_id" field.

func (*ProcDefCreate) SetResourceKey

func (pdc *ProcDefCreate) SetResourceKey(s string) *ProcDefCreate

SetResourceKey sets the "resource_key" field.

func (*ProcDefCreate) SetRevision

func (pdc *ProcDefCreate) SetRevision(i int32) *ProcDefCreate

SetRevision sets the "revision" field.

func (*ProcDefCreate) SetStatus

func (pdc *ProcDefCreate) SetStatus(ts typex.SimpleStatus) *ProcDefCreate

SetStatus sets the "status" field.

func (*ProcDefCreate) SetTenantID

func (pdc *ProcDefCreate) SetTenantID(i int) *ProcDefCreate

SetTenantID sets the "tenant_id" field.

func (*ProcDefCreate) SetUpdatedAt

func (pdc *ProcDefCreate) SetUpdatedAt(t time.Time) *ProcDefCreate

SetUpdatedAt sets the "updated_at" field.

func (*ProcDefCreate) SetUpdatedBy

func (pdc *ProcDefCreate) SetUpdatedBy(i int) *ProcDefCreate

SetUpdatedBy sets the "updated_by" field.

func (*ProcDefCreate) SetVersion

func (pdc *ProcDefCreate) SetVersion(i int32) *ProcDefCreate

SetVersion sets the "version" field.

func (*ProcDefCreate) SetVersionTag

func (pdc *ProcDefCreate) SetVersionTag(s string) *ProcDefCreate

SetVersionTag sets the "version_tag" field.

type ProcDefCreateBulk

type ProcDefCreateBulk struct {
	// contains filtered or unexported fields
}

ProcDefCreateBulk is the builder for creating many ProcDef entities in bulk.

func (*ProcDefCreateBulk) Exec

func (pdcb *ProcDefCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcDefCreateBulk) ExecX

func (pdcb *ProcDefCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefCreateBulk) OnConflict

func (pdcb *ProcDefCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProcDefUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ProcDef.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProcDefUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*ProcDefCreateBulk) OnConflictColumns

func (pdcb *ProcDefCreateBulk) OnConflictColumns(columns ...string) *ProcDefUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ProcDef.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProcDefCreateBulk) Save

func (pdcb *ProcDefCreateBulk) Save(ctx context.Context) ([]*ProcDef, error)

Save creates the ProcDef entities in the database.

func (*ProcDefCreateBulk) SaveX

func (pdcb *ProcDefCreateBulk) SaveX(ctx context.Context) []*ProcDef

SaveX is like Save, but panics if an error occurs.

type ProcDefDelete

type ProcDefDelete struct {
	// contains filtered or unexported fields
}

ProcDefDelete is the builder for deleting a ProcDef entity.

func (*ProcDefDelete) Exec

func (pdd *ProcDefDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProcDefDelete) ExecX

func (pdd *ProcDefDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefDelete) Where

func (pdd *ProcDefDelete) Where(ps ...predicate.ProcDef) *ProcDefDelete

Where appends a list predicates to the ProcDefDelete builder.

type ProcDefDeleteOne

type ProcDefDeleteOne struct {
	// contains filtered or unexported fields
}

ProcDefDeleteOne is the builder for deleting a single ProcDef entity.

func (*ProcDefDeleteOne) Exec

func (pddo *ProcDefDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProcDefDeleteOne) ExecX

func (pddo *ProcDefDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefDeleteOne) Where

func (pddo *ProcDefDeleteOne) Where(ps ...predicate.ProcDef) *ProcDefDeleteOne

Where appends a list predicates to the ProcDefDelete builder.

type ProcDefEdge

type ProcDefEdge struct {
	Node   *ProcDef `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

ProcDefEdge is the edge representation of ProcDef.

type ProcDefEdges

type ProcDefEdges struct {
	// Deployment holds the value of the deployment edge.
	Deployment *Deployment `json:"deployment,omitempty"`
	// ProcInstances holds the value of the proc_instances edge.
	ProcInstances []*ProcInst `json:"proc_instances,omitempty"`
	// contains filtered or unexported fields
}

ProcDefEdges holds the relations/edges for other nodes in the graph.

func (ProcDefEdges) DeploymentOrErr

func (e ProcDefEdges) DeploymentOrErr() (*Deployment, error)

DeploymentOrErr returns the Deployment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ProcDefEdges) ProcInstancesOrErr

func (e ProcDefEdges) ProcInstancesOrErr() ([]*ProcInst, error)

ProcInstancesOrErr returns the ProcInstances value or an error if the edge was not loaded in eager-loading.

type ProcDefGroupBy

type ProcDefGroupBy struct {
	// contains filtered or unexported fields
}

ProcDefGroupBy is the group-by builder for ProcDef entities.

func (*ProcDefGroupBy) Aggregate

func (pdgb *ProcDefGroupBy) Aggregate(fns ...AggregateFunc) *ProcDefGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProcDefGroupBy) Bool

func (s *ProcDefGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) BoolX

func (s *ProcDefGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProcDefGroupBy) Bools

func (s *ProcDefGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) BoolsX

func (s *ProcDefGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProcDefGroupBy) Float64

func (s *ProcDefGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) Float64X

func (s *ProcDefGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProcDefGroupBy) Float64s

func (s *ProcDefGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) Float64sX

func (s *ProcDefGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProcDefGroupBy) Int

func (s *ProcDefGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) IntX

func (s *ProcDefGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProcDefGroupBy) Ints

func (s *ProcDefGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) IntsX

func (s *ProcDefGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProcDefGroupBy) Scan

func (pdgb *ProcDefGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProcDefGroupBy) ScanX

func (s *ProcDefGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProcDefGroupBy) String

func (s *ProcDefGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) StringX

func (s *ProcDefGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProcDefGroupBy) Strings

func (s *ProcDefGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProcDefGroupBy) StringsX

func (s *ProcDefGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProcDefMutation

type ProcDefMutation struct {
	// contains filtered or unexported fields
}

ProcDefMutation represents an operation that mutates the ProcDef nodes in the graph.

func (*ProcDefMutation) AddAppID

func (m *ProcDefMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*ProcDefMutation) AddCreatedBy

func (m *ProcDefMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*ProcDefMutation) AddField

func (m *ProcDefMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProcDefMutation) AddProcInstanceIDs

func (m *ProcDefMutation) AddProcInstanceIDs(ids ...int)

AddProcInstanceIDs adds the "proc_instances" edge to the ProcInst entity by ids.

func (*ProcDefMutation) AddResourceID

func (m *ProcDefMutation) AddResourceID(i int)

AddResourceID adds i to the "resource_id" field.

func (*ProcDefMutation) AddRevision

func (m *ProcDefMutation) AddRevision(i int32)

AddRevision adds i to the "revision" field.

func (*ProcDefMutation) AddTenantID

func (m *ProcDefMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*ProcDefMutation) AddUpdatedBy

func (m *ProcDefMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*ProcDefMutation) AddVersion

func (m *ProcDefMutation) AddVersion(i int32)

AddVersion adds i to the "version" field.

func (*ProcDefMutation) AddedAppID

func (m *ProcDefMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*ProcDefMutation) AddedCreatedBy

func (m *ProcDefMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*ProcDefMutation) AddedEdges

func (m *ProcDefMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProcDefMutation) AddedField

func (m *ProcDefMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProcDefMutation) AddedFields

func (m *ProcDefMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProcDefMutation) AddedIDs

func (m *ProcDefMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProcDefMutation) AddedResourceID

func (m *ProcDefMutation) AddedResourceID() (r int, exists bool)

AddedResourceID returns the value that was added to the "resource_id" field in this mutation.

func (*ProcDefMutation) AddedRevision

func (m *ProcDefMutation) AddedRevision() (r int32, exists bool)

AddedRevision returns the value that was added to the "revision" field in this mutation.

func (*ProcDefMutation) AddedTenantID

func (m *ProcDefMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*ProcDefMutation) AddedUpdatedBy

func (m *ProcDefMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*ProcDefMutation) AddedVersion

func (m *ProcDefMutation) AddedVersion() (r int32, exists bool)

AddedVersion returns the value that was added to the "version" field in this mutation.

func (*ProcDefMutation) AppID

func (m *ProcDefMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*ProcDefMutation) Category

func (m *ProcDefMutation) Category() (r string, exists bool)

Category returns the value of the "category" field in the mutation.

func (*ProcDefMutation) CategoryCleared

func (m *ProcDefMutation) CategoryCleared() bool

CategoryCleared returns if the "category" field was cleared in this mutation.

func (*ProcDefMutation) ClearCategory

func (m *ProcDefMutation) ClearCategory()

ClearCategory clears the value of the "category" field.

func (*ProcDefMutation) ClearDeployment

func (m *ProcDefMutation) ClearDeployment()

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*ProcDefMutation) ClearEdge

func (m *ProcDefMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ProcDefMutation) ClearField

func (m *ProcDefMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProcDefMutation) ClearName

func (m *ProcDefMutation) ClearName()

ClearName clears the value of the "name" field.

func (*ProcDefMutation) ClearProcInstances

func (m *ProcDefMutation) ClearProcInstances()

ClearProcInstances clears the "proc_instances" edge to the ProcInst entity.

func (*ProcDefMutation) ClearResourceID

func (m *ProcDefMutation) ClearResourceID()

ClearResourceID clears the value of the "resource_id" field.

func (*ProcDefMutation) ClearResourceKey

func (m *ProcDefMutation) ClearResourceKey()

ClearResourceKey clears the value of the "resource_key" field.

func (*ProcDefMutation) ClearRevision

func (m *ProcDefMutation) ClearRevision()

ClearRevision clears the value of the "revision" field.

func (*ProcDefMutation) ClearUpdatedAt

func (m *ProcDefMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcDefMutation) ClearUpdatedBy

func (m *ProcDefMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcDefMutation) ClearVersion

func (m *ProcDefMutation) ClearVersion()

ClearVersion clears the value of the "version" field.

func (*ProcDefMutation) ClearVersionTag

func (m *ProcDefMutation) ClearVersionTag()

ClearVersionTag clears the value of the "version_tag" field.

func (*ProcDefMutation) ClearedEdges

func (m *ProcDefMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProcDefMutation) ClearedFields

func (m *ProcDefMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProcDefMutation) Client

func (m ProcDefMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ProcDefMutation) CreatedAt

func (m *ProcDefMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ProcDefMutation) CreatedBy

func (m *ProcDefMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*ProcDefMutation) DeploymentCleared

func (m *ProcDefMutation) DeploymentCleared() bool

DeploymentCleared reports if the "deployment" edge to the Deployment entity was cleared.

func (*ProcDefMutation) DeploymentID

func (m *ProcDefMutation) DeploymentID() (r int, exists bool)

DeploymentID returns the value of the "deployment_id" field in the mutation.

func (*ProcDefMutation) DeploymentIDs

func (m *ProcDefMutation) DeploymentIDs() (ids []int)

DeploymentIDs returns the "deployment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeploymentID instead. It exists only for internal usage by the builders.

func (*ProcDefMutation) EdgeCleared

func (m *ProcDefMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProcDefMutation) Field

func (m *ProcDefMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProcDefMutation) FieldCleared

func (m *ProcDefMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProcDefMutation) Fields

func (m *ProcDefMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ProcDefMutation) ID

func (m *ProcDefMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ProcDefMutation) IDs

func (m *ProcDefMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ProcDefMutation) Key

func (m *ProcDefMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*ProcDefMutation) Name

func (m *ProcDefMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ProcDefMutation) NameCleared

func (m *ProcDefMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*ProcDefMutation) OldAppID

func (m *ProcDefMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldCategory

func (m *ProcDefMutation) OldCategory(ctx context.Context) (v string, err error)

OldCategory returns the old "category" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldCreatedAt

func (m *ProcDefMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldCreatedBy

func (m *ProcDefMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldDeploymentID

func (m *ProcDefMutation) OldDeploymentID(ctx context.Context) (v int, err error)

OldDeploymentID returns the old "deployment_id" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldField

func (m *ProcDefMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ProcDefMutation) OldKey

func (m *ProcDefMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldName

func (m *ProcDefMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldResourceID

func (m *ProcDefMutation) OldResourceID(ctx context.Context) (v int, err error)

OldResourceID returns the old "resource_id" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldResourceKey

func (m *ProcDefMutation) OldResourceKey(ctx context.Context) (v string, err error)

OldResourceKey returns the old "resource_key" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldRevision

func (m *ProcDefMutation) OldRevision(ctx context.Context) (v int32, err error)

OldRevision returns the old "revision" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldStatus

func (m *ProcDefMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldTenantID

func (m *ProcDefMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldUpdatedAt

func (m *ProcDefMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldUpdatedBy

func (m *ProcDefMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldVersion

func (m *ProcDefMutation) OldVersion(ctx context.Context) (v int32, err error)

OldVersion returns the old "version" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) OldVersionTag

func (m *ProcDefMutation) OldVersionTag(ctx context.Context) (v string, err error)

OldVersionTag returns the old "version_tag" field's value of the ProcDef entity. If the ProcDef object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcDefMutation) Op

func (m *ProcDefMutation) Op() Op

Op returns the operation name.

func (*ProcDefMutation) ProcInstancesCleared

func (m *ProcDefMutation) ProcInstancesCleared() bool

ProcInstancesCleared reports if the "proc_instances" edge to the ProcInst entity was cleared.

func (*ProcDefMutation) ProcInstancesIDs

func (m *ProcDefMutation) ProcInstancesIDs() (ids []int)

ProcInstancesIDs returns the "proc_instances" edge IDs in the mutation.

func (*ProcDefMutation) RemoveProcInstanceIDs

func (m *ProcDefMutation) RemoveProcInstanceIDs(ids ...int)

RemoveProcInstanceIDs removes the "proc_instances" edge to the ProcInst entity by IDs.

func (*ProcDefMutation) RemovedEdges

func (m *ProcDefMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProcDefMutation) RemovedIDs

func (m *ProcDefMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ProcDefMutation) RemovedProcInstancesIDs

func (m *ProcDefMutation) RemovedProcInstancesIDs() (ids []int)

RemovedProcInstances returns the removed IDs of the "proc_instances" edge to the ProcInst entity.

func (*ProcDefMutation) ResetAppID

func (m *ProcDefMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*ProcDefMutation) ResetCategory

func (m *ProcDefMutation) ResetCategory()

ResetCategory resets all changes to the "category" field.

func (*ProcDefMutation) ResetCreatedAt

func (m *ProcDefMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ProcDefMutation) ResetCreatedBy

func (m *ProcDefMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*ProcDefMutation) ResetDeployment

func (m *ProcDefMutation) ResetDeployment()

ResetDeployment resets all changes to the "deployment" edge.

func (*ProcDefMutation) ResetDeploymentID

func (m *ProcDefMutation) ResetDeploymentID()

ResetDeploymentID resets all changes to the "deployment_id" field.

func (*ProcDefMutation) ResetEdge

func (m *ProcDefMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ProcDefMutation) ResetField

func (m *ProcDefMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProcDefMutation) ResetKey

func (m *ProcDefMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*ProcDefMutation) ResetName

func (m *ProcDefMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProcDefMutation) ResetProcInstances

func (m *ProcDefMutation) ResetProcInstances()

ResetProcInstances resets all changes to the "proc_instances" edge.

func (*ProcDefMutation) ResetResourceID

func (m *ProcDefMutation) ResetResourceID()

ResetResourceID resets all changes to the "resource_id" field.

func (*ProcDefMutation) ResetResourceKey

func (m *ProcDefMutation) ResetResourceKey()

ResetResourceKey resets all changes to the "resource_key" field.

func (*ProcDefMutation) ResetRevision

func (m *ProcDefMutation) ResetRevision()

ResetRevision resets all changes to the "revision" field.

func (*ProcDefMutation) ResetStatus

func (m *ProcDefMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ProcDefMutation) ResetTenantID

func (m *ProcDefMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*ProcDefMutation) ResetUpdatedAt

func (m *ProcDefMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ProcDefMutation) ResetUpdatedBy

func (m *ProcDefMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*ProcDefMutation) ResetVersion

func (m *ProcDefMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*ProcDefMutation) ResetVersionTag

func (m *ProcDefMutation) ResetVersionTag()

ResetVersionTag resets all changes to the "version_tag" field.

func (*ProcDefMutation) ResourceID

func (m *ProcDefMutation) ResourceID() (r int, exists bool)

ResourceID returns the value of the "resource_id" field in the mutation.

func (*ProcDefMutation) ResourceIDCleared

func (m *ProcDefMutation) ResourceIDCleared() bool

ResourceIDCleared returns if the "resource_id" field was cleared in this mutation.

func (*ProcDefMutation) ResourceKey

func (m *ProcDefMutation) ResourceKey() (r string, exists bool)

ResourceKey returns the value of the "resource_key" field in the mutation.

func (*ProcDefMutation) ResourceKeyCleared

func (m *ProcDefMutation) ResourceKeyCleared() bool

ResourceKeyCleared returns if the "resource_key" field was cleared in this mutation.

func (*ProcDefMutation) Revision

func (m *ProcDefMutation) Revision() (r int32, exists bool)

Revision returns the value of the "revision" field in the mutation.

func (*ProcDefMutation) RevisionCleared

func (m *ProcDefMutation) RevisionCleared() bool

RevisionCleared returns if the "revision" field was cleared in this mutation.

func (*ProcDefMutation) SetAppID

func (m *ProcDefMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*ProcDefMutation) SetCategory

func (m *ProcDefMutation) SetCategory(s string)

SetCategory sets the "category" field.

func (*ProcDefMutation) SetCreatedAt

func (m *ProcDefMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ProcDefMutation) SetCreatedBy

func (m *ProcDefMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*ProcDefMutation) SetDeploymentID

func (m *ProcDefMutation) SetDeploymentID(i int)

SetDeploymentID sets the "deployment_id" field.

func (*ProcDefMutation) SetField

func (m *ProcDefMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProcDefMutation) SetID

func (m *ProcDefMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ProcDef entities.

func (*ProcDefMutation) SetKey

func (m *ProcDefMutation) SetKey(s string)

SetKey sets the "key" field.

func (*ProcDefMutation) SetName

func (m *ProcDefMutation) SetName(s string)

SetName sets the "name" field.

func (*ProcDefMutation) SetOp

func (m *ProcDefMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProcDefMutation) SetResourceID

func (m *ProcDefMutation) SetResourceID(i int)

SetResourceID sets the "resource_id" field.

func (*ProcDefMutation) SetResourceKey

func (m *ProcDefMutation) SetResourceKey(s string)

SetResourceKey sets the "resource_key" field.

func (*ProcDefMutation) SetRevision

func (m *ProcDefMutation) SetRevision(i int32)

SetRevision sets the "revision" field.

func (*ProcDefMutation) SetStatus

func (m *ProcDefMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*ProcDefMutation) SetTenantID

func (m *ProcDefMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*ProcDefMutation) SetUpdatedAt

func (m *ProcDefMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ProcDefMutation) SetUpdatedBy

func (m *ProcDefMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*ProcDefMutation) SetVersion

func (m *ProcDefMutation) SetVersion(i int32)

SetVersion sets the "version" field.

func (*ProcDefMutation) SetVersionTag

func (m *ProcDefMutation) SetVersionTag(s string)

SetVersionTag sets the "version_tag" field.

func (*ProcDefMutation) Status

func (m *ProcDefMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ProcDefMutation) TenantID

func (m *ProcDefMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (ProcDefMutation) Tx

func (m ProcDefMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProcDefMutation) Type

func (m *ProcDefMutation) Type() string

Type returns the node type of this mutation (ProcDef).

func (*ProcDefMutation) UpdatedAt

func (m *ProcDefMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ProcDefMutation) UpdatedAtCleared

func (m *ProcDefMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*ProcDefMutation) UpdatedBy

func (m *ProcDefMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*ProcDefMutation) UpdatedByCleared

func (m *ProcDefMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*ProcDefMutation) Version

func (m *ProcDefMutation) Version() (r int32, exists bool)

Version returns the value of the "version" field in the mutation.

func (*ProcDefMutation) VersionCleared

func (m *ProcDefMutation) VersionCleared() bool

VersionCleared returns if the "version" field was cleared in this mutation.

func (*ProcDefMutation) VersionTag

func (m *ProcDefMutation) VersionTag() (r string, exists bool)

VersionTag returns the value of the "version_tag" field in the mutation.

func (*ProcDefMutation) VersionTagCleared

func (m *ProcDefMutation) VersionTagCleared() bool

VersionTagCleared returns if the "version_tag" field was cleared in this mutation.

func (*ProcDefMutation) Where

func (m *ProcDefMutation) Where(ps ...predicate.ProcDef)

Where appends a list predicates to the ProcDefMutation builder.

func (*ProcDefMutation) WhereP

func (m *ProcDefMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProcDefMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProcDefOrder

type ProcDefOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *ProcDefOrderField `json:"field"`
}

ProcDefOrder defines the ordering of ProcDef.

type ProcDefOrderField

type ProcDefOrderField struct {
	// Value extracts the ordering value from the given ProcDef.
	Value func(*ProcDef) (ent.Value, error)
	// contains filtered or unexported fields
}

ProcDefOrderField defines the ordering field of ProcDef.

func (ProcDefOrderField) MarshalGQL

func (f ProcDefOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ProcDefOrderField) String

func (f ProcDefOrderField) String() string

String implement fmt.Stringer interface.

func (*ProcDefOrderField) UnmarshalGQL

func (f *ProcDefOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ProcDefPaginateOption

type ProcDefPaginateOption func(*procdefPager) error

ProcDefPaginateOption enables pagination customization.

func WithProcDefFilter

func WithProcDefFilter(filter func(*ProcDefQuery) (*ProcDefQuery, error)) ProcDefPaginateOption

WithProcDefFilter configures pagination filter.

func WithProcDefOrder

func WithProcDefOrder(order *ProcDefOrder) ProcDefPaginateOption

WithProcDefOrder configures pagination ordering.

type ProcDefQuery

type ProcDefQuery struct {
	// contains filtered or unexported fields
}

ProcDefQuery is the builder for querying ProcDef entities.

func (*ProcDefQuery) Aggregate

func (pdq *ProcDefQuery) Aggregate(fns ...AggregateFunc) *ProcDefSelect

Aggregate returns a ProcDefSelect configured with the given aggregations.

func (*ProcDefQuery) All

func (pdq *ProcDefQuery) All(ctx context.Context) ([]*ProcDef, error)

All executes the query and returns a list of ProcDefs.

func (*ProcDefQuery) AllX

func (pdq *ProcDefQuery) AllX(ctx context.Context) []*ProcDef

AllX is like All, but panics if an error occurs.

func (*ProcDefQuery) Clone

func (pdq *ProcDefQuery) Clone() *ProcDefQuery

Clone returns a duplicate of the ProcDefQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProcDefQuery) CollectFields

func (pd *ProcDefQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProcDefQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ProcDefQuery) Count

func (pdq *ProcDefQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProcDefQuery) CountX

func (pdq *ProcDefQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProcDefQuery) Exist

func (pdq *ProcDefQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProcDefQuery) ExistX

func (pdq *ProcDefQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProcDefQuery) First

func (pdq *ProcDefQuery) First(ctx context.Context) (*ProcDef, error)

First returns the first ProcDef entity from the query. Returns a *NotFoundError when no ProcDef was found.

func (*ProcDefQuery) FirstID

func (pdq *ProcDefQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first ProcDef ID from the query. Returns a *NotFoundError when no ProcDef ID was found.

func (*ProcDefQuery) FirstIDX

func (pdq *ProcDefQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProcDefQuery) FirstX

func (pdq *ProcDefQuery) FirstX(ctx context.Context) *ProcDef

FirstX is like First, but panics if an error occurs.

func (*ProcDefQuery) GroupBy

func (pdq *ProcDefQuery) GroupBy(field string, fields ...string) *ProcDefGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ProcDef.Query().
	GroupBy(procdef.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProcDefQuery) IDs

func (pdq *ProcDefQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of ProcDef IDs.

func (*ProcDefQuery) IDsX

func (pdq *ProcDefQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ProcDefQuery) Limit

func (pdq *ProcDefQuery) Limit(limit int) *ProcDefQuery

Limit the number of records to be returned by this query.

func (*ProcDefQuery) Offset

func (pdq *ProcDefQuery) Offset(offset int) *ProcDefQuery

Offset to start from.

func (*ProcDefQuery) Only

func (pdq *ProcDefQuery) Only(ctx context.Context) (*ProcDef, error)

Only returns a single ProcDef entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProcDef entity is found. Returns a *NotFoundError when no ProcDef entities are found.

func (*ProcDefQuery) OnlyID

func (pdq *ProcDefQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only ProcDef ID in the query. Returns a *NotSingularError when more than one ProcDef ID is found. Returns a *NotFoundError when no entities are found.

func (*ProcDefQuery) OnlyIDX

func (pdq *ProcDefQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProcDefQuery) OnlyX

func (pdq *ProcDefQuery) OnlyX(ctx context.Context) *ProcDef

OnlyX is like Only, but panics if an error occurs.

func (*ProcDefQuery) Order

func (pdq *ProcDefQuery) Order(o ...procdef.OrderOption) *ProcDefQuery

Order specifies how the records should be ordered.

func (*ProcDefQuery) Paginate

func (pd *ProcDefQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ProcDefPaginateOption,
) (*ProcDefConnection, error)

Paginate executes the query and returns a relay based cursor connection to ProcDef.

func (*ProcDefQuery) QueryDeployment

func (pdq *ProcDefQuery) QueryDeployment() *DeploymentQuery

QueryDeployment chains the current query on the "deployment" edge.

func (*ProcDefQuery) QueryProcInstances

func (pdq *ProcDefQuery) QueryProcInstances() *ProcInstQuery

QueryProcInstances chains the current query on the "proc_instances" edge.

func (*ProcDefQuery) Select

func (pdq *ProcDefQuery) Select(fields ...string) *ProcDefSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.ProcDef.Query().
	Select(procdef.FieldCreatedBy).
	Scan(ctx, &v)

func (*ProcDefQuery) Unique

func (pdq *ProcDefQuery) Unique(unique bool) *ProcDefQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ProcDefQuery) Where

func (pdq *ProcDefQuery) Where(ps ...predicate.ProcDef) *ProcDefQuery

Where adds a new predicate for the ProcDefQuery builder.

func (*ProcDefQuery) WithDeployment

func (pdq *ProcDefQuery) WithDeployment(opts ...func(*DeploymentQuery)) *ProcDefQuery

WithDeployment tells the query-builder to eager-load the nodes that are connected to the "deployment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProcDefQuery) WithNamedProcInstances

func (pdq *ProcDefQuery) WithNamedProcInstances(name string, opts ...func(*ProcInstQuery)) *ProcDefQuery

WithNamedProcInstances tells the query-builder to eager-load the nodes that are connected to the "proc_instances" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProcDefQuery) WithProcInstances

func (pdq *ProcDefQuery) WithProcInstances(opts ...func(*ProcInstQuery)) *ProcDefQuery

WithProcInstances tells the query-builder to eager-load the nodes that are connected to the "proc_instances" edge. The optional arguments are used to configure the query builder of the edge.

type ProcDefSelect

type ProcDefSelect struct {
	*ProcDefQuery
	// contains filtered or unexported fields
}

ProcDefSelect is the builder for selecting fields of ProcDef entities.

func (*ProcDefSelect) Aggregate

func (pds *ProcDefSelect) Aggregate(fns ...AggregateFunc) *ProcDefSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProcDefSelect) Bool

func (s *ProcDefSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) BoolX

func (s *ProcDefSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProcDefSelect) Bools

func (s *ProcDefSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) BoolsX

func (s *ProcDefSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProcDefSelect) Float64

func (s *ProcDefSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) Float64X

func (s *ProcDefSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProcDefSelect) Float64s

func (s *ProcDefSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) Float64sX

func (s *ProcDefSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProcDefSelect) Int

func (s *ProcDefSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) IntX

func (s *ProcDefSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProcDefSelect) Ints

func (s *ProcDefSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) IntsX

func (s *ProcDefSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProcDefSelect) Scan

func (pds *ProcDefSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProcDefSelect) ScanX

func (s *ProcDefSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProcDefSelect) String

func (s *ProcDefSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) StringX

func (s *ProcDefSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProcDefSelect) Strings

func (s *ProcDefSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProcDefSelect) StringsX

func (s *ProcDefSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProcDefUpdate

type ProcDefUpdate struct {
	// contains filtered or unexported fields
}

ProcDefUpdate is the builder for updating ProcDef entities.

func (*ProcDefUpdate) AddProcInstanceIDs

func (pdu *ProcDefUpdate) AddProcInstanceIDs(ids ...int) *ProcDefUpdate

AddProcInstanceIDs adds the "proc_instances" edge to the ProcInst entity by IDs.

func (*ProcDefUpdate) AddProcInstances

func (pdu *ProcDefUpdate) AddProcInstances(p ...*ProcInst) *ProcDefUpdate

AddProcInstances adds the "proc_instances" edges to the ProcInst entity.

func (*ProcDefUpdate) AddResourceID

func (pdu *ProcDefUpdate) AddResourceID(i int) *ProcDefUpdate

AddResourceID adds i to the "resource_id" field.

func (*ProcDefUpdate) AddRevision

func (pdu *ProcDefUpdate) AddRevision(i int32) *ProcDefUpdate

AddRevision adds i to the "revision" field.

func (*ProcDefUpdate) AddUpdatedBy

func (pdu *ProcDefUpdate) AddUpdatedBy(i int) *ProcDefUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*ProcDefUpdate) AddVersion

func (pdu *ProcDefUpdate) AddVersion(i int32) *ProcDefUpdate

AddVersion adds i to the "version" field.

func (*ProcDefUpdate) ClearCategory

func (pdu *ProcDefUpdate) ClearCategory() *ProcDefUpdate

ClearCategory clears the value of the "category" field.

func (*ProcDefUpdate) ClearName

func (pdu *ProcDefUpdate) ClearName() *ProcDefUpdate

ClearName clears the value of the "name" field.

func (*ProcDefUpdate) ClearProcInstances

func (pdu *ProcDefUpdate) ClearProcInstances() *ProcDefUpdate

ClearProcInstances clears all "proc_instances" edges to the ProcInst entity.

func (*ProcDefUpdate) ClearResourceID

func (pdu *ProcDefUpdate) ClearResourceID() *ProcDefUpdate

ClearResourceID clears the value of the "resource_id" field.

func (*ProcDefUpdate) ClearResourceKey

func (pdu *ProcDefUpdate) ClearResourceKey() *ProcDefUpdate

ClearResourceKey clears the value of the "resource_key" field.

func (*ProcDefUpdate) ClearRevision

func (pdu *ProcDefUpdate) ClearRevision() *ProcDefUpdate

ClearRevision clears the value of the "revision" field.

func (*ProcDefUpdate) ClearUpdatedAt

func (pdu *ProcDefUpdate) ClearUpdatedAt() *ProcDefUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcDefUpdate) ClearUpdatedBy

func (pdu *ProcDefUpdate) ClearUpdatedBy() *ProcDefUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcDefUpdate) ClearVersion

func (pdu *ProcDefUpdate) ClearVersion() *ProcDefUpdate

ClearVersion clears the value of the "version" field.

func (*ProcDefUpdate) ClearVersionTag

func (pdu *ProcDefUpdate) ClearVersionTag() *ProcDefUpdate

ClearVersionTag clears the value of the "version_tag" field.

func (*ProcDefUpdate) Exec

func (pdu *ProcDefUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcDefUpdate) ExecX

func (pdu *ProcDefUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefUpdate) Mutation

func (pdu *ProcDefUpdate) Mutation() *ProcDefMutation

Mutation returns the ProcDefMutation object of the builder.

func (*ProcDefUpdate) RemoveProcInstanceIDs

func (pdu *ProcDefUpdate) RemoveProcInstanceIDs(ids ...int) *ProcDefUpdate

RemoveProcInstanceIDs removes the "proc_instances" edge to ProcInst entities by IDs.

func (*ProcDefUpdate) RemoveProcInstances

func (pdu *ProcDefUpdate) RemoveProcInstances(p ...*ProcInst) *ProcDefUpdate

RemoveProcInstances removes "proc_instances" edges to ProcInst entities.

func (*ProcDefUpdate) Save

func (pdu *ProcDefUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProcDefUpdate) SaveX

func (pdu *ProcDefUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProcDefUpdate) SetCategory

func (pdu *ProcDefUpdate) SetCategory(s string) *ProcDefUpdate

SetCategory sets the "category" field.

func (*ProcDefUpdate) SetKey

func (pdu *ProcDefUpdate) SetKey(s string) *ProcDefUpdate

SetKey sets the "key" field.

func (*ProcDefUpdate) SetName

func (pdu *ProcDefUpdate) SetName(s string) *ProcDefUpdate

SetName sets the "name" field.

func (*ProcDefUpdate) SetNillableCategory

func (pdu *ProcDefUpdate) SetNillableCategory(s *string) *ProcDefUpdate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableName

func (pdu *ProcDefUpdate) SetNillableName(s *string) *ProcDefUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableResourceID

func (pdu *ProcDefUpdate) SetNillableResourceID(i *int) *ProcDefUpdate

SetNillableResourceID sets the "resource_id" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableResourceKey

func (pdu *ProcDefUpdate) SetNillableResourceKey(s *string) *ProcDefUpdate

SetNillableResourceKey sets the "resource_key" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableRevision

func (pdu *ProcDefUpdate) SetNillableRevision(i *int32) *ProcDefUpdate

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableStatus

func (pdu *ProcDefUpdate) SetNillableStatus(ts *typex.SimpleStatus) *ProcDefUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableUpdatedAt

func (pdu *ProcDefUpdate) SetNillableUpdatedAt(t *time.Time) *ProcDefUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableUpdatedBy

func (pdu *ProcDefUpdate) SetNillableUpdatedBy(i *int) *ProcDefUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableVersion

func (pdu *ProcDefUpdate) SetNillableVersion(i *int32) *ProcDefUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*ProcDefUpdate) SetNillableVersionTag

func (pdu *ProcDefUpdate) SetNillableVersionTag(s *string) *ProcDefUpdate

SetNillableVersionTag sets the "version_tag" field if the given value is not nil.

func (*ProcDefUpdate) SetResourceID

func (pdu *ProcDefUpdate) SetResourceID(i int) *ProcDefUpdate

SetResourceID sets the "resource_id" field.

func (*ProcDefUpdate) SetResourceKey

func (pdu *ProcDefUpdate) SetResourceKey(s string) *ProcDefUpdate

SetResourceKey sets the "resource_key" field.

func (*ProcDefUpdate) SetRevision

func (pdu *ProcDefUpdate) SetRevision(i int32) *ProcDefUpdate

SetRevision sets the "revision" field.

func (*ProcDefUpdate) SetStatus

func (pdu *ProcDefUpdate) SetStatus(ts typex.SimpleStatus) *ProcDefUpdate

SetStatus sets the "status" field.

func (*ProcDefUpdate) SetUpdatedAt

func (pdu *ProcDefUpdate) SetUpdatedAt(t time.Time) *ProcDefUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ProcDefUpdate) SetUpdatedBy

func (pdu *ProcDefUpdate) SetUpdatedBy(i int) *ProcDefUpdate

SetUpdatedBy sets the "updated_by" field.

func (*ProcDefUpdate) SetVersion

func (pdu *ProcDefUpdate) SetVersion(i int32) *ProcDefUpdate

SetVersion sets the "version" field.

func (*ProcDefUpdate) SetVersionTag

func (pdu *ProcDefUpdate) SetVersionTag(s string) *ProcDefUpdate

SetVersionTag sets the "version_tag" field.

func (*ProcDefUpdate) Where

func (pdu *ProcDefUpdate) Where(ps ...predicate.ProcDef) *ProcDefUpdate

Where appends a list predicates to the ProcDefUpdate builder.

type ProcDefUpdateOne

type ProcDefUpdateOne struct {
	// contains filtered or unexported fields
}

ProcDefUpdateOne is the builder for updating a single ProcDef entity.

func (*ProcDefUpdateOne) AddProcInstanceIDs

func (pduo *ProcDefUpdateOne) AddProcInstanceIDs(ids ...int) *ProcDefUpdateOne

AddProcInstanceIDs adds the "proc_instances" edge to the ProcInst entity by IDs.

func (*ProcDefUpdateOne) AddProcInstances

func (pduo *ProcDefUpdateOne) AddProcInstances(p ...*ProcInst) *ProcDefUpdateOne

AddProcInstances adds the "proc_instances" edges to the ProcInst entity.

func (*ProcDefUpdateOne) AddResourceID

func (pduo *ProcDefUpdateOne) AddResourceID(i int) *ProcDefUpdateOne

AddResourceID adds i to the "resource_id" field.

func (*ProcDefUpdateOne) AddRevision

func (pduo *ProcDefUpdateOne) AddRevision(i int32) *ProcDefUpdateOne

AddRevision adds i to the "revision" field.

func (*ProcDefUpdateOne) AddUpdatedBy

func (pduo *ProcDefUpdateOne) AddUpdatedBy(i int) *ProcDefUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*ProcDefUpdateOne) AddVersion

func (pduo *ProcDefUpdateOne) AddVersion(i int32) *ProcDefUpdateOne

AddVersion adds i to the "version" field.

func (*ProcDefUpdateOne) ClearCategory

func (pduo *ProcDefUpdateOne) ClearCategory() *ProcDefUpdateOne

ClearCategory clears the value of the "category" field.

func (*ProcDefUpdateOne) ClearName

func (pduo *ProcDefUpdateOne) ClearName() *ProcDefUpdateOne

ClearName clears the value of the "name" field.

func (*ProcDefUpdateOne) ClearProcInstances

func (pduo *ProcDefUpdateOne) ClearProcInstances() *ProcDefUpdateOne

ClearProcInstances clears all "proc_instances" edges to the ProcInst entity.

func (*ProcDefUpdateOne) ClearResourceID

func (pduo *ProcDefUpdateOne) ClearResourceID() *ProcDefUpdateOne

ClearResourceID clears the value of the "resource_id" field.

func (*ProcDefUpdateOne) ClearResourceKey

func (pduo *ProcDefUpdateOne) ClearResourceKey() *ProcDefUpdateOne

ClearResourceKey clears the value of the "resource_key" field.

func (*ProcDefUpdateOne) ClearRevision

func (pduo *ProcDefUpdateOne) ClearRevision() *ProcDefUpdateOne

ClearRevision clears the value of the "revision" field.

func (*ProcDefUpdateOne) ClearUpdatedAt

func (pduo *ProcDefUpdateOne) ClearUpdatedAt() *ProcDefUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcDefUpdateOne) ClearUpdatedBy

func (pduo *ProcDefUpdateOne) ClearUpdatedBy() *ProcDefUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcDefUpdateOne) ClearVersion

func (pduo *ProcDefUpdateOne) ClearVersion() *ProcDefUpdateOne

ClearVersion clears the value of the "version" field.

func (*ProcDefUpdateOne) ClearVersionTag

func (pduo *ProcDefUpdateOne) ClearVersionTag() *ProcDefUpdateOne

ClearVersionTag clears the value of the "version_tag" field.

func (*ProcDefUpdateOne) Exec

func (pduo *ProcDefUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProcDefUpdateOne) ExecX

func (pduo *ProcDefUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefUpdateOne) Mutation

func (pduo *ProcDefUpdateOne) Mutation() *ProcDefMutation

Mutation returns the ProcDefMutation object of the builder.

func (*ProcDefUpdateOne) RemoveProcInstanceIDs

func (pduo *ProcDefUpdateOne) RemoveProcInstanceIDs(ids ...int) *ProcDefUpdateOne

RemoveProcInstanceIDs removes the "proc_instances" edge to ProcInst entities by IDs.

func (*ProcDefUpdateOne) RemoveProcInstances

func (pduo *ProcDefUpdateOne) RemoveProcInstances(p ...*ProcInst) *ProcDefUpdateOne

RemoveProcInstances removes "proc_instances" edges to ProcInst entities.

func (*ProcDefUpdateOne) Save

func (pduo *ProcDefUpdateOne) Save(ctx context.Context) (*ProcDef, error)

Save executes the query and returns the updated ProcDef entity.

func (*ProcDefUpdateOne) SaveX

func (pduo *ProcDefUpdateOne) SaveX(ctx context.Context) *ProcDef

SaveX is like Save, but panics if an error occurs.

func (*ProcDefUpdateOne) Select

func (pduo *ProcDefUpdateOne) Select(field string, fields ...string) *ProcDefUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProcDefUpdateOne) SetCategory

func (pduo *ProcDefUpdateOne) SetCategory(s string) *ProcDefUpdateOne

SetCategory sets the "category" field.

func (*ProcDefUpdateOne) SetKey

func (pduo *ProcDefUpdateOne) SetKey(s string) *ProcDefUpdateOne

SetKey sets the "key" field.

func (*ProcDefUpdateOne) SetName

func (pduo *ProcDefUpdateOne) SetName(s string) *ProcDefUpdateOne

SetName sets the "name" field.

func (*ProcDefUpdateOne) SetNillableCategory

func (pduo *ProcDefUpdateOne) SetNillableCategory(s *string) *ProcDefUpdateOne

SetNillableCategory sets the "category" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableName

func (pduo *ProcDefUpdateOne) SetNillableName(s *string) *ProcDefUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableResourceID

func (pduo *ProcDefUpdateOne) SetNillableResourceID(i *int) *ProcDefUpdateOne

SetNillableResourceID sets the "resource_id" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableResourceKey

func (pduo *ProcDefUpdateOne) SetNillableResourceKey(s *string) *ProcDefUpdateOne

SetNillableResourceKey sets the "resource_key" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableRevision

func (pduo *ProcDefUpdateOne) SetNillableRevision(i *int32) *ProcDefUpdateOne

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableStatus

func (pduo *ProcDefUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *ProcDefUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableUpdatedAt

func (pduo *ProcDefUpdateOne) SetNillableUpdatedAt(t *time.Time) *ProcDefUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableUpdatedBy

func (pduo *ProcDefUpdateOne) SetNillableUpdatedBy(i *int) *ProcDefUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableVersion

func (pduo *ProcDefUpdateOne) SetNillableVersion(i *int32) *ProcDefUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*ProcDefUpdateOne) SetNillableVersionTag

func (pduo *ProcDefUpdateOne) SetNillableVersionTag(s *string) *ProcDefUpdateOne

SetNillableVersionTag sets the "version_tag" field if the given value is not nil.

func (*ProcDefUpdateOne) SetResourceID

func (pduo *ProcDefUpdateOne) SetResourceID(i int) *ProcDefUpdateOne

SetResourceID sets the "resource_id" field.

func (*ProcDefUpdateOne) SetResourceKey

func (pduo *ProcDefUpdateOne) SetResourceKey(s string) *ProcDefUpdateOne

SetResourceKey sets the "resource_key" field.

func (*ProcDefUpdateOne) SetRevision

func (pduo *ProcDefUpdateOne) SetRevision(i int32) *ProcDefUpdateOne

SetRevision sets the "revision" field.

func (*ProcDefUpdateOne) SetStatus

func (pduo *ProcDefUpdateOne) SetStatus(ts typex.SimpleStatus) *ProcDefUpdateOne

SetStatus sets the "status" field.

func (*ProcDefUpdateOne) SetUpdatedAt

func (pduo *ProcDefUpdateOne) SetUpdatedAt(t time.Time) *ProcDefUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ProcDefUpdateOne) SetUpdatedBy

func (pduo *ProcDefUpdateOne) SetUpdatedBy(i int) *ProcDefUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*ProcDefUpdateOne) SetVersion

func (pduo *ProcDefUpdateOne) SetVersion(i int32) *ProcDefUpdateOne

SetVersion sets the "version" field.

func (*ProcDefUpdateOne) SetVersionTag

func (pduo *ProcDefUpdateOne) SetVersionTag(s string) *ProcDefUpdateOne

SetVersionTag sets the "version_tag" field.

func (*ProcDefUpdateOne) Where

func (pduo *ProcDefUpdateOne) Where(ps ...predicate.ProcDef) *ProcDefUpdateOne

Where appends a list predicates to the ProcDefUpdate builder.

type ProcDefUpsert

type ProcDefUpsert struct {
	*sql.UpdateSet
}

ProcDefUpsert is the "OnConflict" setter.

func (*ProcDefUpsert) AddResourceID

func (u *ProcDefUpsert) AddResourceID(v int) *ProcDefUpsert

AddResourceID adds v to the "resource_id" field.

func (*ProcDefUpsert) AddRevision

func (u *ProcDefUpsert) AddRevision(v int32) *ProcDefUpsert

AddRevision adds v to the "revision" field.

func (*ProcDefUpsert) AddUpdatedBy

func (u *ProcDefUpsert) AddUpdatedBy(v int) *ProcDefUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*ProcDefUpsert) AddVersion

func (u *ProcDefUpsert) AddVersion(v int32) *ProcDefUpsert

AddVersion adds v to the "version" field.

func (*ProcDefUpsert) ClearCategory

func (u *ProcDefUpsert) ClearCategory() *ProcDefUpsert

ClearCategory clears the value of the "category" field.

func (*ProcDefUpsert) ClearName

func (u *ProcDefUpsert) ClearName() *ProcDefUpsert

ClearName clears the value of the "name" field.

func (*ProcDefUpsert) ClearResourceID

func (u *ProcDefUpsert) ClearResourceID() *ProcDefUpsert

ClearResourceID clears the value of the "resource_id" field.

func (*ProcDefUpsert) ClearResourceKey

func (u *ProcDefUpsert) ClearResourceKey() *ProcDefUpsert

ClearResourceKey clears the value of the "resource_key" field.

func (*ProcDefUpsert) ClearRevision

func (u *ProcDefUpsert) ClearRevision() *ProcDefUpsert

ClearRevision clears the value of the "revision" field.

func (*ProcDefUpsert) ClearUpdatedAt

func (u *ProcDefUpsert) ClearUpdatedAt() *ProcDefUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcDefUpsert) ClearUpdatedBy

func (u *ProcDefUpsert) ClearUpdatedBy() *ProcDefUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcDefUpsert) ClearVersion

func (u *ProcDefUpsert) ClearVersion() *ProcDefUpsert

ClearVersion clears the value of the "version" field.

func (*ProcDefUpsert) ClearVersionTag

func (u *ProcDefUpsert) ClearVersionTag() *ProcDefUpsert

ClearVersionTag clears the value of the "version_tag" field.

func (*ProcDefUpsert) SetCategory

func (u *ProcDefUpsert) SetCategory(v string) *ProcDefUpsert

SetCategory sets the "category" field.

func (*ProcDefUpsert) SetKey

func (u *ProcDefUpsert) SetKey(v string) *ProcDefUpsert

SetKey sets the "key" field.

func (*ProcDefUpsert) SetName

func (u *ProcDefUpsert) SetName(v string) *ProcDefUpsert

SetName sets the "name" field.

func (*ProcDefUpsert) SetResourceID

func (u *ProcDefUpsert) SetResourceID(v int) *ProcDefUpsert

SetResourceID sets the "resource_id" field.

func (*ProcDefUpsert) SetResourceKey

func (u *ProcDefUpsert) SetResourceKey(v string) *ProcDefUpsert

SetResourceKey sets the "resource_key" field.

func (*ProcDefUpsert) SetRevision

func (u *ProcDefUpsert) SetRevision(v int32) *ProcDefUpsert

SetRevision sets the "revision" field.

func (*ProcDefUpsert) SetStatus

func (u *ProcDefUpsert) SetStatus(v typex.SimpleStatus) *ProcDefUpsert

SetStatus sets the "status" field.

func (*ProcDefUpsert) SetUpdatedAt

func (u *ProcDefUpsert) SetUpdatedAt(v time.Time) *ProcDefUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ProcDefUpsert) SetUpdatedBy

func (u *ProcDefUpsert) SetUpdatedBy(v int) *ProcDefUpsert

SetUpdatedBy sets the "updated_by" field.

func (*ProcDefUpsert) SetVersion

func (u *ProcDefUpsert) SetVersion(v int32) *ProcDefUpsert

SetVersion sets the "version" field.

func (*ProcDefUpsert) SetVersionTag

func (u *ProcDefUpsert) SetVersionTag(v string) *ProcDefUpsert

SetVersionTag sets the "version_tag" field.

func (*ProcDefUpsert) UpdateCategory

func (u *ProcDefUpsert) UpdateCategory() *ProcDefUpsert

UpdateCategory sets the "category" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateKey

func (u *ProcDefUpsert) UpdateKey() *ProcDefUpsert

UpdateKey sets the "key" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateName

func (u *ProcDefUpsert) UpdateName() *ProcDefUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateResourceID

func (u *ProcDefUpsert) UpdateResourceID() *ProcDefUpsert

UpdateResourceID sets the "resource_id" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateResourceKey

func (u *ProcDefUpsert) UpdateResourceKey() *ProcDefUpsert

UpdateResourceKey sets the "resource_key" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateRevision

func (u *ProcDefUpsert) UpdateRevision() *ProcDefUpsert

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateStatus

func (u *ProcDefUpsert) UpdateStatus() *ProcDefUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateUpdatedAt

func (u *ProcDefUpsert) UpdateUpdatedAt() *ProcDefUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateUpdatedBy

func (u *ProcDefUpsert) UpdateUpdatedBy() *ProcDefUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateVersion

func (u *ProcDefUpsert) UpdateVersion() *ProcDefUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

func (*ProcDefUpsert) UpdateVersionTag

func (u *ProcDefUpsert) UpdateVersionTag() *ProcDefUpsert

UpdateVersionTag sets the "version_tag" field to the value that was provided on create.

type ProcDefUpsertBulk

type ProcDefUpsertBulk struct {
	// contains filtered or unexported fields
}

ProcDefUpsertBulk is the builder for "upsert"-ing a bulk of ProcDef nodes.

func (*ProcDefUpsertBulk) AddResourceID

func (u *ProcDefUpsertBulk) AddResourceID(v int) *ProcDefUpsertBulk

AddResourceID adds v to the "resource_id" field.

func (*ProcDefUpsertBulk) AddRevision

func (u *ProcDefUpsertBulk) AddRevision(v int32) *ProcDefUpsertBulk

AddRevision adds v to the "revision" field.

func (*ProcDefUpsertBulk) AddUpdatedBy

func (u *ProcDefUpsertBulk) AddUpdatedBy(v int) *ProcDefUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*ProcDefUpsertBulk) AddVersion

func (u *ProcDefUpsertBulk) AddVersion(v int32) *ProcDefUpsertBulk

AddVersion adds v to the "version" field.

func (*ProcDefUpsertBulk) ClearCategory

func (u *ProcDefUpsertBulk) ClearCategory() *ProcDefUpsertBulk

ClearCategory clears the value of the "category" field.

func (*ProcDefUpsertBulk) ClearName

func (u *ProcDefUpsertBulk) ClearName() *ProcDefUpsertBulk

ClearName clears the value of the "name" field.

func (*ProcDefUpsertBulk) ClearResourceID

func (u *ProcDefUpsertBulk) ClearResourceID() *ProcDefUpsertBulk

ClearResourceID clears the value of the "resource_id" field.

func (*ProcDefUpsertBulk) ClearResourceKey

func (u *ProcDefUpsertBulk) ClearResourceKey() *ProcDefUpsertBulk

ClearResourceKey clears the value of the "resource_key" field.

func (*ProcDefUpsertBulk) ClearRevision

func (u *ProcDefUpsertBulk) ClearRevision() *ProcDefUpsertBulk

ClearRevision clears the value of the "revision" field.

func (*ProcDefUpsertBulk) ClearUpdatedAt

func (u *ProcDefUpsertBulk) ClearUpdatedAt() *ProcDefUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcDefUpsertBulk) ClearUpdatedBy

func (u *ProcDefUpsertBulk) ClearUpdatedBy() *ProcDefUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcDefUpsertBulk) ClearVersion

func (u *ProcDefUpsertBulk) ClearVersion() *ProcDefUpsertBulk

ClearVersion clears the value of the "version" field.

func (*ProcDefUpsertBulk) ClearVersionTag

func (u *ProcDefUpsertBulk) ClearVersionTag() *ProcDefUpsertBulk

ClearVersionTag clears the value of the "version_tag" field.

func (*ProcDefUpsertBulk) DoNothing

func (u *ProcDefUpsertBulk) DoNothing() *ProcDefUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProcDefUpsertBulk) Exec

func (u *ProcDefUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcDefUpsertBulk) ExecX

func (u *ProcDefUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefUpsertBulk) Ignore

func (u *ProcDefUpsertBulk) Ignore() *ProcDefUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ProcDef.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ProcDefUpsertBulk) SetCategory

func (u *ProcDefUpsertBulk) SetCategory(v string) *ProcDefUpsertBulk

SetCategory sets the "category" field.

func (*ProcDefUpsertBulk) SetKey

SetKey sets the "key" field.

func (*ProcDefUpsertBulk) SetName

SetName sets the "name" field.

func (*ProcDefUpsertBulk) SetResourceID

func (u *ProcDefUpsertBulk) SetResourceID(v int) *ProcDefUpsertBulk

SetResourceID sets the "resource_id" field.

func (*ProcDefUpsertBulk) SetResourceKey

func (u *ProcDefUpsertBulk) SetResourceKey(v string) *ProcDefUpsertBulk

SetResourceKey sets the "resource_key" field.

func (*ProcDefUpsertBulk) SetRevision

func (u *ProcDefUpsertBulk) SetRevision(v int32) *ProcDefUpsertBulk

SetRevision sets the "revision" field.

func (*ProcDefUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*ProcDefUpsertBulk) SetUpdatedAt

func (u *ProcDefUpsertBulk) SetUpdatedAt(v time.Time) *ProcDefUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*ProcDefUpsertBulk) SetUpdatedBy

func (u *ProcDefUpsertBulk) SetUpdatedBy(v int) *ProcDefUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*ProcDefUpsertBulk) SetVersion

func (u *ProcDefUpsertBulk) SetVersion(v int32) *ProcDefUpsertBulk

SetVersion sets the "version" field.

func (*ProcDefUpsertBulk) SetVersionTag

func (u *ProcDefUpsertBulk) SetVersionTag(v string) *ProcDefUpsertBulk

SetVersionTag sets the "version_tag" field.

func (*ProcDefUpsertBulk) Update

func (u *ProcDefUpsertBulk) Update(set func(*ProcDefUpsert)) *ProcDefUpsertBulk

Update allows overriding fields `UPDATE` values. See the ProcDefCreateBulk.OnConflict documentation for more info.

func (*ProcDefUpsertBulk) UpdateCategory

func (u *ProcDefUpsertBulk) UpdateCategory() *ProcDefUpsertBulk

UpdateCategory sets the "category" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateKey

func (u *ProcDefUpsertBulk) UpdateKey() *ProcDefUpsertBulk

UpdateKey sets the "key" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateName

func (u *ProcDefUpsertBulk) UpdateName() *ProcDefUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateNewValues

func (u *ProcDefUpsertBulk) UpdateNewValues() *ProcDefUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ProcDef.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(procdef.FieldID)
		}),
	).
	Exec(ctx)

func (*ProcDefUpsertBulk) UpdateResourceID

func (u *ProcDefUpsertBulk) UpdateResourceID() *ProcDefUpsertBulk

UpdateResourceID sets the "resource_id" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateResourceKey

func (u *ProcDefUpsertBulk) UpdateResourceKey() *ProcDefUpsertBulk

UpdateResourceKey sets the "resource_key" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateRevision

func (u *ProcDefUpsertBulk) UpdateRevision() *ProcDefUpsertBulk

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateStatus

func (u *ProcDefUpsertBulk) UpdateStatus() *ProcDefUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateUpdatedAt

func (u *ProcDefUpsertBulk) UpdateUpdatedAt() *ProcDefUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateUpdatedBy

func (u *ProcDefUpsertBulk) UpdateUpdatedBy() *ProcDefUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateVersion

func (u *ProcDefUpsertBulk) UpdateVersion() *ProcDefUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

func (*ProcDefUpsertBulk) UpdateVersionTag

func (u *ProcDefUpsertBulk) UpdateVersionTag() *ProcDefUpsertBulk

UpdateVersionTag sets the "version_tag" field to the value that was provided on create.

type ProcDefUpsertOne

type ProcDefUpsertOne struct {
	// contains filtered or unexported fields
}

ProcDefUpsertOne is the builder for "upsert"-ing

one ProcDef node.

func (*ProcDefUpsertOne) AddResourceID

func (u *ProcDefUpsertOne) AddResourceID(v int) *ProcDefUpsertOne

AddResourceID adds v to the "resource_id" field.

func (*ProcDefUpsertOne) AddRevision

func (u *ProcDefUpsertOne) AddRevision(v int32) *ProcDefUpsertOne

AddRevision adds v to the "revision" field.

func (*ProcDefUpsertOne) AddUpdatedBy

func (u *ProcDefUpsertOne) AddUpdatedBy(v int) *ProcDefUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*ProcDefUpsertOne) AddVersion

func (u *ProcDefUpsertOne) AddVersion(v int32) *ProcDefUpsertOne

AddVersion adds v to the "version" field.

func (*ProcDefUpsertOne) ClearCategory

func (u *ProcDefUpsertOne) ClearCategory() *ProcDefUpsertOne

ClearCategory clears the value of the "category" field.

func (*ProcDefUpsertOne) ClearName

func (u *ProcDefUpsertOne) ClearName() *ProcDefUpsertOne

ClearName clears the value of the "name" field.

func (*ProcDefUpsertOne) ClearResourceID

func (u *ProcDefUpsertOne) ClearResourceID() *ProcDefUpsertOne

ClearResourceID clears the value of the "resource_id" field.

func (*ProcDefUpsertOne) ClearResourceKey

func (u *ProcDefUpsertOne) ClearResourceKey() *ProcDefUpsertOne

ClearResourceKey clears the value of the "resource_key" field.

func (*ProcDefUpsertOne) ClearRevision

func (u *ProcDefUpsertOne) ClearRevision() *ProcDefUpsertOne

ClearRevision clears the value of the "revision" field.

func (*ProcDefUpsertOne) ClearUpdatedAt

func (u *ProcDefUpsertOne) ClearUpdatedAt() *ProcDefUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcDefUpsertOne) ClearUpdatedBy

func (u *ProcDefUpsertOne) ClearUpdatedBy() *ProcDefUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcDefUpsertOne) ClearVersion

func (u *ProcDefUpsertOne) ClearVersion() *ProcDefUpsertOne

ClearVersion clears the value of the "version" field.

func (*ProcDefUpsertOne) ClearVersionTag

func (u *ProcDefUpsertOne) ClearVersionTag() *ProcDefUpsertOne

ClearVersionTag clears the value of the "version_tag" field.

func (*ProcDefUpsertOne) DoNothing

func (u *ProcDefUpsertOne) DoNothing() *ProcDefUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProcDefUpsertOne) Exec

func (u *ProcDefUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcDefUpsertOne) ExecX

func (u *ProcDefUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcDefUpsertOne) ID

func (u *ProcDefUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ProcDefUpsertOne) IDX

func (u *ProcDefUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*ProcDefUpsertOne) Ignore

func (u *ProcDefUpsertOne) Ignore() *ProcDefUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ProcDef.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ProcDefUpsertOne) SetCategory

func (u *ProcDefUpsertOne) SetCategory(v string) *ProcDefUpsertOne

SetCategory sets the "category" field.

func (*ProcDefUpsertOne) SetKey

SetKey sets the "key" field.

func (*ProcDefUpsertOne) SetName

func (u *ProcDefUpsertOne) SetName(v string) *ProcDefUpsertOne

SetName sets the "name" field.

func (*ProcDefUpsertOne) SetResourceID

func (u *ProcDefUpsertOne) SetResourceID(v int) *ProcDefUpsertOne

SetResourceID sets the "resource_id" field.

func (*ProcDefUpsertOne) SetResourceKey

func (u *ProcDefUpsertOne) SetResourceKey(v string) *ProcDefUpsertOne

SetResourceKey sets the "resource_key" field.

func (*ProcDefUpsertOne) SetRevision

func (u *ProcDefUpsertOne) SetRevision(v int32) *ProcDefUpsertOne

SetRevision sets the "revision" field.

func (*ProcDefUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*ProcDefUpsertOne) SetUpdatedAt

func (u *ProcDefUpsertOne) SetUpdatedAt(v time.Time) *ProcDefUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*ProcDefUpsertOne) SetUpdatedBy

func (u *ProcDefUpsertOne) SetUpdatedBy(v int) *ProcDefUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*ProcDefUpsertOne) SetVersion

func (u *ProcDefUpsertOne) SetVersion(v int32) *ProcDefUpsertOne

SetVersion sets the "version" field.

func (*ProcDefUpsertOne) SetVersionTag

func (u *ProcDefUpsertOne) SetVersionTag(v string) *ProcDefUpsertOne

SetVersionTag sets the "version_tag" field.

func (*ProcDefUpsertOne) Update

func (u *ProcDefUpsertOne) Update(set func(*ProcDefUpsert)) *ProcDefUpsertOne

Update allows overriding fields `UPDATE` values. See the ProcDefCreate.OnConflict documentation for more info.

func (*ProcDefUpsertOne) UpdateCategory

func (u *ProcDefUpsertOne) UpdateCategory() *ProcDefUpsertOne

UpdateCategory sets the "category" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateKey

func (u *ProcDefUpsertOne) UpdateKey() *ProcDefUpsertOne

UpdateKey sets the "key" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateName

func (u *ProcDefUpsertOne) UpdateName() *ProcDefUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateNewValues

func (u *ProcDefUpsertOne) UpdateNewValues() *ProcDefUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ProcDef.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(procdef.FieldID)
		}),
	).
	Exec(ctx)

func (*ProcDefUpsertOne) UpdateResourceID

func (u *ProcDefUpsertOne) UpdateResourceID() *ProcDefUpsertOne

UpdateResourceID sets the "resource_id" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateResourceKey

func (u *ProcDefUpsertOne) UpdateResourceKey() *ProcDefUpsertOne

UpdateResourceKey sets the "resource_key" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateRevision

func (u *ProcDefUpsertOne) UpdateRevision() *ProcDefUpsertOne

UpdateRevision sets the "revision" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateStatus

func (u *ProcDefUpsertOne) UpdateStatus() *ProcDefUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateUpdatedAt

func (u *ProcDefUpsertOne) UpdateUpdatedAt() *ProcDefUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateUpdatedBy

func (u *ProcDefUpsertOne) UpdateUpdatedBy() *ProcDefUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateVersion

func (u *ProcDefUpsertOne) UpdateVersion() *ProcDefUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

func (*ProcDefUpsertOne) UpdateVersionTag

func (u *ProcDefUpsertOne) UpdateVersionTag() *ProcDefUpsertOne

UpdateVersionTag sets the "version_tag" field to the value that was provided on create.

type ProcDefWhereInput

type ProcDefWhereInput struct {
	Predicates []predicate.ProcDef  `json:"-"`
	Not        *ProcDefWhereInput   `json:"not,omitempty"`
	Or         []*ProcDefWhereInput `json:"or,omitempty"`
	And        []*ProcDefWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "deployment_id" field predicates.
	DeploymentID      *int  `json:"deploymentID,omitempty"`
	DeploymentIDNEQ   *int  `json:"deploymentIDNEQ,omitempty"`
	DeploymentIDIn    []int `json:"deploymentIDIn,omitempty"`
	DeploymentIDNotIn []int `json:"deploymentIDNotIn,omitempty"`

	// "app_id" field predicates.
	AppID      *int  `json:"appID,omitempty"`
	AppIDNEQ   *int  `json:"appIDNEQ,omitempty"`
	AppIDIn    []int `json:"appIDIn,omitempty"`
	AppIDNotIn []int `json:"appIDNotIn,omitempty"`
	AppIDGT    *int  `json:"appIDGT,omitempty"`
	AppIDGTE   *int  `json:"appIDGTE,omitempty"`
	AppIDLT    *int  `json:"appIDLT,omitempty"`
	AppIDLTE   *int  `json:"appIDLTE,omitempty"`

	// "category" field predicates.
	Category             *string  `json:"category,omitempty"`
	CategoryNEQ          *string  `json:"categoryNEQ,omitempty"`
	CategoryIn           []string `json:"categoryIn,omitempty"`
	CategoryNotIn        []string `json:"categoryNotIn,omitempty"`
	CategoryGT           *string  `json:"categoryGT,omitempty"`
	CategoryGTE          *string  `json:"categoryGTE,omitempty"`
	CategoryLT           *string  `json:"categoryLT,omitempty"`
	CategoryLTE          *string  `json:"categoryLTE,omitempty"`
	CategoryContains     *string  `json:"categoryContains,omitempty"`
	CategoryHasPrefix    *string  `json:"categoryHasPrefix,omitempty"`
	CategoryHasSuffix    *string  `json:"categoryHasSuffix,omitempty"`
	CategoryIsNil        bool     `json:"categoryIsNil,omitempty"`
	CategoryNotNil       bool     `json:"categoryNotNil,omitempty"`
	CategoryEqualFold    *string  `json:"categoryEqualFold,omitempty"`
	CategoryContainsFold *string  `json:"categoryContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "version" field predicates.
	Version       *int32  `json:"version,omitempty"`
	VersionNEQ    *int32  `json:"versionNEQ,omitempty"`
	VersionIn     []int32 `json:"versionIn,omitempty"`
	VersionNotIn  []int32 `json:"versionNotIn,omitempty"`
	VersionGT     *int32  `json:"versionGT,omitempty"`
	VersionGTE    *int32  `json:"versionGTE,omitempty"`
	VersionLT     *int32  `json:"versionLT,omitempty"`
	VersionLTE    *int32  `json:"versionLTE,omitempty"`
	VersionIsNil  bool    `json:"versionIsNil,omitempty"`
	VersionNotNil bool    `json:"versionNotNil,omitempty"`

	// "revision" field predicates.
	Revision       *int32  `json:"revision,omitempty"`
	RevisionNEQ    *int32  `json:"revisionNEQ,omitempty"`
	RevisionIn     []int32 `json:"revisionIn,omitempty"`
	RevisionNotIn  []int32 `json:"revisionNotIn,omitempty"`
	RevisionGT     *int32  `json:"revisionGT,omitempty"`
	RevisionGTE    *int32  `json:"revisionGTE,omitempty"`
	RevisionLT     *int32  `json:"revisionLT,omitempty"`
	RevisionLTE    *int32  `json:"revisionLTE,omitempty"`
	RevisionIsNil  bool    `json:"revisionIsNil,omitempty"`
	RevisionNotNil bool    `json:"revisionNotNil,omitempty"`

	// "version_tag" field predicates.
	VersionTag             *string  `json:"versionTag,omitempty"`
	VersionTagNEQ          *string  `json:"versionTagNEQ,omitempty"`
	VersionTagIn           []string `json:"versionTagIn,omitempty"`
	VersionTagNotIn        []string `json:"versionTagNotIn,omitempty"`
	VersionTagGT           *string  `json:"versionTagGT,omitempty"`
	VersionTagGTE          *string  `json:"versionTagGTE,omitempty"`
	VersionTagLT           *string  `json:"versionTagLT,omitempty"`
	VersionTagLTE          *string  `json:"versionTagLTE,omitempty"`
	VersionTagContains     *string  `json:"versionTagContains,omitempty"`
	VersionTagHasPrefix    *string  `json:"versionTagHasPrefix,omitempty"`
	VersionTagHasSuffix    *string  `json:"versionTagHasSuffix,omitempty"`
	VersionTagIsNil        bool     `json:"versionTagIsNil,omitempty"`
	VersionTagNotNil       bool     `json:"versionTagNotNil,omitempty"`
	VersionTagEqualFold    *string  `json:"versionTagEqualFold,omitempty"`
	VersionTagContainsFold *string  `json:"versionTagContainsFold,omitempty"`

	// "status" field predicates.
	Status      *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ   *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn    []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn []typex.SimpleStatus `json:"statusNotIn,omitempty"`

	// "deployment" edge predicates.
	HasDeployment     *bool                   `json:"hasDeployment,omitempty"`
	HasDeploymentWith []*DeploymentWhereInput `json:"hasDeploymentWith,omitempty"`

	// "proc_instances" edge predicates.
	HasProcInstances     *bool                 `json:"hasProcInstances,omitempty"`
	HasProcInstancesWith []*ProcInstWhereInput `json:"hasProcInstancesWith,omitempty"`
}

ProcDefWhereInput represents a where input for filtering ProcDef queries.

func (*ProcDefWhereInput) AddPredicates

func (i *ProcDefWhereInput) AddPredicates(predicates ...predicate.ProcDef)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ProcDefWhereInput) Filter

Filter applies the ProcDefWhereInput filter on the ProcDefQuery builder.

func (*ProcDefWhereInput) P

P returns a predicate for filtering procdefs. An error is returned if the input is empty or invalid.

type ProcDefs

type ProcDefs []*ProcDef

ProcDefs is a parsable slice of ProcDef.

type ProcInst

type ProcInst struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 流程定义ID
	ProcDefID int `json:"proc_def_id,omitempty"`
	// 所属应用ID
	AppID int `json:"app_id,omitempty"`
	// 业务主键
	BusinessKey string `json:"business_key,omitempty"`
	// 开始时间
	StartTime time.Time `json:"start_time,omitempty"`
	// 结束时间
	EndTime time.Time `json:"end_time,omitempty"`
	// 持续时间
	Duration int `json:"duration,omitempty"`
	// 发起人ID/名称
	StartUserID int `json:"start_user_id,omitempty"`
	// 父流程实例ID
	SupperInstanceID int `json:"supper_instance_id,omitempty"`
	// 根流程实例ID
	RootInstanceID int `json:"root_instance_id,omitempty"`
	// 删除时间
	DeletedTime time.Time `json:"deleted_time,omitempty"`
	// 删除原因
	DeletedReason string `json:"deleted_reason,omitempty"`
	// 状态
	Status procinst.Status `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProcInstQuery when eager-loading is set.
	Edges ProcInstEdges `json:"edges"`
	// contains filtered or unexported fields
}

ProcInst is the model entity for the ProcInst schema.

func (*ProcInst) GlobalID

func (pi *ProcInst) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given ProcInst node.

func (*ProcInst) IsNode

func (*ProcInst) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*ProcInst) NamedTasks

func (pi *ProcInst) NamedTasks(name string) ([]*Task, error)

NamedTasks returns the Tasks named value or an error if the edge was not loaded in eager-loading with this name.

func (*ProcInst) ProcDef

func (pi *ProcInst) ProcDef(ctx context.Context) (*ProcDef, error)

func (*ProcInst) QueryProcDef

func (pi *ProcInst) QueryProcDef() *ProcDefQuery

QueryProcDef queries the "proc_def" edge of the ProcInst entity.

func (*ProcInst) QueryTasks

func (pi *ProcInst) QueryTasks() *TaskQuery

QueryTasks queries the "tasks" edge of the ProcInst entity.

func (*ProcInst) String

func (pi *ProcInst) String() string

String implements the fmt.Stringer.

func (*ProcInst) Tasks

func (pi *ProcInst) Tasks(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *TaskWhereInput,
) (*TaskConnection, error)

func (*ProcInst) ToEdge

func (pi *ProcInst) ToEdge(order *ProcInstOrder) *ProcInstEdge

ToEdge converts ProcInst into ProcInstEdge.

func (*ProcInst) Unwrap

func (pi *ProcInst) Unwrap() *ProcInst

Unwrap unwraps the ProcInst entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*ProcInst) Update

func (pi *ProcInst) Update() *ProcInstUpdateOne

Update returns a builder for updating this ProcInst. Note that you need to call ProcInst.Unwrap() before calling this method if this ProcInst was returned from a transaction, and the transaction was committed or rolled back.

func (*ProcInst) Value

func (pi *ProcInst) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ProcInst. This includes values selected through modifiers, order, etc.

type ProcInstClient

type ProcInstClient struct {
	// contains filtered or unexported fields
}

ProcInstClient is a client for the ProcInst schema.

func NewProcInstClient

func NewProcInstClient(c config) *ProcInstClient

NewProcInstClient returns a client for the ProcInst from the given config.

func (*ProcInstClient) Create

func (c *ProcInstClient) Create() *ProcInstCreate

Create returns a builder for creating a ProcInst entity.

func (*ProcInstClient) CreateBulk

func (c *ProcInstClient) CreateBulk(builders ...*ProcInstCreate) *ProcInstCreateBulk

CreateBulk returns a builder for creating a bulk of ProcInst entities.

func (*ProcInstClient) Delete

func (c *ProcInstClient) Delete() *ProcInstDelete

Delete returns a delete builder for ProcInst.

func (*ProcInstClient) DeleteOne

func (c *ProcInstClient) DeleteOne(pi *ProcInst) *ProcInstDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProcInstClient) DeleteOneID

func (c *ProcInstClient) DeleteOneID(id int) *ProcInstDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProcInstClient) Get

func (c *ProcInstClient) Get(ctx context.Context, id int) (*ProcInst, error)

Get returns a ProcInst entity by its id.

func (*ProcInstClient) GetX

func (c *ProcInstClient) GetX(ctx context.Context, id int) *ProcInst

GetX is like Get, but panics if an error occurs.

func (*ProcInstClient) Hooks

func (c *ProcInstClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProcInstClient) Intercept

func (c *ProcInstClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `procinst.Intercept(f(g(h())))`.

func (*ProcInstClient) Interceptors

func (c *ProcInstClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProcInstClient) Query

func (c *ProcInstClient) Query() *ProcInstQuery

Query returns a query builder for ProcInst.

func (*ProcInstClient) QueryProcDef

func (c *ProcInstClient) QueryProcDef(pi *ProcInst) *ProcDefQuery

QueryProcDef queries the proc_def edge of a ProcInst.

func (*ProcInstClient) QueryTasks

func (c *ProcInstClient) QueryTasks(pi *ProcInst) *TaskQuery

QueryTasks queries the tasks edge of a ProcInst.

func (*ProcInstClient) Update

func (c *ProcInstClient) Update() *ProcInstUpdate

Update returns an update builder for ProcInst.

func (*ProcInstClient) UpdateOne

func (c *ProcInstClient) UpdateOne(pi *ProcInst) *ProcInstUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProcInstClient) UpdateOneID

func (c *ProcInstClient) UpdateOneID(id int) *ProcInstUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProcInstClient) Use

func (c *ProcInstClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `procinst.Hooks(f(g(h())))`.

type ProcInstConnection

type ProcInstConnection struct {
	Edges      []*ProcInstEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

ProcInstConnection is the connection containing edges to ProcInst.

type ProcInstCreate

type ProcInstCreate struct {
	// contains filtered or unexported fields
}

ProcInstCreate is the builder for creating a ProcInst entity.

func (*ProcInstCreate) AddTaskIDs

func (pic *ProcInstCreate) AddTaskIDs(ids ...int) *ProcInstCreate

AddTaskIDs adds the "tasks" edge to the Task entity by IDs.

func (*ProcInstCreate) AddTasks

func (pic *ProcInstCreate) AddTasks(t ...*Task) *ProcInstCreate

AddTasks adds the "tasks" edges to the Task entity.

func (*ProcInstCreate) Exec

func (pic *ProcInstCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcInstCreate) ExecX

func (pic *ProcInstCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstCreate) Mutation

func (pic *ProcInstCreate) Mutation() *ProcInstMutation

Mutation returns the ProcInstMutation object of the builder.

func (*ProcInstCreate) OnConflict

func (pic *ProcInstCreate) OnConflict(opts ...sql.ConflictOption) *ProcInstUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ProcInst.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProcInstUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*ProcInstCreate) OnConflictColumns

func (pic *ProcInstCreate) OnConflictColumns(columns ...string) *ProcInstUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ProcInst.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProcInstCreate) Save

func (pic *ProcInstCreate) Save(ctx context.Context) (*ProcInst, error)

Save creates the ProcInst in the database.

func (*ProcInstCreate) SaveX

func (pic *ProcInstCreate) SaveX(ctx context.Context) *ProcInst

SaveX calls Save and panics if Save returns an error.

func (*ProcInstCreate) SetAppID

func (pic *ProcInstCreate) SetAppID(i int) *ProcInstCreate

SetAppID sets the "app_id" field.

func (*ProcInstCreate) SetBusinessKey

func (pic *ProcInstCreate) SetBusinessKey(s string) *ProcInstCreate

SetBusinessKey sets the "business_key" field.

func (*ProcInstCreate) SetCreatedAt

func (pic *ProcInstCreate) SetCreatedAt(t time.Time) *ProcInstCreate

SetCreatedAt sets the "created_at" field.

func (*ProcInstCreate) SetCreatedBy

func (pic *ProcInstCreate) SetCreatedBy(i int) *ProcInstCreate

SetCreatedBy sets the "created_by" field.

func (*ProcInstCreate) SetDeletedReason

func (pic *ProcInstCreate) SetDeletedReason(s string) *ProcInstCreate

SetDeletedReason sets the "deleted_reason" field.

func (*ProcInstCreate) SetDeletedTime

func (pic *ProcInstCreate) SetDeletedTime(t time.Time) *ProcInstCreate

SetDeletedTime sets the "deleted_time" field.

func (*ProcInstCreate) SetDuration

func (pic *ProcInstCreate) SetDuration(i int) *ProcInstCreate

SetDuration sets the "duration" field.

func (*ProcInstCreate) SetEndTime

func (pic *ProcInstCreate) SetEndTime(t time.Time) *ProcInstCreate

SetEndTime sets the "end_time" field.

func (*ProcInstCreate) SetID

func (pic *ProcInstCreate) SetID(i int) *ProcInstCreate

SetID sets the "id" field.

func (*ProcInstCreate) SetNillableCreatedAt

func (pic *ProcInstCreate) SetNillableCreatedAt(t *time.Time) *ProcInstCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProcInstCreate) SetNillableDeletedReason

func (pic *ProcInstCreate) SetNillableDeletedReason(s *string) *ProcInstCreate

SetNillableDeletedReason sets the "deleted_reason" field if the given value is not nil.

func (*ProcInstCreate) SetNillableDeletedTime

func (pic *ProcInstCreate) SetNillableDeletedTime(t *time.Time) *ProcInstCreate

SetNillableDeletedTime sets the "deleted_time" field if the given value is not nil.

func (*ProcInstCreate) SetNillableDuration

func (pic *ProcInstCreate) SetNillableDuration(i *int) *ProcInstCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*ProcInstCreate) SetNillableEndTime

func (pic *ProcInstCreate) SetNillableEndTime(t *time.Time) *ProcInstCreate

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*ProcInstCreate) SetNillableID

func (pic *ProcInstCreate) SetNillableID(i *int) *ProcInstCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ProcInstCreate) SetNillableRootInstanceID

func (pic *ProcInstCreate) SetNillableRootInstanceID(i *int) *ProcInstCreate

SetNillableRootInstanceID sets the "root_instance_id" field if the given value is not nil.

func (*ProcInstCreate) SetNillableStartTime

func (pic *ProcInstCreate) SetNillableStartTime(t *time.Time) *ProcInstCreate

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*ProcInstCreate) SetNillableSupperInstanceID

func (pic *ProcInstCreate) SetNillableSupperInstanceID(i *int) *ProcInstCreate

SetNillableSupperInstanceID sets the "supper_instance_id" field if the given value is not nil.

func (*ProcInstCreate) SetNillableUpdatedAt

func (pic *ProcInstCreate) SetNillableUpdatedAt(t *time.Time) *ProcInstCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProcInstCreate) SetNillableUpdatedBy

func (pic *ProcInstCreate) SetNillableUpdatedBy(i *int) *ProcInstCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*ProcInstCreate) SetProcDef

func (pic *ProcInstCreate) SetProcDef(p *ProcDef) *ProcInstCreate

SetProcDef sets the "proc_def" edge to the ProcDef entity.

func (*ProcInstCreate) SetProcDefID

func (pic *ProcInstCreate) SetProcDefID(i int) *ProcInstCreate

SetProcDefID sets the "proc_def_id" field.

func (*ProcInstCreate) SetRootInstanceID

func (pic *ProcInstCreate) SetRootInstanceID(i int) *ProcInstCreate

SetRootInstanceID sets the "root_instance_id" field.

func (*ProcInstCreate) SetStartTime

func (pic *ProcInstCreate) SetStartTime(t time.Time) *ProcInstCreate

SetStartTime sets the "start_time" field.

func (*ProcInstCreate) SetStartUserID

func (pic *ProcInstCreate) SetStartUserID(i int) *ProcInstCreate

SetStartUserID sets the "start_user_id" field.

func (*ProcInstCreate) SetStatus

func (pic *ProcInstCreate) SetStatus(pr procinst.Status) *ProcInstCreate

SetStatus sets the "status" field.

func (*ProcInstCreate) SetSupperInstanceID

func (pic *ProcInstCreate) SetSupperInstanceID(i int) *ProcInstCreate

SetSupperInstanceID sets the "supper_instance_id" field.

func (*ProcInstCreate) SetTenantID

func (pic *ProcInstCreate) SetTenantID(i int) *ProcInstCreate

SetTenantID sets the "tenant_id" field.

func (*ProcInstCreate) SetUpdatedAt

func (pic *ProcInstCreate) SetUpdatedAt(t time.Time) *ProcInstCreate

SetUpdatedAt sets the "updated_at" field.

func (*ProcInstCreate) SetUpdatedBy

func (pic *ProcInstCreate) SetUpdatedBy(i int) *ProcInstCreate

SetUpdatedBy sets the "updated_by" field.

type ProcInstCreateBulk

type ProcInstCreateBulk struct {
	// contains filtered or unexported fields
}

ProcInstCreateBulk is the builder for creating many ProcInst entities in bulk.

func (*ProcInstCreateBulk) Exec

func (picb *ProcInstCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcInstCreateBulk) ExecX

func (picb *ProcInstCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstCreateBulk) OnConflict

func (picb *ProcInstCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProcInstUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ProcInst.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProcInstUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*ProcInstCreateBulk) OnConflictColumns

func (picb *ProcInstCreateBulk) OnConflictColumns(columns ...string) *ProcInstUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ProcInst.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProcInstCreateBulk) Save

func (picb *ProcInstCreateBulk) Save(ctx context.Context) ([]*ProcInst, error)

Save creates the ProcInst entities in the database.

func (*ProcInstCreateBulk) SaveX

func (picb *ProcInstCreateBulk) SaveX(ctx context.Context) []*ProcInst

SaveX is like Save, but panics if an error occurs.

type ProcInstDelete

type ProcInstDelete struct {
	// contains filtered or unexported fields
}

ProcInstDelete is the builder for deleting a ProcInst entity.

func (*ProcInstDelete) Exec

func (pid *ProcInstDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProcInstDelete) ExecX

func (pid *ProcInstDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstDelete) Where

func (pid *ProcInstDelete) Where(ps ...predicate.ProcInst) *ProcInstDelete

Where appends a list predicates to the ProcInstDelete builder.

type ProcInstDeleteOne

type ProcInstDeleteOne struct {
	// contains filtered or unexported fields
}

ProcInstDeleteOne is the builder for deleting a single ProcInst entity.

func (*ProcInstDeleteOne) Exec

func (pido *ProcInstDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProcInstDeleteOne) ExecX

func (pido *ProcInstDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstDeleteOne) Where

Where appends a list predicates to the ProcInstDelete builder.

type ProcInstEdge

type ProcInstEdge struct {
	Node   *ProcInst `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

ProcInstEdge is the edge representation of ProcInst.

type ProcInstEdges

type ProcInstEdges struct {
	// 流程定义
	ProcDef *ProcDef `json:"proc_def,omitempty"`
	// 任务列表
	Tasks []*Task `json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

ProcInstEdges holds the relations/edges for other nodes in the graph.

func (ProcInstEdges) ProcDefOrErr

func (e ProcInstEdges) ProcDefOrErr() (*ProcDef, error)

ProcDefOrErr returns the ProcDef value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ProcInstEdges) TasksOrErr

func (e ProcInstEdges) TasksOrErr() ([]*Task, error)

TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.

type ProcInstGroupBy

type ProcInstGroupBy struct {
	// contains filtered or unexported fields
}

ProcInstGroupBy is the group-by builder for ProcInst entities.

func (*ProcInstGroupBy) Aggregate

func (pigb *ProcInstGroupBy) Aggregate(fns ...AggregateFunc) *ProcInstGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProcInstGroupBy) Bool

func (s *ProcInstGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) BoolX

func (s *ProcInstGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProcInstGroupBy) Bools

func (s *ProcInstGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) BoolsX

func (s *ProcInstGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProcInstGroupBy) Float64

func (s *ProcInstGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) Float64X

func (s *ProcInstGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProcInstGroupBy) Float64s

func (s *ProcInstGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) Float64sX

func (s *ProcInstGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProcInstGroupBy) Int

func (s *ProcInstGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) IntX

func (s *ProcInstGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProcInstGroupBy) Ints

func (s *ProcInstGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) IntsX

func (s *ProcInstGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProcInstGroupBy) Scan

func (pigb *ProcInstGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProcInstGroupBy) ScanX

func (s *ProcInstGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProcInstGroupBy) String

func (s *ProcInstGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) StringX

func (s *ProcInstGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProcInstGroupBy) Strings

func (s *ProcInstGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProcInstGroupBy) StringsX

func (s *ProcInstGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProcInstMutation

type ProcInstMutation struct {
	// contains filtered or unexported fields
}

ProcInstMutation represents an operation that mutates the ProcInst nodes in the graph.

func (*ProcInstMutation) AddAppID

func (m *ProcInstMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*ProcInstMutation) AddCreatedBy

func (m *ProcInstMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*ProcInstMutation) AddDuration

func (m *ProcInstMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*ProcInstMutation) AddField

func (m *ProcInstMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProcInstMutation) AddRootInstanceID

func (m *ProcInstMutation) AddRootInstanceID(i int)

AddRootInstanceID adds i to the "root_instance_id" field.

func (*ProcInstMutation) AddStartUserID

func (m *ProcInstMutation) AddStartUserID(i int)

AddStartUserID adds i to the "start_user_id" field.

func (*ProcInstMutation) AddSupperInstanceID

func (m *ProcInstMutation) AddSupperInstanceID(i int)

AddSupperInstanceID adds i to the "supper_instance_id" field.

func (*ProcInstMutation) AddTaskIDs

func (m *ProcInstMutation) AddTaskIDs(ids ...int)

AddTaskIDs adds the "tasks" edge to the Task entity by ids.

func (*ProcInstMutation) AddTenantID

func (m *ProcInstMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*ProcInstMutation) AddUpdatedBy

func (m *ProcInstMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*ProcInstMutation) AddedAppID

func (m *ProcInstMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*ProcInstMutation) AddedCreatedBy

func (m *ProcInstMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*ProcInstMutation) AddedDuration

func (m *ProcInstMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*ProcInstMutation) AddedEdges

func (m *ProcInstMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProcInstMutation) AddedField

func (m *ProcInstMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProcInstMutation) AddedFields

func (m *ProcInstMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProcInstMutation) AddedIDs

func (m *ProcInstMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProcInstMutation) AddedRootInstanceID

func (m *ProcInstMutation) AddedRootInstanceID() (r int, exists bool)

AddedRootInstanceID returns the value that was added to the "root_instance_id" field in this mutation.

func (*ProcInstMutation) AddedStartUserID

func (m *ProcInstMutation) AddedStartUserID() (r int, exists bool)

AddedStartUserID returns the value that was added to the "start_user_id" field in this mutation.

func (*ProcInstMutation) AddedSupperInstanceID

func (m *ProcInstMutation) AddedSupperInstanceID() (r int, exists bool)

AddedSupperInstanceID returns the value that was added to the "supper_instance_id" field in this mutation.

func (*ProcInstMutation) AddedTenantID

func (m *ProcInstMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*ProcInstMutation) AddedUpdatedBy

func (m *ProcInstMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*ProcInstMutation) AppID

func (m *ProcInstMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*ProcInstMutation) BusinessKey

func (m *ProcInstMutation) BusinessKey() (r string, exists bool)

BusinessKey returns the value of the "business_key" field in the mutation.

func (*ProcInstMutation) ClearDeletedReason

func (m *ProcInstMutation) ClearDeletedReason()

ClearDeletedReason clears the value of the "deleted_reason" field.

func (*ProcInstMutation) ClearDeletedTime

func (m *ProcInstMutation) ClearDeletedTime()

ClearDeletedTime clears the value of the "deleted_time" field.

func (*ProcInstMutation) ClearDuration

func (m *ProcInstMutation) ClearDuration()

ClearDuration clears the value of the "duration" field.

func (*ProcInstMutation) ClearEdge

func (m *ProcInstMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ProcInstMutation) ClearEndTime

func (m *ProcInstMutation) ClearEndTime()

ClearEndTime clears the value of the "end_time" field.

func (*ProcInstMutation) ClearField

func (m *ProcInstMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProcInstMutation) ClearProcDef

func (m *ProcInstMutation) ClearProcDef()

ClearProcDef clears the "proc_def" edge to the ProcDef entity.

func (*ProcInstMutation) ClearRootInstanceID

func (m *ProcInstMutation) ClearRootInstanceID()

ClearRootInstanceID clears the value of the "root_instance_id" field.

func (*ProcInstMutation) ClearSupperInstanceID

func (m *ProcInstMutation) ClearSupperInstanceID()

ClearSupperInstanceID clears the value of the "supper_instance_id" field.

func (*ProcInstMutation) ClearTasks

func (m *ProcInstMutation) ClearTasks()

ClearTasks clears the "tasks" edge to the Task entity.

func (*ProcInstMutation) ClearUpdatedAt

func (m *ProcInstMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcInstMutation) ClearUpdatedBy

func (m *ProcInstMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcInstMutation) ClearedEdges

func (m *ProcInstMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProcInstMutation) ClearedFields

func (m *ProcInstMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProcInstMutation) Client

func (m ProcInstMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ProcInstMutation) CreatedAt

func (m *ProcInstMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ProcInstMutation) CreatedBy

func (m *ProcInstMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*ProcInstMutation) DeletedReason

func (m *ProcInstMutation) DeletedReason() (r string, exists bool)

DeletedReason returns the value of the "deleted_reason" field in the mutation.

func (*ProcInstMutation) DeletedReasonCleared

func (m *ProcInstMutation) DeletedReasonCleared() bool

DeletedReasonCleared returns if the "deleted_reason" field was cleared in this mutation.

func (*ProcInstMutation) DeletedTime

func (m *ProcInstMutation) DeletedTime() (r time.Time, exists bool)

DeletedTime returns the value of the "deleted_time" field in the mutation.

func (*ProcInstMutation) DeletedTimeCleared

func (m *ProcInstMutation) DeletedTimeCleared() bool

DeletedTimeCleared returns if the "deleted_time" field was cleared in this mutation.

func (*ProcInstMutation) Duration

func (m *ProcInstMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*ProcInstMutation) DurationCleared

func (m *ProcInstMutation) DurationCleared() bool

DurationCleared returns if the "duration" field was cleared in this mutation.

func (*ProcInstMutation) EdgeCleared

func (m *ProcInstMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProcInstMutation) EndTime

func (m *ProcInstMutation) EndTime() (r time.Time, exists bool)

EndTime returns the value of the "end_time" field in the mutation.

func (*ProcInstMutation) EndTimeCleared

func (m *ProcInstMutation) EndTimeCleared() bool

EndTimeCleared returns if the "end_time" field was cleared in this mutation.

func (*ProcInstMutation) Field

func (m *ProcInstMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProcInstMutation) FieldCleared

func (m *ProcInstMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProcInstMutation) Fields

func (m *ProcInstMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ProcInstMutation) ID

func (m *ProcInstMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ProcInstMutation) IDs

func (m *ProcInstMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ProcInstMutation) OldAppID

func (m *ProcInstMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldBusinessKey

func (m *ProcInstMutation) OldBusinessKey(ctx context.Context) (v string, err error)

OldBusinessKey returns the old "business_key" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldCreatedAt

func (m *ProcInstMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldCreatedBy

func (m *ProcInstMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldDeletedReason

func (m *ProcInstMutation) OldDeletedReason(ctx context.Context) (v string, err error)

OldDeletedReason returns the old "deleted_reason" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldDeletedTime

func (m *ProcInstMutation) OldDeletedTime(ctx context.Context) (v time.Time, err error)

OldDeletedTime returns the old "deleted_time" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldDuration

func (m *ProcInstMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldEndTime

func (m *ProcInstMutation) OldEndTime(ctx context.Context) (v time.Time, err error)

OldEndTime returns the old "end_time" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldField

func (m *ProcInstMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ProcInstMutation) OldProcDefID

func (m *ProcInstMutation) OldProcDefID(ctx context.Context) (v int, err error)

OldProcDefID returns the old "proc_def_id" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldRootInstanceID

func (m *ProcInstMutation) OldRootInstanceID(ctx context.Context) (v int, err error)

OldRootInstanceID returns the old "root_instance_id" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldStartTime

func (m *ProcInstMutation) OldStartTime(ctx context.Context) (v time.Time, err error)

OldStartTime returns the old "start_time" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldStartUserID

func (m *ProcInstMutation) OldStartUserID(ctx context.Context) (v int, err error)

OldStartUserID returns the old "start_user_id" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldStatus

func (m *ProcInstMutation) OldStatus(ctx context.Context) (v procinst.Status, err error)

OldStatus returns the old "status" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldSupperInstanceID

func (m *ProcInstMutation) OldSupperInstanceID(ctx context.Context) (v int, err error)

OldSupperInstanceID returns the old "supper_instance_id" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldTenantID

func (m *ProcInstMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldUpdatedAt

func (m *ProcInstMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) OldUpdatedBy

func (m *ProcInstMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the ProcInst entity. If the ProcInst object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProcInstMutation) Op

func (m *ProcInstMutation) Op() Op

Op returns the operation name.

func (*ProcInstMutation) ProcDefCleared

func (m *ProcInstMutation) ProcDefCleared() bool

ProcDefCleared reports if the "proc_def" edge to the ProcDef entity was cleared.

func (*ProcInstMutation) ProcDefID

func (m *ProcInstMutation) ProcDefID() (r int, exists bool)

ProcDefID returns the value of the "proc_def_id" field in the mutation.

func (*ProcInstMutation) ProcDefIDs

func (m *ProcInstMutation) ProcDefIDs() (ids []int)

ProcDefIDs returns the "proc_def" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProcDefID instead. It exists only for internal usage by the builders.

func (*ProcInstMutation) RemoveTaskIDs

func (m *ProcInstMutation) RemoveTaskIDs(ids ...int)

RemoveTaskIDs removes the "tasks" edge to the Task entity by IDs.

func (*ProcInstMutation) RemovedEdges

func (m *ProcInstMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProcInstMutation) RemovedIDs

func (m *ProcInstMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ProcInstMutation) RemovedTasksIDs

func (m *ProcInstMutation) RemovedTasksIDs() (ids []int)

RemovedTasks returns the removed IDs of the "tasks" edge to the Task entity.

func (*ProcInstMutation) ResetAppID

func (m *ProcInstMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*ProcInstMutation) ResetBusinessKey

func (m *ProcInstMutation) ResetBusinessKey()

ResetBusinessKey resets all changes to the "business_key" field.

func (*ProcInstMutation) ResetCreatedAt

func (m *ProcInstMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ProcInstMutation) ResetCreatedBy

func (m *ProcInstMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*ProcInstMutation) ResetDeletedReason

func (m *ProcInstMutation) ResetDeletedReason()

ResetDeletedReason resets all changes to the "deleted_reason" field.

func (*ProcInstMutation) ResetDeletedTime

func (m *ProcInstMutation) ResetDeletedTime()

ResetDeletedTime resets all changes to the "deleted_time" field.

func (*ProcInstMutation) ResetDuration

func (m *ProcInstMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*ProcInstMutation) ResetEdge

func (m *ProcInstMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ProcInstMutation) ResetEndTime

func (m *ProcInstMutation) ResetEndTime()

ResetEndTime resets all changes to the "end_time" field.

func (*ProcInstMutation) ResetField

func (m *ProcInstMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProcInstMutation) ResetProcDef

func (m *ProcInstMutation) ResetProcDef()

ResetProcDef resets all changes to the "proc_def" edge.

func (*ProcInstMutation) ResetProcDefID

func (m *ProcInstMutation) ResetProcDefID()

ResetProcDefID resets all changes to the "proc_def_id" field.

func (*ProcInstMutation) ResetRootInstanceID

func (m *ProcInstMutation) ResetRootInstanceID()

ResetRootInstanceID resets all changes to the "root_instance_id" field.

func (*ProcInstMutation) ResetStartTime

func (m *ProcInstMutation) ResetStartTime()

ResetStartTime resets all changes to the "start_time" field.

func (*ProcInstMutation) ResetStartUserID

func (m *ProcInstMutation) ResetStartUserID()

ResetStartUserID resets all changes to the "start_user_id" field.

func (*ProcInstMutation) ResetStatus

func (m *ProcInstMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ProcInstMutation) ResetSupperInstanceID

func (m *ProcInstMutation) ResetSupperInstanceID()

ResetSupperInstanceID resets all changes to the "supper_instance_id" field.

func (*ProcInstMutation) ResetTasks

func (m *ProcInstMutation) ResetTasks()

ResetTasks resets all changes to the "tasks" edge.

func (*ProcInstMutation) ResetTenantID

func (m *ProcInstMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*ProcInstMutation) ResetUpdatedAt

func (m *ProcInstMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ProcInstMutation) ResetUpdatedBy

func (m *ProcInstMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*ProcInstMutation) RootInstanceID

func (m *ProcInstMutation) RootInstanceID() (r int, exists bool)

RootInstanceID returns the value of the "root_instance_id" field in the mutation.

func (*ProcInstMutation) RootInstanceIDCleared

func (m *ProcInstMutation) RootInstanceIDCleared() bool

RootInstanceIDCleared returns if the "root_instance_id" field was cleared in this mutation.

func (*ProcInstMutation) SetAppID

func (m *ProcInstMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*ProcInstMutation) SetBusinessKey

func (m *ProcInstMutation) SetBusinessKey(s string)

SetBusinessKey sets the "business_key" field.

func (*ProcInstMutation) SetCreatedAt

func (m *ProcInstMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ProcInstMutation) SetCreatedBy

func (m *ProcInstMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*ProcInstMutation) SetDeletedReason

func (m *ProcInstMutation) SetDeletedReason(s string)

SetDeletedReason sets the "deleted_reason" field.

func (*ProcInstMutation) SetDeletedTime

func (m *ProcInstMutation) SetDeletedTime(t time.Time)

SetDeletedTime sets the "deleted_time" field.

func (*ProcInstMutation) SetDuration

func (m *ProcInstMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*ProcInstMutation) SetEndTime

func (m *ProcInstMutation) SetEndTime(t time.Time)

SetEndTime sets the "end_time" field.

func (*ProcInstMutation) SetField

func (m *ProcInstMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProcInstMutation) SetID

func (m *ProcInstMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ProcInst entities.

func (*ProcInstMutation) SetOp

func (m *ProcInstMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProcInstMutation) SetProcDefID

func (m *ProcInstMutation) SetProcDefID(i int)

SetProcDefID sets the "proc_def_id" field.

func (*ProcInstMutation) SetRootInstanceID

func (m *ProcInstMutation) SetRootInstanceID(i int)

SetRootInstanceID sets the "root_instance_id" field.

func (*ProcInstMutation) SetStartTime

func (m *ProcInstMutation) SetStartTime(t time.Time)

SetStartTime sets the "start_time" field.

func (*ProcInstMutation) SetStartUserID

func (m *ProcInstMutation) SetStartUserID(i int)

SetStartUserID sets the "start_user_id" field.

func (*ProcInstMutation) SetStatus

func (m *ProcInstMutation) SetStatus(pr procinst.Status)

SetStatus sets the "status" field.

func (*ProcInstMutation) SetSupperInstanceID

func (m *ProcInstMutation) SetSupperInstanceID(i int)

SetSupperInstanceID sets the "supper_instance_id" field.

func (*ProcInstMutation) SetTenantID

func (m *ProcInstMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*ProcInstMutation) SetUpdatedAt

func (m *ProcInstMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ProcInstMutation) SetUpdatedBy

func (m *ProcInstMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*ProcInstMutation) StartTime

func (m *ProcInstMutation) StartTime() (r time.Time, exists bool)

StartTime returns the value of the "start_time" field in the mutation.

func (*ProcInstMutation) StartUserID

func (m *ProcInstMutation) StartUserID() (r int, exists bool)

StartUserID returns the value of the "start_user_id" field in the mutation.

func (*ProcInstMutation) Status

func (m *ProcInstMutation) Status() (r procinst.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ProcInstMutation) SupperInstanceID

func (m *ProcInstMutation) SupperInstanceID() (r int, exists bool)

SupperInstanceID returns the value of the "supper_instance_id" field in the mutation.

func (*ProcInstMutation) SupperInstanceIDCleared

func (m *ProcInstMutation) SupperInstanceIDCleared() bool

SupperInstanceIDCleared returns if the "supper_instance_id" field was cleared in this mutation.

func (*ProcInstMutation) TasksCleared

func (m *ProcInstMutation) TasksCleared() bool

TasksCleared reports if the "tasks" edge to the Task entity was cleared.

func (*ProcInstMutation) TasksIDs

func (m *ProcInstMutation) TasksIDs() (ids []int)

TasksIDs returns the "tasks" edge IDs in the mutation.

func (*ProcInstMutation) TenantID

func (m *ProcInstMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (ProcInstMutation) Tx

func (m ProcInstMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProcInstMutation) Type

func (m *ProcInstMutation) Type() string

Type returns the node type of this mutation (ProcInst).

func (*ProcInstMutation) UpdatedAt

func (m *ProcInstMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ProcInstMutation) UpdatedAtCleared

func (m *ProcInstMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*ProcInstMutation) UpdatedBy

func (m *ProcInstMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*ProcInstMutation) UpdatedByCleared

func (m *ProcInstMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*ProcInstMutation) Where

func (m *ProcInstMutation) Where(ps ...predicate.ProcInst)

Where appends a list predicates to the ProcInstMutation builder.

func (*ProcInstMutation) WhereP

func (m *ProcInstMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProcInstMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProcInstOrder

type ProcInstOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *ProcInstOrderField `json:"field"`
}

ProcInstOrder defines the ordering of ProcInst.

type ProcInstOrderField

type ProcInstOrderField struct {
	// Value extracts the ordering value from the given ProcInst.
	Value func(*ProcInst) (ent.Value, error)
	// contains filtered or unexported fields
}

ProcInstOrderField defines the ordering field of ProcInst.

func (ProcInstOrderField) MarshalGQL

func (f ProcInstOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ProcInstOrderField) String

func (f ProcInstOrderField) String() string

String implement fmt.Stringer interface.

func (*ProcInstOrderField) UnmarshalGQL

func (f *ProcInstOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ProcInstPaginateOption

type ProcInstPaginateOption func(*procinstPager) error

ProcInstPaginateOption enables pagination customization.

func WithProcInstFilter

func WithProcInstFilter(filter func(*ProcInstQuery) (*ProcInstQuery, error)) ProcInstPaginateOption

WithProcInstFilter configures pagination filter.

func WithProcInstOrder

func WithProcInstOrder(order *ProcInstOrder) ProcInstPaginateOption

WithProcInstOrder configures pagination ordering.

type ProcInstQuery

type ProcInstQuery struct {
	// contains filtered or unexported fields
}

ProcInstQuery is the builder for querying ProcInst entities.

func (*ProcInstQuery) Aggregate

func (piq *ProcInstQuery) Aggregate(fns ...AggregateFunc) *ProcInstSelect

Aggregate returns a ProcInstSelect configured with the given aggregations.

func (*ProcInstQuery) All

func (piq *ProcInstQuery) All(ctx context.Context) ([]*ProcInst, error)

All executes the query and returns a list of ProcInsts.

func (*ProcInstQuery) AllX

func (piq *ProcInstQuery) AllX(ctx context.Context) []*ProcInst

AllX is like All, but panics if an error occurs.

func (*ProcInstQuery) Clone

func (piq *ProcInstQuery) Clone() *ProcInstQuery

Clone returns a duplicate of the ProcInstQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProcInstQuery) CollectFields

func (pi *ProcInstQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProcInstQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ProcInstQuery) Count

func (piq *ProcInstQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProcInstQuery) CountX

func (piq *ProcInstQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProcInstQuery) Exist

func (piq *ProcInstQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProcInstQuery) ExistX

func (piq *ProcInstQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProcInstQuery) First

func (piq *ProcInstQuery) First(ctx context.Context) (*ProcInst, error)

First returns the first ProcInst entity from the query. Returns a *NotFoundError when no ProcInst was found.

func (*ProcInstQuery) FirstID

func (piq *ProcInstQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first ProcInst ID from the query. Returns a *NotFoundError when no ProcInst ID was found.

func (*ProcInstQuery) FirstIDX

func (piq *ProcInstQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProcInstQuery) FirstX

func (piq *ProcInstQuery) FirstX(ctx context.Context) *ProcInst

FirstX is like First, but panics if an error occurs.

func (*ProcInstQuery) GroupBy

func (piq *ProcInstQuery) GroupBy(field string, fields ...string) *ProcInstGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ProcInst.Query().
	GroupBy(procinst.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProcInstQuery) IDs

func (piq *ProcInstQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of ProcInst IDs.

func (*ProcInstQuery) IDsX

func (piq *ProcInstQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ProcInstQuery) Limit

func (piq *ProcInstQuery) Limit(limit int) *ProcInstQuery

Limit the number of records to be returned by this query.

func (*ProcInstQuery) Offset

func (piq *ProcInstQuery) Offset(offset int) *ProcInstQuery

Offset to start from.

func (*ProcInstQuery) Only

func (piq *ProcInstQuery) Only(ctx context.Context) (*ProcInst, error)

Only returns a single ProcInst entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProcInst entity is found. Returns a *NotFoundError when no ProcInst entities are found.

func (*ProcInstQuery) OnlyID

func (piq *ProcInstQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only ProcInst ID in the query. Returns a *NotSingularError when more than one ProcInst ID is found. Returns a *NotFoundError when no entities are found.

func (*ProcInstQuery) OnlyIDX

func (piq *ProcInstQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProcInstQuery) OnlyX

func (piq *ProcInstQuery) OnlyX(ctx context.Context) *ProcInst

OnlyX is like Only, but panics if an error occurs.

func (*ProcInstQuery) Order

func (piq *ProcInstQuery) Order(o ...procinst.OrderOption) *ProcInstQuery

Order specifies how the records should be ordered.

func (*ProcInstQuery) Paginate

func (pi *ProcInstQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ProcInstPaginateOption,
) (*ProcInstConnection, error)

Paginate executes the query and returns a relay based cursor connection to ProcInst.

func (*ProcInstQuery) QueryProcDef

func (piq *ProcInstQuery) QueryProcDef() *ProcDefQuery

QueryProcDef chains the current query on the "proc_def" edge.

func (*ProcInstQuery) QueryTasks

func (piq *ProcInstQuery) QueryTasks() *TaskQuery

QueryTasks chains the current query on the "tasks" edge.

func (*ProcInstQuery) Select

func (piq *ProcInstQuery) Select(fields ...string) *ProcInstSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.ProcInst.Query().
	Select(procinst.FieldCreatedBy).
	Scan(ctx, &v)

func (*ProcInstQuery) Unique

func (piq *ProcInstQuery) Unique(unique bool) *ProcInstQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ProcInstQuery) Where

func (piq *ProcInstQuery) Where(ps ...predicate.ProcInst) *ProcInstQuery

Where adds a new predicate for the ProcInstQuery builder.

func (*ProcInstQuery) WithNamedTasks

func (piq *ProcInstQuery) WithNamedTasks(name string, opts ...func(*TaskQuery)) *ProcInstQuery

WithNamedTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProcInstQuery) WithProcDef

func (piq *ProcInstQuery) WithProcDef(opts ...func(*ProcDefQuery)) *ProcInstQuery

WithProcDef tells the query-builder to eager-load the nodes that are connected to the "proc_def" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProcInstQuery) WithTasks

func (piq *ProcInstQuery) WithTasks(opts ...func(*TaskQuery)) *ProcInstQuery

WithTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge. The optional arguments are used to configure the query builder of the edge.

type ProcInstSelect

type ProcInstSelect struct {
	*ProcInstQuery
	// contains filtered or unexported fields
}

ProcInstSelect is the builder for selecting fields of ProcInst entities.

func (*ProcInstSelect) Aggregate

func (pis *ProcInstSelect) Aggregate(fns ...AggregateFunc) *ProcInstSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProcInstSelect) Bool

func (s *ProcInstSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) BoolX

func (s *ProcInstSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProcInstSelect) Bools

func (s *ProcInstSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) BoolsX

func (s *ProcInstSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProcInstSelect) Float64

func (s *ProcInstSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) Float64X

func (s *ProcInstSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProcInstSelect) Float64s

func (s *ProcInstSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) Float64sX

func (s *ProcInstSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProcInstSelect) Int

func (s *ProcInstSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) IntX

func (s *ProcInstSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProcInstSelect) Ints

func (s *ProcInstSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) IntsX

func (s *ProcInstSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProcInstSelect) Scan

func (pis *ProcInstSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProcInstSelect) ScanX

func (s *ProcInstSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProcInstSelect) String

func (s *ProcInstSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) StringX

func (s *ProcInstSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProcInstSelect) Strings

func (s *ProcInstSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProcInstSelect) StringsX

func (s *ProcInstSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProcInstUpdate

type ProcInstUpdate struct {
	// contains filtered or unexported fields
}

ProcInstUpdate is the builder for updating ProcInst entities.

func (*ProcInstUpdate) AddDuration

func (piu *ProcInstUpdate) AddDuration(i int) *ProcInstUpdate

AddDuration adds i to the "duration" field.

func (*ProcInstUpdate) AddRootInstanceID

func (piu *ProcInstUpdate) AddRootInstanceID(i int) *ProcInstUpdate

AddRootInstanceID adds i to the "root_instance_id" field.

func (*ProcInstUpdate) AddStartUserID

func (piu *ProcInstUpdate) AddStartUserID(i int) *ProcInstUpdate

AddStartUserID adds i to the "start_user_id" field.

func (*ProcInstUpdate) AddSupperInstanceID

func (piu *ProcInstUpdate) AddSupperInstanceID(i int) *ProcInstUpdate

AddSupperInstanceID adds i to the "supper_instance_id" field.

func (*ProcInstUpdate) AddTaskIDs

func (piu *ProcInstUpdate) AddTaskIDs(ids ...int) *ProcInstUpdate

AddTaskIDs adds the "tasks" edge to the Task entity by IDs.

func (*ProcInstUpdate) AddTasks

func (piu *ProcInstUpdate) AddTasks(t ...*Task) *ProcInstUpdate

AddTasks adds the "tasks" edges to the Task entity.

func (*ProcInstUpdate) AddUpdatedBy

func (piu *ProcInstUpdate) AddUpdatedBy(i int) *ProcInstUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*ProcInstUpdate) ClearDeletedReason

func (piu *ProcInstUpdate) ClearDeletedReason() *ProcInstUpdate

ClearDeletedReason clears the value of the "deleted_reason" field.

func (*ProcInstUpdate) ClearDeletedTime

func (piu *ProcInstUpdate) ClearDeletedTime() *ProcInstUpdate

ClearDeletedTime clears the value of the "deleted_time" field.

func (*ProcInstUpdate) ClearDuration

func (piu *ProcInstUpdate) ClearDuration() *ProcInstUpdate

ClearDuration clears the value of the "duration" field.

func (*ProcInstUpdate) ClearEndTime

func (piu *ProcInstUpdate) ClearEndTime() *ProcInstUpdate

ClearEndTime clears the value of the "end_time" field.

func (*ProcInstUpdate) ClearProcDef

func (piu *ProcInstUpdate) ClearProcDef() *ProcInstUpdate

ClearProcDef clears the "proc_def" edge to the ProcDef entity.

func (*ProcInstUpdate) ClearRootInstanceID

func (piu *ProcInstUpdate) ClearRootInstanceID() *ProcInstUpdate

ClearRootInstanceID clears the value of the "root_instance_id" field.

func (*ProcInstUpdate) ClearSupperInstanceID

func (piu *ProcInstUpdate) ClearSupperInstanceID() *ProcInstUpdate

ClearSupperInstanceID clears the value of the "supper_instance_id" field.

func (*ProcInstUpdate) ClearTasks

func (piu *ProcInstUpdate) ClearTasks() *ProcInstUpdate

ClearTasks clears all "tasks" edges to the Task entity.

func (*ProcInstUpdate) ClearUpdatedAt

func (piu *ProcInstUpdate) ClearUpdatedAt() *ProcInstUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcInstUpdate) ClearUpdatedBy

func (piu *ProcInstUpdate) ClearUpdatedBy() *ProcInstUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcInstUpdate) Exec

func (piu *ProcInstUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcInstUpdate) ExecX

func (piu *ProcInstUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstUpdate) Mutation

func (piu *ProcInstUpdate) Mutation() *ProcInstMutation

Mutation returns the ProcInstMutation object of the builder.

func (*ProcInstUpdate) RemoveTaskIDs

func (piu *ProcInstUpdate) RemoveTaskIDs(ids ...int) *ProcInstUpdate

RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.

func (*ProcInstUpdate) RemoveTasks

func (piu *ProcInstUpdate) RemoveTasks(t ...*Task) *ProcInstUpdate

RemoveTasks removes "tasks" edges to Task entities.

func (*ProcInstUpdate) Save

func (piu *ProcInstUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProcInstUpdate) SaveX

func (piu *ProcInstUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProcInstUpdate) SetBusinessKey

func (piu *ProcInstUpdate) SetBusinessKey(s string) *ProcInstUpdate

SetBusinessKey sets the "business_key" field.

func (*ProcInstUpdate) SetDeletedReason

func (piu *ProcInstUpdate) SetDeletedReason(s string) *ProcInstUpdate

SetDeletedReason sets the "deleted_reason" field.

func (*ProcInstUpdate) SetDeletedTime

func (piu *ProcInstUpdate) SetDeletedTime(t time.Time) *ProcInstUpdate

SetDeletedTime sets the "deleted_time" field.

func (*ProcInstUpdate) SetDuration

func (piu *ProcInstUpdate) SetDuration(i int) *ProcInstUpdate

SetDuration sets the "duration" field.

func (*ProcInstUpdate) SetEndTime

func (piu *ProcInstUpdate) SetEndTime(t time.Time) *ProcInstUpdate

SetEndTime sets the "end_time" field.

func (*ProcInstUpdate) SetNillableDeletedReason

func (piu *ProcInstUpdate) SetNillableDeletedReason(s *string) *ProcInstUpdate

SetNillableDeletedReason sets the "deleted_reason" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableDeletedTime

func (piu *ProcInstUpdate) SetNillableDeletedTime(t *time.Time) *ProcInstUpdate

SetNillableDeletedTime sets the "deleted_time" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableDuration

func (piu *ProcInstUpdate) SetNillableDuration(i *int) *ProcInstUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableEndTime

func (piu *ProcInstUpdate) SetNillableEndTime(t *time.Time) *ProcInstUpdate

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableRootInstanceID

func (piu *ProcInstUpdate) SetNillableRootInstanceID(i *int) *ProcInstUpdate

SetNillableRootInstanceID sets the "root_instance_id" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableStartTime

func (piu *ProcInstUpdate) SetNillableStartTime(t *time.Time) *ProcInstUpdate

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableSupperInstanceID

func (piu *ProcInstUpdate) SetNillableSupperInstanceID(i *int) *ProcInstUpdate

SetNillableSupperInstanceID sets the "supper_instance_id" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableUpdatedAt

func (piu *ProcInstUpdate) SetNillableUpdatedAt(t *time.Time) *ProcInstUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProcInstUpdate) SetNillableUpdatedBy

func (piu *ProcInstUpdate) SetNillableUpdatedBy(i *int) *ProcInstUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*ProcInstUpdate) SetProcDef

func (piu *ProcInstUpdate) SetProcDef(p *ProcDef) *ProcInstUpdate

SetProcDef sets the "proc_def" edge to the ProcDef entity.

func (*ProcInstUpdate) SetProcDefID

func (piu *ProcInstUpdate) SetProcDefID(i int) *ProcInstUpdate

SetProcDefID sets the "proc_def_id" field.

func (*ProcInstUpdate) SetRootInstanceID

func (piu *ProcInstUpdate) SetRootInstanceID(i int) *ProcInstUpdate

SetRootInstanceID sets the "root_instance_id" field.

func (*ProcInstUpdate) SetStartTime

func (piu *ProcInstUpdate) SetStartTime(t time.Time) *ProcInstUpdate

SetStartTime sets the "start_time" field.

func (*ProcInstUpdate) SetStartUserID

func (piu *ProcInstUpdate) SetStartUserID(i int) *ProcInstUpdate

SetStartUserID sets the "start_user_id" field.

func (*ProcInstUpdate) SetStatus

func (piu *ProcInstUpdate) SetStatus(pr procinst.Status) *ProcInstUpdate

SetStatus sets the "status" field.

func (*ProcInstUpdate) SetSupperInstanceID

func (piu *ProcInstUpdate) SetSupperInstanceID(i int) *ProcInstUpdate

SetSupperInstanceID sets the "supper_instance_id" field.

func (*ProcInstUpdate) SetUpdatedAt

func (piu *ProcInstUpdate) SetUpdatedAt(t time.Time) *ProcInstUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ProcInstUpdate) SetUpdatedBy

func (piu *ProcInstUpdate) SetUpdatedBy(i int) *ProcInstUpdate

SetUpdatedBy sets the "updated_by" field.

func (*ProcInstUpdate) Where

func (piu *ProcInstUpdate) Where(ps ...predicate.ProcInst) *ProcInstUpdate

Where appends a list predicates to the ProcInstUpdate builder.

type ProcInstUpdateOne

type ProcInstUpdateOne struct {
	// contains filtered or unexported fields
}

ProcInstUpdateOne is the builder for updating a single ProcInst entity.

func (*ProcInstUpdateOne) AddDuration

func (piuo *ProcInstUpdateOne) AddDuration(i int) *ProcInstUpdateOne

AddDuration adds i to the "duration" field.

func (*ProcInstUpdateOne) AddRootInstanceID

func (piuo *ProcInstUpdateOne) AddRootInstanceID(i int) *ProcInstUpdateOne

AddRootInstanceID adds i to the "root_instance_id" field.

func (*ProcInstUpdateOne) AddStartUserID

func (piuo *ProcInstUpdateOne) AddStartUserID(i int) *ProcInstUpdateOne

AddStartUserID adds i to the "start_user_id" field.

func (*ProcInstUpdateOne) AddSupperInstanceID

func (piuo *ProcInstUpdateOne) AddSupperInstanceID(i int) *ProcInstUpdateOne

AddSupperInstanceID adds i to the "supper_instance_id" field.

func (*ProcInstUpdateOne) AddTaskIDs

func (piuo *ProcInstUpdateOne) AddTaskIDs(ids ...int) *ProcInstUpdateOne

AddTaskIDs adds the "tasks" edge to the Task entity by IDs.

func (*ProcInstUpdateOne) AddTasks

func (piuo *ProcInstUpdateOne) AddTasks(t ...*Task) *ProcInstUpdateOne

AddTasks adds the "tasks" edges to the Task entity.

func (*ProcInstUpdateOne) AddUpdatedBy

func (piuo *ProcInstUpdateOne) AddUpdatedBy(i int) *ProcInstUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*ProcInstUpdateOne) ClearDeletedReason

func (piuo *ProcInstUpdateOne) ClearDeletedReason() *ProcInstUpdateOne

ClearDeletedReason clears the value of the "deleted_reason" field.

func (*ProcInstUpdateOne) ClearDeletedTime

func (piuo *ProcInstUpdateOne) ClearDeletedTime() *ProcInstUpdateOne

ClearDeletedTime clears the value of the "deleted_time" field.

func (*ProcInstUpdateOne) ClearDuration

func (piuo *ProcInstUpdateOne) ClearDuration() *ProcInstUpdateOne

ClearDuration clears the value of the "duration" field.

func (*ProcInstUpdateOne) ClearEndTime

func (piuo *ProcInstUpdateOne) ClearEndTime() *ProcInstUpdateOne

ClearEndTime clears the value of the "end_time" field.

func (*ProcInstUpdateOne) ClearProcDef

func (piuo *ProcInstUpdateOne) ClearProcDef() *ProcInstUpdateOne

ClearProcDef clears the "proc_def" edge to the ProcDef entity.

func (*ProcInstUpdateOne) ClearRootInstanceID

func (piuo *ProcInstUpdateOne) ClearRootInstanceID() *ProcInstUpdateOne

ClearRootInstanceID clears the value of the "root_instance_id" field.

func (*ProcInstUpdateOne) ClearSupperInstanceID

func (piuo *ProcInstUpdateOne) ClearSupperInstanceID() *ProcInstUpdateOne

ClearSupperInstanceID clears the value of the "supper_instance_id" field.

func (*ProcInstUpdateOne) ClearTasks

func (piuo *ProcInstUpdateOne) ClearTasks() *ProcInstUpdateOne

ClearTasks clears all "tasks" edges to the Task entity.

func (*ProcInstUpdateOne) ClearUpdatedAt

func (piuo *ProcInstUpdateOne) ClearUpdatedAt() *ProcInstUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcInstUpdateOne) ClearUpdatedBy

func (piuo *ProcInstUpdateOne) ClearUpdatedBy() *ProcInstUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcInstUpdateOne) Exec

func (piuo *ProcInstUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProcInstUpdateOne) ExecX

func (piuo *ProcInstUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstUpdateOne) Mutation

func (piuo *ProcInstUpdateOne) Mutation() *ProcInstMutation

Mutation returns the ProcInstMutation object of the builder.

func (*ProcInstUpdateOne) RemoveTaskIDs

func (piuo *ProcInstUpdateOne) RemoveTaskIDs(ids ...int) *ProcInstUpdateOne

RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.

func (*ProcInstUpdateOne) RemoveTasks

func (piuo *ProcInstUpdateOne) RemoveTasks(t ...*Task) *ProcInstUpdateOne

RemoveTasks removes "tasks" edges to Task entities.

func (*ProcInstUpdateOne) Save

func (piuo *ProcInstUpdateOne) Save(ctx context.Context) (*ProcInst, error)

Save executes the query and returns the updated ProcInst entity.

func (*ProcInstUpdateOne) SaveX

func (piuo *ProcInstUpdateOne) SaveX(ctx context.Context) *ProcInst

SaveX is like Save, but panics if an error occurs.

func (*ProcInstUpdateOne) Select

func (piuo *ProcInstUpdateOne) Select(field string, fields ...string) *ProcInstUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProcInstUpdateOne) SetBusinessKey

func (piuo *ProcInstUpdateOne) SetBusinessKey(s string) *ProcInstUpdateOne

SetBusinessKey sets the "business_key" field.

func (*ProcInstUpdateOne) SetDeletedReason

func (piuo *ProcInstUpdateOne) SetDeletedReason(s string) *ProcInstUpdateOne

SetDeletedReason sets the "deleted_reason" field.

func (*ProcInstUpdateOne) SetDeletedTime

func (piuo *ProcInstUpdateOne) SetDeletedTime(t time.Time) *ProcInstUpdateOne

SetDeletedTime sets the "deleted_time" field.

func (*ProcInstUpdateOne) SetDuration

func (piuo *ProcInstUpdateOne) SetDuration(i int) *ProcInstUpdateOne

SetDuration sets the "duration" field.

func (*ProcInstUpdateOne) SetEndTime

func (piuo *ProcInstUpdateOne) SetEndTime(t time.Time) *ProcInstUpdateOne

SetEndTime sets the "end_time" field.

func (*ProcInstUpdateOne) SetNillableDeletedReason

func (piuo *ProcInstUpdateOne) SetNillableDeletedReason(s *string) *ProcInstUpdateOne

SetNillableDeletedReason sets the "deleted_reason" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableDeletedTime

func (piuo *ProcInstUpdateOne) SetNillableDeletedTime(t *time.Time) *ProcInstUpdateOne

SetNillableDeletedTime sets the "deleted_time" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableDuration

func (piuo *ProcInstUpdateOne) SetNillableDuration(i *int) *ProcInstUpdateOne

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableEndTime

func (piuo *ProcInstUpdateOne) SetNillableEndTime(t *time.Time) *ProcInstUpdateOne

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableRootInstanceID

func (piuo *ProcInstUpdateOne) SetNillableRootInstanceID(i *int) *ProcInstUpdateOne

SetNillableRootInstanceID sets the "root_instance_id" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableStartTime

func (piuo *ProcInstUpdateOne) SetNillableStartTime(t *time.Time) *ProcInstUpdateOne

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableSupperInstanceID

func (piuo *ProcInstUpdateOne) SetNillableSupperInstanceID(i *int) *ProcInstUpdateOne

SetNillableSupperInstanceID sets the "supper_instance_id" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableUpdatedAt

func (piuo *ProcInstUpdateOne) SetNillableUpdatedAt(t *time.Time) *ProcInstUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProcInstUpdateOne) SetNillableUpdatedBy

func (piuo *ProcInstUpdateOne) SetNillableUpdatedBy(i *int) *ProcInstUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*ProcInstUpdateOne) SetProcDef

func (piuo *ProcInstUpdateOne) SetProcDef(p *ProcDef) *ProcInstUpdateOne

SetProcDef sets the "proc_def" edge to the ProcDef entity.

func (*ProcInstUpdateOne) SetProcDefID

func (piuo *ProcInstUpdateOne) SetProcDefID(i int) *ProcInstUpdateOne

SetProcDefID sets the "proc_def_id" field.

func (*ProcInstUpdateOne) SetRootInstanceID

func (piuo *ProcInstUpdateOne) SetRootInstanceID(i int) *ProcInstUpdateOne

SetRootInstanceID sets the "root_instance_id" field.

func (*ProcInstUpdateOne) SetStartTime

func (piuo *ProcInstUpdateOne) SetStartTime(t time.Time) *ProcInstUpdateOne

SetStartTime sets the "start_time" field.

func (*ProcInstUpdateOne) SetStartUserID

func (piuo *ProcInstUpdateOne) SetStartUserID(i int) *ProcInstUpdateOne

SetStartUserID sets the "start_user_id" field.

func (*ProcInstUpdateOne) SetStatus

func (piuo *ProcInstUpdateOne) SetStatus(pr procinst.Status) *ProcInstUpdateOne

SetStatus sets the "status" field.

func (*ProcInstUpdateOne) SetSupperInstanceID

func (piuo *ProcInstUpdateOne) SetSupperInstanceID(i int) *ProcInstUpdateOne

SetSupperInstanceID sets the "supper_instance_id" field.

func (*ProcInstUpdateOne) SetUpdatedAt

func (piuo *ProcInstUpdateOne) SetUpdatedAt(t time.Time) *ProcInstUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ProcInstUpdateOne) SetUpdatedBy

func (piuo *ProcInstUpdateOne) SetUpdatedBy(i int) *ProcInstUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*ProcInstUpdateOne) Where

Where appends a list predicates to the ProcInstUpdate builder.

type ProcInstUpsert

type ProcInstUpsert struct {
	*sql.UpdateSet
}

ProcInstUpsert is the "OnConflict" setter.

func (*ProcInstUpsert) AddDuration

func (u *ProcInstUpsert) AddDuration(v int) *ProcInstUpsert

AddDuration adds v to the "duration" field.

func (*ProcInstUpsert) AddRootInstanceID

func (u *ProcInstUpsert) AddRootInstanceID(v int) *ProcInstUpsert

AddRootInstanceID adds v to the "root_instance_id" field.

func (*ProcInstUpsert) AddStartUserID

func (u *ProcInstUpsert) AddStartUserID(v int) *ProcInstUpsert

AddStartUserID adds v to the "start_user_id" field.

func (*ProcInstUpsert) AddSupperInstanceID

func (u *ProcInstUpsert) AddSupperInstanceID(v int) *ProcInstUpsert

AddSupperInstanceID adds v to the "supper_instance_id" field.

func (*ProcInstUpsert) AddUpdatedBy

func (u *ProcInstUpsert) AddUpdatedBy(v int) *ProcInstUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*ProcInstUpsert) ClearDeletedReason

func (u *ProcInstUpsert) ClearDeletedReason() *ProcInstUpsert

ClearDeletedReason clears the value of the "deleted_reason" field.

func (*ProcInstUpsert) ClearDeletedTime

func (u *ProcInstUpsert) ClearDeletedTime() *ProcInstUpsert

ClearDeletedTime clears the value of the "deleted_time" field.

func (*ProcInstUpsert) ClearDuration

func (u *ProcInstUpsert) ClearDuration() *ProcInstUpsert

ClearDuration clears the value of the "duration" field.

func (*ProcInstUpsert) ClearEndTime

func (u *ProcInstUpsert) ClearEndTime() *ProcInstUpsert

ClearEndTime clears the value of the "end_time" field.

func (*ProcInstUpsert) ClearRootInstanceID

func (u *ProcInstUpsert) ClearRootInstanceID() *ProcInstUpsert

ClearRootInstanceID clears the value of the "root_instance_id" field.

func (*ProcInstUpsert) ClearSupperInstanceID

func (u *ProcInstUpsert) ClearSupperInstanceID() *ProcInstUpsert

ClearSupperInstanceID clears the value of the "supper_instance_id" field.

func (*ProcInstUpsert) ClearUpdatedAt

func (u *ProcInstUpsert) ClearUpdatedAt() *ProcInstUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcInstUpsert) ClearUpdatedBy

func (u *ProcInstUpsert) ClearUpdatedBy() *ProcInstUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcInstUpsert) SetBusinessKey

func (u *ProcInstUpsert) SetBusinessKey(v string) *ProcInstUpsert

SetBusinessKey sets the "business_key" field.

func (*ProcInstUpsert) SetDeletedReason

func (u *ProcInstUpsert) SetDeletedReason(v string) *ProcInstUpsert

SetDeletedReason sets the "deleted_reason" field.

func (*ProcInstUpsert) SetDeletedTime

func (u *ProcInstUpsert) SetDeletedTime(v time.Time) *ProcInstUpsert

SetDeletedTime sets the "deleted_time" field.

func (*ProcInstUpsert) SetDuration

func (u *ProcInstUpsert) SetDuration(v int) *ProcInstUpsert

SetDuration sets the "duration" field.

func (*ProcInstUpsert) SetEndTime

func (u *ProcInstUpsert) SetEndTime(v time.Time) *ProcInstUpsert

SetEndTime sets the "end_time" field.

func (*ProcInstUpsert) SetProcDefID

func (u *ProcInstUpsert) SetProcDefID(v int) *ProcInstUpsert

SetProcDefID sets the "proc_def_id" field.

func (*ProcInstUpsert) SetRootInstanceID

func (u *ProcInstUpsert) SetRootInstanceID(v int) *ProcInstUpsert

SetRootInstanceID sets the "root_instance_id" field.

func (*ProcInstUpsert) SetStartTime

func (u *ProcInstUpsert) SetStartTime(v time.Time) *ProcInstUpsert

SetStartTime sets the "start_time" field.

func (*ProcInstUpsert) SetStartUserID

func (u *ProcInstUpsert) SetStartUserID(v int) *ProcInstUpsert

SetStartUserID sets the "start_user_id" field.

func (*ProcInstUpsert) SetStatus

func (u *ProcInstUpsert) SetStatus(v procinst.Status) *ProcInstUpsert

SetStatus sets the "status" field.

func (*ProcInstUpsert) SetSupperInstanceID

func (u *ProcInstUpsert) SetSupperInstanceID(v int) *ProcInstUpsert

SetSupperInstanceID sets the "supper_instance_id" field.

func (*ProcInstUpsert) SetUpdatedAt

func (u *ProcInstUpsert) SetUpdatedAt(v time.Time) *ProcInstUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ProcInstUpsert) SetUpdatedBy

func (u *ProcInstUpsert) SetUpdatedBy(v int) *ProcInstUpsert

SetUpdatedBy sets the "updated_by" field.

func (*ProcInstUpsert) UpdateBusinessKey

func (u *ProcInstUpsert) UpdateBusinessKey() *ProcInstUpsert

UpdateBusinessKey sets the "business_key" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateDeletedReason

func (u *ProcInstUpsert) UpdateDeletedReason() *ProcInstUpsert

UpdateDeletedReason sets the "deleted_reason" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateDeletedTime

func (u *ProcInstUpsert) UpdateDeletedTime() *ProcInstUpsert

UpdateDeletedTime sets the "deleted_time" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateDuration

func (u *ProcInstUpsert) UpdateDuration() *ProcInstUpsert

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateEndTime

func (u *ProcInstUpsert) UpdateEndTime() *ProcInstUpsert

UpdateEndTime sets the "end_time" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateProcDefID

func (u *ProcInstUpsert) UpdateProcDefID() *ProcInstUpsert

UpdateProcDefID sets the "proc_def_id" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateRootInstanceID

func (u *ProcInstUpsert) UpdateRootInstanceID() *ProcInstUpsert

UpdateRootInstanceID sets the "root_instance_id" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateStartTime

func (u *ProcInstUpsert) UpdateStartTime() *ProcInstUpsert

UpdateStartTime sets the "start_time" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateStartUserID

func (u *ProcInstUpsert) UpdateStartUserID() *ProcInstUpsert

UpdateStartUserID sets the "start_user_id" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateStatus

func (u *ProcInstUpsert) UpdateStatus() *ProcInstUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateSupperInstanceID

func (u *ProcInstUpsert) UpdateSupperInstanceID() *ProcInstUpsert

UpdateSupperInstanceID sets the "supper_instance_id" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateUpdatedAt

func (u *ProcInstUpsert) UpdateUpdatedAt() *ProcInstUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProcInstUpsert) UpdateUpdatedBy

func (u *ProcInstUpsert) UpdateUpdatedBy() *ProcInstUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type ProcInstUpsertBulk

type ProcInstUpsertBulk struct {
	// contains filtered or unexported fields
}

ProcInstUpsertBulk is the builder for "upsert"-ing a bulk of ProcInst nodes.

func (*ProcInstUpsertBulk) AddDuration

func (u *ProcInstUpsertBulk) AddDuration(v int) *ProcInstUpsertBulk

AddDuration adds v to the "duration" field.

func (*ProcInstUpsertBulk) AddRootInstanceID

func (u *ProcInstUpsertBulk) AddRootInstanceID(v int) *ProcInstUpsertBulk

AddRootInstanceID adds v to the "root_instance_id" field.

func (*ProcInstUpsertBulk) AddStartUserID

func (u *ProcInstUpsertBulk) AddStartUserID(v int) *ProcInstUpsertBulk

AddStartUserID adds v to the "start_user_id" field.

func (*ProcInstUpsertBulk) AddSupperInstanceID

func (u *ProcInstUpsertBulk) AddSupperInstanceID(v int) *ProcInstUpsertBulk

AddSupperInstanceID adds v to the "supper_instance_id" field.

func (*ProcInstUpsertBulk) AddUpdatedBy

func (u *ProcInstUpsertBulk) AddUpdatedBy(v int) *ProcInstUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*ProcInstUpsertBulk) ClearDeletedReason

func (u *ProcInstUpsertBulk) ClearDeletedReason() *ProcInstUpsertBulk

ClearDeletedReason clears the value of the "deleted_reason" field.

func (*ProcInstUpsertBulk) ClearDeletedTime

func (u *ProcInstUpsertBulk) ClearDeletedTime() *ProcInstUpsertBulk

ClearDeletedTime clears the value of the "deleted_time" field.

func (*ProcInstUpsertBulk) ClearDuration

func (u *ProcInstUpsertBulk) ClearDuration() *ProcInstUpsertBulk

ClearDuration clears the value of the "duration" field.

func (*ProcInstUpsertBulk) ClearEndTime

func (u *ProcInstUpsertBulk) ClearEndTime() *ProcInstUpsertBulk

ClearEndTime clears the value of the "end_time" field.

func (*ProcInstUpsertBulk) ClearRootInstanceID

func (u *ProcInstUpsertBulk) ClearRootInstanceID() *ProcInstUpsertBulk

ClearRootInstanceID clears the value of the "root_instance_id" field.

func (*ProcInstUpsertBulk) ClearSupperInstanceID

func (u *ProcInstUpsertBulk) ClearSupperInstanceID() *ProcInstUpsertBulk

ClearSupperInstanceID clears the value of the "supper_instance_id" field.

func (*ProcInstUpsertBulk) ClearUpdatedAt

func (u *ProcInstUpsertBulk) ClearUpdatedAt() *ProcInstUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcInstUpsertBulk) ClearUpdatedBy

func (u *ProcInstUpsertBulk) ClearUpdatedBy() *ProcInstUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcInstUpsertBulk) DoNothing

func (u *ProcInstUpsertBulk) DoNothing() *ProcInstUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProcInstUpsertBulk) Exec

func (u *ProcInstUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcInstUpsertBulk) ExecX

func (u *ProcInstUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ProcInst.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ProcInstUpsertBulk) SetBusinessKey

func (u *ProcInstUpsertBulk) SetBusinessKey(v string) *ProcInstUpsertBulk

SetBusinessKey sets the "business_key" field.

func (*ProcInstUpsertBulk) SetDeletedReason

func (u *ProcInstUpsertBulk) SetDeletedReason(v string) *ProcInstUpsertBulk

SetDeletedReason sets the "deleted_reason" field.

func (*ProcInstUpsertBulk) SetDeletedTime

func (u *ProcInstUpsertBulk) SetDeletedTime(v time.Time) *ProcInstUpsertBulk

SetDeletedTime sets the "deleted_time" field.

func (*ProcInstUpsertBulk) SetDuration

func (u *ProcInstUpsertBulk) SetDuration(v int) *ProcInstUpsertBulk

SetDuration sets the "duration" field.

func (*ProcInstUpsertBulk) SetEndTime

func (u *ProcInstUpsertBulk) SetEndTime(v time.Time) *ProcInstUpsertBulk

SetEndTime sets the "end_time" field.

func (*ProcInstUpsertBulk) SetProcDefID

func (u *ProcInstUpsertBulk) SetProcDefID(v int) *ProcInstUpsertBulk

SetProcDefID sets the "proc_def_id" field.

func (*ProcInstUpsertBulk) SetRootInstanceID

func (u *ProcInstUpsertBulk) SetRootInstanceID(v int) *ProcInstUpsertBulk

SetRootInstanceID sets the "root_instance_id" field.

func (*ProcInstUpsertBulk) SetStartTime

func (u *ProcInstUpsertBulk) SetStartTime(v time.Time) *ProcInstUpsertBulk

SetStartTime sets the "start_time" field.

func (*ProcInstUpsertBulk) SetStartUserID

func (u *ProcInstUpsertBulk) SetStartUserID(v int) *ProcInstUpsertBulk

SetStartUserID sets the "start_user_id" field.

func (*ProcInstUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*ProcInstUpsertBulk) SetSupperInstanceID

func (u *ProcInstUpsertBulk) SetSupperInstanceID(v int) *ProcInstUpsertBulk

SetSupperInstanceID sets the "supper_instance_id" field.

func (*ProcInstUpsertBulk) SetUpdatedAt

func (u *ProcInstUpsertBulk) SetUpdatedAt(v time.Time) *ProcInstUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*ProcInstUpsertBulk) SetUpdatedBy

func (u *ProcInstUpsertBulk) SetUpdatedBy(v int) *ProcInstUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*ProcInstUpsertBulk) Update

func (u *ProcInstUpsertBulk) Update(set func(*ProcInstUpsert)) *ProcInstUpsertBulk

Update allows overriding fields `UPDATE` values. See the ProcInstCreateBulk.OnConflict documentation for more info.

func (*ProcInstUpsertBulk) UpdateBusinessKey

func (u *ProcInstUpsertBulk) UpdateBusinessKey() *ProcInstUpsertBulk

UpdateBusinessKey sets the "business_key" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateDeletedReason

func (u *ProcInstUpsertBulk) UpdateDeletedReason() *ProcInstUpsertBulk

UpdateDeletedReason sets the "deleted_reason" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateDeletedTime

func (u *ProcInstUpsertBulk) UpdateDeletedTime() *ProcInstUpsertBulk

UpdateDeletedTime sets the "deleted_time" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateDuration

func (u *ProcInstUpsertBulk) UpdateDuration() *ProcInstUpsertBulk

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateEndTime

func (u *ProcInstUpsertBulk) UpdateEndTime() *ProcInstUpsertBulk

UpdateEndTime sets the "end_time" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateNewValues

func (u *ProcInstUpsertBulk) UpdateNewValues() *ProcInstUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ProcInst.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(procinst.FieldID)
		}),
	).
	Exec(ctx)

func (*ProcInstUpsertBulk) UpdateProcDefID

func (u *ProcInstUpsertBulk) UpdateProcDefID() *ProcInstUpsertBulk

UpdateProcDefID sets the "proc_def_id" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateRootInstanceID

func (u *ProcInstUpsertBulk) UpdateRootInstanceID() *ProcInstUpsertBulk

UpdateRootInstanceID sets the "root_instance_id" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateStartTime

func (u *ProcInstUpsertBulk) UpdateStartTime() *ProcInstUpsertBulk

UpdateStartTime sets the "start_time" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateStartUserID

func (u *ProcInstUpsertBulk) UpdateStartUserID() *ProcInstUpsertBulk

UpdateStartUserID sets the "start_user_id" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateStatus

func (u *ProcInstUpsertBulk) UpdateStatus() *ProcInstUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateSupperInstanceID

func (u *ProcInstUpsertBulk) UpdateSupperInstanceID() *ProcInstUpsertBulk

UpdateSupperInstanceID sets the "supper_instance_id" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateUpdatedAt

func (u *ProcInstUpsertBulk) UpdateUpdatedAt() *ProcInstUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProcInstUpsertBulk) UpdateUpdatedBy

func (u *ProcInstUpsertBulk) UpdateUpdatedBy() *ProcInstUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type ProcInstUpsertOne

type ProcInstUpsertOne struct {
	// contains filtered or unexported fields
}

ProcInstUpsertOne is the builder for "upsert"-ing

one ProcInst node.

func (*ProcInstUpsertOne) AddDuration

func (u *ProcInstUpsertOne) AddDuration(v int) *ProcInstUpsertOne

AddDuration adds v to the "duration" field.

func (*ProcInstUpsertOne) AddRootInstanceID

func (u *ProcInstUpsertOne) AddRootInstanceID(v int) *ProcInstUpsertOne

AddRootInstanceID adds v to the "root_instance_id" field.

func (*ProcInstUpsertOne) AddStartUserID

func (u *ProcInstUpsertOne) AddStartUserID(v int) *ProcInstUpsertOne

AddStartUserID adds v to the "start_user_id" field.

func (*ProcInstUpsertOne) AddSupperInstanceID

func (u *ProcInstUpsertOne) AddSupperInstanceID(v int) *ProcInstUpsertOne

AddSupperInstanceID adds v to the "supper_instance_id" field.

func (*ProcInstUpsertOne) AddUpdatedBy

func (u *ProcInstUpsertOne) AddUpdatedBy(v int) *ProcInstUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*ProcInstUpsertOne) ClearDeletedReason

func (u *ProcInstUpsertOne) ClearDeletedReason() *ProcInstUpsertOne

ClearDeletedReason clears the value of the "deleted_reason" field.

func (*ProcInstUpsertOne) ClearDeletedTime

func (u *ProcInstUpsertOne) ClearDeletedTime() *ProcInstUpsertOne

ClearDeletedTime clears the value of the "deleted_time" field.

func (*ProcInstUpsertOne) ClearDuration

func (u *ProcInstUpsertOne) ClearDuration() *ProcInstUpsertOne

ClearDuration clears the value of the "duration" field.

func (*ProcInstUpsertOne) ClearEndTime

func (u *ProcInstUpsertOne) ClearEndTime() *ProcInstUpsertOne

ClearEndTime clears the value of the "end_time" field.

func (*ProcInstUpsertOne) ClearRootInstanceID

func (u *ProcInstUpsertOne) ClearRootInstanceID() *ProcInstUpsertOne

ClearRootInstanceID clears the value of the "root_instance_id" field.

func (*ProcInstUpsertOne) ClearSupperInstanceID

func (u *ProcInstUpsertOne) ClearSupperInstanceID() *ProcInstUpsertOne

ClearSupperInstanceID clears the value of the "supper_instance_id" field.

func (*ProcInstUpsertOne) ClearUpdatedAt

func (u *ProcInstUpsertOne) ClearUpdatedAt() *ProcInstUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ProcInstUpsertOne) ClearUpdatedBy

func (u *ProcInstUpsertOne) ClearUpdatedBy() *ProcInstUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*ProcInstUpsertOne) DoNothing

func (u *ProcInstUpsertOne) DoNothing() *ProcInstUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProcInstUpsertOne) Exec

func (u *ProcInstUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ProcInstUpsertOne) ExecX

func (u *ProcInstUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProcInstUpsertOne) ID

func (u *ProcInstUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ProcInstUpsertOne) IDX

func (u *ProcInstUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*ProcInstUpsertOne) Ignore

func (u *ProcInstUpsertOne) Ignore() *ProcInstUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ProcInst.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ProcInstUpsertOne) SetBusinessKey

func (u *ProcInstUpsertOne) SetBusinessKey(v string) *ProcInstUpsertOne

SetBusinessKey sets the "business_key" field.

func (*ProcInstUpsertOne) SetDeletedReason

func (u *ProcInstUpsertOne) SetDeletedReason(v string) *ProcInstUpsertOne

SetDeletedReason sets the "deleted_reason" field.

func (*ProcInstUpsertOne) SetDeletedTime

func (u *ProcInstUpsertOne) SetDeletedTime(v time.Time) *ProcInstUpsertOne

SetDeletedTime sets the "deleted_time" field.

func (*ProcInstUpsertOne) SetDuration

func (u *ProcInstUpsertOne) SetDuration(v int) *ProcInstUpsertOne

SetDuration sets the "duration" field.

func (*ProcInstUpsertOne) SetEndTime

func (u *ProcInstUpsertOne) SetEndTime(v time.Time) *ProcInstUpsertOne

SetEndTime sets the "end_time" field.

func (*ProcInstUpsertOne) SetProcDefID

func (u *ProcInstUpsertOne) SetProcDefID(v int) *ProcInstUpsertOne

SetProcDefID sets the "proc_def_id" field.

func (*ProcInstUpsertOne) SetRootInstanceID

func (u *ProcInstUpsertOne) SetRootInstanceID(v int) *ProcInstUpsertOne

SetRootInstanceID sets the "root_instance_id" field.

func (*ProcInstUpsertOne) SetStartTime

func (u *ProcInstUpsertOne) SetStartTime(v time.Time) *ProcInstUpsertOne

SetStartTime sets the "start_time" field.

func (*ProcInstUpsertOne) SetStartUserID

func (u *ProcInstUpsertOne) SetStartUserID(v int) *ProcInstUpsertOne

SetStartUserID sets the "start_user_id" field.

func (*ProcInstUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*ProcInstUpsertOne) SetSupperInstanceID

func (u *ProcInstUpsertOne) SetSupperInstanceID(v int) *ProcInstUpsertOne

SetSupperInstanceID sets the "supper_instance_id" field.

func (*ProcInstUpsertOne) SetUpdatedAt

func (u *ProcInstUpsertOne) SetUpdatedAt(v time.Time) *ProcInstUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*ProcInstUpsertOne) SetUpdatedBy

func (u *ProcInstUpsertOne) SetUpdatedBy(v int) *ProcInstUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*ProcInstUpsertOne) Update

func (u *ProcInstUpsertOne) Update(set func(*ProcInstUpsert)) *ProcInstUpsertOne

Update allows overriding fields `UPDATE` values. See the ProcInstCreate.OnConflict documentation for more info.

func (*ProcInstUpsertOne) UpdateBusinessKey

func (u *ProcInstUpsertOne) UpdateBusinessKey() *ProcInstUpsertOne

UpdateBusinessKey sets the "business_key" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateDeletedReason

func (u *ProcInstUpsertOne) UpdateDeletedReason() *ProcInstUpsertOne

UpdateDeletedReason sets the "deleted_reason" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateDeletedTime

func (u *ProcInstUpsertOne) UpdateDeletedTime() *ProcInstUpsertOne

UpdateDeletedTime sets the "deleted_time" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateDuration

func (u *ProcInstUpsertOne) UpdateDuration() *ProcInstUpsertOne

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateEndTime

func (u *ProcInstUpsertOne) UpdateEndTime() *ProcInstUpsertOne

UpdateEndTime sets the "end_time" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateNewValues

func (u *ProcInstUpsertOne) UpdateNewValues() *ProcInstUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ProcInst.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(procinst.FieldID)
		}),
	).
	Exec(ctx)

func (*ProcInstUpsertOne) UpdateProcDefID

func (u *ProcInstUpsertOne) UpdateProcDefID() *ProcInstUpsertOne

UpdateProcDefID sets the "proc_def_id" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateRootInstanceID

func (u *ProcInstUpsertOne) UpdateRootInstanceID() *ProcInstUpsertOne

UpdateRootInstanceID sets the "root_instance_id" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateStartTime

func (u *ProcInstUpsertOne) UpdateStartTime() *ProcInstUpsertOne

UpdateStartTime sets the "start_time" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateStartUserID

func (u *ProcInstUpsertOne) UpdateStartUserID() *ProcInstUpsertOne

UpdateStartUserID sets the "start_user_id" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateStatus

func (u *ProcInstUpsertOne) UpdateStatus() *ProcInstUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateSupperInstanceID

func (u *ProcInstUpsertOne) UpdateSupperInstanceID() *ProcInstUpsertOne

UpdateSupperInstanceID sets the "supper_instance_id" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateUpdatedAt

func (u *ProcInstUpsertOne) UpdateUpdatedAt() *ProcInstUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProcInstUpsertOne) UpdateUpdatedBy

func (u *ProcInstUpsertOne) UpdateUpdatedBy() *ProcInstUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type ProcInstWhereInput

type ProcInstWhereInput struct {
	Predicates []predicate.ProcInst  `json:"-"`
	Not        *ProcInstWhereInput   `json:"not,omitempty"`
	Or         []*ProcInstWhereInput `json:"or,omitempty"`
	And        []*ProcInstWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "proc_def_id" field predicates.
	ProcDefID      *int  `json:"procDefID,omitempty"`
	ProcDefIDNEQ   *int  `json:"procDefIDNEQ,omitempty"`
	ProcDefIDIn    []int `json:"procDefIDIn,omitempty"`
	ProcDefIDNotIn []int `json:"procDefIDNotIn,omitempty"`

	// "app_id" field predicates.
	AppID      *int  `json:"appID,omitempty"`
	AppIDNEQ   *int  `json:"appIDNEQ,omitempty"`
	AppIDIn    []int `json:"appIDIn,omitempty"`
	AppIDNotIn []int `json:"appIDNotIn,omitempty"`
	AppIDGT    *int  `json:"appIDGT,omitempty"`
	AppIDGTE   *int  `json:"appIDGTE,omitempty"`
	AppIDLT    *int  `json:"appIDLT,omitempty"`
	AppIDLTE   *int  `json:"appIDLTE,omitempty"`

	// "business_key" field predicates.
	BusinessKey             *string  `json:"businessKey,omitempty"`
	BusinessKeyNEQ          *string  `json:"businessKeyNEQ,omitempty"`
	BusinessKeyIn           []string `json:"businessKeyIn,omitempty"`
	BusinessKeyNotIn        []string `json:"businessKeyNotIn,omitempty"`
	BusinessKeyGT           *string  `json:"businessKeyGT,omitempty"`
	BusinessKeyGTE          *string  `json:"businessKeyGTE,omitempty"`
	BusinessKeyLT           *string  `json:"businessKeyLT,omitempty"`
	BusinessKeyLTE          *string  `json:"businessKeyLTE,omitempty"`
	BusinessKeyContains     *string  `json:"businessKeyContains,omitempty"`
	BusinessKeyHasPrefix    *string  `json:"businessKeyHasPrefix,omitempty"`
	BusinessKeyHasSuffix    *string  `json:"businessKeyHasSuffix,omitempty"`
	BusinessKeyEqualFold    *string  `json:"businessKeyEqualFold,omitempty"`
	BusinessKeyContainsFold *string  `json:"businessKeyContainsFold,omitempty"`

	// "start_time" field predicates.
	StartTime      *time.Time  `json:"startTime,omitempty"`
	StartTimeNEQ   *time.Time  `json:"startTimeNEQ,omitempty"`
	StartTimeIn    []time.Time `json:"startTimeIn,omitempty"`
	StartTimeNotIn []time.Time `json:"startTimeNotIn,omitempty"`
	StartTimeGT    *time.Time  `json:"startTimeGT,omitempty"`
	StartTimeGTE   *time.Time  `json:"startTimeGTE,omitempty"`
	StartTimeLT    *time.Time  `json:"startTimeLT,omitempty"`
	StartTimeLTE   *time.Time  `json:"startTimeLTE,omitempty"`

	// "end_time" field predicates.
	EndTime       *time.Time  `json:"endTime,omitempty"`
	EndTimeNEQ    *time.Time  `json:"endTimeNEQ,omitempty"`
	EndTimeIn     []time.Time `json:"endTimeIn,omitempty"`
	EndTimeNotIn  []time.Time `json:"endTimeNotIn,omitempty"`
	EndTimeGT     *time.Time  `json:"endTimeGT,omitempty"`
	EndTimeGTE    *time.Time  `json:"endTimeGTE,omitempty"`
	EndTimeLT     *time.Time  `json:"endTimeLT,omitempty"`
	EndTimeLTE    *time.Time  `json:"endTimeLTE,omitempty"`
	EndTimeIsNil  bool        `json:"endTimeIsNil,omitempty"`
	EndTimeNotNil bool        `json:"endTimeNotNil,omitempty"`

	// "duration" field predicates.
	Duration       *int  `json:"duration,omitempty"`
	DurationNEQ    *int  `json:"durationNEQ,omitempty"`
	DurationIn     []int `json:"durationIn,omitempty"`
	DurationNotIn  []int `json:"durationNotIn,omitempty"`
	DurationGT     *int  `json:"durationGT,omitempty"`
	DurationGTE    *int  `json:"durationGTE,omitempty"`
	DurationLT     *int  `json:"durationLT,omitempty"`
	DurationLTE    *int  `json:"durationLTE,omitempty"`
	DurationIsNil  bool  `json:"durationIsNil,omitempty"`
	DurationNotNil bool  `json:"durationNotNil,omitempty"`

	// "start_user_id" field predicates.
	StartUserID      *int  `json:"startUserID,omitempty"`
	StartUserIDNEQ   *int  `json:"startUserIDNEQ,omitempty"`
	StartUserIDIn    []int `json:"startUserIDIn,omitempty"`
	StartUserIDNotIn []int `json:"startUserIDNotIn,omitempty"`
	StartUserIDGT    *int  `json:"startUserIDGT,omitempty"`
	StartUserIDGTE   *int  `json:"startUserIDGTE,omitempty"`
	StartUserIDLT    *int  `json:"startUserIDLT,omitempty"`
	StartUserIDLTE   *int  `json:"startUserIDLTE,omitempty"`

	// "supper_instance_id" field predicates.
	SupperInstanceID       *int  `json:"supperInstanceID,omitempty"`
	SupperInstanceIDNEQ    *int  `json:"supperInstanceIDNEQ,omitempty"`
	SupperInstanceIDIn     []int `json:"supperInstanceIDIn,omitempty"`
	SupperInstanceIDNotIn  []int `json:"supperInstanceIDNotIn,omitempty"`
	SupperInstanceIDGT     *int  `json:"supperInstanceIDGT,omitempty"`
	SupperInstanceIDGTE    *int  `json:"supperInstanceIDGTE,omitempty"`
	SupperInstanceIDLT     *int  `json:"supperInstanceIDLT,omitempty"`
	SupperInstanceIDLTE    *int  `json:"supperInstanceIDLTE,omitempty"`
	SupperInstanceIDIsNil  bool  `json:"supperInstanceIDIsNil,omitempty"`
	SupperInstanceIDNotNil bool  `json:"supperInstanceIDNotNil,omitempty"`

	// "root_instance_id" field predicates.
	RootInstanceID       *int  `json:"rootInstanceID,omitempty"`
	RootInstanceIDNEQ    *int  `json:"rootInstanceIDNEQ,omitempty"`
	RootInstanceIDIn     []int `json:"rootInstanceIDIn,omitempty"`
	RootInstanceIDNotIn  []int `json:"rootInstanceIDNotIn,omitempty"`
	RootInstanceIDGT     *int  `json:"rootInstanceIDGT,omitempty"`
	RootInstanceIDGTE    *int  `json:"rootInstanceIDGTE,omitempty"`
	RootInstanceIDLT     *int  `json:"rootInstanceIDLT,omitempty"`
	RootInstanceIDLTE    *int  `json:"rootInstanceIDLTE,omitempty"`
	RootInstanceIDIsNil  bool  `json:"rootInstanceIDIsNil,omitempty"`
	RootInstanceIDNotNil bool  `json:"rootInstanceIDNotNil,omitempty"`

	// "deleted_time" field predicates.
	DeletedTime       *time.Time  `json:"deletedTime,omitempty"`
	DeletedTimeNEQ    *time.Time  `json:"deletedTimeNEQ,omitempty"`
	DeletedTimeIn     []time.Time `json:"deletedTimeIn,omitempty"`
	DeletedTimeNotIn  []time.Time `json:"deletedTimeNotIn,omitempty"`
	DeletedTimeGT     *time.Time  `json:"deletedTimeGT,omitempty"`
	DeletedTimeGTE    *time.Time  `json:"deletedTimeGTE,omitempty"`
	DeletedTimeLT     *time.Time  `json:"deletedTimeLT,omitempty"`
	DeletedTimeLTE    *time.Time  `json:"deletedTimeLTE,omitempty"`
	DeletedTimeIsNil  bool        `json:"deletedTimeIsNil,omitempty"`
	DeletedTimeNotNil bool        `json:"deletedTimeNotNil,omitempty"`

	// "deleted_reason" field predicates.
	DeletedReason             *string  `json:"deletedReason,omitempty"`
	DeletedReasonNEQ          *string  `json:"deletedReasonNEQ,omitempty"`
	DeletedReasonIn           []string `json:"deletedReasonIn,omitempty"`
	DeletedReasonNotIn        []string `json:"deletedReasonNotIn,omitempty"`
	DeletedReasonGT           *string  `json:"deletedReasonGT,omitempty"`
	DeletedReasonGTE          *string  `json:"deletedReasonGTE,omitempty"`
	DeletedReasonLT           *string  `json:"deletedReasonLT,omitempty"`
	DeletedReasonLTE          *string  `json:"deletedReasonLTE,omitempty"`
	DeletedReasonContains     *string  `json:"deletedReasonContains,omitempty"`
	DeletedReasonHasPrefix    *string  `json:"deletedReasonHasPrefix,omitempty"`
	DeletedReasonHasSuffix    *string  `json:"deletedReasonHasSuffix,omitempty"`
	DeletedReasonIsNil        bool     `json:"deletedReasonIsNil,omitempty"`
	DeletedReasonNotNil       bool     `json:"deletedReasonNotNil,omitempty"`
	DeletedReasonEqualFold    *string  `json:"deletedReasonEqualFold,omitempty"`
	DeletedReasonContainsFold *string  `json:"deletedReasonContainsFold,omitempty"`

	// "status" field predicates.
	Status      *procinst.Status  `json:"status,omitempty"`
	StatusNEQ   *procinst.Status  `json:"statusNEQ,omitempty"`
	StatusIn    []procinst.Status `json:"statusIn,omitempty"`
	StatusNotIn []procinst.Status `json:"statusNotIn,omitempty"`

	// "proc_def" edge predicates.
	HasProcDef     *bool                `json:"hasProcDef,omitempty"`
	HasProcDefWith []*ProcDefWhereInput `json:"hasProcDefWith,omitempty"`

	// "tasks" edge predicates.
	HasTasks     *bool             `json:"hasTasks,omitempty"`
	HasTasksWith []*TaskWhereInput `json:"hasTasksWith,omitempty"`
}

ProcInstWhereInput represents a where input for filtering ProcInst queries.

func (*ProcInstWhereInput) AddPredicates

func (i *ProcInstWhereInput) AddPredicates(predicates ...predicate.ProcInst)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ProcInstWhereInput) Filter

Filter applies the ProcInstWhereInput filter on the ProcInstQuery builder.

func (*ProcInstWhereInput) P

P returns a predicate for filtering procinsts. An error is returned if the input is empty or invalid.

type ProcInsts

type ProcInsts []*ProcInst

ProcInsts is a parsable slice of ProcInst.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type ResolvedGlobal

type ResolvedGlobal struct{ Type, ID string }

func FromGlobalID

func FromGlobalID(s string) (*ResolvedGlobal, error)

func (*ResolvedGlobal) Int

func (r *ResolvedGlobal) Int() (int, error)

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type SchemaConfig

type SchemaConfig = internal.SchemaConfig

SchemaConfig represents alternative schema names for all tables that can be passed at runtime.

type Task

type Task struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 流程实例ID
	ProcInstID int `json:"proc_inst_id,omitempty"`
	// 流程定义ID
	ProcDefID int `json:"proc_def_id,omitempty"`
	// workflow id
	ExecutionID string `json:"execution_id,omitempty"`
	// run id
	RunID string `json:"run_id,omitempty"`
	// 流程节点名称
	TaskDefKey string `json:"task_def_key,omitempty"`
	// 父任务ID
	ParentID int `json:"parent_id,omitempty"`
	// 任务描述
	Comments string `json:"comments,omitempty"`
	// 设定的受理人
	Assignee string `json:"assignee,omitempty"`
	// 任务成员人数
	MemberCount int32 `json:"member_count,omitempty"`
	// 未任务成员完成人数
	UnfinishedCount int32 `json:"unfinished_count,omitempty"`
	// 通过数量
	AgreeCount int32 `json:"agree_count,omitempty"`
	// 会签类型
	Kind task.Kind `json:"kind,omitempty"`
	// 默认并行false,顺序执行true
	Sequential bool `json:"sequential,omitempty"`
	// 创建时间
	CreatedAt time.Time `json:"created_at,omitempty"`
	// 创建时间
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 任务状态
	Status task.Status `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TaskQuery when eager-loading is set.
	Edges TaskEdges `json:"edges"`
	// contains filtered or unexported fields
}

Task is the model entity for the Task schema.

func (*Task) GlobalID

func (t *Task) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Task node.

func (*Task) IsNode

func (*Task) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Task) NamedTaskIdentities

func (t *Task) NamedTaskIdentities(name string) ([]*IdentityLink, error)

NamedTaskIdentities returns the TaskIdentities named value or an error if the edge was not loaded in eager-loading with this name.

func (*Task) ProcInst

func (t *Task) ProcInst(ctx context.Context) (*ProcInst, error)

func (*Task) QueryProcInst

func (t *Task) QueryProcInst() *ProcInstQuery

QueryProcInst queries the "proc_inst" edge of the Task entity.

func (*Task) QueryTaskIdentities

func (t *Task) QueryTaskIdentities() *IdentityLinkQuery

QueryTaskIdentities queries the "task_identities" edge of the Task entity.

func (*Task) String

func (t *Task) String() string

String implements the fmt.Stringer.

func (*Task) TaskIdentities

func (t *Task) TaskIdentities(ctx context.Context) (result []*IdentityLink, err error)

func (*Task) ToEdge

func (t *Task) ToEdge(order *TaskOrder) *TaskEdge

ToEdge converts Task into TaskEdge.

func (*Task) Unwrap

func (t *Task) Unwrap() *Task

Unwrap unwraps the Task entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Task) Update

func (t *Task) Update() *TaskUpdateOne

Update returns a builder for updating this Task. Note that you need to call Task.Unwrap() before calling this method if this Task was returned from a transaction, and the transaction was committed or rolled back.

func (*Task) Value

func (t *Task) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Task. This includes values selected through modifiers, order, etc.

type TaskClient

type TaskClient struct {
	// contains filtered or unexported fields
}

TaskClient is a client for the Task schema.

func NewTaskClient

func NewTaskClient(c config) *TaskClient

NewTaskClient returns a client for the Task from the given config.

func (*TaskClient) Create

func (c *TaskClient) Create() *TaskCreate

Create returns a builder for creating a Task entity.

func (*TaskClient) CreateBulk

func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk

CreateBulk returns a builder for creating a bulk of Task entities.

func (*TaskClient) Delete

func (c *TaskClient) Delete() *TaskDelete

Delete returns a delete builder for Task.

func (*TaskClient) DeleteOne

func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TaskClient) DeleteOneID

func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TaskClient) Get

func (c *TaskClient) Get(ctx context.Context, id int) (*Task, error)

Get returns a Task entity by its id.

func (*TaskClient) GetX

func (c *TaskClient) GetX(ctx context.Context, id int) *Task

GetX is like Get, but panics if an error occurs.

func (*TaskClient) Hooks

func (c *TaskClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TaskClient) Intercept

func (c *TaskClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `task.Intercept(f(g(h())))`.

func (*TaskClient) Interceptors

func (c *TaskClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TaskClient) Query

func (c *TaskClient) Query() *TaskQuery

Query returns a query builder for Task.

func (*TaskClient) QueryProcInst

func (c *TaskClient) QueryProcInst(t *Task) *ProcInstQuery

QueryProcInst queries the proc_inst edge of a Task.

func (*TaskClient) QueryTaskIdentities

func (c *TaskClient) QueryTaskIdentities(t *Task) *IdentityLinkQuery

QueryTaskIdentities queries the task_identities edge of a Task.

func (*TaskClient) Update

func (c *TaskClient) Update() *TaskUpdate

Update returns an update builder for Task.

func (*TaskClient) UpdateOne

func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TaskClient) UpdateOneID

func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TaskClient) Use

func (c *TaskClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `task.Hooks(f(g(h())))`.

type TaskConnection

type TaskConnection struct {
	Edges      []*TaskEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

TaskConnection is the connection containing edges to Task.

type TaskCreate

type TaskCreate struct {
	// contains filtered or unexported fields
}

TaskCreate is the builder for creating a Task entity.

func (*TaskCreate) AddTaskIdentities

func (tc *TaskCreate) AddTaskIdentities(i ...*IdentityLink) *TaskCreate

AddTaskIdentities adds the "task_identities" edges to the IdentityLink entity.

func (*TaskCreate) AddTaskIdentityIDs

func (tc *TaskCreate) AddTaskIdentityIDs(ids ...int) *TaskCreate

AddTaskIdentityIDs adds the "task_identities" edge to the IdentityLink entity by IDs.

func (*TaskCreate) Exec

func (tc *TaskCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskCreate) ExecX

func (tc *TaskCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskCreate) Mutation

func (tc *TaskCreate) Mutation() *TaskMutation

Mutation returns the TaskMutation object of the builder.

func (*TaskCreate) OnConflict

func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Task.Create().
	SetTenantID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TaskUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*TaskCreate) OnConflictColumns

func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TaskCreate) Save

func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)

Save creates the Task in the database.

func (*TaskCreate) SaveX

func (tc *TaskCreate) SaveX(ctx context.Context) *Task

SaveX calls Save and panics if Save returns an error.

func (*TaskCreate) SetAgreeCount

func (tc *TaskCreate) SetAgreeCount(i int32) *TaskCreate

SetAgreeCount sets the "agree_count" field.

func (*TaskCreate) SetAssignee

func (tc *TaskCreate) SetAssignee(s string) *TaskCreate

SetAssignee sets the "assignee" field.

func (*TaskCreate) SetComments

func (tc *TaskCreate) SetComments(s string) *TaskCreate

SetComments sets the "comments" field.

func (*TaskCreate) SetCreatedAt

func (tc *TaskCreate) SetCreatedAt(t time.Time) *TaskCreate

SetCreatedAt sets the "created_at" field.

func (*TaskCreate) SetExecutionID

func (tc *TaskCreate) SetExecutionID(s string) *TaskCreate

SetExecutionID sets the "execution_id" field.

func (*TaskCreate) SetID

func (tc *TaskCreate) SetID(i int) *TaskCreate

SetID sets the "id" field.

func (*TaskCreate) SetKind

func (tc *TaskCreate) SetKind(t task.Kind) *TaskCreate

SetKind sets the "kind" field.

func (*TaskCreate) SetMemberCount

func (tc *TaskCreate) SetMemberCount(i int32) *TaskCreate

SetMemberCount sets the "member_count" field.

func (*TaskCreate) SetNillableAgreeCount

func (tc *TaskCreate) SetNillableAgreeCount(i *int32) *TaskCreate

SetNillableAgreeCount sets the "agree_count" field if the given value is not nil.

func (*TaskCreate) SetNillableAssignee

func (tc *TaskCreate) SetNillableAssignee(s *string) *TaskCreate

SetNillableAssignee sets the "assignee" field if the given value is not nil.

func (*TaskCreate) SetNillableComments

func (tc *TaskCreate) SetNillableComments(s *string) *TaskCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*TaskCreate) SetNillableCreatedAt

func (tc *TaskCreate) SetNillableCreatedAt(t *time.Time) *TaskCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TaskCreate) SetNillableID

func (tc *TaskCreate) SetNillableID(i *int) *TaskCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*TaskCreate) SetNillableKind

func (tc *TaskCreate) SetNillableKind(t *task.Kind) *TaskCreate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*TaskCreate) SetNillableParentID

func (tc *TaskCreate) SetNillableParentID(i *int) *TaskCreate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*TaskCreate) SetNillableRunID

func (tc *TaskCreate) SetNillableRunID(s *string) *TaskCreate

SetNillableRunID sets the "run_id" field if the given value is not nil.

func (*TaskCreate) SetNillableSequential

func (tc *TaskCreate) SetNillableSequential(b *bool) *TaskCreate

SetNillableSequential sets the "sequential" field if the given value is not nil.

func (*TaskCreate) SetNillableStatus

func (tc *TaskCreate) SetNillableStatus(t *task.Status) *TaskCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*TaskCreate) SetNillableUpdatedAt

func (tc *TaskCreate) SetNillableUpdatedAt(t *time.Time) *TaskCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*TaskCreate) SetParentID

func (tc *TaskCreate) SetParentID(i int) *TaskCreate

SetParentID sets the "parent_id" field.

func (*TaskCreate) SetProcDefID

func (tc *TaskCreate) SetProcDefID(i int) *TaskCreate

SetProcDefID sets the "proc_def_id" field.

func (*TaskCreate) SetProcInst

func (tc *TaskCreate) SetProcInst(p *ProcInst) *TaskCreate

SetProcInst sets the "proc_inst" edge to the ProcInst entity.

func (*TaskCreate) SetProcInstID

func (tc *TaskCreate) SetProcInstID(i int) *TaskCreate

SetProcInstID sets the "proc_inst_id" field.

func (*TaskCreate) SetRunID

func (tc *TaskCreate) SetRunID(s string) *TaskCreate

SetRunID sets the "run_id" field.

func (*TaskCreate) SetSequential

func (tc *TaskCreate) SetSequential(b bool) *TaskCreate

SetSequential sets the "sequential" field.

func (*TaskCreate) SetStatus

func (tc *TaskCreate) SetStatus(t task.Status) *TaskCreate

SetStatus sets the "status" field.

func (*TaskCreate) SetTaskDefKey

func (tc *TaskCreate) SetTaskDefKey(s string) *TaskCreate

SetTaskDefKey sets the "task_def_key" field.

func (*TaskCreate) SetTenantID

func (tc *TaskCreate) SetTenantID(i int) *TaskCreate

SetTenantID sets the "tenant_id" field.

func (*TaskCreate) SetUnfinishedCount

func (tc *TaskCreate) SetUnfinishedCount(i int32) *TaskCreate

SetUnfinishedCount sets the "unfinished_count" field.

func (*TaskCreate) SetUpdatedAt

func (tc *TaskCreate) SetUpdatedAt(t time.Time) *TaskCreate

SetUpdatedAt sets the "updated_at" field.

type TaskCreateBulk

type TaskCreateBulk struct {
	// contains filtered or unexported fields
}

TaskCreateBulk is the builder for creating many Task entities in bulk.

func (*TaskCreateBulk) Exec

func (tcb *TaskCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskCreateBulk) ExecX

func (tcb *TaskCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskCreateBulk) OnConflict

func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Task.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TaskUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*TaskCreateBulk) OnConflictColumns

func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TaskCreateBulk) Save

func (tcb *TaskCreateBulk) Save(ctx context.Context) ([]*Task, error)

Save creates the Task entities in the database.

func (*TaskCreateBulk) SaveX

func (tcb *TaskCreateBulk) SaveX(ctx context.Context) []*Task

SaveX is like Save, but panics if an error occurs.

type TaskDelete

type TaskDelete struct {
	// contains filtered or unexported fields
}

TaskDelete is the builder for deleting a Task entity.

func (*TaskDelete) Exec

func (td *TaskDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TaskDelete) ExecX

func (td *TaskDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TaskDelete) Where

func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete

Where appends a list predicates to the TaskDelete builder.

type TaskDeleteOne

type TaskDeleteOne struct {
	// contains filtered or unexported fields
}

TaskDeleteOne is the builder for deleting a single Task entity.

func (*TaskDeleteOne) Exec

func (tdo *TaskDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TaskDeleteOne) ExecX

func (tdo *TaskDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskDeleteOne) Where

func (tdo *TaskDeleteOne) Where(ps ...predicate.Task) *TaskDeleteOne

Where appends a list predicates to the TaskDelete builder.

type TaskEdge

type TaskEdge struct {
	Node   *Task  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

TaskEdge is the edge representation of Task.

type TaskEdges

type TaskEdges struct {
	// 流程实例
	ProcInst *ProcInst `json:"proc_inst,omitempty"`
	// 任务主体
	TaskIdentities []*IdentityLink `json:"task_identities,omitempty"`
	// contains filtered or unexported fields
}

TaskEdges holds the relations/edges for other nodes in the graph.

func (TaskEdges) ProcInstOrErr

func (e TaskEdges) ProcInstOrErr() (*ProcInst, error)

ProcInstOrErr returns the ProcInst value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TaskEdges) TaskIdentitiesOrErr

func (e TaskEdges) TaskIdentitiesOrErr() ([]*IdentityLink, error)

TaskIdentitiesOrErr returns the TaskIdentities value or an error if the edge was not loaded in eager-loading.

type TaskGroupBy

type TaskGroupBy struct {
	// contains filtered or unexported fields
}

TaskGroupBy is the group-by builder for Task entities.

func (*TaskGroupBy) Aggregate

func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TaskGroupBy) Bool

func (s *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) BoolX

func (s *TaskGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TaskGroupBy) Bools

func (s *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) BoolsX

func (s *TaskGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskGroupBy) Float64

func (s *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) Float64X

func (s *TaskGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TaskGroupBy) Float64s

func (s *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) Float64sX

func (s *TaskGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskGroupBy) Int

func (s *TaskGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) IntX

func (s *TaskGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TaskGroupBy) Ints

func (s *TaskGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) IntsX

func (s *TaskGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskGroupBy) Scan

func (tgb *TaskGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TaskGroupBy) ScanX

func (s *TaskGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TaskGroupBy) String

func (s *TaskGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) StringX

func (s *TaskGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TaskGroupBy) Strings

func (s *TaskGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TaskGroupBy) StringsX

func (s *TaskGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskMutation

type TaskMutation struct {
	// contains filtered or unexported fields
}

TaskMutation represents an operation that mutates the Task nodes in the graph.

func (*TaskMutation) AddAgreeCount

func (m *TaskMutation) AddAgreeCount(i int32)

AddAgreeCount adds i to the "agree_count" field.

func (*TaskMutation) AddField

func (m *TaskMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TaskMutation) AddMemberCount

func (m *TaskMutation) AddMemberCount(i int32)

AddMemberCount adds i to the "member_count" field.

func (*TaskMutation) AddParentID

func (m *TaskMutation) AddParentID(i int)

AddParentID adds i to the "parent_id" field.

func (*TaskMutation) AddProcDefID

func (m *TaskMutation) AddProcDefID(i int)

AddProcDefID adds i to the "proc_def_id" field.

func (*TaskMutation) AddTaskIdentityIDs

func (m *TaskMutation) AddTaskIdentityIDs(ids ...int)

AddTaskIdentityIDs adds the "task_identities" edge to the IdentityLink entity by ids.

func (*TaskMutation) AddTenantID

func (m *TaskMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*TaskMutation) AddUnfinishedCount

func (m *TaskMutation) AddUnfinishedCount(i int32)

AddUnfinishedCount adds i to the "unfinished_count" field.

func (*TaskMutation) AddedAgreeCount

func (m *TaskMutation) AddedAgreeCount() (r int32, exists bool)

AddedAgreeCount returns the value that was added to the "agree_count" field in this mutation.

func (*TaskMutation) AddedEdges

func (m *TaskMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TaskMutation) AddedField

func (m *TaskMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TaskMutation) AddedFields

func (m *TaskMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TaskMutation) AddedIDs

func (m *TaskMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TaskMutation) AddedMemberCount

func (m *TaskMutation) AddedMemberCount() (r int32, exists bool)

AddedMemberCount returns the value that was added to the "member_count" field in this mutation.

func (*TaskMutation) AddedParentID

func (m *TaskMutation) AddedParentID() (r int, exists bool)

AddedParentID returns the value that was added to the "parent_id" field in this mutation.

func (*TaskMutation) AddedProcDefID

func (m *TaskMutation) AddedProcDefID() (r int, exists bool)

AddedProcDefID returns the value that was added to the "proc_def_id" field in this mutation.

func (*TaskMutation) AddedTenantID

func (m *TaskMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*TaskMutation) AddedUnfinishedCount

func (m *TaskMutation) AddedUnfinishedCount() (r int32, exists bool)

AddedUnfinishedCount returns the value that was added to the "unfinished_count" field in this mutation.

func (*TaskMutation) AgreeCount

func (m *TaskMutation) AgreeCount() (r int32, exists bool)

AgreeCount returns the value of the "agree_count" field in the mutation.

func (*TaskMutation) Assignee

func (m *TaskMutation) Assignee() (r string, exists bool)

Assignee returns the value of the "assignee" field in the mutation.

func (*TaskMutation) AssigneeCleared

func (m *TaskMutation) AssigneeCleared() bool

AssigneeCleared returns if the "assignee" field was cleared in this mutation.

func (*TaskMutation) ClearAssignee

func (m *TaskMutation) ClearAssignee()

ClearAssignee clears the value of the "assignee" field.

func (*TaskMutation) ClearComments

func (m *TaskMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*TaskMutation) ClearEdge

func (m *TaskMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*TaskMutation) ClearField

func (m *TaskMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*TaskMutation) ClearParentID

func (m *TaskMutation) ClearParentID()

ClearParentID clears the value of the "parent_id" field.

func (*TaskMutation) ClearProcInst

func (m *TaskMutation) ClearProcInst()

ClearProcInst clears the "proc_inst" edge to the ProcInst entity.

func (*TaskMutation) ClearRunID

func (m *TaskMutation) ClearRunID()

ClearRunID clears the value of the "run_id" field.

func (*TaskMutation) ClearTaskIdentities

func (m *TaskMutation) ClearTaskIdentities()

ClearTaskIdentities clears the "task_identities" edge to the IdentityLink entity.

func (*TaskMutation) ClearedEdges

func (m *TaskMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TaskMutation) ClearedFields

func (m *TaskMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TaskMutation) Client

func (m TaskMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*TaskMutation) Comments

func (m *TaskMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*TaskMutation) CommentsCleared

func (m *TaskMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*TaskMutation) CreatedAt

func (m *TaskMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TaskMutation) EdgeCleared

func (m *TaskMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TaskMutation) ExecutionID

func (m *TaskMutation) ExecutionID() (r string, exists bool)

ExecutionID returns the value of the "execution_id" field in the mutation.

func (*TaskMutation) Field

func (m *TaskMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TaskMutation) FieldCleared

func (m *TaskMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TaskMutation) Fields

func (m *TaskMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*TaskMutation) ID

func (m *TaskMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TaskMutation) IDs

func (m *TaskMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TaskMutation) Kind

func (m *TaskMutation) Kind() (r task.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*TaskMutation) MemberCount

func (m *TaskMutation) MemberCount() (r int32, exists bool)

MemberCount returns the value of the "member_count" field in the mutation.

func (*TaskMutation) OldAgreeCount

func (m *TaskMutation) OldAgreeCount(ctx context.Context) (v int32, err error)

OldAgreeCount returns the old "agree_count" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldAssignee

func (m *TaskMutation) OldAssignee(ctx context.Context) (v string, err error)

OldAssignee returns the old "assignee" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldComments

func (m *TaskMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldCreatedAt

func (m *TaskMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldExecutionID

func (m *TaskMutation) OldExecutionID(ctx context.Context) (v string, err error)

OldExecutionID returns the old "execution_id" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldField

func (m *TaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*TaskMutation) OldKind

func (m *TaskMutation) OldKind(ctx context.Context) (v task.Kind, err error)

OldKind returns the old "kind" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldMemberCount

func (m *TaskMutation) OldMemberCount(ctx context.Context) (v int32, err error)

OldMemberCount returns the old "member_count" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldParentID

func (m *TaskMutation) OldParentID(ctx context.Context) (v int, err error)

OldParentID returns the old "parent_id" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldProcDefID

func (m *TaskMutation) OldProcDefID(ctx context.Context) (v int, err error)

OldProcDefID returns the old "proc_def_id" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldProcInstID

func (m *TaskMutation) OldProcInstID(ctx context.Context) (v int, err error)

OldProcInstID returns the old "proc_inst_id" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldRunID

func (m *TaskMutation) OldRunID(ctx context.Context) (v string, err error)

OldRunID returns the old "run_id" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldSequential

func (m *TaskMutation) OldSequential(ctx context.Context) (v bool, err error)

OldSequential returns the old "sequential" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldStatus

func (m *TaskMutation) OldStatus(ctx context.Context) (v task.Status, err error)

OldStatus returns the old "status" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldTaskDefKey

func (m *TaskMutation) OldTaskDefKey(ctx context.Context) (v string, err error)

OldTaskDefKey returns the old "task_def_key" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldTenantID

func (m *TaskMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldUnfinishedCount

func (m *TaskMutation) OldUnfinishedCount(ctx context.Context) (v int32, err error)

OldUnfinishedCount returns the old "unfinished_count" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) OldUpdatedAt

func (m *TaskMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TaskMutation) Op

func (m *TaskMutation) Op() Op

Op returns the operation name.

func (*TaskMutation) ParentID

func (m *TaskMutation) ParentID() (r int, exists bool)

ParentID returns the value of the "parent_id" field in the mutation.

func (*TaskMutation) ParentIDCleared

func (m *TaskMutation) ParentIDCleared() bool

ParentIDCleared returns if the "parent_id" field was cleared in this mutation.

func (*TaskMutation) ProcDefID

func (m *TaskMutation) ProcDefID() (r int, exists bool)

ProcDefID returns the value of the "proc_def_id" field in the mutation.

func (*TaskMutation) ProcInstCleared

func (m *TaskMutation) ProcInstCleared() bool

ProcInstCleared reports if the "proc_inst" edge to the ProcInst entity was cleared.

func (*TaskMutation) ProcInstID

func (m *TaskMutation) ProcInstID() (r int, exists bool)

ProcInstID returns the value of the "proc_inst_id" field in the mutation.

func (*TaskMutation) ProcInstIDs

func (m *TaskMutation) ProcInstIDs() (ids []int)

ProcInstIDs returns the "proc_inst" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProcInstID instead. It exists only for internal usage by the builders.

func (*TaskMutation) RemoveTaskIdentityIDs

func (m *TaskMutation) RemoveTaskIdentityIDs(ids ...int)

RemoveTaskIdentityIDs removes the "task_identities" edge to the IdentityLink entity by IDs.

func (*TaskMutation) RemovedEdges

func (m *TaskMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TaskMutation) RemovedIDs

func (m *TaskMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*TaskMutation) RemovedTaskIdentitiesIDs

func (m *TaskMutation) RemovedTaskIdentitiesIDs() (ids []int)

RemovedTaskIdentities returns the removed IDs of the "task_identities" edge to the IdentityLink entity.

func (*TaskMutation) ResetAgreeCount

func (m *TaskMutation) ResetAgreeCount()

ResetAgreeCount resets all changes to the "agree_count" field.

func (*TaskMutation) ResetAssignee

func (m *TaskMutation) ResetAssignee()

ResetAssignee resets all changes to the "assignee" field.

func (*TaskMutation) ResetComments

func (m *TaskMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*TaskMutation) ResetCreatedAt

func (m *TaskMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TaskMutation) ResetEdge

func (m *TaskMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*TaskMutation) ResetExecutionID

func (m *TaskMutation) ResetExecutionID()

ResetExecutionID resets all changes to the "execution_id" field.

func (*TaskMutation) ResetField

func (m *TaskMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*TaskMutation) ResetKind

func (m *TaskMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*TaskMutation) ResetMemberCount

func (m *TaskMutation) ResetMemberCount()

ResetMemberCount resets all changes to the "member_count" field.

func (*TaskMutation) ResetParentID

func (m *TaskMutation) ResetParentID()

ResetParentID resets all changes to the "parent_id" field.

func (*TaskMutation) ResetProcDefID

func (m *TaskMutation) ResetProcDefID()

ResetProcDefID resets all changes to the "proc_def_id" field.

func (*TaskMutation) ResetProcInst

func (m *TaskMutation) ResetProcInst()

ResetProcInst resets all changes to the "proc_inst" edge.

func (*TaskMutation) ResetProcInstID

func (m *TaskMutation) ResetProcInstID()

ResetProcInstID resets all changes to the "proc_inst_id" field.

func (*TaskMutation) ResetRunID

func (m *TaskMutation) ResetRunID()

ResetRunID resets all changes to the "run_id" field.

func (*TaskMutation) ResetSequential

func (m *TaskMutation) ResetSequential()

ResetSequential resets all changes to the "sequential" field.

func (*TaskMutation) ResetStatus

func (m *TaskMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*TaskMutation) ResetTaskDefKey

func (m *TaskMutation) ResetTaskDefKey()

ResetTaskDefKey resets all changes to the "task_def_key" field.

func (*TaskMutation) ResetTaskIdentities

func (m *TaskMutation) ResetTaskIdentities()

ResetTaskIdentities resets all changes to the "task_identities" edge.

func (*TaskMutation) ResetTenantID

func (m *TaskMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*TaskMutation) ResetUnfinishedCount

func (m *TaskMutation) ResetUnfinishedCount()

ResetUnfinishedCount resets all changes to the "unfinished_count" field.

func (*TaskMutation) ResetUpdatedAt

func (m *TaskMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*TaskMutation) RunID

func (m *TaskMutation) RunID() (r string, exists bool)

RunID returns the value of the "run_id" field in the mutation.

func (*TaskMutation) RunIDCleared

func (m *TaskMutation) RunIDCleared() bool

RunIDCleared returns if the "run_id" field was cleared in this mutation.

func (*TaskMutation) Sequential

func (m *TaskMutation) Sequential() (r bool, exists bool)

Sequential returns the value of the "sequential" field in the mutation.

func (*TaskMutation) SetAgreeCount

func (m *TaskMutation) SetAgreeCount(i int32)

SetAgreeCount sets the "agree_count" field.

func (*TaskMutation) SetAssignee

func (m *TaskMutation) SetAssignee(s string)

SetAssignee sets the "assignee" field.

func (*TaskMutation) SetComments

func (m *TaskMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*TaskMutation) SetCreatedAt

func (m *TaskMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TaskMutation) SetExecutionID

func (m *TaskMutation) SetExecutionID(s string)

SetExecutionID sets the "execution_id" field.

func (*TaskMutation) SetField

func (m *TaskMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TaskMutation) SetID

func (m *TaskMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Task entities.

func (*TaskMutation) SetKind

func (m *TaskMutation) SetKind(t task.Kind)

SetKind sets the "kind" field.

func (*TaskMutation) SetMemberCount

func (m *TaskMutation) SetMemberCount(i int32)

SetMemberCount sets the "member_count" field.

func (*TaskMutation) SetOp

func (m *TaskMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TaskMutation) SetParentID

func (m *TaskMutation) SetParentID(i int)

SetParentID sets the "parent_id" field.

func (*TaskMutation) SetProcDefID

func (m *TaskMutation) SetProcDefID(i int)

SetProcDefID sets the "proc_def_id" field.

func (*TaskMutation) SetProcInstID

func (m *TaskMutation) SetProcInstID(i int)

SetProcInstID sets the "proc_inst_id" field.

func (*TaskMutation) SetRunID

func (m *TaskMutation) SetRunID(s string)

SetRunID sets the "run_id" field.

func (*TaskMutation) SetSequential

func (m *TaskMutation) SetSequential(b bool)

SetSequential sets the "sequential" field.

func (*TaskMutation) SetStatus

func (m *TaskMutation) SetStatus(t task.Status)

SetStatus sets the "status" field.

func (*TaskMutation) SetTaskDefKey

func (m *TaskMutation) SetTaskDefKey(s string)

SetTaskDefKey sets the "task_def_key" field.

func (*TaskMutation) SetTenantID

func (m *TaskMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*TaskMutation) SetUnfinishedCount

func (m *TaskMutation) SetUnfinishedCount(i int32)

SetUnfinishedCount sets the "unfinished_count" field.

func (*TaskMutation) SetUpdatedAt

func (m *TaskMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*TaskMutation) Status

func (m *TaskMutation) Status() (r task.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*TaskMutation) TaskDefKey

func (m *TaskMutation) TaskDefKey() (r string, exists bool)

TaskDefKey returns the value of the "task_def_key" field in the mutation.

func (*TaskMutation) TaskIdentitiesCleared

func (m *TaskMutation) TaskIdentitiesCleared() bool

TaskIdentitiesCleared reports if the "task_identities" edge to the IdentityLink entity was cleared.

func (*TaskMutation) TaskIdentitiesIDs

func (m *TaskMutation) TaskIdentitiesIDs() (ids []int)

TaskIdentitiesIDs returns the "task_identities" edge IDs in the mutation.

func (*TaskMutation) TenantID

func (m *TaskMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (TaskMutation) Tx

func (m TaskMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TaskMutation) Type

func (m *TaskMutation) Type() string

Type returns the node type of this mutation (Task).

func (*TaskMutation) UnfinishedCount

func (m *TaskMutation) UnfinishedCount() (r int32, exists bool)

UnfinishedCount returns the value of the "unfinished_count" field in the mutation.

func (*TaskMutation) UpdatedAt

func (m *TaskMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*TaskMutation) Where

func (m *TaskMutation) Where(ps ...predicate.Task)

Where appends a list predicates to the TaskMutation builder.

func (*TaskMutation) WhereP

func (m *TaskMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TaskMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TaskOrder

type TaskOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *TaskOrderField `json:"field"`
}

TaskOrder defines the ordering of Task.

type TaskOrderField

type TaskOrderField struct {
	// Value extracts the ordering value from the given Task.
	Value func(*Task) (ent.Value, error)
	// contains filtered or unexported fields
}

TaskOrderField defines the ordering field of Task.

type TaskPaginateOption

type TaskPaginateOption func(*taskPager) error

TaskPaginateOption enables pagination customization.

func WithTaskFilter

func WithTaskFilter(filter func(*TaskQuery) (*TaskQuery, error)) TaskPaginateOption

WithTaskFilter configures pagination filter.

func WithTaskOrder

func WithTaskOrder(order *TaskOrder) TaskPaginateOption

WithTaskOrder configures pagination ordering.

type TaskQuery

type TaskQuery struct {
	// contains filtered or unexported fields
}

TaskQuery is the builder for querying Task entities.

func (*TaskQuery) Aggregate

func (tq *TaskQuery) Aggregate(fns ...AggregateFunc) *TaskSelect

Aggregate returns a TaskSelect configured with the given aggregations.

func (*TaskQuery) All

func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error)

All executes the query and returns a list of Tasks.

func (*TaskQuery) AllX

func (tq *TaskQuery) AllX(ctx context.Context) []*Task

AllX is like All, but panics if an error occurs.

func (*TaskQuery) Clone

func (tq *TaskQuery) Clone() *TaskQuery

Clone returns a duplicate of the TaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TaskQuery) CollectFields

func (t *TaskQuery) CollectFields(ctx context.Context, satisfies ...string) (*TaskQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*TaskQuery) Count

func (tq *TaskQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TaskQuery) CountX

func (tq *TaskQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TaskQuery) Exist

func (tq *TaskQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TaskQuery) ExistX

func (tq *TaskQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TaskQuery) First

func (tq *TaskQuery) First(ctx context.Context) (*Task, error)

First returns the first Task entity from the query. Returns a *NotFoundError when no Task was found.

func (*TaskQuery) FirstID

func (tq *TaskQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Task ID from the query. Returns a *NotFoundError when no Task ID was found.

func (*TaskQuery) FirstIDX

func (tq *TaskQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TaskQuery) FirstX

func (tq *TaskQuery) FirstX(ctx context.Context) *Task

FirstX is like First, but panics if an error occurs.

func (*TaskQuery) GroupBy

func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	TenantID int `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Task.Query().
	GroupBy(task.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TaskQuery) IDs

func (tq *TaskQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Task IDs.

func (*TaskQuery) IDsX

func (tq *TaskQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TaskQuery) Limit

func (tq *TaskQuery) Limit(limit int) *TaskQuery

Limit the number of records to be returned by this query.

func (*TaskQuery) Offset

func (tq *TaskQuery) Offset(offset int) *TaskQuery

Offset to start from.

func (*TaskQuery) Only

func (tq *TaskQuery) Only(ctx context.Context) (*Task, error)

Only returns a single Task entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Task entity is found. Returns a *NotFoundError when no Task entities are found.

func (*TaskQuery) OnlyID

func (tq *TaskQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Task ID in the query. Returns a *NotSingularError when more than one Task ID is found. Returns a *NotFoundError when no entities are found.

func (*TaskQuery) OnlyIDX

func (tq *TaskQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TaskQuery) OnlyX

func (tq *TaskQuery) OnlyX(ctx context.Context) *Task

OnlyX is like Only, but panics if an error occurs.

func (*TaskQuery) Order

func (tq *TaskQuery) Order(o ...task.OrderOption) *TaskQuery

Order specifies how the records should be ordered.

func (*TaskQuery) Paginate

func (t *TaskQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...TaskPaginateOption,
) (*TaskConnection, error)

Paginate executes the query and returns a relay based cursor connection to Task.

func (*TaskQuery) QueryProcInst

func (tq *TaskQuery) QueryProcInst() *ProcInstQuery

QueryProcInst chains the current query on the "proc_inst" edge.

func (*TaskQuery) QueryTaskIdentities

func (tq *TaskQuery) QueryTaskIdentities() *IdentityLinkQuery

QueryTaskIdentities chains the current query on the "task_identities" edge.

func (*TaskQuery) Select

func (tq *TaskQuery) Select(fields ...string) *TaskSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	TenantID int `json:"tenant_id,omitempty"`
}

client.Task.Query().
	Select(task.FieldTenantID).
	Scan(ctx, &v)

func (*TaskQuery) Unique

func (tq *TaskQuery) Unique(unique bool) *TaskQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*TaskQuery) Where

func (tq *TaskQuery) Where(ps ...predicate.Task) *TaskQuery

Where adds a new predicate for the TaskQuery builder.

func (*TaskQuery) WithNamedTaskIdentities

func (tq *TaskQuery) WithNamedTaskIdentities(name string, opts ...func(*IdentityLinkQuery)) *TaskQuery

WithNamedTaskIdentities tells the query-builder to eager-load the nodes that are connected to the "task_identities" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*TaskQuery) WithProcInst

func (tq *TaskQuery) WithProcInst(opts ...func(*ProcInstQuery)) *TaskQuery

WithProcInst tells the query-builder to eager-load the nodes that are connected to the "proc_inst" edge. The optional arguments are used to configure the query builder of the edge.

func (*TaskQuery) WithTaskIdentities

func (tq *TaskQuery) WithTaskIdentities(opts ...func(*IdentityLinkQuery)) *TaskQuery

WithTaskIdentities tells the query-builder to eager-load the nodes that are connected to the "task_identities" edge. The optional arguments are used to configure the query builder of the edge.

type TaskSelect

type TaskSelect struct {
	*TaskQuery
	// contains filtered or unexported fields
}

TaskSelect is the builder for selecting fields of Task entities.

func (*TaskSelect) Aggregate

func (ts *TaskSelect) Aggregate(fns ...AggregateFunc) *TaskSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TaskSelect) Bool

func (s *TaskSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TaskSelect) BoolX

func (s *TaskSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TaskSelect) Bools

func (s *TaskSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TaskSelect) BoolsX

func (s *TaskSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskSelect) Float64

func (s *TaskSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TaskSelect) Float64X

func (s *TaskSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TaskSelect) Float64s

func (s *TaskSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TaskSelect) Float64sX

func (s *TaskSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskSelect) Int

func (s *TaskSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TaskSelect) IntX

func (s *TaskSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TaskSelect) Ints

func (s *TaskSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TaskSelect) IntsX

func (s *TaskSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskSelect) Scan

func (ts *TaskSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TaskSelect) ScanX

func (s *TaskSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TaskSelect) String

func (s *TaskSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TaskSelect) StringX

func (s *TaskSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TaskSelect) Strings

func (s *TaskSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TaskSelect) StringsX

func (s *TaskSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskUpdate

type TaskUpdate struct {
	// contains filtered or unexported fields
}

TaskUpdate is the builder for updating Task entities.

func (*TaskUpdate) AddAgreeCount

func (tu *TaskUpdate) AddAgreeCount(i int32) *TaskUpdate

AddAgreeCount adds i to the "agree_count" field.

func (*TaskUpdate) AddMemberCount

func (tu *TaskUpdate) AddMemberCount(i int32) *TaskUpdate

AddMemberCount adds i to the "member_count" field.

func (*TaskUpdate) AddParentID

func (tu *TaskUpdate) AddParentID(i int) *TaskUpdate

AddParentID adds i to the "parent_id" field.

func (*TaskUpdate) AddProcDefID

func (tu *TaskUpdate) AddProcDefID(i int) *TaskUpdate

AddProcDefID adds i to the "proc_def_id" field.

func (*TaskUpdate) AddTaskIdentities

func (tu *TaskUpdate) AddTaskIdentities(i ...*IdentityLink) *TaskUpdate

AddTaskIdentities adds the "task_identities" edges to the IdentityLink entity.

func (*TaskUpdate) AddTaskIdentityIDs

func (tu *TaskUpdate) AddTaskIdentityIDs(ids ...int) *TaskUpdate

AddTaskIdentityIDs adds the "task_identities" edge to the IdentityLink entity by IDs.

func (*TaskUpdate) AddUnfinishedCount

func (tu *TaskUpdate) AddUnfinishedCount(i int32) *TaskUpdate

AddUnfinishedCount adds i to the "unfinished_count" field.

func (*TaskUpdate) ClearAssignee

func (tu *TaskUpdate) ClearAssignee() *TaskUpdate

ClearAssignee clears the value of the "assignee" field.

func (*TaskUpdate) ClearComments

func (tu *TaskUpdate) ClearComments() *TaskUpdate

ClearComments clears the value of the "comments" field.

func (*TaskUpdate) ClearParentID

func (tu *TaskUpdate) ClearParentID() *TaskUpdate

ClearParentID clears the value of the "parent_id" field.

func (*TaskUpdate) ClearProcInst

func (tu *TaskUpdate) ClearProcInst() *TaskUpdate

ClearProcInst clears the "proc_inst" edge to the ProcInst entity.

func (*TaskUpdate) ClearRunID

func (tu *TaskUpdate) ClearRunID() *TaskUpdate

ClearRunID clears the value of the "run_id" field.

func (*TaskUpdate) ClearTaskIdentities

func (tu *TaskUpdate) ClearTaskIdentities() *TaskUpdate

ClearTaskIdentities clears all "task_identities" edges to the IdentityLink entity.

func (*TaskUpdate) Exec

func (tu *TaskUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskUpdate) ExecX

func (tu *TaskUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpdate) Mutation

func (tu *TaskUpdate) Mutation() *TaskMutation

Mutation returns the TaskMutation object of the builder.

func (*TaskUpdate) RemoveTaskIdentities

func (tu *TaskUpdate) RemoveTaskIdentities(i ...*IdentityLink) *TaskUpdate

RemoveTaskIdentities removes "task_identities" edges to IdentityLink entities.

func (*TaskUpdate) RemoveTaskIdentityIDs

func (tu *TaskUpdate) RemoveTaskIdentityIDs(ids ...int) *TaskUpdate

RemoveTaskIdentityIDs removes the "task_identities" edge to IdentityLink entities by IDs.

func (*TaskUpdate) Save

func (tu *TaskUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TaskUpdate) SaveX

func (tu *TaskUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TaskUpdate) SetAgreeCount

func (tu *TaskUpdate) SetAgreeCount(i int32) *TaskUpdate

SetAgreeCount sets the "agree_count" field.

func (*TaskUpdate) SetAssignee

func (tu *TaskUpdate) SetAssignee(s string) *TaskUpdate

SetAssignee sets the "assignee" field.

func (*TaskUpdate) SetComments

func (tu *TaskUpdate) SetComments(s string) *TaskUpdate

SetComments sets the "comments" field.

func (*TaskUpdate) SetExecutionID

func (tu *TaskUpdate) SetExecutionID(s string) *TaskUpdate

SetExecutionID sets the "execution_id" field.

func (*TaskUpdate) SetKind

func (tu *TaskUpdate) SetKind(t task.Kind) *TaskUpdate

SetKind sets the "kind" field.

func (*TaskUpdate) SetMemberCount

func (tu *TaskUpdate) SetMemberCount(i int32) *TaskUpdate

SetMemberCount sets the "member_count" field.

func (*TaskUpdate) SetNillableAgreeCount

func (tu *TaskUpdate) SetNillableAgreeCount(i *int32) *TaskUpdate

SetNillableAgreeCount sets the "agree_count" field if the given value is not nil.

func (*TaskUpdate) SetNillableAssignee

func (tu *TaskUpdate) SetNillableAssignee(s *string) *TaskUpdate

SetNillableAssignee sets the "assignee" field if the given value is not nil.

func (*TaskUpdate) SetNillableComments

func (tu *TaskUpdate) SetNillableComments(s *string) *TaskUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*TaskUpdate) SetNillableKind

func (tu *TaskUpdate) SetNillableKind(t *task.Kind) *TaskUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*TaskUpdate) SetNillableParentID

func (tu *TaskUpdate) SetNillableParentID(i *int) *TaskUpdate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*TaskUpdate) SetNillableRunID

func (tu *TaskUpdate) SetNillableRunID(s *string) *TaskUpdate

SetNillableRunID sets the "run_id" field if the given value is not nil.

func (*TaskUpdate) SetNillableSequential

func (tu *TaskUpdate) SetNillableSequential(b *bool) *TaskUpdate

SetNillableSequential sets the "sequential" field if the given value is not nil.

func (*TaskUpdate) SetNillableStatus

func (tu *TaskUpdate) SetNillableStatus(t *task.Status) *TaskUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*TaskUpdate) SetParentID

func (tu *TaskUpdate) SetParentID(i int) *TaskUpdate

SetParentID sets the "parent_id" field.

func (*TaskUpdate) SetProcDefID

func (tu *TaskUpdate) SetProcDefID(i int) *TaskUpdate

SetProcDefID sets the "proc_def_id" field.

func (*TaskUpdate) SetProcInst

func (tu *TaskUpdate) SetProcInst(p *ProcInst) *TaskUpdate

SetProcInst sets the "proc_inst" edge to the ProcInst entity.

func (*TaskUpdate) SetProcInstID

func (tu *TaskUpdate) SetProcInstID(i int) *TaskUpdate

SetProcInstID sets the "proc_inst_id" field.

func (*TaskUpdate) SetRunID

func (tu *TaskUpdate) SetRunID(s string) *TaskUpdate

SetRunID sets the "run_id" field.

func (*TaskUpdate) SetSequential

func (tu *TaskUpdate) SetSequential(b bool) *TaskUpdate

SetSequential sets the "sequential" field.

func (*TaskUpdate) SetStatus

func (tu *TaskUpdate) SetStatus(t task.Status) *TaskUpdate

SetStatus sets the "status" field.

func (*TaskUpdate) SetTaskDefKey

func (tu *TaskUpdate) SetTaskDefKey(s string) *TaskUpdate

SetTaskDefKey sets the "task_def_key" field.

func (*TaskUpdate) SetUnfinishedCount

func (tu *TaskUpdate) SetUnfinishedCount(i int32) *TaskUpdate

SetUnfinishedCount sets the "unfinished_count" field.

func (*TaskUpdate) Where

func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate

Where appends a list predicates to the TaskUpdate builder.

type TaskUpdateOne

type TaskUpdateOne struct {
	// contains filtered or unexported fields
}

TaskUpdateOne is the builder for updating a single Task entity.

func (*TaskUpdateOne) AddAgreeCount

func (tuo *TaskUpdateOne) AddAgreeCount(i int32) *TaskUpdateOne

AddAgreeCount adds i to the "agree_count" field.

func (*TaskUpdateOne) AddMemberCount

func (tuo *TaskUpdateOne) AddMemberCount(i int32) *TaskUpdateOne

AddMemberCount adds i to the "member_count" field.

func (*TaskUpdateOne) AddParentID

func (tuo *TaskUpdateOne) AddParentID(i int) *TaskUpdateOne

AddParentID adds i to the "parent_id" field.

func (*TaskUpdateOne) AddProcDefID

func (tuo *TaskUpdateOne) AddProcDefID(i int) *TaskUpdateOne

AddProcDefID adds i to the "proc_def_id" field.

func (*TaskUpdateOne) AddTaskIdentities

func (tuo *TaskUpdateOne) AddTaskIdentities(i ...*IdentityLink) *TaskUpdateOne

AddTaskIdentities adds the "task_identities" edges to the IdentityLink entity.

func (*TaskUpdateOne) AddTaskIdentityIDs

func (tuo *TaskUpdateOne) AddTaskIdentityIDs(ids ...int) *TaskUpdateOne

AddTaskIdentityIDs adds the "task_identities" edge to the IdentityLink entity by IDs.

func (*TaskUpdateOne) AddUnfinishedCount

func (tuo *TaskUpdateOne) AddUnfinishedCount(i int32) *TaskUpdateOne

AddUnfinishedCount adds i to the "unfinished_count" field.

func (*TaskUpdateOne) ClearAssignee

func (tuo *TaskUpdateOne) ClearAssignee() *TaskUpdateOne

ClearAssignee clears the value of the "assignee" field.

func (*TaskUpdateOne) ClearComments

func (tuo *TaskUpdateOne) ClearComments() *TaskUpdateOne

ClearComments clears the value of the "comments" field.

func (*TaskUpdateOne) ClearParentID

func (tuo *TaskUpdateOne) ClearParentID() *TaskUpdateOne

ClearParentID clears the value of the "parent_id" field.

func (*TaskUpdateOne) ClearProcInst

func (tuo *TaskUpdateOne) ClearProcInst() *TaskUpdateOne

ClearProcInst clears the "proc_inst" edge to the ProcInst entity.

func (*TaskUpdateOne) ClearRunID

func (tuo *TaskUpdateOne) ClearRunID() *TaskUpdateOne

ClearRunID clears the value of the "run_id" field.

func (*TaskUpdateOne) ClearTaskIdentities

func (tuo *TaskUpdateOne) ClearTaskIdentities() *TaskUpdateOne

ClearTaskIdentities clears all "task_identities" edges to the IdentityLink entity.

func (*TaskUpdateOne) Exec

func (tuo *TaskUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TaskUpdateOne) ExecX

func (tuo *TaskUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpdateOne) Mutation

func (tuo *TaskUpdateOne) Mutation() *TaskMutation

Mutation returns the TaskMutation object of the builder.

func (*TaskUpdateOne) RemoveTaskIdentities

func (tuo *TaskUpdateOne) RemoveTaskIdentities(i ...*IdentityLink) *TaskUpdateOne

RemoveTaskIdentities removes "task_identities" edges to IdentityLink entities.

func (*TaskUpdateOne) RemoveTaskIdentityIDs

func (tuo *TaskUpdateOne) RemoveTaskIdentityIDs(ids ...int) *TaskUpdateOne

RemoveTaskIdentityIDs removes the "task_identities" edge to IdentityLink entities by IDs.

func (*TaskUpdateOne) Save

func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)

Save executes the query and returns the updated Task entity.

func (*TaskUpdateOne) SaveX

func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task

SaveX is like Save, but panics if an error occurs.

func (*TaskUpdateOne) Select

func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TaskUpdateOne) SetAgreeCount

func (tuo *TaskUpdateOne) SetAgreeCount(i int32) *TaskUpdateOne

SetAgreeCount sets the "agree_count" field.

func (*TaskUpdateOne) SetAssignee

func (tuo *TaskUpdateOne) SetAssignee(s string) *TaskUpdateOne

SetAssignee sets the "assignee" field.

func (*TaskUpdateOne) SetComments

func (tuo *TaskUpdateOne) SetComments(s string) *TaskUpdateOne

SetComments sets the "comments" field.

func (*TaskUpdateOne) SetExecutionID

func (tuo *TaskUpdateOne) SetExecutionID(s string) *TaskUpdateOne

SetExecutionID sets the "execution_id" field.

func (*TaskUpdateOne) SetKind

func (tuo *TaskUpdateOne) SetKind(t task.Kind) *TaskUpdateOne

SetKind sets the "kind" field.

func (*TaskUpdateOne) SetMemberCount

func (tuo *TaskUpdateOne) SetMemberCount(i int32) *TaskUpdateOne

SetMemberCount sets the "member_count" field.

func (*TaskUpdateOne) SetNillableAgreeCount

func (tuo *TaskUpdateOne) SetNillableAgreeCount(i *int32) *TaskUpdateOne

SetNillableAgreeCount sets the "agree_count" field if the given value is not nil.

func (*TaskUpdateOne) SetNillableAssignee

func (tuo *TaskUpdateOne) SetNillableAssignee(s *string) *TaskUpdateOne

SetNillableAssignee sets the "assignee" field if the given value is not nil.

func (*TaskUpdateOne) SetNillableComments

func (tuo *TaskUpdateOne) SetNillableComments(s *string) *TaskUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*TaskUpdateOne) SetNillableKind

func (tuo *TaskUpdateOne) SetNillableKind(t *task.Kind) *TaskUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*TaskUpdateOne) SetNillableParentID

func (tuo *TaskUpdateOne) SetNillableParentID(i *int) *TaskUpdateOne

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*TaskUpdateOne) SetNillableRunID

func (tuo *TaskUpdateOne) SetNillableRunID(s *string) *TaskUpdateOne

SetNillableRunID sets the "run_id" field if the given value is not nil.

func (*TaskUpdateOne) SetNillableSequential

func (tuo *TaskUpdateOne) SetNillableSequential(b *bool) *TaskUpdateOne

SetNillableSequential sets the "sequential" field if the given value is not nil.

func (*TaskUpdateOne) SetNillableStatus

func (tuo *TaskUpdateOne) SetNillableStatus(t *task.Status) *TaskUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*TaskUpdateOne) SetParentID

func (tuo *TaskUpdateOne) SetParentID(i int) *TaskUpdateOne

SetParentID sets the "parent_id" field.

func (*TaskUpdateOne) SetProcDefID

func (tuo *TaskUpdateOne) SetProcDefID(i int) *TaskUpdateOne

SetProcDefID sets the "proc_def_id" field.

func (*TaskUpdateOne) SetProcInst

func (tuo *TaskUpdateOne) SetProcInst(p *ProcInst) *TaskUpdateOne

SetProcInst sets the "proc_inst" edge to the ProcInst entity.

func (*TaskUpdateOne) SetProcInstID

func (tuo *TaskUpdateOne) SetProcInstID(i int) *TaskUpdateOne

SetProcInstID sets the "proc_inst_id" field.

func (*TaskUpdateOne) SetRunID

func (tuo *TaskUpdateOne) SetRunID(s string) *TaskUpdateOne

SetRunID sets the "run_id" field.

func (*TaskUpdateOne) SetSequential

func (tuo *TaskUpdateOne) SetSequential(b bool) *TaskUpdateOne

SetSequential sets the "sequential" field.

func (*TaskUpdateOne) SetStatus

func (tuo *TaskUpdateOne) SetStatus(t task.Status) *TaskUpdateOne

SetStatus sets the "status" field.

func (*TaskUpdateOne) SetTaskDefKey

func (tuo *TaskUpdateOne) SetTaskDefKey(s string) *TaskUpdateOne

SetTaskDefKey sets the "task_def_key" field.

func (*TaskUpdateOne) SetUnfinishedCount

func (tuo *TaskUpdateOne) SetUnfinishedCount(i int32) *TaskUpdateOne

SetUnfinishedCount sets the "unfinished_count" field.

func (*TaskUpdateOne) Where

func (tuo *TaskUpdateOne) Where(ps ...predicate.Task) *TaskUpdateOne

Where appends a list predicates to the TaskUpdate builder.

type TaskUpsert

type TaskUpsert struct {
	*sql.UpdateSet
}

TaskUpsert is the "OnConflict" setter.

func (*TaskUpsert) AddAgreeCount

func (u *TaskUpsert) AddAgreeCount(v int32) *TaskUpsert

AddAgreeCount adds v to the "agree_count" field.

func (*TaskUpsert) AddMemberCount

func (u *TaskUpsert) AddMemberCount(v int32) *TaskUpsert

AddMemberCount adds v to the "member_count" field.

func (*TaskUpsert) AddParentID

func (u *TaskUpsert) AddParentID(v int) *TaskUpsert

AddParentID adds v to the "parent_id" field.

func (*TaskUpsert) AddProcDefID

func (u *TaskUpsert) AddProcDefID(v int) *TaskUpsert

AddProcDefID adds v to the "proc_def_id" field.

func (*TaskUpsert) AddUnfinishedCount

func (u *TaskUpsert) AddUnfinishedCount(v int32) *TaskUpsert

AddUnfinishedCount adds v to the "unfinished_count" field.

func (*TaskUpsert) ClearAssignee

func (u *TaskUpsert) ClearAssignee() *TaskUpsert

ClearAssignee clears the value of the "assignee" field.

func (*TaskUpsert) ClearComments

func (u *TaskUpsert) ClearComments() *TaskUpsert

ClearComments clears the value of the "comments" field.

func (*TaskUpsert) ClearParentID

func (u *TaskUpsert) ClearParentID() *TaskUpsert

ClearParentID clears the value of the "parent_id" field.

func (*TaskUpsert) ClearRunID

func (u *TaskUpsert) ClearRunID() *TaskUpsert

ClearRunID clears the value of the "run_id" field.

func (*TaskUpsert) SetAgreeCount

func (u *TaskUpsert) SetAgreeCount(v int32) *TaskUpsert

SetAgreeCount sets the "agree_count" field.

func (*TaskUpsert) SetAssignee

func (u *TaskUpsert) SetAssignee(v string) *TaskUpsert

SetAssignee sets the "assignee" field.

func (*TaskUpsert) SetComments

func (u *TaskUpsert) SetComments(v string) *TaskUpsert

SetComments sets the "comments" field.

func (*TaskUpsert) SetExecutionID

func (u *TaskUpsert) SetExecutionID(v string) *TaskUpsert

SetExecutionID sets the "execution_id" field.

func (*TaskUpsert) SetKind

func (u *TaskUpsert) SetKind(v task.Kind) *TaskUpsert

SetKind sets the "kind" field.

func (*TaskUpsert) SetMemberCount

func (u *TaskUpsert) SetMemberCount(v int32) *TaskUpsert

SetMemberCount sets the "member_count" field.

func (*TaskUpsert) SetParentID

func (u *TaskUpsert) SetParentID(v int) *TaskUpsert

SetParentID sets the "parent_id" field.

func (*TaskUpsert) SetProcDefID

func (u *TaskUpsert) SetProcDefID(v int) *TaskUpsert

SetProcDefID sets the "proc_def_id" field.

func (*TaskUpsert) SetProcInstID

func (u *TaskUpsert) SetProcInstID(v int) *TaskUpsert

SetProcInstID sets the "proc_inst_id" field.

func (*TaskUpsert) SetRunID

func (u *TaskUpsert) SetRunID(v string) *TaskUpsert

SetRunID sets the "run_id" field.

func (*TaskUpsert) SetSequential

func (u *TaskUpsert) SetSequential(v bool) *TaskUpsert

SetSequential sets the "sequential" field.

func (*TaskUpsert) SetStatus

func (u *TaskUpsert) SetStatus(v task.Status) *TaskUpsert

SetStatus sets the "status" field.

func (*TaskUpsert) SetTaskDefKey

func (u *TaskUpsert) SetTaskDefKey(v string) *TaskUpsert

SetTaskDefKey sets the "task_def_key" field.

func (*TaskUpsert) SetUnfinishedCount

func (u *TaskUpsert) SetUnfinishedCount(v int32) *TaskUpsert

SetUnfinishedCount sets the "unfinished_count" field.

func (*TaskUpsert) UpdateAgreeCount

func (u *TaskUpsert) UpdateAgreeCount() *TaskUpsert

UpdateAgreeCount sets the "agree_count" field to the value that was provided on create.

func (*TaskUpsert) UpdateAssignee

func (u *TaskUpsert) UpdateAssignee() *TaskUpsert

UpdateAssignee sets the "assignee" field to the value that was provided on create.

func (*TaskUpsert) UpdateComments

func (u *TaskUpsert) UpdateComments() *TaskUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*TaskUpsert) UpdateExecutionID

func (u *TaskUpsert) UpdateExecutionID() *TaskUpsert

UpdateExecutionID sets the "execution_id" field to the value that was provided on create.

func (*TaskUpsert) UpdateKind

func (u *TaskUpsert) UpdateKind() *TaskUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*TaskUpsert) UpdateMemberCount

func (u *TaskUpsert) UpdateMemberCount() *TaskUpsert

UpdateMemberCount sets the "member_count" field to the value that was provided on create.

func (*TaskUpsert) UpdateParentID

func (u *TaskUpsert) UpdateParentID() *TaskUpsert

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*TaskUpsert) UpdateProcDefID

func (u *TaskUpsert) UpdateProcDefID() *TaskUpsert

UpdateProcDefID sets the "proc_def_id" field to the value that was provided on create.

func (*TaskUpsert) UpdateProcInstID

func (u *TaskUpsert) UpdateProcInstID() *TaskUpsert

UpdateProcInstID sets the "proc_inst_id" field to the value that was provided on create.

func (*TaskUpsert) UpdateRunID

func (u *TaskUpsert) UpdateRunID() *TaskUpsert

UpdateRunID sets the "run_id" field to the value that was provided on create.

func (*TaskUpsert) UpdateSequential

func (u *TaskUpsert) UpdateSequential() *TaskUpsert

UpdateSequential sets the "sequential" field to the value that was provided on create.

func (*TaskUpsert) UpdateStatus

func (u *TaskUpsert) UpdateStatus() *TaskUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*TaskUpsert) UpdateTaskDefKey

func (u *TaskUpsert) UpdateTaskDefKey() *TaskUpsert

UpdateTaskDefKey sets the "task_def_key" field to the value that was provided on create.

func (*TaskUpsert) UpdateUnfinishedCount

func (u *TaskUpsert) UpdateUnfinishedCount() *TaskUpsert

UpdateUnfinishedCount sets the "unfinished_count" field to the value that was provided on create.

type TaskUpsertBulk

type TaskUpsertBulk struct {
	// contains filtered or unexported fields
}

TaskUpsertBulk is the builder for "upsert"-ing a bulk of Task nodes.

func (*TaskUpsertBulk) AddAgreeCount

func (u *TaskUpsertBulk) AddAgreeCount(v int32) *TaskUpsertBulk

AddAgreeCount adds v to the "agree_count" field.

func (*TaskUpsertBulk) AddMemberCount

func (u *TaskUpsertBulk) AddMemberCount(v int32) *TaskUpsertBulk

AddMemberCount adds v to the "member_count" field.

func (*TaskUpsertBulk) AddParentID

func (u *TaskUpsertBulk) AddParentID(v int) *TaskUpsertBulk

AddParentID adds v to the "parent_id" field.

func (*TaskUpsertBulk) AddProcDefID

func (u *TaskUpsertBulk) AddProcDefID(v int) *TaskUpsertBulk

AddProcDefID adds v to the "proc_def_id" field.

func (*TaskUpsertBulk) AddUnfinishedCount

func (u *TaskUpsertBulk) AddUnfinishedCount(v int32) *TaskUpsertBulk

AddUnfinishedCount adds v to the "unfinished_count" field.

func (*TaskUpsertBulk) ClearAssignee

func (u *TaskUpsertBulk) ClearAssignee() *TaskUpsertBulk

ClearAssignee clears the value of the "assignee" field.

func (*TaskUpsertBulk) ClearComments

func (u *TaskUpsertBulk) ClearComments() *TaskUpsertBulk

ClearComments clears the value of the "comments" field.

func (*TaskUpsertBulk) ClearParentID

func (u *TaskUpsertBulk) ClearParentID() *TaskUpsertBulk

ClearParentID clears the value of the "parent_id" field.

func (*TaskUpsertBulk) ClearRunID

func (u *TaskUpsertBulk) ClearRunID() *TaskUpsertBulk

ClearRunID clears the value of the "run_id" field.

func (*TaskUpsertBulk) DoNothing

func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TaskUpsertBulk) Exec

func (u *TaskUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskUpsertBulk) ExecX

func (u *TaskUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpsertBulk) Ignore

func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TaskUpsertBulk) SetAgreeCount

func (u *TaskUpsertBulk) SetAgreeCount(v int32) *TaskUpsertBulk

SetAgreeCount sets the "agree_count" field.

func (*TaskUpsertBulk) SetAssignee

func (u *TaskUpsertBulk) SetAssignee(v string) *TaskUpsertBulk

SetAssignee sets the "assignee" field.

func (*TaskUpsertBulk) SetComments

func (u *TaskUpsertBulk) SetComments(v string) *TaskUpsertBulk

SetComments sets the "comments" field.

func (*TaskUpsertBulk) SetExecutionID

func (u *TaskUpsertBulk) SetExecutionID(v string) *TaskUpsertBulk

SetExecutionID sets the "execution_id" field.

func (*TaskUpsertBulk) SetKind

func (u *TaskUpsertBulk) SetKind(v task.Kind) *TaskUpsertBulk

SetKind sets the "kind" field.

func (*TaskUpsertBulk) SetMemberCount

func (u *TaskUpsertBulk) SetMemberCount(v int32) *TaskUpsertBulk

SetMemberCount sets the "member_count" field.

func (*TaskUpsertBulk) SetParentID

func (u *TaskUpsertBulk) SetParentID(v int) *TaskUpsertBulk

SetParentID sets the "parent_id" field.

func (*TaskUpsertBulk) SetProcDefID

func (u *TaskUpsertBulk) SetProcDefID(v int) *TaskUpsertBulk

SetProcDefID sets the "proc_def_id" field.

func (*TaskUpsertBulk) SetProcInstID

func (u *TaskUpsertBulk) SetProcInstID(v int) *TaskUpsertBulk

SetProcInstID sets the "proc_inst_id" field.

func (*TaskUpsertBulk) SetRunID

func (u *TaskUpsertBulk) SetRunID(v string) *TaskUpsertBulk

SetRunID sets the "run_id" field.

func (*TaskUpsertBulk) SetSequential

func (u *TaskUpsertBulk) SetSequential(v bool) *TaskUpsertBulk

SetSequential sets the "sequential" field.

func (*TaskUpsertBulk) SetStatus

func (u *TaskUpsertBulk) SetStatus(v task.Status) *TaskUpsertBulk

SetStatus sets the "status" field.

func (*TaskUpsertBulk) SetTaskDefKey

func (u *TaskUpsertBulk) SetTaskDefKey(v string) *TaskUpsertBulk

SetTaskDefKey sets the "task_def_key" field.

func (*TaskUpsertBulk) SetUnfinishedCount

func (u *TaskUpsertBulk) SetUnfinishedCount(v int32) *TaskUpsertBulk

SetUnfinishedCount sets the "unfinished_count" field.

func (*TaskUpsertBulk) Update

func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk

Update allows overriding fields `UPDATE` values. See the TaskCreateBulk.OnConflict documentation for more info.

func (*TaskUpsertBulk) UpdateAgreeCount

func (u *TaskUpsertBulk) UpdateAgreeCount() *TaskUpsertBulk

UpdateAgreeCount sets the "agree_count" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateAssignee

func (u *TaskUpsertBulk) UpdateAssignee() *TaskUpsertBulk

UpdateAssignee sets the "assignee" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateComments

func (u *TaskUpsertBulk) UpdateComments() *TaskUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateExecutionID

func (u *TaskUpsertBulk) UpdateExecutionID() *TaskUpsertBulk

UpdateExecutionID sets the "execution_id" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateKind

func (u *TaskUpsertBulk) UpdateKind() *TaskUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateMemberCount

func (u *TaskUpsertBulk) UpdateMemberCount() *TaskUpsertBulk

UpdateMemberCount sets the "member_count" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateNewValues

func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(task.FieldID)
		}),
	).
	Exec(ctx)

func (*TaskUpsertBulk) UpdateParentID

func (u *TaskUpsertBulk) UpdateParentID() *TaskUpsertBulk

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateProcDefID

func (u *TaskUpsertBulk) UpdateProcDefID() *TaskUpsertBulk

UpdateProcDefID sets the "proc_def_id" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateProcInstID

func (u *TaskUpsertBulk) UpdateProcInstID() *TaskUpsertBulk

UpdateProcInstID sets the "proc_inst_id" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateRunID

func (u *TaskUpsertBulk) UpdateRunID() *TaskUpsertBulk

UpdateRunID sets the "run_id" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateSequential

func (u *TaskUpsertBulk) UpdateSequential() *TaskUpsertBulk

UpdateSequential sets the "sequential" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateStatus

func (u *TaskUpsertBulk) UpdateStatus() *TaskUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateTaskDefKey

func (u *TaskUpsertBulk) UpdateTaskDefKey() *TaskUpsertBulk

UpdateTaskDefKey sets the "task_def_key" field to the value that was provided on create.

func (*TaskUpsertBulk) UpdateUnfinishedCount

func (u *TaskUpsertBulk) UpdateUnfinishedCount() *TaskUpsertBulk

UpdateUnfinishedCount sets the "unfinished_count" field to the value that was provided on create.

type TaskUpsertOne

type TaskUpsertOne struct {
	// contains filtered or unexported fields
}

TaskUpsertOne is the builder for "upsert"-ing

one Task node.

func (*TaskUpsertOne) AddAgreeCount

func (u *TaskUpsertOne) AddAgreeCount(v int32) *TaskUpsertOne

AddAgreeCount adds v to the "agree_count" field.

func (*TaskUpsertOne) AddMemberCount

func (u *TaskUpsertOne) AddMemberCount(v int32) *TaskUpsertOne

AddMemberCount adds v to the "member_count" field.

func (*TaskUpsertOne) AddParentID

func (u *TaskUpsertOne) AddParentID(v int) *TaskUpsertOne

AddParentID adds v to the "parent_id" field.

func (*TaskUpsertOne) AddProcDefID

func (u *TaskUpsertOne) AddProcDefID(v int) *TaskUpsertOne

AddProcDefID adds v to the "proc_def_id" field.

func (*TaskUpsertOne) AddUnfinishedCount

func (u *TaskUpsertOne) AddUnfinishedCount(v int32) *TaskUpsertOne

AddUnfinishedCount adds v to the "unfinished_count" field.

func (*TaskUpsertOne) ClearAssignee

func (u *TaskUpsertOne) ClearAssignee() *TaskUpsertOne

ClearAssignee clears the value of the "assignee" field.

func (*TaskUpsertOne) ClearComments

func (u *TaskUpsertOne) ClearComments() *TaskUpsertOne

ClearComments clears the value of the "comments" field.

func (*TaskUpsertOne) ClearParentID

func (u *TaskUpsertOne) ClearParentID() *TaskUpsertOne

ClearParentID clears the value of the "parent_id" field.

func (*TaskUpsertOne) ClearRunID

func (u *TaskUpsertOne) ClearRunID() *TaskUpsertOne

ClearRunID clears the value of the "run_id" field.

func (*TaskUpsertOne) DoNothing

func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TaskUpsertOne) Exec

func (u *TaskUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskUpsertOne) ExecX

func (u *TaskUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpsertOne) ID

func (u *TaskUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TaskUpsertOne) IDX

func (u *TaskUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*TaskUpsertOne) Ignore

func (u *TaskUpsertOne) Ignore() *TaskUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Task.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TaskUpsertOne) SetAgreeCount

func (u *TaskUpsertOne) SetAgreeCount(v int32) *TaskUpsertOne

SetAgreeCount sets the "agree_count" field.

func (*TaskUpsertOne) SetAssignee

func (u *TaskUpsertOne) SetAssignee(v string) *TaskUpsertOne

SetAssignee sets the "assignee" field.

func (*TaskUpsertOne) SetComments

func (u *TaskUpsertOne) SetComments(v string) *TaskUpsertOne

SetComments sets the "comments" field.

func (*TaskUpsertOne) SetExecutionID

func (u *TaskUpsertOne) SetExecutionID(v string) *TaskUpsertOne

SetExecutionID sets the "execution_id" field.

func (*TaskUpsertOne) SetKind

func (u *TaskUpsertOne) SetKind(v task.Kind) *TaskUpsertOne

SetKind sets the "kind" field.

func (*TaskUpsertOne) SetMemberCount

func (u *TaskUpsertOne) SetMemberCount(v int32) *TaskUpsertOne

SetMemberCount sets the "member_count" field.

func (*TaskUpsertOne) SetParentID

func (u *TaskUpsertOne) SetParentID(v int) *TaskUpsertOne

SetParentID sets the "parent_id" field.

func (*TaskUpsertOne) SetProcDefID

func (u *TaskUpsertOne) SetProcDefID(v int) *TaskUpsertOne

SetProcDefID sets the "proc_def_id" field.

func (*TaskUpsertOne) SetProcInstID

func (u *TaskUpsertOne) SetProcInstID(v int) *TaskUpsertOne

SetProcInstID sets the "proc_inst_id" field.

func (*TaskUpsertOne) SetRunID

func (u *TaskUpsertOne) SetRunID(v string) *TaskUpsertOne

SetRunID sets the "run_id" field.

func (*TaskUpsertOne) SetSequential

func (u *TaskUpsertOne) SetSequential(v bool) *TaskUpsertOne

SetSequential sets the "sequential" field.

func (*TaskUpsertOne) SetStatus

func (u *TaskUpsertOne) SetStatus(v task.Status) *TaskUpsertOne

SetStatus sets the "status" field.

func (*TaskUpsertOne) SetTaskDefKey

func (u *TaskUpsertOne) SetTaskDefKey(v string) *TaskUpsertOne

SetTaskDefKey sets the "task_def_key" field.

func (*TaskUpsertOne) SetUnfinishedCount

func (u *TaskUpsertOne) SetUnfinishedCount(v int32) *TaskUpsertOne

SetUnfinishedCount sets the "unfinished_count" field.

func (*TaskUpsertOne) Update

func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne

Update allows overriding fields `UPDATE` values. See the TaskCreate.OnConflict documentation for more info.

func (*TaskUpsertOne) UpdateAgreeCount

func (u *TaskUpsertOne) UpdateAgreeCount() *TaskUpsertOne

UpdateAgreeCount sets the "agree_count" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateAssignee

func (u *TaskUpsertOne) UpdateAssignee() *TaskUpsertOne

UpdateAssignee sets the "assignee" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateComments

func (u *TaskUpsertOne) UpdateComments() *TaskUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateExecutionID

func (u *TaskUpsertOne) UpdateExecutionID() *TaskUpsertOne

UpdateExecutionID sets the "execution_id" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateKind

func (u *TaskUpsertOne) UpdateKind() *TaskUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateMemberCount

func (u *TaskUpsertOne) UpdateMemberCount() *TaskUpsertOne

UpdateMemberCount sets the "member_count" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateNewValues

func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(task.FieldID)
		}),
	).
	Exec(ctx)

func (*TaskUpsertOne) UpdateParentID

func (u *TaskUpsertOne) UpdateParentID() *TaskUpsertOne

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateProcDefID

func (u *TaskUpsertOne) UpdateProcDefID() *TaskUpsertOne

UpdateProcDefID sets the "proc_def_id" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateProcInstID

func (u *TaskUpsertOne) UpdateProcInstID() *TaskUpsertOne

UpdateProcInstID sets the "proc_inst_id" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateRunID

func (u *TaskUpsertOne) UpdateRunID() *TaskUpsertOne

UpdateRunID sets the "run_id" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateSequential

func (u *TaskUpsertOne) UpdateSequential() *TaskUpsertOne

UpdateSequential sets the "sequential" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateStatus

func (u *TaskUpsertOne) UpdateStatus() *TaskUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateTaskDefKey

func (u *TaskUpsertOne) UpdateTaskDefKey() *TaskUpsertOne

UpdateTaskDefKey sets the "task_def_key" field to the value that was provided on create.

func (*TaskUpsertOne) UpdateUnfinishedCount

func (u *TaskUpsertOne) UpdateUnfinishedCount() *TaskUpsertOne

UpdateUnfinishedCount sets the "unfinished_count" field to the value that was provided on create.

type TaskWhereInput

type TaskWhereInput struct {
	Predicates []predicate.Task  `json:"-"`
	Not        *TaskWhereInput   `json:"not,omitempty"`
	Or         []*TaskWhereInput `json:"or,omitempty"`
	And        []*TaskWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "proc_inst_id" field predicates.
	ProcInstID      *int  `json:"procInstID,omitempty"`
	ProcInstIDNEQ   *int  `json:"procInstIDNEQ,omitempty"`
	ProcInstIDIn    []int `json:"procInstIDIn,omitempty"`
	ProcInstIDNotIn []int `json:"procInstIDNotIn,omitempty"`

	// "proc_def_id" field predicates.
	ProcDefID      *int  `json:"procDefID,omitempty"`
	ProcDefIDNEQ   *int  `json:"procDefIDNEQ,omitempty"`
	ProcDefIDIn    []int `json:"procDefIDIn,omitempty"`
	ProcDefIDNotIn []int `json:"procDefIDNotIn,omitempty"`
	ProcDefIDGT    *int  `json:"procDefIDGT,omitempty"`
	ProcDefIDGTE   *int  `json:"procDefIDGTE,omitempty"`
	ProcDefIDLT    *int  `json:"procDefIDLT,omitempty"`
	ProcDefIDLTE   *int  `json:"procDefIDLTE,omitempty"`

	// "execution_id" field predicates.
	ExecutionID             *string  `json:"executionID,omitempty"`
	ExecutionIDNEQ          *string  `json:"executionIDNEQ,omitempty"`
	ExecutionIDIn           []string `json:"executionIDIn,omitempty"`
	ExecutionIDNotIn        []string `json:"executionIDNotIn,omitempty"`
	ExecutionIDGT           *string  `json:"executionIDGT,omitempty"`
	ExecutionIDGTE          *string  `json:"executionIDGTE,omitempty"`
	ExecutionIDLT           *string  `json:"executionIDLT,omitempty"`
	ExecutionIDLTE          *string  `json:"executionIDLTE,omitempty"`
	ExecutionIDContains     *string  `json:"executionIDContains,omitempty"`
	ExecutionIDHasPrefix    *string  `json:"executionIDHasPrefix,omitempty"`
	ExecutionIDHasSuffix    *string  `json:"executionIDHasSuffix,omitempty"`
	ExecutionIDEqualFold    *string  `json:"executionIDEqualFold,omitempty"`
	ExecutionIDContainsFold *string  `json:"executionIDContainsFold,omitempty"`

	// "run_id" field predicates.
	RunID             *string  `json:"runID,omitempty"`
	RunIDNEQ          *string  `json:"runIDNEQ,omitempty"`
	RunIDIn           []string `json:"runIDIn,omitempty"`
	RunIDNotIn        []string `json:"runIDNotIn,omitempty"`
	RunIDGT           *string  `json:"runIDGT,omitempty"`
	RunIDGTE          *string  `json:"runIDGTE,omitempty"`
	RunIDLT           *string  `json:"runIDLT,omitempty"`
	RunIDLTE          *string  `json:"runIDLTE,omitempty"`
	RunIDContains     *string  `json:"runIDContains,omitempty"`
	RunIDHasPrefix    *string  `json:"runIDHasPrefix,omitempty"`
	RunIDHasSuffix    *string  `json:"runIDHasSuffix,omitempty"`
	RunIDIsNil        bool     `json:"runIDIsNil,omitempty"`
	RunIDNotNil       bool     `json:"runIDNotNil,omitempty"`
	RunIDEqualFold    *string  `json:"runIDEqualFold,omitempty"`
	RunIDContainsFold *string  `json:"runIDContainsFold,omitempty"`

	// "task_def_key" field predicates.
	TaskDefKey             *string  `json:"taskDefKey,omitempty"`
	TaskDefKeyNEQ          *string  `json:"taskDefKeyNEQ,omitempty"`
	TaskDefKeyIn           []string `json:"taskDefKeyIn,omitempty"`
	TaskDefKeyNotIn        []string `json:"taskDefKeyNotIn,omitempty"`
	TaskDefKeyGT           *string  `json:"taskDefKeyGT,omitempty"`
	TaskDefKeyGTE          *string  `json:"taskDefKeyGTE,omitempty"`
	TaskDefKeyLT           *string  `json:"taskDefKeyLT,omitempty"`
	TaskDefKeyLTE          *string  `json:"taskDefKeyLTE,omitempty"`
	TaskDefKeyContains     *string  `json:"taskDefKeyContains,omitempty"`
	TaskDefKeyHasPrefix    *string  `json:"taskDefKeyHasPrefix,omitempty"`
	TaskDefKeyHasSuffix    *string  `json:"taskDefKeyHasSuffix,omitempty"`
	TaskDefKeyEqualFold    *string  `json:"taskDefKeyEqualFold,omitempty"`
	TaskDefKeyContainsFold *string  `json:"taskDefKeyContainsFold,omitempty"`

	// "parent_id" field predicates.
	ParentID       *int  `json:"parentID,omitempty"`
	ParentIDNEQ    *int  `json:"parentIDNEQ,omitempty"`
	ParentIDIn     []int `json:"parentIDIn,omitempty"`
	ParentIDNotIn  []int `json:"parentIDNotIn,omitempty"`
	ParentIDGT     *int  `json:"parentIDGT,omitempty"`
	ParentIDGTE    *int  `json:"parentIDGTE,omitempty"`
	ParentIDLT     *int  `json:"parentIDLT,omitempty"`
	ParentIDLTE    *int  `json:"parentIDLTE,omitempty"`
	ParentIDIsNil  bool  `json:"parentIDIsNil,omitempty"`
	ParentIDNotNil bool  `json:"parentIDNotNil,omitempty"`

	// "assignee" field predicates.
	Assignee             *string  `json:"assignee,omitempty"`
	AssigneeNEQ          *string  `json:"assigneeNEQ,omitempty"`
	AssigneeIn           []string `json:"assigneeIn,omitempty"`
	AssigneeNotIn        []string `json:"assigneeNotIn,omitempty"`
	AssigneeGT           *string  `json:"assigneeGT,omitempty"`
	AssigneeGTE          *string  `json:"assigneeGTE,omitempty"`
	AssigneeLT           *string  `json:"assigneeLT,omitempty"`
	AssigneeLTE          *string  `json:"assigneeLTE,omitempty"`
	AssigneeContains     *string  `json:"assigneeContains,omitempty"`
	AssigneeHasPrefix    *string  `json:"assigneeHasPrefix,omitempty"`
	AssigneeHasSuffix    *string  `json:"assigneeHasSuffix,omitempty"`
	AssigneeIsNil        bool     `json:"assigneeIsNil,omitempty"`
	AssigneeNotNil       bool     `json:"assigneeNotNil,omitempty"`
	AssigneeEqualFold    *string  `json:"assigneeEqualFold,omitempty"`
	AssigneeContainsFold *string  `json:"assigneeContainsFold,omitempty"`

	// "member_count" field predicates.
	MemberCount      *int32  `json:"memberCount,omitempty"`
	MemberCountNEQ   *int32  `json:"memberCountNEQ,omitempty"`
	MemberCountIn    []int32 `json:"memberCountIn,omitempty"`
	MemberCountNotIn []int32 `json:"memberCountNotIn,omitempty"`
	MemberCountGT    *int32  `json:"memberCountGT,omitempty"`
	MemberCountGTE   *int32  `json:"memberCountGTE,omitempty"`
	MemberCountLT    *int32  `json:"memberCountLT,omitempty"`
	MemberCountLTE   *int32  `json:"memberCountLTE,omitempty"`

	// "unfinished_count" field predicates.
	UnfinishedCount      *int32  `json:"unfinishedCount,omitempty"`
	UnfinishedCountNEQ   *int32  `json:"unfinishedCountNEQ,omitempty"`
	UnfinishedCountIn    []int32 `json:"unfinishedCountIn,omitempty"`
	UnfinishedCountNotIn []int32 `json:"unfinishedCountNotIn,omitempty"`
	UnfinishedCountGT    *int32  `json:"unfinishedCountGT,omitempty"`
	UnfinishedCountGTE   *int32  `json:"unfinishedCountGTE,omitempty"`
	UnfinishedCountLT    *int32  `json:"unfinishedCountLT,omitempty"`
	UnfinishedCountLTE   *int32  `json:"unfinishedCountLTE,omitempty"`

	// "agree_count" field predicates.
	AgreeCount      *int32  `json:"agreeCount,omitempty"`
	AgreeCountNEQ   *int32  `json:"agreeCountNEQ,omitempty"`
	AgreeCountIn    []int32 `json:"agreeCountIn,omitempty"`
	AgreeCountNotIn []int32 `json:"agreeCountNotIn,omitempty"`
	AgreeCountGT    *int32  `json:"agreeCountGT,omitempty"`
	AgreeCountGTE   *int32  `json:"agreeCountGTE,omitempty"`
	AgreeCountLT    *int32  `json:"agreeCountLT,omitempty"`
	AgreeCountLTE   *int32  `json:"agreeCountLTE,omitempty"`

	// "kind" field predicates.
	Kind      *task.Kind  `json:"kind,omitempty"`
	KindNEQ   *task.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []task.Kind `json:"kindIn,omitempty"`
	KindNotIn []task.Kind `json:"kindNotIn,omitempty"`

	// "sequential" field predicates.
	Sequential    *bool `json:"sequential,omitempty"`
	SequentialNEQ *bool `json:"sequentialNEQ,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "status" field predicates.
	Status      *task.Status  `json:"status,omitempty"`
	StatusNEQ   *task.Status  `json:"statusNEQ,omitempty"`
	StatusIn    []task.Status `json:"statusIn,omitempty"`
	StatusNotIn []task.Status `json:"statusNotIn,omitempty"`

	// "proc_inst" edge predicates.
	HasProcInst     *bool                 `json:"hasProcInst,omitempty"`
	HasProcInstWith []*ProcInstWhereInput `json:"hasProcInstWith,omitempty"`

	// "task_identities" edge predicates.
	HasTaskIdentities     *bool                     `json:"hasTaskIdentities,omitempty"`
	HasTaskIdentitiesWith []*IdentityLinkWhereInput `json:"hasTaskIdentitiesWith,omitempty"`
}

TaskWhereInput represents a where input for filtering Task queries.

func (*TaskWhereInput) AddPredicates

func (i *TaskWhereInput) AddPredicates(predicates ...predicate.Task)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*TaskWhereInput) Filter

func (i *TaskWhereInput) Filter(q *TaskQuery) (*TaskQuery, error)

Filter applies the TaskWhereInput filter on the TaskQuery builder.

func (*TaskWhereInput) P

func (i *TaskWhereInput) P() (predicate.Task, error)

P returns a predicate for filtering tasks. An error is returned if the input is empty or invalid.

type Tasks

type Tasks []*Task

Tasks is a parsable slice of Task.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// DecisionDef is the client for interacting with the DecisionDef builders.
	DecisionDef *DecisionDefClient
	// DecisionReqDef is the client for interacting with the DecisionReqDef builders.
	DecisionReqDef *DecisionReqDefClient
	// Deployment is the client for interacting with the Deployment builders.
	Deployment *DeploymentClient
	// IdentityLink is the client for interacting with the IdentityLink builders.
	IdentityLink *IdentityLinkClient
	// OrgApp is the client for interacting with the OrgApp builders.
	OrgApp *OrgAppClient
	// OrgRole is the client for interacting with the OrgRole builders.
	OrgRole *OrgRoleClient
	// OrgRoleUser is the client for interacting with the OrgRoleUser builders.
	OrgRoleUser *OrgRoleUserClient
	// OrgUser is the client for interacting with the OrgUser builders.
	OrgUser *OrgUserClient
	// ProcDef is the client for interacting with the ProcDef builders.
	ProcDef *ProcDefClient
	// ProcInst is the client for interacting with the ProcInst builders.
	ProcInst *ProcInstClient
	// Task is the client for interacting with the Task builders.
	Task *TaskClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type UpdateDeploymentInput

type UpdateDeploymentInput struct {
	ClearName            bool
	Name                 *string
	ClearSource          bool
	Source               *string
	ClearProcDefs        bool
	AddProcDefIDs        []int
	RemoveProcDefIDs     []int
	ClearDecisionReqs    bool
	AddDecisionReqIDs    []int
	RemoveDecisionReqIDs []int
}

UpdateDeploymentInput represents a mutation input for updating deployments.

func (*UpdateDeploymentInput) Mutate

Mutate applies the UpdateDeploymentInput on the DeploymentMutation builder.

type UpdateIdentityLinkInput

type UpdateIdentityLinkInput struct {
	ClearGroupID    bool
	GroupID         *int
	ClearUserID     bool
	UserID          *int
	ClearAssignerID bool
	AssignerID      *int
	LinkType        *identitylink.LinkType
	OperationType   *identitylink.OperationType
	ClearComments   bool
	Comments        *string
	TaskID          *int
}

UpdateIdentityLinkInput represents a mutation input for updating identitylinks.

func (*UpdateIdentityLinkInput) Mutate

Mutate applies the UpdateIdentityLinkInput on the IdentityLinkMutation builder.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

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