ent

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 35 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.
	TypeComment          = "Comment"
	TypeEpic             = "Epic"
	TypeFeature          = "Feature"
	TypeGoal             = "Goal"
	TypeIdea             = "Idea"
	TypeIdeaEndorsement  = "IdeaEndorsement"
	TypeIdeaOrganization = "IdeaOrganization"
	TypeIdeaUser         = "IdeaUser"
	TypeInitiative       = "Initiative"
	TypeProduct          = "Product"
	TypeRelationship     = "Relationship"
	TypeRelease          = "Release"
	TypeRequirement      = "Requirement"
	TypeSavedFilter      = "SavedFilter"
	TypeSyncMeta         = "SyncMeta"
	TypeUser             = "User"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

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 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.

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
	// Comment is the client for interacting with the Comment builders.
	Comment *CommentClient
	// Epic is the client for interacting with the Epic builders.
	Epic *EpicClient
	// Feature is the client for interacting with the Feature builders.
	Feature *FeatureClient
	// Goal is the client for interacting with the Goal builders.
	Goal *GoalClient
	// Idea is the client for interacting with the Idea builders.
	Idea *IdeaClient
	// IdeaEndorsement is the client for interacting with the IdeaEndorsement builders.
	IdeaEndorsement *IdeaEndorsementClient
	// IdeaOrganization is the client for interacting with the IdeaOrganization builders.
	IdeaOrganization *IdeaOrganizationClient
	// IdeaUser is the client for interacting with the IdeaUser builders.
	IdeaUser *IdeaUserClient
	// Initiative is the client for interacting with the Initiative builders.
	Initiative *InitiativeClient
	// Product is the client for interacting with the Product builders.
	Product *ProductClient
	// Relationship is the client for interacting with the Relationship builders.
	Relationship *RelationshipClient
	// Release is the client for interacting with the Release builders.
	Release *ReleaseClient
	// Requirement is the client for interacting with the Requirement builders.
	Requirement *RequirementClient
	// SavedFilter is the client for interacting with the SavedFilter builders.
	SavedFilter *SavedFilterClient
	// SyncMeta is the client for interacting with the SyncMeta builders.
	SyncMeta *SyncMetaClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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().
	Comment.
	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) 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 Comment

type Comment struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// CommentableType holds the value of the "commentable_type" field.
	CommentableType string `json:"commentable_type,omitempty"`
	// CommentableID holds the value of the "commentable_id" field.
	CommentableID string `json:"commentable_id,omitempty"`
	// Body holds the value of the "body" field.
	Body string `json:"body,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID string `json:"user_id,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Comment is the model entity for the Comment schema.

func (*Comment) String

func (_m *Comment) String() string

String implements the fmt.Stringer.

func (*Comment) Unwrap

func (_m *Comment) Unwrap() *Comment

Unwrap unwraps the Comment 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 (*Comment) Update

func (_m *Comment) Update() *CommentUpdateOne

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

func (*Comment) Value

func (_m *Comment) Value(name string) (ent.Value, error)

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

type CommentClient

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

CommentClient is a client for the Comment schema.

func NewCommentClient

func NewCommentClient(c config) *CommentClient

NewCommentClient returns a client for the Comment from the given config.

func (*CommentClient) Create

func (c *CommentClient) Create() *CommentCreate

Create returns a builder for creating a Comment entity.

func (*CommentClient) CreateBulk

func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk

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

func (*CommentClient) Delete

func (c *CommentClient) Delete() *CommentDelete

Delete returns a delete builder for Comment.

func (*CommentClient) DeleteOne

func (c *CommentClient) DeleteOne(_m *Comment) *CommentDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CommentClient) DeleteOneID

func (c *CommentClient) DeleteOneID(id string) *CommentDeleteOne

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

func (*CommentClient) Get

func (c *CommentClient) Get(ctx context.Context, id string) (*Comment, error)

Get returns a Comment entity by its id.

func (*CommentClient) GetX

func (c *CommentClient) GetX(ctx context.Context, id string) *Comment

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

func (*CommentClient) Hooks

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

Hooks returns the client hooks.

func (*CommentClient) Intercept

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

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

func (*CommentClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CommentClient) MapCreateBulk

func (c *CommentClient) MapCreateBulk(slice any, setFunc func(*CommentCreate, int)) *CommentCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*CommentClient) Query

func (c *CommentClient) Query() *CommentQuery

Query returns a query builder for Comment.

func (*CommentClient) Update

func (c *CommentClient) Update() *CommentUpdate

Update returns an update builder for Comment.

func (*CommentClient) UpdateOne

func (c *CommentClient) UpdateOne(_m *Comment) *CommentUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CommentClient) UpdateOneID

func (c *CommentClient) UpdateOneID(id string) *CommentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CommentClient) Use

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

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

type CommentCreate

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

CommentCreate is the builder for creating a Comment entity.

func (*CommentCreate) Exec

func (_c *CommentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentCreate) ExecX

func (_c *CommentCreate) ExecX(ctx context.Context)

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

func (*CommentCreate) Mutation

func (_c *CommentCreate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentCreate) OnConflict

func (_c *CommentCreate) OnConflict(opts ...sql.ConflictOption) *CommentUpsertOne

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

client.Comment.Create().
	SetProduct(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.CommentUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*CommentCreate) OnConflictColumns

func (_c *CommentCreate) OnConflictColumns(columns ...string) *CommentUpsertOne

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

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

func (*CommentCreate) Save

func (_c *CommentCreate) Save(ctx context.Context) (*Comment, error)

Save creates the Comment in the database.

func (*CommentCreate) SaveX

func (_c *CommentCreate) SaveX(ctx context.Context) *Comment

SaveX calls Save and panics if Save returns an error.

func (*CommentCreate) SetBody

func (_c *CommentCreate) SetBody(v string) *CommentCreate

SetBody sets the "body" field.

func (*CommentCreate) SetCommentableID

func (_c *CommentCreate) SetCommentableID(v string) *CommentCreate

SetCommentableID sets the "commentable_id" field.

func (*CommentCreate) SetCommentableType

func (_c *CommentCreate) SetCommentableType(v string) *CommentCreate

SetCommentableType sets the "commentable_type" field.

func (*CommentCreate) SetCreatedAt

func (_c *CommentCreate) SetCreatedAt(v time.Time) *CommentCreate

SetCreatedAt sets the "created_at" field.

func (*CommentCreate) SetData

func (_c *CommentCreate) SetData(v map[string]interface{}) *CommentCreate

SetData sets the "data" field.

func (*CommentCreate) SetID

func (_c *CommentCreate) SetID(v string) *CommentCreate

SetID sets the "id" field.

func (*CommentCreate) SetNillableBody

func (_c *CommentCreate) SetNillableBody(v *string) *CommentCreate

SetNillableBody sets the "body" field if the given value is not nil.

func (*CommentCreate) SetNillableCommentableID

func (_c *CommentCreate) SetNillableCommentableID(v *string) *CommentCreate

SetNillableCommentableID sets the "commentable_id" field if the given value is not nil.

func (*CommentCreate) SetNillableCommentableType

func (_c *CommentCreate) SetNillableCommentableType(v *string) *CommentCreate

SetNillableCommentableType sets the "commentable_type" field if the given value is not nil.

func (*CommentCreate) SetNillableCreatedAt

func (_c *CommentCreate) SetNillableCreatedAt(v *time.Time) *CommentCreate

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

func (*CommentCreate) SetNillableProduct

func (_c *CommentCreate) SetNillableProduct(v *string) *CommentCreate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*CommentCreate) SetNillableURL

func (_c *CommentCreate) SetNillableURL(v *string) *CommentCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*CommentCreate) SetNillableUpdatedAt

func (_c *CommentCreate) SetNillableUpdatedAt(v *time.Time) *CommentCreate

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

func (*CommentCreate) SetNillableUserID

func (_c *CommentCreate) SetNillableUserID(v *string) *CommentCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*CommentCreate) SetProduct

func (_c *CommentCreate) SetProduct(v string) *CommentCreate

SetProduct sets the "product" field.

func (*CommentCreate) SetURL

func (_c *CommentCreate) SetURL(v string) *CommentCreate

SetURL sets the "url" field.

func (*CommentCreate) SetUpdatedAt

func (_c *CommentCreate) SetUpdatedAt(v time.Time) *CommentCreate

SetUpdatedAt sets the "updated_at" field.

func (*CommentCreate) SetUserID

func (_c *CommentCreate) SetUserID(v string) *CommentCreate

SetUserID sets the "user_id" field.

type CommentCreateBulk

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

CommentCreateBulk is the builder for creating many Comment entities in bulk.

func (*CommentCreateBulk) Exec

func (_c *CommentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentCreateBulk) ExecX

func (_c *CommentCreateBulk) ExecX(ctx context.Context)

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

func (*CommentCreateBulk) OnConflict

func (_c *CommentCreateBulk) OnConflict(opts ...sql.ConflictOption) *CommentUpsertBulk

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

client.Comment.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.CommentUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*CommentCreateBulk) OnConflictColumns

func (_c *CommentCreateBulk) OnConflictColumns(columns ...string) *CommentUpsertBulk

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

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

func (*CommentCreateBulk) Save

func (_c *CommentCreateBulk) Save(ctx context.Context) ([]*Comment, error)

Save creates the Comment entities in the database.

func (*CommentCreateBulk) SaveX

func (_c *CommentCreateBulk) SaveX(ctx context.Context) []*Comment

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

type CommentDelete

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

CommentDelete is the builder for deleting a Comment entity.

func (*CommentDelete) Exec

func (_d *CommentDelete) Exec(ctx context.Context) (int, error)

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

func (*CommentDelete) ExecX

func (_d *CommentDelete) ExecX(ctx context.Context) int

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

func (*CommentDelete) Where

func (_d *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete

Where appends a list predicates to the CommentDelete builder.

type CommentDeleteOne

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

CommentDeleteOne is the builder for deleting a single Comment entity.

func (*CommentDeleteOne) Exec

func (_d *CommentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CommentDeleteOne) ExecX

func (_d *CommentDeleteOne) ExecX(ctx context.Context)

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

func (*CommentDeleteOne) Where

Where appends a list predicates to the CommentDelete builder.

type CommentGroupBy

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

CommentGroupBy is the group-by builder for Comment entities.

func (*CommentGroupBy) Aggregate

func (_g *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy

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

func (*CommentGroupBy) Bool

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

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

func (*CommentGroupBy) BoolX

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

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

func (*CommentGroupBy) Bools

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

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

func (*CommentGroupBy) BoolsX

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

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

func (*CommentGroupBy) Float64

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

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

func (*CommentGroupBy) Float64X

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

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

func (*CommentGroupBy) Float64s

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

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

func (*CommentGroupBy) Float64sX

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

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

func (*CommentGroupBy) Int

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

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

func (*CommentGroupBy) IntX

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

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

func (*CommentGroupBy) Ints

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

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

func (*CommentGroupBy) IntsX

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

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

func (*CommentGroupBy) Scan

func (_g *CommentGroupBy) Scan(ctx context.Context, v any) error

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

func (*CommentGroupBy) ScanX

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

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

func (*CommentGroupBy) String

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

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

func (*CommentGroupBy) StringX

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

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

func (*CommentGroupBy) Strings

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

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

func (*CommentGroupBy) StringsX

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

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

type CommentMutation

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

CommentMutation represents an operation that mutates the Comment nodes in the graph.

func (*CommentMutation) AddField

func (m *CommentMutation) 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 (*CommentMutation) AddedEdges

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

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

func (*CommentMutation) AddedField

func (m *CommentMutation) 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 (*CommentMutation) AddedFields

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

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

func (*CommentMutation) AddedIDs

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

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

func (*CommentMutation) Body

func (m *CommentMutation) Body() (r string, exists bool)

Body returns the value of the "body" field in the mutation.

func (*CommentMutation) BodyCleared

func (m *CommentMutation) BodyCleared() bool

BodyCleared returns if the "body" field was cleared in this mutation.

func (*CommentMutation) ClearBody

func (m *CommentMutation) ClearBody()

ClearBody clears the value of the "body" field.

func (*CommentMutation) ClearCommentableID

func (m *CommentMutation) ClearCommentableID()

ClearCommentableID clears the value of the "commentable_id" field.

func (*CommentMutation) ClearCommentableType

func (m *CommentMutation) ClearCommentableType()

ClearCommentableType clears the value of the "commentable_type" field.

func (*CommentMutation) ClearCreatedAt

func (m *CommentMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*CommentMutation) ClearData

func (m *CommentMutation) ClearData()

ClearData clears the value of the "data" field.

func (*CommentMutation) ClearEdge

func (m *CommentMutation) 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 (*CommentMutation) ClearField

func (m *CommentMutation) 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 (*CommentMutation) ClearProduct

func (m *CommentMutation) ClearProduct()

ClearProduct clears the value of the "product" field.

func (*CommentMutation) ClearURL

func (m *CommentMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*CommentMutation) ClearUpdatedAt

func (m *CommentMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CommentMutation) ClearUserID

func (m *CommentMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*CommentMutation) ClearedEdges

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

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

func (*CommentMutation) ClearedFields

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

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

func (CommentMutation) Client

func (m CommentMutation) 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 (*CommentMutation) CommentableID

func (m *CommentMutation) CommentableID() (r string, exists bool)

CommentableID returns the value of the "commentable_id" field in the mutation.

func (*CommentMutation) CommentableIDCleared

func (m *CommentMutation) CommentableIDCleared() bool

CommentableIDCleared returns if the "commentable_id" field was cleared in this mutation.

func (*CommentMutation) CommentableType

func (m *CommentMutation) CommentableType() (r string, exists bool)

CommentableType returns the value of the "commentable_type" field in the mutation.

func (*CommentMutation) CommentableTypeCleared

func (m *CommentMutation) CommentableTypeCleared() bool

CommentableTypeCleared returns if the "commentable_type" field was cleared in this mutation.

func (*CommentMutation) CreatedAt

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

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

func (*CommentMutation) CreatedAtCleared

func (m *CommentMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*CommentMutation) Data

func (m *CommentMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*CommentMutation) DataCleared

func (m *CommentMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*CommentMutation) EdgeCleared

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

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

func (*CommentMutation) Field

func (m *CommentMutation) 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 (*CommentMutation) FieldCleared

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

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

func (*CommentMutation) Fields

func (m *CommentMutation) 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 (*CommentMutation) ID

func (m *CommentMutation) ID() (id string, 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 (*CommentMutation) IDs

func (m *CommentMutation) IDs(ctx context.Context) ([]string, 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 (*CommentMutation) OldBody

func (m *CommentMutation) OldBody(ctx context.Context) (v string, err error)

OldBody returns the old "body" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldCommentableID

func (m *CommentMutation) OldCommentableID(ctx context.Context) (v string, err error)

OldCommentableID returns the old "commentable_id" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldCommentableType

func (m *CommentMutation) OldCommentableType(ctx context.Context) (v string, err error)

OldCommentableType returns the old "commentable_type" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldData

func (m *CommentMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldField

func (m *CommentMutation) 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 (*CommentMutation) OldProduct

func (m *CommentMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldURL

func (m *CommentMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldUserID

func (m *CommentMutation) OldUserID(ctx context.Context) (v string, err error)

OldUserID returns the old "user_id" field's value of the Comment entity. If the Comment 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 (*CommentMutation) Op

func (m *CommentMutation) Op() Op

Op returns the operation name.

func (*CommentMutation) Product

func (m *CommentMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*CommentMutation) ProductCleared

func (m *CommentMutation) ProductCleared() bool

ProductCleared returns if the "product" field was cleared in this mutation.

func (*CommentMutation) RemovedEdges

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

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

func (*CommentMutation) RemovedIDs

func (m *CommentMutation) 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 (*CommentMutation) ResetBody

func (m *CommentMutation) ResetBody()

ResetBody resets all changes to the "body" field.

func (*CommentMutation) ResetCommentableID

func (m *CommentMutation) ResetCommentableID()

ResetCommentableID resets all changes to the "commentable_id" field.

func (*CommentMutation) ResetCommentableType

func (m *CommentMutation) ResetCommentableType()

ResetCommentableType resets all changes to the "commentable_type" field.

func (*CommentMutation) ResetCreatedAt

func (m *CommentMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CommentMutation) ResetData

func (m *CommentMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*CommentMutation) ResetEdge

func (m *CommentMutation) 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 (*CommentMutation) ResetField

func (m *CommentMutation) 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 (*CommentMutation) ResetProduct

func (m *CommentMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*CommentMutation) ResetURL

func (m *CommentMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*CommentMutation) ResetUpdatedAt

func (m *CommentMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CommentMutation) ResetUserID

func (m *CommentMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*CommentMutation) SetBody

func (m *CommentMutation) SetBody(s string)

SetBody sets the "body" field.

func (*CommentMutation) SetCommentableID

func (m *CommentMutation) SetCommentableID(s string)

SetCommentableID sets the "commentable_id" field.

func (*CommentMutation) SetCommentableType

func (m *CommentMutation) SetCommentableType(s string)

SetCommentableType sets the "commentable_type" field.

func (*CommentMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*CommentMutation) SetData

func (m *CommentMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*CommentMutation) SetField

func (m *CommentMutation) 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 (*CommentMutation) SetID

func (m *CommentMutation) SetID(id string)

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

func (*CommentMutation) SetOp

func (m *CommentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CommentMutation) SetProduct

func (m *CommentMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*CommentMutation) SetURL

func (m *CommentMutation) SetURL(s string)

SetURL sets the "url" field.

func (*CommentMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CommentMutation) SetUserID

func (m *CommentMutation) SetUserID(s string)

SetUserID sets the "user_id" field.

func (CommentMutation) Tx

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

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

func (*CommentMutation) Type

func (m *CommentMutation) Type() string

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

func (*CommentMutation) URL

func (m *CommentMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*CommentMutation) URLCleared

func (m *CommentMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*CommentMutation) UpdatedAt

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

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

func (*CommentMutation) UpdatedAtCleared

func (m *CommentMutation) UpdatedAtCleared() bool

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

func (*CommentMutation) UserID

func (m *CommentMutation) UserID() (r string, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*CommentMutation) UserIDCleared

func (m *CommentMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*CommentMutation) Where

func (m *CommentMutation) Where(ps ...predicate.Comment)

Where appends a list predicates to the CommentMutation builder.

func (*CommentMutation) WhereP

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

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

type CommentQuery

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

CommentQuery is the builder for querying Comment entities.

func (*CommentQuery) Aggregate

func (_q *CommentQuery) Aggregate(fns ...AggregateFunc) *CommentSelect

Aggregate returns a CommentSelect configured with the given aggregations.

func (*CommentQuery) All

func (_q *CommentQuery) All(ctx context.Context) ([]*Comment, error)

All executes the query and returns a list of Comments.

func (*CommentQuery) AllX

func (_q *CommentQuery) AllX(ctx context.Context) []*Comment

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

func (*CommentQuery) Clone

func (_q *CommentQuery) Clone() *CommentQuery

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

func (*CommentQuery) Count

func (_q *CommentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CommentQuery) CountX

func (_q *CommentQuery) CountX(ctx context.Context) int

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

func (*CommentQuery) Exist

func (_q *CommentQuery) Exist(ctx context.Context) (bool, error)

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

func (*CommentQuery) ExistX

func (_q *CommentQuery) ExistX(ctx context.Context) bool

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

func (*CommentQuery) First

func (_q *CommentQuery) First(ctx context.Context) (*Comment, error)

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

func (*CommentQuery) FirstID

func (_q *CommentQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*CommentQuery) FirstIDX

func (_q *CommentQuery) FirstIDX(ctx context.Context) string

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

func (*CommentQuery) FirstX

func (_q *CommentQuery) FirstX(ctx context.Context) *Comment

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

func (*CommentQuery) GroupBy

func (_q *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Comment.Query().
	GroupBy(comment.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CommentQuery) IDs

func (_q *CommentQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*CommentQuery) IDsX

func (_q *CommentQuery) IDsX(ctx context.Context) []string

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

func (*CommentQuery) Limit

func (_q *CommentQuery) Limit(limit int) *CommentQuery

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

func (*CommentQuery) Offset

func (_q *CommentQuery) Offset(offset int) *CommentQuery

Offset to start from.

func (*CommentQuery) Only

func (_q *CommentQuery) Only(ctx context.Context) (*Comment, error)

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

func (*CommentQuery) OnlyID

func (_q *CommentQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*CommentQuery) OnlyIDX

func (_q *CommentQuery) OnlyIDX(ctx context.Context) string

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

func (*CommentQuery) OnlyX

func (_q *CommentQuery) OnlyX(ctx context.Context) *Comment

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

func (*CommentQuery) Order

func (_q *CommentQuery) Order(o ...comment.OrderOption) *CommentQuery

Order specifies how the records should be ordered.

func (*CommentQuery) Select

func (_q *CommentQuery) Select(fields ...string) *CommentSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Comment.Query().
	Select(comment.FieldProduct).
	Scan(ctx, &v)

func (*CommentQuery) Unique

func (_q *CommentQuery) Unique(unique bool) *CommentQuery

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 (*CommentQuery) Where

func (_q *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery

Where adds a new predicate for the CommentQuery builder.

type CommentSelect

type CommentSelect struct {
	*CommentQuery
	// contains filtered or unexported fields
}

CommentSelect is the builder for selecting fields of Comment entities.

func (*CommentSelect) Aggregate

func (_s *CommentSelect) Aggregate(fns ...AggregateFunc) *CommentSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CommentSelect) Bool

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

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

func (*CommentSelect) BoolX

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

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

func (*CommentSelect) Bools

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

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

func (*CommentSelect) BoolsX

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

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

func (*CommentSelect) Float64

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

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

func (*CommentSelect) Float64X

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

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

func (*CommentSelect) Float64s

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

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

func (*CommentSelect) Float64sX

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

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

func (*CommentSelect) Int

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

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

func (*CommentSelect) IntX

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

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

func (*CommentSelect) Ints

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

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

func (*CommentSelect) IntsX

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

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

func (*CommentSelect) Scan

func (_s *CommentSelect) Scan(ctx context.Context, v any) error

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

func (*CommentSelect) ScanX

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

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

func (*CommentSelect) String

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

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

func (*CommentSelect) StringX

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

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

func (*CommentSelect) Strings

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

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

func (*CommentSelect) StringsX

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

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

type CommentUpdate

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

CommentUpdate is the builder for updating Comment entities.

func (*CommentUpdate) ClearBody

func (_u *CommentUpdate) ClearBody() *CommentUpdate

ClearBody clears the value of the "body" field.

func (*CommentUpdate) ClearCommentableID

func (_u *CommentUpdate) ClearCommentableID() *CommentUpdate

ClearCommentableID clears the value of the "commentable_id" field.

func (*CommentUpdate) ClearCommentableType

func (_u *CommentUpdate) ClearCommentableType() *CommentUpdate

ClearCommentableType clears the value of the "commentable_type" field.

func (*CommentUpdate) ClearCreatedAt

func (_u *CommentUpdate) ClearCreatedAt() *CommentUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*CommentUpdate) ClearData

func (_u *CommentUpdate) ClearData() *CommentUpdate

ClearData clears the value of the "data" field.

func (*CommentUpdate) ClearProduct

func (_u *CommentUpdate) ClearProduct() *CommentUpdate

ClearProduct clears the value of the "product" field.

func (*CommentUpdate) ClearURL

func (_u *CommentUpdate) ClearURL() *CommentUpdate

ClearURL clears the value of the "url" field.

func (*CommentUpdate) ClearUpdatedAt

func (_u *CommentUpdate) ClearUpdatedAt() *CommentUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CommentUpdate) ClearUserID

func (_u *CommentUpdate) ClearUserID() *CommentUpdate

ClearUserID clears the value of the "user_id" field.

func (*CommentUpdate) Exec

func (_u *CommentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentUpdate) ExecX

func (_u *CommentUpdate) ExecX(ctx context.Context)

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

func (*CommentUpdate) Mutation

func (_u *CommentUpdate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdate) Save

func (_u *CommentUpdate) Save(ctx context.Context) (int, error)

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

func (*CommentUpdate) SaveX

func (_u *CommentUpdate) SaveX(ctx context.Context) int

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

func (*CommentUpdate) SetBody

func (_u *CommentUpdate) SetBody(v string) *CommentUpdate

SetBody sets the "body" field.

func (*CommentUpdate) SetCommentableID

func (_u *CommentUpdate) SetCommentableID(v string) *CommentUpdate

SetCommentableID sets the "commentable_id" field.

func (*CommentUpdate) SetCommentableType

func (_u *CommentUpdate) SetCommentableType(v string) *CommentUpdate

SetCommentableType sets the "commentable_type" field.

func (*CommentUpdate) SetCreatedAt

func (_u *CommentUpdate) SetCreatedAt(v time.Time) *CommentUpdate

SetCreatedAt sets the "created_at" field.

func (*CommentUpdate) SetData

func (_u *CommentUpdate) SetData(v map[string]interface{}) *CommentUpdate

SetData sets the "data" field.

func (*CommentUpdate) SetNillableBody

func (_u *CommentUpdate) SetNillableBody(v *string) *CommentUpdate

SetNillableBody sets the "body" field if the given value is not nil.

func (*CommentUpdate) SetNillableCommentableID

func (_u *CommentUpdate) SetNillableCommentableID(v *string) *CommentUpdate

SetNillableCommentableID sets the "commentable_id" field if the given value is not nil.

func (*CommentUpdate) SetNillableCommentableType

func (_u *CommentUpdate) SetNillableCommentableType(v *string) *CommentUpdate

SetNillableCommentableType sets the "commentable_type" field if the given value is not nil.

func (*CommentUpdate) SetNillableCreatedAt

func (_u *CommentUpdate) SetNillableCreatedAt(v *time.Time) *CommentUpdate

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

func (*CommentUpdate) SetNillableProduct

func (_u *CommentUpdate) SetNillableProduct(v *string) *CommentUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*CommentUpdate) SetNillableURL

func (_u *CommentUpdate) SetNillableURL(v *string) *CommentUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*CommentUpdate) SetNillableUpdatedAt

func (_u *CommentUpdate) SetNillableUpdatedAt(v *time.Time) *CommentUpdate

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

func (*CommentUpdate) SetNillableUserID

func (_u *CommentUpdate) SetNillableUserID(v *string) *CommentUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*CommentUpdate) SetProduct

func (_u *CommentUpdate) SetProduct(v string) *CommentUpdate

SetProduct sets the "product" field.

func (*CommentUpdate) SetURL

func (_u *CommentUpdate) SetURL(v string) *CommentUpdate

SetURL sets the "url" field.

func (*CommentUpdate) SetUpdatedAt

func (_u *CommentUpdate) SetUpdatedAt(v time.Time) *CommentUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CommentUpdate) SetUserID

func (_u *CommentUpdate) SetUserID(v string) *CommentUpdate

SetUserID sets the "user_id" field.

func (*CommentUpdate) Where

func (_u *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate

Where appends a list predicates to the CommentUpdate builder.

type CommentUpdateOne

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

CommentUpdateOne is the builder for updating a single Comment entity.

func (*CommentUpdateOne) ClearBody

func (_u *CommentUpdateOne) ClearBody() *CommentUpdateOne

ClearBody clears the value of the "body" field.

func (*CommentUpdateOne) ClearCommentableID

func (_u *CommentUpdateOne) ClearCommentableID() *CommentUpdateOne

ClearCommentableID clears the value of the "commentable_id" field.

func (*CommentUpdateOne) ClearCommentableType

func (_u *CommentUpdateOne) ClearCommentableType() *CommentUpdateOne

ClearCommentableType clears the value of the "commentable_type" field.

func (*CommentUpdateOne) ClearCreatedAt

func (_u *CommentUpdateOne) ClearCreatedAt() *CommentUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*CommentUpdateOne) ClearData

func (_u *CommentUpdateOne) ClearData() *CommentUpdateOne

ClearData clears the value of the "data" field.

func (*CommentUpdateOne) ClearProduct

func (_u *CommentUpdateOne) ClearProduct() *CommentUpdateOne

ClearProduct clears the value of the "product" field.

func (*CommentUpdateOne) ClearURL

func (_u *CommentUpdateOne) ClearURL() *CommentUpdateOne

ClearURL clears the value of the "url" field.

func (*CommentUpdateOne) ClearUpdatedAt

func (_u *CommentUpdateOne) ClearUpdatedAt() *CommentUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CommentUpdateOne) ClearUserID

func (_u *CommentUpdateOne) ClearUserID() *CommentUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*CommentUpdateOne) Exec

func (_u *CommentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CommentUpdateOne) ExecX

func (_u *CommentUpdateOne) ExecX(ctx context.Context)

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

func (*CommentUpdateOne) Mutation

func (_u *CommentUpdateOne) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdateOne) Save

func (_u *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)

Save executes the query and returns the updated Comment entity.

func (*CommentUpdateOne) SaveX

func (_u *CommentUpdateOne) SaveX(ctx context.Context) *Comment

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

func (*CommentUpdateOne) Select

func (_u *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne

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

func (*CommentUpdateOne) SetBody

func (_u *CommentUpdateOne) SetBody(v string) *CommentUpdateOne

SetBody sets the "body" field.

func (*CommentUpdateOne) SetCommentableID

func (_u *CommentUpdateOne) SetCommentableID(v string) *CommentUpdateOne

SetCommentableID sets the "commentable_id" field.

func (*CommentUpdateOne) SetCommentableType

func (_u *CommentUpdateOne) SetCommentableType(v string) *CommentUpdateOne

SetCommentableType sets the "commentable_type" field.

func (*CommentUpdateOne) SetCreatedAt

func (_u *CommentUpdateOne) SetCreatedAt(v time.Time) *CommentUpdateOne

SetCreatedAt sets the "created_at" field.

func (*CommentUpdateOne) SetData

func (_u *CommentUpdateOne) SetData(v map[string]interface{}) *CommentUpdateOne

SetData sets the "data" field.

func (*CommentUpdateOne) SetNillableBody

func (_u *CommentUpdateOne) SetNillableBody(v *string) *CommentUpdateOne

SetNillableBody sets the "body" field if the given value is not nil.

func (*CommentUpdateOne) SetNillableCommentableID

func (_u *CommentUpdateOne) SetNillableCommentableID(v *string) *CommentUpdateOne

SetNillableCommentableID sets the "commentable_id" field if the given value is not nil.

func (*CommentUpdateOne) SetNillableCommentableType

func (_u *CommentUpdateOne) SetNillableCommentableType(v *string) *CommentUpdateOne

SetNillableCommentableType sets the "commentable_type" field if the given value is not nil.

func (*CommentUpdateOne) SetNillableCreatedAt

func (_u *CommentUpdateOne) SetNillableCreatedAt(v *time.Time) *CommentUpdateOne

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

func (*CommentUpdateOne) SetNillableProduct

func (_u *CommentUpdateOne) SetNillableProduct(v *string) *CommentUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*CommentUpdateOne) SetNillableURL

func (_u *CommentUpdateOne) SetNillableURL(v *string) *CommentUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*CommentUpdateOne) SetNillableUpdatedAt

func (_u *CommentUpdateOne) SetNillableUpdatedAt(v *time.Time) *CommentUpdateOne

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

func (*CommentUpdateOne) SetNillableUserID

func (_u *CommentUpdateOne) SetNillableUserID(v *string) *CommentUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*CommentUpdateOne) SetProduct

func (_u *CommentUpdateOne) SetProduct(v string) *CommentUpdateOne

SetProduct sets the "product" field.

func (*CommentUpdateOne) SetURL

func (_u *CommentUpdateOne) SetURL(v string) *CommentUpdateOne

SetURL sets the "url" field.

func (*CommentUpdateOne) SetUpdatedAt

func (_u *CommentUpdateOne) SetUpdatedAt(v time.Time) *CommentUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*CommentUpdateOne) SetUserID

func (_u *CommentUpdateOne) SetUserID(v string) *CommentUpdateOne

SetUserID sets the "user_id" field.

func (*CommentUpdateOne) Where

Where appends a list predicates to the CommentUpdate builder.

type CommentUpsert

type CommentUpsert struct {
	*sql.UpdateSet
}

CommentUpsert is the "OnConflict" setter.

func (*CommentUpsert) ClearBody

func (u *CommentUpsert) ClearBody() *CommentUpsert

ClearBody clears the value of the "body" field.

func (*CommentUpsert) ClearCommentableID

func (u *CommentUpsert) ClearCommentableID() *CommentUpsert

ClearCommentableID clears the value of the "commentable_id" field.

func (*CommentUpsert) ClearCommentableType

func (u *CommentUpsert) ClearCommentableType() *CommentUpsert

ClearCommentableType clears the value of the "commentable_type" field.

func (*CommentUpsert) ClearCreatedAt

func (u *CommentUpsert) ClearCreatedAt() *CommentUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*CommentUpsert) ClearData

func (u *CommentUpsert) ClearData() *CommentUpsert

ClearData clears the value of the "data" field.

func (*CommentUpsert) ClearProduct

func (u *CommentUpsert) ClearProduct() *CommentUpsert

ClearProduct clears the value of the "product" field.

func (*CommentUpsert) ClearURL

func (u *CommentUpsert) ClearURL() *CommentUpsert

ClearURL clears the value of the "url" field.

func (*CommentUpsert) ClearUpdatedAt

func (u *CommentUpsert) ClearUpdatedAt() *CommentUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CommentUpsert) ClearUserID

func (u *CommentUpsert) ClearUserID() *CommentUpsert

ClearUserID clears the value of the "user_id" field.

func (*CommentUpsert) SetBody

func (u *CommentUpsert) SetBody(v string) *CommentUpsert

SetBody sets the "body" field.

func (*CommentUpsert) SetCommentableID

func (u *CommentUpsert) SetCommentableID(v string) *CommentUpsert

SetCommentableID sets the "commentable_id" field.

func (*CommentUpsert) SetCommentableType

func (u *CommentUpsert) SetCommentableType(v string) *CommentUpsert

SetCommentableType sets the "commentable_type" field.

func (*CommentUpsert) SetCreatedAt

func (u *CommentUpsert) SetCreatedAt(v time.Time) *CommentUpsert

SetCreatedAt sets the "created_at" field.

func (*CommentUpsert) SetData

func (u *CommentUpsert) SetData(v map[string]interface{}) *CommentUpsert

SetData sets the "data" field.

func (*CommentUpsert) SetProduct

func (u *CommentUpsert) SetProduct(v string) *CommentUpsert

SetProduct sets the "product" field.

func (*CommentUpsert) SetURL

func (u *CommentUpsert) SetURL(v string) *CommentUpsert

SetURL sets the "url" field.

func (*CommentUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CommentUpsert) SetUserID

func (u *CommentUpsert) SetUserID(v string) *CommentUpsert

SetUserID sets the "user_id" field.

func (*CommentUpsert) UpdateBody

func (u *CommentUpsert) UpdateBody() *CommentUpsert

UpdateBody sets the "body" field to the value that was provided on create.

func (*CommentUpsert) UpdateCommentableID

func (u *CommentUpsert) UpdateCommentableID() *CommentUpsert

UpdateCommentableID sets the "commentable_id" field to the value that was provided on create.

func (*CommentUpsert) UpdateCommentableType

func (u *CommentUpsert) UpdateCommentableType() *CommentUpsert

UpdateCommentableType sets the "commentable_type" field to the value that was provided on create.

func (*CommentUpsert) UpdateCreatedAt

func (u *CommentUpsert) UpdateCreatedAt() *CommentUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*CommentUpsert) UpdateData

func (u *CommentUpsert) UpdateData() *CommentUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*CommentUpsert) UpdateProduct

func (u *CommentUpsert) UpdateProduct() *CommentUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*CommentUpsert) UpdateURL

func (u *CommentUpsert) UpdateURL() *CommentUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*CommentUpsert) UpdateUpdatedAt

func (u *CommentUpsert) UpdateUpdatedAt() *CommentUpsert

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

func (*CommentUpsert) UpdateUserID

func (u *CommentUpsert) UpdateUserID() *CommentUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type CommentUpsertBulk

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

CommentUpsertBulk is the builder for "upsert"-ing a bulk of Comment nodes.

func (*CommentUpsertBulk) ClearBody

func (u *CommentUpsertBulk) ClearBody() *CommentUpsertBulk

ClearBody clears the value of the "body" field.

func (*CommentUpsertBulk) ClearCommentableID

func (u *CommentUpsertBulk) ClearCommentableID() *CommentUpsertBulk

ClearCommentableID clears the value of the "commentable_id" field.

func (*CommentUpsertBulk) ClearCommentableType

func (u *CommentUpsertBulk) ClearCommentableType() *CommentUpsertBulk

ClearCommentableType clears the value of the "commentable_type" field.

func (*CommentUpsertBulk) ClearCreatedAt

func (u *CommentUpsertBulk) ClearCreatedAt() *CommentUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*CommentUpsertBulk) ClearData

func (u *CommentUpsertBulk) ClearData() *CommentUpsertBulk

ClearData clears the value of the "data" field.

func (*CommentUpsertBulk) ClearProduct

func (u *CommentUpsertBulk) ClearProduct() *CommentUpsertBulk

ClearProduct clears the value of the "product" field.

func (*CommentUpsertBulk) ClearURL

func (u *CommentUpsertBulk) ClearURL() *CommentUpsertBulk

ClearURL clears the value of the "url" field.

func (*CommentUpsertBulk) ClearUpdatedAt

func (u *CommentUpsertBulk) ClearUpdatedAt() *CommentUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CommentUpsertBulk) ClearUserID

func (u *CommentUpsertBulk) ClearUserID() *CommentUpsertBulk

ClearUserID clears the value of the "user_id" field.

func (*CommentUpsertBulk) DoNothing

func (u *CommentUpsertBulk) DoNothing() *CommentUpsertBulk

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

func (*CommentUpsertBulk) Exec

func (u *CommentUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentUpsertBulk) ExecX

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

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

func (*CommentUpsertBulk) Ignore

func (u *CommentUpsertBulk) Ignore() *CommentUpsertBulk

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

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

func (*CommentUpsertBulk) SetBody

SetBody sets the "body" field.

func (*CommentUpsertBulk) SetCommentableID

func (u *CommentUpsertBulk) SetCommentableID(v string) *CommentUpsertBulk

SetCommentableID sets the "commentable_id" field.

func (*CommentUpsertBulk) SetCommentableType

func (u *CommentUpsertBulk) SetCommentableType(v string) *CommentUpsertBulk

SetCommentableType sets the "commentable_type" field.

func (*CommentUpsertBulk) SetCreatedAt

func (u *CommentUpsertBulk) SetCreatedAt(v time.Time) *CommentUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*CommentUpsertBulk) SetData

func (u *CommentUpsertBulk) SetData(v map[string]interface{}) *CommentUpsertBulk

SetData sets the "data" field.

func (*CommentUpsertBulk) SetProduct

func (u *CommentUpsertBulk) SetProduct(v string) *CommentUpsertBulk

SetProduct sets the "product" field.

func (*CommentUpsertBulk) SetURL

SetURL sets the "url" field.

func (*CommentUpsertBulk) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CommentUpsertBulk) SetUserID

func (u *CommentUpsertBulk) SetUserID(v string) *CommentUpsertBulk

SetUserID sets the "user_id" field.

func (*CommentUpsertBulk) Update

func (u *CommentUpsertBulk) Update(set func(*CommentUpsert)) *CommentUpsertBulk

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

func (*CommentUpsertBulk) UpdateBody

func (u *CommentUpsertBulk) UpdateBody() *CommentUpsertBulk

UpdateBody sets the "body" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateCommentableID

func (u *CommentUpsertBulk) UpdateCommentableID() *CommentUpsertBulk

UpdateCommentableID sets the "commentable_id" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateCommentableType

func (u *CommentUpsertBulk) UpdateCommentableType() *CommentUpsertBulk

UpdateCommentableType sets the "commentable_type" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateCreatedAt

func (u *CommentUpsertBulk) UpdateCreatedAt() *CommentUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateData

func (u *CommentUpsertBulk) UpdateData() *CommentUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateNewValues

func (u *CommentUpsertBulk) UpdateNewValues() *CommentUpsertBulk

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

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

func (*CommentUpsertBulk) UpdateProduct

func (u *CommentUpsertBulk) UpdateProduct() *CommentUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateURL

func (u *CommentUpsertBulk) UpdateURL() *CommentUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateUpdatedAt

func (u *CommentUpsertBulk) UpdateUpdatedAt() *CommentUpsertBulk

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

func (*CommentUpsertBulk) UpdateUserID

func (u *CommentUpsertBulk) UpdateUserID() *CommentUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type CommentUpsertOne

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

CommentUpsertOne is the builder for "upsert"-ing

one Comment node.

func (*CommentUpsertOne) ClearBody

func (u *CommentUpsertOne) ClearBody() *CommentUpsertOne

ClearBody clears the value of the "body" field.

func (*CommentUpsertOne) ClearCommentableID

func (u *CommentUpsertOne) ClearCommentableID() *CommentUpsertOne

ClearCommentableID clears the value of the "commentable_id" field.

func (*CommentUpsertOne) ClearCommentableType

func (u *CommentUpsertOne) ClearCommentableType() *CommentUpsertOne

ClearCommentableType clears the value of the "commentable_type" field.

func (*CommentUpsertOne) ClearCreatedAt

func (u *CommentUpsertOne) ClearCreatedAt() *CommentUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*CommentUpsertOne) ClearData

func (u *CommentUpsertOne) ClearData() *CommentUpsertOne

ClearData clears the value of the "data" field.

func (*CommentUpsertOne) ClearProduct

func (u *CommentUpsertOne) ClearProduct() *CommentUpsertOne

ClearProduct clears the value of the "product" field.

func (*CommentUpsertOne) ClearURL

func (u *CommentUpsertOne) ClearURL() *CommentUpsertOne

ClearURL clears the value of the "url" field.

func (*CommentUpsertOne) ClearUpdatedAt

func (u *CommentUpsertOne) ClearUpdatedAt() *CommentUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CommentUpsertOne) ClearUserID

func (u *CommentUpsertOne) ClearUserID() *CommentUpsertOne

ClearUserID clears the value of the "user_id" field.

func (*CommentUpsertOne) DoNothing

func (u *CommentUpsertOne) DoNothing() *CommentUpsertOne

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

func (*CommentUpsertOne) Exec

func (u *CommentUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentUpsertOne) ExecX

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

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

func (*CommentUpsertOne) ID

func (u *CommentUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*CommentUpsertOne) IDX

func (u *CommentUpsertOne) IDX(ctx context.Context) string

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

func (*CommentUpsertOne) Ignore

func (u *CommentUpsertOne) Ignore() *CommentUpsertOne

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

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

func (*CommentUpsertOne) SetBody

func (u *CommentUpsertOne) SetBody(v string) *CommentUpsertOne

SetBody sets the "body" field.

func (*CommentUpsertOne) SetCommentableID

func (u *CommentUpsertOne) SetCommentableID(v string) *CommentUpsertOne

SetCommentableID sets the "commentable_id" field.

func (*CommentUpsertOne) SetCommentableType

func (u *CommentUpsertOne) SetCommentableType(v string) *CommentUpsertOne

SetCommentableType sets the "commentable_type" field.

func (*CommentUpsertOne) SetCreatedAt

func (u *CommentUpsertOne) SetCreatedAt(v time.Time) *CommentUpsertOne

SetCreatedAt sets the "created_at" field.

func (*CommentUpsertOne) SetData

func (u *CommentUpsertOne) SetData(v map[string]interface{}) *CommentUpsertOne

SetData sets the "data" field.

func (*CommentUpsertOne) SetProduct

func (u *CommentUpsertOne) SetProduct(v string) *CommentUpsertOne

SetProduct sets the "product" field.

func (*CommentUpsertOne) SetURL

SetURL sets the "url" field.

func (*CommentUpsertOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CommentUpsertOne) SetUserID

func (u *CommentUpsertOne) SetUserID(v string) *CommentUpsertOne

SetUserID sets the "user_id" field.

func (*CommentUpsertOne) Update

func (u *CommentUpsertOne) Update(set func(*CommentUpsert)) *CommentUpsertOne

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

func (*CommentUpsertOne) UpdateBody

func (u *CommentUpsertOne) UpdateBody() *CommentUpsertOne

UpdateBody sets the "body" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateCommentableID

func (u *CommentUpsertOne) UpdateCommentableID() *CommentUpsertOne

UpdateCommentableID sets the "commentable_id" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateCommentableType

func (u *CommentUpsertOne) UpdateCommentableType() *CommentUpsertOne

UpdateCommentableType sets the "commentable_type" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateCreatedAt

func (u *CommentUpsertOne) UpdateCreatedAt() *CommentUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateData

func (u *CommentUpsertOne) UpdateData() *CommentUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateNewValues

func (u *CommentUpsertOne) UpdateNewValues() *CommentUpsertOne

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.Comment.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(comment.FieldID)
		}),
	).
	Exec(ctx)

func (*CommentUpsertOne) UpdateProduct

func (u *CommentUpsertOne) UpdateProduct() *CommentUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateURL

func (u *CommentUpsertOne) UpdateURL() *CommentUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateUpdatedAt

func (u *CommentUpsertOne) UpdateUpdatedAt() *CommentUpsertOne

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

func (*CommentUpsertOne) UpdateUserID

func (u *CommentUpsertOne) UpdateUserID() *CommentUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type Comments

type Comments []*Comment

Comments is a parsable slice of Comment.

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 Epic

type Epic struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// Progress holds the value of the "progress" field.
	Progress *float64 `json:"progress,omitempty"`
	// StartDate holds the value of the "start_date" field.
	StartDate string `json:"start_date,omitempty"`
	// DueDate holds the value of the "due_date" field.
	DueDate string `json:"due_date,omitempty"`
	// Release holds the value of the "release" field.
	Release string `json:"release,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Epic is the model entity for the Epic schema.

func (*Epic) String

func (_m *Epic) String() string

String implements the fmt.Stringer.

func (*Epic) Unwrap

func (_m *Epic) Unwrap() *Epic

Unwrap unwraps the Epic 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 (*Epic) Update

func (_m *Epic) Update() *EpicUpdateOne

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

func (*Epic) Value

func (_m *Epic) Value(name string) (ent.Value, error)

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

type EpicClient

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

EpicClient is a client for the Epic schema.

func NewEpicClient

func NewEpicClient(c config) *EpicClient

NewEpicClient returns a client for the Epic from the given config.

func (*EpicClient) Create

func (c *EpicClient) Create() *EpicCreate

Create returns a builder for creating a Epic entity.

func (*EpicClient) CreateBulk

func (c *EpicClient) CreateBulk(builders ...*EpicCreate) *EpicCreateBulk

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

func (*EpicClient) Delete

func (c *EpicClient) Delete() *EpicDelete

Delete returns a delete builder for Epic.

func (*EpicClient) DeleteOne

func (c *EpicClient) DeleteOne(_m *Epic) *EpicDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EpicClient) DeleteOneID

func (c *EpicClient) DeleteOneID(id string) *EpicDeleteOne

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

func (*EpicClient) Get

func (c *EpicClient) Get(ctx context.Context, id string) (*Epic, error)

Get returns a Epic entity by its id.

func (*EpicClient) GetX

func (c *EpicClient) GetX(ctx context.Context, id string) *Epic

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

func (*EpicClient) Hooks

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

Hooks returns the client hooks.

func (*EpicClient) Intercept

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

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

func (*EpicClient) Interceptors

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

Interceptors returns the client interceptors.

func (*EpicClient) MapCreateBulk

func (c *EpicClient) MapCreateBulk(slice any, setFunc func(*EpicCreate, int)) *EpicCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*EpicClient) Query

func (c *EpicClient) Query() *EpicQuery

Query returns a query builder for Epic.

func (*EpicClient) Update

func (c *EpicClient) Update() *EpicUpdate

Update returns an update builder for Epic.

func (*EpicClient) UpdateOne

func (c *EpicClient) UpdateOne(_m *Epic) *EpicUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EpicClient) UpdateOneID

func (c *EpicClient) UpdateOneID(id string) *EpicUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EpicClient) Use

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

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

type EpicCreate

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

EpicCreate is the builder for creating a Epic entity.

func (*EpicCreate) Exec

func (_c *EpicCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EpicCreate) ExecX

func (_c *EpicCreate) ExecX(ctx context.Context)

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

func (*EpicCreate) Mutation

func (_c *EpicCreate) Mutation() *EpicMutation

Mutation returns the EpicMutation object of the builder.

func (*EpicCreate) OnConflict

func (_c *EpicCreate) OnConflict(opts ...sql.ConflictOption) *EpicUpsertOne

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

client.Epic.Create().
	SetProduct(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.EpicUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*EpicCreate) OnConflictColumns

func (_c *EpicCreate) OnConflictColumns(columns ...string) *EpicUpsertOne

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

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

func (*EpicCreate) Save

func (_c *EpicCreate) Save(ctx context.Context) (*Epic, error)

Save creates the Epic in the database.

func (*EpicCreate) SaveX

func (_c *EpicCreate) SaveX(ctx context.Context) *Epic

SaveX calls Save and panics if Save returns an error.

func (*EpicCreate) SetCreatedAt

func (_c *EpicCreate) SetCreatedAt(v time.Time) *EpicCreate

SetCreatedAt sets the "created_at" field.

func (*EpicCreate) SetData

func (_c *EpicCreate) SetData(v map[string]interface{}) *EpicCreate

SetData sets the "data" field.

func (*EpicCreate) SetDescription

func (_c *EpicCreate) SetDescription(v string) *EpicCreate

SetDescription sets the "description" field.

func (*EpicCreate) SetDueDate

func (_c *EpicCreate) SetDueDate(v string) *EpicCreate

SetDueDate sets the "due_date" field.

func (*EpicCreate) SetID

func (_c *EpicCreate) SetID(v string) *EpicCreate

SetID sets the "id" field.

func (*EpicCreate) SetName

func (_c *EpicCreate) SetName(v string) *EpicCreate

SetName sets the "name" field.

func (*EpicCreate) SetNillableCreatedAt

func (_c *EpicCreate) SetNillableCreatedAt(v *time.Time) *EpicCreate

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

func (*EpicCreate) SetNillableDescription

func (_c *EpicCreate) SetNillableDescription(v *string) *EpicCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*EpicCreate) SetNillableDueDate

func (_c *EpicCreate) SetNillableDueDate(v *string) *EpicCreate

SetNillableDueDate sets the "due_date" field if the given value is not nil.

func (*EpicCreate) SetNillableName

func (_c *EpicCreate) SetNillableName(v *string) *EpicCreate

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

func (*EpicCreate) SetNillableProgress

func (_c *EpicCreate) SetNillableProgress(v *float64) *EpicCreate

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*EpicCreate) SetNillableReferenceNum

func (_c *EpicCreate) SetNillableReferenceNum(v *string) *EpicCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*EpicCreate) SetNillableRelease

func (_c *EpicCreate) SetNillableRelease(v *string) *EpicCreate

SetNillableRelease sets the "release" field if the given value is not nil.

func (*EpicCreate) SetNillableStartDate

func (_c *EpicCreate) SetNillableStartDate(v *string) *EpicCreate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*EpicCreate) SetNillableStatus

func (_c *EpicCreate) SetNillableStatus(v *string) *EpicCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*EpicCreate) SetNillableURL

func (_c *EpicCreate) SetNillableURL(v *string) *EpicCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*EpicCreate) SetNillableUpdatedAt

func (_c *EpicCreate) SetNillableUpdatedAt(v *time.Time) *EpicCreate

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

func (*EpicCreate) SetProduct

func (_c *EpicCreate) SetProduct(v string) *EpicCreate

SetProduct sets the "product" field.

func (*EpicCreate) SetProgress

func (_c *EpicCreate) SetProgress(v float64) *EpicCreate

SetProgress sets the "progress" field.

func (*EpicCreate) SetReferenceNum

func (_c *EpicCreate) SetReferenceNum(v string) *EpicCreate

SetReferenceNum sets the "reference_num" field.

func (*EpicCreate) SetRelease

func (_c *EpicCreate) SetRelease(v string) *EpicCreate

SetRelease sets the "release" field.

func (*EpicCreate) SetStartDate

func (_c *EpicCreate) SetStartDate(v string) *EpicCreate

SetStartDate sets the "start_date" field.

func (*EpicCreate) SetStatus

func (_c *EpicCreate) SetStatus(v string) *EpicCreate

SetStatus sets the "status" field.

func (*EpicCreate) SetURL

func (_c *EpicCreate) SetURL(v string) *EpicCreate

SetURL sets the "url" field.

func (*EpicCreate) SetUpdatedAt

func (_c *EpicCreate) SetUpdatedAt(v time.Time) *EpicCreate

SetUpdatedAt sets the "updated_at" field.

type EpicCreateBulk

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

EpicCreateBulk is the builder for creating many Epic entities in bulk.

func (*EpicCreateBulk) Exec

func (_c *EpicCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EpicCreateBulk) ExecX

func (_c *EpicCreateBulk) ExecX(ctx context.Context)

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

func (*EpicCreateBulk) OnConflict

func (_c *EpicCreateBulk) OnConflict(opts ...sql.ConflictOption) *EpicUpsertBulk

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

client.Epic.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.EpicUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*EpicCreateBulk) OnConflictColumns

func (_c *EpicCreateBulk) OnConflictColumns(columns ...string) *EpicUpsertBulk

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

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

func (*EpicCreateBulk) Save

func (_c *EpicCreateBulk) Save(ctx context.Context) ([]*Epic, error)

Save creates the Epic entities in the database.

func (*EpicCreateBulk) SaveX

func (_c *EpicCreateBulk) SaveX(ctx context.Context) []*Epic

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

type EpicDelete

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

EpicDelete is the builder for deleting a Epic entity.

func (*EpicDelete) Exec

func (_d *EpicDelete) Exec(ctx context.Context) (int, error)

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

func (*EpicDelete) ExecX

func (_d *EpicDelete) ExecX(ctx context.Context) int

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

func (*EpicDelete) Where

func (_d *EpicDelete) Where(ps ...predicate.Epic) *EpicDelete

Where appends a list predicates to the EpicDelete builder.

type EpicDeleteOne

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

EpicDeleteOne is the builder for deleting a single Epic entity.

func (*EpicDeleteOne) Exec

func (_d *EpicDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EpicDeleteOne) ExecX

func (_d *EpicDeleteOne) ExecX(ctx context.Context)

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

func (*EpicDeleteOne) Where

func (_d *EpicDeleteOne) Where(ps ...predicate.Epic) *EpicDeleteOne

Where appends a list predicates to the EpicDelete builder.

type EpicGroupBy

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

EpicGroupBy is the group-by builder for Epic entities.

func (*EpicGroupBy) Aggregate

func (_g *EpicGroupBy) Aggregate(fns ...AggregateFunc) *EpicGroupBy

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

func (*EpicGroupBy) Bool

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

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

func (*EpicGroupBy) BoolX

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

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

func (*EpicGroupBy) Bools

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

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

func (*EpicGroupBy) BoolsX

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

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

func (*EpicGroupBy) Float64

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

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

func (*EpicGroupBy) Float64X

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

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

func (*EpicGroupBy) Float64s

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

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

func (*EpicGroupBy) Float64sX

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

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

func (*EpicGroupBy) Int

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

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

func (*EpicGroupBy) IntX

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

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

func (*EpicGroupBy) Ints

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

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

func (*EpicGroupBy) IntsX

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

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

func (*EpicGroupBy) Scan

func (_g *EpicGroupBy) Scan(ctx context.Context, v any) error

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

func (*EpicGroupBy) ScanX

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

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

func (*EpicGroupBy) String

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

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

func (*EpicGroupBy) StringX

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

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

func (*EpicGroupBy) Strings

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

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

func (*EpicGroupBy) StringsX

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

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

type EpicMutation

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

EpicMutation represents an operation that mutates the Epic nodes in the graph.

func (*EpicMutation) AddField

func (m *EpicMutation) 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 (*EpicMutation) AddProgress

func (m *EpicMutation) AddProgress(f float64)

AddProgress adds f to the "progress" field.

func (*EpicMutation) AddedEdges

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

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

func (*EpicMutation) AddedField

func (m *EpicMutation) 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 (*EpicMutation) AddedFields

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

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

func (*EpicMutation) AddedIDs

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

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

func (*EpicMutation) AddedProgress

func (m *EpicMutation) AddedProgress() (r float64, exists bool)

AddedProgress returns the value that was added to the "progress" field in this mutation.

func (*EpicMutation) ClearCreatedAt

func (m *EpicMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*EpicMutation) ClearData

func (m *EpicMutation) ClearData()

ClearData clears the value of the "data" field.

func (*EpicMutation) ClearDescription

func (m *EpicMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*EpicMutation) ClearDueDate

func (m *EpicMutation) ClearDueDate()

ClearDueDate clears the value of the "due_date" field.

func (*EpicMutation) ClearEdge

func (m *EpicMutation) 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 (*EpicMutation) ClearField

func (m *EpicMutation) 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 (*EpicMutation) ClearName

func (m *EpicMutation) ClearName()

ClearName clears the value of the "name" field.

func (*EpicMutation) ClearProgress

func (m *EpicMutation) ClearProgress()

ClearProgress clears the value of the "progress" field.

func (*EpicMutation) ClearReferenceNum

func (m *EpicMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*EpicMutation) ClearRelease

func (m *EpicMutation) ClearRelease()

ClearRelease clears the value of the "release" field.

func (*EpicMutation) ClearStartDate

func (m *EpicMutation) ClearStartDate()

ClearStartDate clears the value of the "start_date" field.

func (*EpicMutation) ClearStatus

func (m *EpicMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*EpicMutation) ClearURL

func (m *EpicMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*EpicMutation) ClearUpdatedAt

func (m *EpicMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*EpicMutation) ClearedEdges

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

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

func (*EpicMutation) ClearedFields

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

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

func (EpicMutation) Client

func (m EpicMutation) 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 (*EpicMutation) CreatedAt

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

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

func (*EpicMutation) CreatedAtCleared

func (m *EpicMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*EpicMutation) Data

func (m *EpicMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*EpicMutation) DataCleared

func (m *EpicMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*EpicMutation) Description

func (m *EpicMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*EpicMutation) DescriptionCleared

func (m *EpicMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*EpicMutation) DueDate

func (m *EpicMutation) DueDate() (r string, exists bool)

DueDate returns the value of the "due_date" field in the mutation.

func (*EpicMutation) DueDateCleared

func (m *EpicMutation) DueDateCleared() bool

DueDateCleared returns if the "due_date" field was cleared in this mutation.

func (*EpicMutation) EdgeCleared

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

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

func (*EpicMutation) Field

func (m *EpicMutation) 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 (*EpicMutation) FieldCleared

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

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

func (*EpicMutation) Fields

func (m *EpicMutation) 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 (*EpicMutation) ID

func (m *EpicMutation) ID() (id string, 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 (*EpicMutation) IDs

func (m *EpicMutation) IDs(ctx context.Context) ([]string, 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 (*EpicMutation) Name

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

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

func (*EpicMutation) NameCleared

func (m *EpicMutation) NameCleared() bool

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

func (*EpicMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldData

func (m *EpicMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldDescription

func (m *EpicMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldDueDate

func (m *EpicMutation) OldDueDate(ctx context.Context) (v string, err error)

OldDueDate returns the old "due_date" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldField

func (m *EpicMutation) 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 (*EpicMutation) OldName

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

OldName returns the old "name" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldProduct

func (m *EpicMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldProgress

func (m *EpicMutation) OldProgress(ctx context.Context) (v *float64, err error)

OldProgress returns the old "progress" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldReferenceNum

func (m *EpicMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldRelease

func (m *EpicMutation) OldRelease(ctx context.Context) (v string, err error)

OldRelease returns the old "release" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldStartDate

func (m *EpicMutation) OldStartDate(ctx context.Context) (v string, err error)

OldStartDate returns the old "start_date" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldStatus

func (m *EpicMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldURL

func (m *EpicMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Epic entity. If the Epic 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 (*EpicMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Epic entity. If the Epic 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 (*EpicMutation) Op

func (m *EpicMutation) Op() Op

Op returns the operation name.

func (*EpicMutation) Product

func (m *EpicMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*EpicMutation) Progress

func (m *EpicMutation) Progress() (r float64, exists bool)

Progress returns the value of the "progress" field in the mutation.

func (*EpicMutation) ProgressCleared

func (m *EpicMutation) ProgressCleared() bool

ProgressCleared returns if the "progress" field was cleared in this mutation.

func (*EpicMutation) ReferenceNum

func (m *EpicMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*EpicMutation) ReferenceNumCleared

func (m *EpicMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*EpicMutation) Release

func (m *EpicMutation) Release() (r string, exists bool)

Release returns the value of the "release" field in the mutation.

func (*EpicMutation) ReleaseCleared

func (m *EpicMutation) ReleaseCleared() bool

ReleaseCleared returns if the "release" field was cleared in this mutation.

func (*EpicMutation) RemovedEdges

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

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

func (*EpicMutation) RemovedIDs

func (m *EpicMutation) 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 (*EpicMutation) ResetCreatedAt

func (m *EpicMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EpicMutation) ResetData

func (m *EpicMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*EpicMutation) ResetDescription

func (m *EpicMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*EpicMutation) ResetDueDate

func (m *EpicMutation) ResetDueDate()

ResetDueDate resets all changes to the "due_date" field.

func (*EpicMutation) ResetEdge

func (m *EpicMutation) 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 (*EpicMutation) ResetField

func (m *EpicMutation) 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 (*EpicMutation) ResetName

func (m *EpicMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*EpicMutation) ResetProduct

func (m *EpicMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*EpicMutation) ResetProgress

func (m *EpicMutation) ResetProgress()

ResetProgress resets all changes to the "progress" field.

func (*EpicMutation) ResetReferenceNum

func (m *EpicMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*EpicMutation) ResetRelease

func (m *EpicMutation) ResetRelease()

ResetRelease resets all changes to the "release" field.

func (*EpicMutation) ResetStartDate

func (m *EpicMutation) ResetStartDate()

ResetStartDate resets all changes to the "start_date" field.

func (*EpicMutation) ResetStatus

func (m *EpicMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*EpicMutation) ResetURL

func (m *EpicMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*EpicMutation) ResetUpdatedAt

func (m *EpicMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*EpicMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*EpicMutation) SetData

func (m *EpicMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*EpicMutation) SetDescription

func (m *EpicMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*EpicMutation) SetDueDate

func (m *EpicMutation) SetDueDate(s string)

SetDueDate sets the "due_date" field.

func (*EpicMutation) SetField

func (m *EpicMutation) 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 (*EpicMutation) SetID

func (m *EpicMutation) SetID(id string)

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

func (*EpicMutation) SetName

func (m *EpicMutation) SetName(s string)

SetName sets the "name" field.

func (*EpicMutation) SetOp

func (m *EpicMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EpicMutation) SetProduct

func (m *EpicMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*EpicMutation) SetProgress

func (m *EpicMutation) SetProgress(f float64)

SetProgress sets the "progress" field.

func (*EpicMutation) SetReferenceNum

func (m *EpicMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*EpicMutation) SetRelease

func (m *EpicMutation) SetRelease(s string)

SetRelease sets the "release" field.

func (*EpicMutation) SetStartDate

func (m *EpicMutation) SetStartDate(s string)

SetStartDate sets the "start_date" field.

func (*EpicMutation) SetStatus

func (m *EpicMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*EpicMutation) SetURL

func (m *EpicMutation) SetURL(s string)

SetURL sets the "url" field.

func (*EpicMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EpicMutation) StartDate

func (m *EpicMutation) StartDate() (r string, exists bool)

StartDate returns the value of the "start_date" field in the mutation.

func (*EpicMutation) StartDateCleared

func (m *EpicMutation) StartDateCleared() bool

StartDateCleared returns if the "start_date" field was cleared in this mutation.

func (*EpicMutation) Status

func (m *EpicMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*EpicMutation) StatusCleared

func (m *EpicMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (EpicMutation) Tx

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

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

func (*EpicMutation) Type

func (m *EpicMutation) Type() string

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

func (*EpicMutation) URL

func (m *EpicMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*EpicMutation) URLCleared

func (m *EpicMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*EpicMutation) UpdatedAt

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

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

func (*EpicMutation) UpdatedAtCleared

func (m *EpicMutation) UpdatedAtCleared() bool

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

func (*EpicMutation) Where

func (m *EpicMutation) Where(ps ...predicate.Epic)

Where appends a list predicates to the EpicMutation builder.

func (*EpicMutation) WhereP

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

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

type EpicQuery

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

EpicQuery is the builder for querying Epic entities.

func (*EpicQuery) Aggregate

func (_q *EpicQuery) Aggregate(fns ...AggregateFunc) *EpicSelect

Aggregate returns a EpicSelect configured with the given aggregations.

func (*EpicQuery) All

func (_q *EpicQuery) All(ctx context.Context) ([]*Epic, error)

All executes the query and returns a list of Epics.

func (*EpicQuery) AllX

func (_q *EpicQuery) AllX(ctx context.Context) []*Epic

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

func (*EpicQuery) Clone

func (_q *EpicQuery) Clone() *EpicQuery

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

func (*EpicQuery) Count

func (_q *EpicQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EpicQuery) CountX

func (_q *EpicQuery) CountX(ctx context.Context) int

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

func (*EpicQuery) Exist

func (_q *EpicQuery) Exist(ctx context.Context) (bool, error)

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

func (*EpicQuery) ExistX

func (_q *EpicQuery) ExistX(ctx context.Context) bool

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

func (*EpicQuery) First

func (_q *EpicQuery) First(ctx context.Context) (*Epic, error)

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

func (*EpicQuery) FirstID

func (_q *EpicQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*EpicQuery) FirstIDX

func (_q *EpicQuery) FirstIDX(ctx context.Context) string

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

func (*EpicQuery) FirstX

func (_q *EpicQuery) FirstX(ctx context.Context) *Epic

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

func (*EpicQuery) GroupBy

func (_q *EpicQuery) GroupBy(field string, fields ...string) *EpicGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Epic.Query().
	GroupBy(epic.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EpicQuery) IDs

func (_q *EpicQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*EpicQuery) IDsX

func (_q *EpicQuery) IDsX(ctx context.Context) []string

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

func (*EpicQuery) Limit

func (_q *EpicQuery) Limit(limit int) *EpicQuery

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

func (*EpicQuery) Offset

func (_q *EpicQuery) Offset(offset int) *EpicQuery

Offset to start from.

func (*EpicQuery) Only

func (_q *EpicQuery) Only(ctx context.Context) (*Epic, error)

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

func (*EpicQuery) OnlyID

func (_q *EpicQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*EpicQuery) OnlyIDX

func (_q *EpicQuery) OnlyIDX(ctx context.Context) string

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

func (*EpicQuery) OnlyX

func (_q *EpicQuery) OnlyX(ctx context.Context) *Epic

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

func (*EpicQuery) Order

func (_q *EpicQuery) Order(o ...epic.OrderOption) *EpicQuery

Order specifies how the records should be ordered.

func (*EpicQuery) Select

func (_q *EpicQuery) Select(fields ...string) *EpicSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Epic.Query().
	Select(epic.FieldProduct).
	Scan(ctx, &v)

func (*EpicQuery) Unique

func (_q *EpicQuery) Unique(unique bool) *EpicQuery

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 (*EpicQuery) Where

func (_q *EpicQuery) Where(ps ...predicate.Epic) *EpicQuery

Where adds a new predicate for the EpicQuery builder.

type EpicSelect

type EpicSelect struct {
	*EpicQuery
	// contains filtered or unexported fields
}

EpicSelect is the builder for selecting fields of Epic entities.

func (*EpicSelect) Aggregate

func (_s *EpicSelect) Aggregate(fns ...AggregateFunc) *EpicSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EpicSelect) Bool

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

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

func (*EpicSelect) BoolX

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

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

func (*EpicSelect) Bools

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

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

func (*EpicSelect) BoolsX

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

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

func (*EpicSelect) Float64

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

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

func (*EpicSelect) Float64X

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

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

func (*EpicSelect) Float64s

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

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

func (*EpicSelect) Float64sX

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

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

func (*EpicSelect) Int

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

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

func (*EpicSelect) IntX

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

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

func (*EpicSelect) Ints

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

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

func (*EpicSelect) IntsX

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

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

func (*EpicSelect) Scan

func (_s *EpicSelect) Scan(ctx context.Context, v any) error

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

func (*EpicSelect) ScanX

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

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

func (*EpicSelect) String

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

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

func (*EpicSelect) StringX

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

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

func (*EpicSelect) Strings

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

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

func (*EpicSelect) StringsX

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

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

type EpicUpdate

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

EpicUpdate is the builder for updating Epic entities.

func (*EpicUpdate) AddProgress

func (_u *EpicUpdate) AddProgress(v float64) *EpicUpdate

AddProgress adds value to the "progress" field.

func (*EpicUpdate) ClearCreatedAt

func (_u *EpicUpdate) ClearCreatedAt() *EpicUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*EpicUpdate) ClearData

func (_u *EpicUpdate) ClearData() *EpicUpdate

ClearData clears the value of the "data" field.

func (*EpicUpdate) ClearDescription

func (_u *EpicUpdate) ClearDescription() *EpicUpdate

ClearDescription clears the value of the "description" field.

func (*EpicUpdate) ClearDueDate

func (_u *EpicUpdate) ClearDueDate() *EpicUpdate

ClearDueDate clears the value of the "due_date" field.

func (*EpicUpdate) ClearName

func (_u *EpicUpdate) ClearName() *EpicUpdate

ClearName clears the value of the "name" field.

func (*EpicUpdate) ClearProgress

func (_u *EpicUpdate) ClearProgress() *EpicUpdate

ClearProgress clears the value of the "progress" field.

func (*EpicUpdate) ClearReferenceNum

func (_u *EpicUpdate) ClearReferenceNum() *EpicUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*EpicUpdate) ClearRelease

func (_u *EpicUpdate) ClearRelease() *EpicUpdate

ClearRelease clears the value of the "release" field.

func (*EpicUpdate) ClearStartDate

func (_u *EpicUpdate) ClearStartDate() *EpicUpdate

ClearStartDate clears the value of the "start_date" field.

func (*EpicUpdate) ClearStatus

func (_u *EpicUpdate) ClearStatus() *EpicUpdate

ClearStatus clears the value of the "status" field.

func (*EpicUpdate) ClearURL

func (_u *EpicUpdate) ClearURL() *EpicUpdate

ClearURL clears the value of the "url" field.

func (*EpicUpdate) ClearUpdatedAt

func (_u *EpicUpdate) ClearUpdatedAt() *EpicUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*EpicUpdate) Exec

func (_u *EpicUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EpicUpdate) ExecX

func (_u *EpicUpdate) ExecX(ctx context.Context)

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

func (*EpicUpdate) Mutation

func (_u *EpicUpdate) Mutation() *EpicMutation

Mutation returns the EpicMutation object of the builder.

func (*EpicUpdate) Save

func (_u *EpicUpdate) Save(ctx context.Context) (int, error)

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

func (*EpicUpdate) SaveX

func (_u *EpicUpdate) SaveX(ctx context.Context) int

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

func (*EpicUpdate) SetCreatedAt

func (_u *EpicUpdate) SetCreatedAt(v time.Time) *EpicUpdate

SetCreatedAt sets the "created_at" field.

func (*EpicUpdate) SetData

func (_u *EpicUpdate) SetData(v map[string]interface{}) *EpicUpdate

SetData sets the "data" field.

func (*EpicUpdate) SetDescription

func (_u *EpicUpdate) SetDescription(v string) *EpicUpdate

SetDescription sets the "description" field.

func (*EpicUpdate) SetDueDate

func (_u *EpicUpdate) SetDueDate(v string) *EpicUpdate

SetDueDate sets the "due_date" field.

func (*EpicUpdate) SetName

func (_u *EpicUpdate) SetName(v string) *EpicUpdate

SetName sets the "name" field.

func (*EpicUpdate) SetNillableCreatedAt

func (_u *EpicUpdate) SetNillableCreatedAt(v *time.Time) *EpicUpdate

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

func (*EpicUpdate) SetNillableDescription

func (_u *EpicUpdate) SetNillableDescription(v *string) *EpicUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*EpicUpdate) SetNillableDueDate

func (_u *EpicUpdate) SetNillableDueDate(v *string) *EpicUpdate

SetNillableDueDate sets the "due_date" field if the given value is not nil.

func (*EpicUpdate) SetNillableName

func (_u *EpicUpdate) SetNillableName(v *string) *EpicUpdate

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

func (*EpicUpdate) SetNillableProduct

func (_u *EpicUpdate) SetNillableProduct(v *string) *EpicUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*EpicUpdate) SetNillableProgress

func (_u *EpicUpdate) SetNillableProgress(v *float64) *EpicUpdate

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*EpicUpdate) SetNillableReferenceNum

func (_u *EpicUpdate) SetNillableReferenceNum(v *string) *EpicUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*EpicUpdate) SetNillableRelease

func (_u *EpicUpdate) SetNillableRelease(v *string) *EpicUpdate

SetNillableRelease sets the "release" field if the given value is not nil.

func (*EpicUpdate) SetNillableStartDate

func (_u *EpicUpdate) SetNillableStartDate(v *string) *EpicUpdate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*EpicUpdate) SetNillableStatus

func (_u *EpicUpdate) SetNillableStatus(v *string) *EpicUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*EpicUpdate) SetNillableURL

func (_u *EpicUpdate) SetNillableURL(v *string) *EpicUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*EpicUpdate) SetNillableUpdatedAt

func (_u *EpicUpdate) SetNillableUpdatedAt(v *time.Time) *EpicUpdate

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

func (*EpicUpdate) SetProduct

func (_u *EpicUpdate) SetProduct(v string) *EpicUpdate

SetProduct sets the "product" field.

func (*EpicUpdate) SetProgress

func (_u *EpicUpdate) SetProgress(v float64) *EpicUpdate

SetProgress sets the "progress" field.

func (*EpicUpdate) SetReferenceNum

func (_u *EpicUpdate) SetReferenceNum(v string) *EpicUpdate

SetReferenceNum sets the "reference_num" field.

func (*EpicUpdate) SetRelease

func (_u *EpicUpdate) SetRelease(v string) *EpicUpdate

SetRelease sets the "release" field.

func (*EpicUpdate) SetStartDate

func (_u *EpicUpdate) SetStartDate(v string) *EpicUpdate

SetStartDate sets the "start_date" field.

func (*EpicUpdate) SetStatus

func (_u *EpicUpdate) SetStatus(v string) *EpicUpdate

SetStatus sets the "status" field.

func (*EpicUpdate) SetURL

func (_u *EpicUpdate) SetURL(v string) *EpicUpdate

SetURL sets the "url" field.

func (*EpicUpdate) SetUpdatedAt

func (_u *EpicUpdate) SetUpdatedAt(v time.Time) *EpicUpdate

SetUpdatedAt sets the "updated_at" field.

func (*EpicUpdate) Where

func (_u *EpicUpdate) Where(ps ...predicate.Epic) *EpicUpdate

Where appends a list predicates to the EpicUpdate builder.

type EpicUpdateOne

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

EpicUpdateOne is the builder for updating a single Epic entity.

func (*EpicUpdateOne) AddProgress

func (_u *EpicUpdateOne) AddProgress(v float64) *EpicUpdateOne

AddProgress adds value to the "progress" field.

func (*EpicUpdateOne) ClearCreatedAt

func (_u *EpicUpdateOne) ClearCreatedAt() *EpicUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*EpicUpdateOne) ClearData

func (_u *EpicUpdateOne) ClearData() *EpicUpdateOne

ClearData clears the value of the "data" field.

func (*EpicUpdateOne) ClearDescription

func (_u *EpicUpdateOne) ClearDescription() *EpicUpdateOne

ClearDescription clears the value of the "description" field.

func (*EpicUpdateOne) ClearDueDate

func (_u *EpicUpdateOne) ClearDueDate() *EpicUpdateOne

ClearDueDate clears the value of the "due_date" field.

func (*EpicUpdateOne) ClearName

func (_u *EpicUpdateOne) ClearName() *EpicUpdateOne

ClearName clears the value of the "name" field.

func (*EpicUpdateOne) ClearProgress

func (_u *EpicUpdateOne) ClearProgress() *EpicUpdateOne

ClearProgress clears the value of the "progress" field.

func (*EpicUpdateOne) ClearReferenceNum

func (_u *EpicUpdateOne) ClearReferenceNum() *EpicUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*EpicUpdateOne) ClearRelease

func (_u *EpicUpdateOne) ClearRelease() *EpicUpdateOne

ClearRelease clears the value of the "release" field.

func (*EpicUpdateOne) ClearStartDate

func (_u *EpicUpdateOne) ClearStartDate() *EpicUpdateOne

ClearStartDate clears the value of the "start_date" field.

func (*EpicUpdateOne) ClearStatus

func (_u *EpicUpdateOne) ClearStatus() *EpicUpdateOne

ClearStatus clears the value of the "status" field.

func (*EpicUpdateOne) ClearURL

func (_u *EpicUpdateOne) ClearURL() *EpicUpdateOne

ClearURL clears the value of the "url" field.

func (*EpicUpdateOne) ClearUpdatedAt

func (_u *EpicUpdateOne) ClearUpdatedAt() *EpicUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*EpicUpdateOne) Exec

func (_u *EpicUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EpicUpdateOne) ExecX

func (_u *EpicUpdateOne) ExecX(ctx context.Context)

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

func (*EpicUpdateOne) Mutation

func (_u *EpicUpdateOne) Mutation() *EpicMutation

Mutation returns the EpicMutation object of the builder.

func (*EpicUpdateOne) Save

func (_u *EpicUpdateOne) Save(ctx context.Context) (*Epic, error)

Save executes the query and returns the updated Epic entity.

func (*EpicUpdateOne) SaveX

func (_u *EpicUpdateOne) SaveX(ctx context.Context) *Epic

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

func (*EpicUpdateOne) Select

func (_u *EpicUpdateOne) Select(field string, fields ...string) *EpicUpdateOne

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

func (*EpicUpdateOne) SetCreatedAt

func (_u *EpicUpdateOne) SetCreatedAt(v time.Time) *EpicUpdateOne

SetCreatedAt sets the "created_at" field.

func (*EpicUpdateOne) SetData

func (_u *EpicUpdateOne) SetData(v map[string]interface{}) *EpicUpdateOne

SetData sets the "data" field.

func (*EpicUpdateOne) SetDescription

func (_u *EpicUpdateOne) SetDescription(v string) *EpicUpdateOne

SetDescription sets the "description" field.

func (*EpicUpdateOne) SetDueDate

func (_u *EpicUpdateOne) SetDueDate(v string) *EpicUpdateOne

SetDueDate sets the "due_date" field.

func (*EpicUpdateOne) SetName

func (_u *EpicUpdateOne) SetName(v string) *EpicUpdateOne

SetName sets the "name" field.

func (*EpicUpdateOne) SetNillableCreatedAt

func (_u *EpicUpdateOne) SetNillableCreatedAt(v *time.Time) *EpicUpdateOne

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

func (*EpicUpdateOne) SetNillableDescription

func (_u *EpicUpdateOne) SetNillableDescription(v *string) *EpicUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableDueDate

func (_u *EpicUpdateOne) SetNillableDueDate(v *string) *EpicUpdateOne

SetNillableDueDate sets the "due_date" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableName

func (_u *EpicUpdateOne) SetNillableName(v *string) *EpicUpdateOne

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

func (*EpicUpdateOne) SetNillableProduct

func (_u *EpicUpdateOne) SetNillableProduct(v *string) *EpicUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableProgress

func (_u *EpicUpdateOne) SetNillableProgress(v *float64) *EpicUpdateOne

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableReferenceNum

func (_u *EpicUpdateOne) SetNillableReferenceNum(v *string) *EpicUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableRelease

func (_u *EpicUpdateOne) SetNillableRelease(v *string) *EpicUpdateOne

SetNillableRelease sets the "release" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableStartDate

func (_u *EpicUpdateOne) SetNillableStartDate(v *string) *EpicUpdateOne

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableStatus

func (_u *EpicUpdateOne) SetNillableStatus(v *string) *EpicUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableURL

func (_u *EpicUpdateOne) SetNillableURL(v *string) *EpicUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*EpicUpdateOne) SetNillableUpdatedAt

func (_u *EpicUpdateOne) SetNillableUpdatedAt(v *time.Time) *EpicUpdateOne

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

func (*EpicUpdateOne) SetProduct

func (_u *EpicUpdateOne) SetProduct(v string) *EpicUpdateOne

SetProduct sets the "product" field.

func (*EpicUpdateOne) SetProgress

func (_u *EpicUpdateOne) SetProgress(v float64) *EpicUpdateOne

SetProgress sets the "progress" field.

func (*EpicUpdateOne) SetReferenceNum

func (_u *EpicUpdateOne) SetReferenceNum(v string) *EpicUpdateOne

SetReferenceNum sets the "reference_num" field.

func (*EpicUpdateOne) SetRelease

func (_u *EpicUpdateOne) SetRelease(v string) *EpicUpdateOne

SetRelease sets the "release" field.

func (*EpicUpdateOne) SetStartDate

func (_u *EpicUpdateOne) SetStartDate(v string) *EpicUpdateOne

SetStartDate sets the "start_date" field.

func (*EpicUpdateOne) SetStatus

func (_u *EpicUpdateOne) SetStatus(v string) *EpicUpdateOne

SetStatus sets the "status" field.

func (*EpicUpdateOne) SetURL

func (_u *EpicUpdateOne) SetURL(v string) *EpicUpdateOne

SetURL sets the "url" field.

func (*EpicUpdateOne) SetUpdatedAt

func (_u *EpicUpdateOne) SetUpdatedAt(v time.Time) *EpicUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*EpicUpdateOne) Where

func (_u *EpicUpdateOne) Where(ps ...predicate.Epic) *EpicUpdateOne

Where appends a list predicates to the EpicUpdate builder.

type EpicUpsert

type EpicUpsert struct {
	*sql.UpdateSet
}

EpicUpsert is the "OnConflict" setter.

func (*EpicUpsert) AddProgress

func (u *EpicUpsert) AddProgress(v float64) *EpicUpsert

AddProgress adds v to the "progress" field.

func (*EpicUpsert) ClearCreatedAt

func (u *EpicUpsert) ClearCreatedAt() *EpicUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*EpicUpsert) ClearData

func (u *EpicUpsert) ClearData() *EpicUpsert

ClearData clears the value of the "data" field.

func (*EpicUpsert) ClearDescription

func (u *EpicUpsert) ClearDescription() *EpicUpsert

ClearDescription clears the value of the "description" field.

func (*EpicUpsert) ClearDueDate

func (u *EpicUpsert) ClearDueDate() *EpicUpsert

ClearDueDate clears the value of the "due_date" field.

func (*EpicUpsert) ClearName

func (u *EpicUpsert) ClearName() *EpicUpsert

ClearName clears the value of the "name" field.

func (*EpicUpsert) ClearProgress

func (u *EpicUpsert) ClearProgress() *EpicUpsert

ClearProgress clears the value of the "progress" field.

func (*EpicUpsert) ClearReferenceNum

func (u *EpicUpsert) ClearReferenceNum() *EpicUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*EpicUpsert) ClearRelease

func (u *EpicUpsert) ClearRelease() *EpicUpsert

ClearRelease clears the value of the "release" field.

func (*EpicUpsert) ClearStartDate

func (u *EpicUpsert) ClearStartDate() *EpicUpsert

ClearStartDate clears the value of the "start_date" field.

func (*EpicUpsert) ClearStatus

func (u *EpicUpsert) ClearStatus() *EpicUpsert

ClearStatus clears the value of the "status" field.

func (*EpicUpsert) ClearURL

func (u *EpicUpsert) ClearURL() *EpicUpsert

ClearURL clears the value of the "url" field.

func (*EpicUpsert) ClearUpdatedAt

func (u *EpicUpsert) ClearUpdatedAt() *EpicUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*EpicUpsert) SetCreatedAt

func (u *EpicUpsert) SetCreatedAt(v time.Time) *EpicUpsert

SetCreatedAt sets the "created_at" field.

func (*EpicUpsert) SetData

func (u *EpicUpsert) SetData(v map[string]interface{}) *EpicUpsert

SetData sets the "data" field.

func (*EpicUpsert) SetDescription

func (u *EpicUpsert) SetDescription(v string) *EpicUpsert

SetDescription sets the "description" field.

func (*EpicUpsert) SetDueDate

func (u *EpicUpsert) SetDueDate(v string) *EpicUpsert

SetDueDate sets the "due_date" field.

func (*EpicUpsert) SetName

func (u *EpicUpsert) SetName(v string) *EpicUpsert

SetName sets the "name" field.

func (*EpicUpsert) SetProduct

func (u *EpicUpsert) SetProduct(v string) *EpicUpsert

SetProduct sets the "product" field.

func (*EpicUpsert) SetProgress

func (u *EpicUpsert) SetProgress(v float64) *EpicUpsert

SetProgress sets the "progress" field.

func (*EpicUpsert) SetReferenceNum

func (u *EpicUpsert) SetReferenceNum(v string) *EpicUpsert

SetReferenceNum sets the "reference_num" field.

func (*EpicUpsert) SetRelease

func (u *EpicUpsert) SetRelease(v string) *EpicUpsert

SetRelease sets the "release" field.

func (*EpicUpsert) SetStartDate

func (u *EpicUpsert) SetStartDate(v string) *EpicUpsert

SetStartDate sets the "start_date" field.

func (*EpicUpsert) SetStatus

func (u *EpicUpsert) SetStatus(v string) *EpicUpsert

SetStatus sets the "status" field.

func (*EpicUpsert) SetURL

func (u *EpicUpsert) SetURL(v string) *EpicUpsert

SetURL sets the "url" field.

func (*EpicUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EpicUpsert) UpdateCreatedAt

func (u *EpicUpsert) UpdateCreatedAt() *EpicUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*EpicUpsert) UpdateData

func (u *EpicUpsert) UpdateData() *EpicUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*EpicUpsert) UpdateDescription

func (u *EpicUpsert) UpdateDescription() *EpicUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*EpicUpsert) UpdateDueDate

func (u *EpicUpsert) UpdateDueDate() *EpicUpsert

UpdateDueDate sets the "due_date" field to the value that was provided on create.

func (*EpicUpsert) UpdateName

func (u *EpicUpsert) UpdateName() *EpicUpsert

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

func (*EpicUpsert) UpdateProduct

func (u *EpicUpsert) UpdateProduct() *EpicUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*EpicUpsert) UpdateProgress

func (u *EpicUpsert) UpdateProgress() *EpicUpsert

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*EpicUpsert) UpdateReferenceNum

func (u *EpicUpsert) UpdateReferenceNum() *EpicUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*EpicUpsert) UpdateRelease

func (u *EpicUpsert) UpdateRelease() *EpicUpsert

UpdateRelease sets the "release" field to the value that was provided on create.

func (*EpicUpsert) UpdateStartDate

func (u *EpicUpsert) UpdateStartDate() *EpicUpsert

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*EpicUpsert) UpdateStatus

func (u *EpicUpsert) UpdateStatus() *EpicUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*EpicUpsert) UpdateURL

func (u *EpicUpsert) UpdateURL() *EpicUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*EpicUpsert) UpdateUpdatedAt

func (u *EpicUpsert) UpdateUpdatedAt() *EpicUpsert

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

type EpicUpsertBulk

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

EpicUpsertBulk is the builder for "upsert"-ing a bulk of Epic nodes.

func (*EpicUpsertBulk) AddProgress

func (u *EpicUpsertBulk) AddProgress(v float64) *EpicUpsertBulk

AddProgress adds v to the "progress" field.

func (*EpicUpsertBulk) ClearCreatedAt

func (u *EpicUpsertBulk) ClearCreatedAt() *EpicUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*EpicUpsertBulk) ClearData

func (u *EpicUpsertBulk) ClearData() *EpicUpsertBulk

ClearData clears the value of the "data" field.

func (*EpicUpsertBulk) ClearDescription

func (u *EpicUpsertBulk) ClearDescription() *EpicUpsertBulk

ClearDescription clears the value of the "description" field.

func (*EpicUpsertBulk) ClearDueDate

func (u *EpicUpsertBulk) ClearDueDate() *EpicUpsertBulk

ClearDueDate clears the value of the "due_date" field.

func (*EpicUpsertBulk) ClearName

func (u *EpicUpsertBulk) ClearName() *EpicUpsertBulk

ClearName clears the value of the "name" field.

func (*EpicUpsertBulk) ClearProgress

func (u *EpicUpsertBulk) ClearProgress() *EpicUpsertBulk

ClearProgress clears the value of the "progress" field.

func (*EpicUpsertBulk) ClearReferenceNum

func (u *EpicUpsertBulk) ClearReferenceNum() *EpicUpsertBulk

ClearReferenceNum clears the value of the "reference_num" field.

func (*EpicUpsertBulk) ClearRelease

func (u *EpicUpsertBulk) ClearRelease() *EpicUpsertBulk

ClearRelease clears the value of the "release" field.

func (*EpicUpsertBulk) ClearStartDate

func (u *EpicUpsertBulk) ClearStartDate() *EpicUpsertBulk

ClearStartDate clears the value of the "start_date" field.

func (*EpicUpsertBulk) ClearStatus

func (u *EpicUpsertBulk) ClearStatus() *EpicUpsertBulk

ClearStatus clears the value of the "status" field.

func (*EpicUpsertBulk) ClearURL

func (u *EpicUpsertBulk) ClearURL() *EpicUpsertBulk

ClearURL clears the value of the "url" field.

func (*EpicUpsertBulk) ClearUpdatedAt

func (u *EpicUpsertBulk) ClearUpdatedAt() *EpicUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*EpicUpsertBulk) DoNothing

func (u *EpicUpsertBulk) DoNothing() *EpicUpsertBulk

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

func (*EpicUpsertBulk) Exec

func (u *EpicUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EpicUpsertBulk) ExecX

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

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

func (*EpicUpsertBulk) Ignore

func (u *EpicUpsertBulk) Ignore() *EpicUpsertBulk

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

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

func (*EpicUpsertBulk) SetCreatedAt

func (u *EpicUpsertBulk) SetCreatedAt(v time.Time) *EpicUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*EpicUpsertBulk) SetData

func (u *EpicUpsertBulk) SetData(v map[string]interface{}) *EpicUpsertBulk

SetData sets the "data" field.

func (*EpicUpsertBulk) SetDescription

func (u *EpicUpsertBulk) SetDescription(v string) *EpicUpsertBulk

SetDescription sets the "description" field.

func (*EpicUpsertBulk) SetDueDate

func (u *EpicUpsertBulk) SetDueDate(v string) *EpicUpsertBulk

SetDueDate sets the "due_date" field.

func (*EpicUpsertBulk) SetName

func (u *EpicUpsertBulk) SetName(v string) *EpicUpsertBulk

SetName sets the "name" field.

func (*EpicUpsertBulk) SetProduct

func (u *EpicUpsertBulk) SetProduct(v string) *EpicUpsertBulk

SetProduct sets the "product" field.

func (*EpicUpsertBulk) SetProgress

func (u *EpicUpsertBulk) SetProgress(v float64) *EpicUpsertBulk

SetProgress sets the "progress" field.

func (*EpicUpsertBulk) SetReferenceNum

func (u *EpicUpsertBulk) SetReferenceNum(v string) *EpicUpsertBulk

SetReferenceNum sets the "reference_num" field.

func (*EpicUpsertBulk) SetRelease

func (u *EpicUpsertBulk) SetRelease(v string) *EpicUpsertBulk

SetRelease sets the "release" field.

func (*EpicUpsertBulk) SetStartDate

func (u *EpicUpsertBulk) SetStartDate(v string) *EpicUpsertBulk

SetStartDate sets the "start_date" field.

func (*EpicUpsertBulk) SetStatus

func (u *EpicUpsertBulk) SetStatus(v string) *EpicUpsertBulk

SetStatus sets the "status" field.

func (*EpicUpsertBulk) SetURL

func (u *EpicUpsertBulk) SetURL(v string) *EpicUpsertBulk

SetURL sets the "url" field.

func (*EpicUpsertBulk) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EpicUpsertBulk) Update

func (u *EpicUpsertBulk) Update(set func(*EpicUpsert)) *EpicUpsertBulk

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

func (*EpicUpsertBulk) UpdateCreatedAt

func (u *EpicUpsertBulk) UpdateCreatedAt() *EpicUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateData

func (u *EpicUpsertBulk) UpdateData() *EpicUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateDescription

func (u *EpicUpsertBulk) UpdateDescription() *EpicUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateDueDate

func (u *EpicUpsertBulk) UpdateDueDate() *EpicUpsertBulk

UpdateDueDate sets the "due_date" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateName

func (u *EpicUpsertBulk) UpdateName() *EpicUpsertBulk

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

func (*EpicUpsertBulk) UpdateNewValues

func (u *EpicUpsertBulk) UpdateNewValues() *EpicUpsertBulk

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

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

func (*EpicUpsertBulk) UpdateProduct

func (u *EpicUpsertBulk) UpdateProduct() *EpicUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateProgress

func (u *EpicUpsertBulk) UpdateProgress() *EpicUpsertBulk

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateReferenceNum

func (u *EpicUpsertBulk) UpdateReferenceNum() *EpicUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateRelease

func (u *EpicUpsertBulk) UpdateRelease() *EpicUpsertBulk

UpdateRelease sets the "release" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateStartDate

func (u *EpicUpsertBulk) UpdateStartDate() *EpicUpsertBulk

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateStatus

func (u *EpicUpsertBulk) UpdateStatus() *EpicUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateURL

func (u *EpicUpsertBulk) UpdateURL() *EpicUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*EpicUpsertBulk) UpdateUpdatedAt

func (u *EpicUpsertBulk) UpdateUpdatedAt() *EpicUpsertBulk

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

type EpicUpsertOne

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

EpicUpsertOne is the builder for "upsert"-ing

one Epic node.

func (*EpicUpsertOne) AddProgress

func (u *EpicUpsertOne) AddProgress(v float64) *EpicUpsertOne

AddProgress adds v to the "progress" field.

func (*EpicUpsertOne) ClearCreatedAt

func (u *EpicUpsertOne) ClearCreatedAt() *EpicUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*EpicUpsertOne) ClearData

func (u *EpicUpsertOne) ClearData() *EpicUpsertOne

ClearData clears the value of the "data" field.

func (*EpicUpsertOne) ClearDescription

func (u *EpicUpsertOne) ClearDescription() *EpicUpsertOne

ClearDescription clears the value of the "description" field.

func (*EpicUpsertOne) ClearDueDate

func (u *EpicUpsertOne) ClearDueDate() *EpicUpsertOne

ClearDueDate clears the value of the "due_date" field.

func (*EpicUpsertOne) ClearName

func (u *EpicUpsertOne) ClearName() *EpicUpsertOne

ClearName clears the value of the "name" field.

func (*EpicUpsertOne) ClearProgress

func (u *EpicUpsertOne) ClearProgress() *EpicUpsertOne

ClearProgress clears the value of the "progress" field.

func (*EpicUpsertOne) ClearReferenceNum

func (u *EpicUpsertOne) ClearReferenceNum() *EpicUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*EpicUpsertOne) ClearRelease

func (u *EpicUpsertOne) ClearRelease() *EpicUpsertOne

ClearRelease clears the value of the "release" field.

func (*EpicUpsertOne) ClearStartDate

func (u *EpicUpsertOne) ClearStartDate() *EpicUpsertOne

ClearStartDate clears the value of the "start_date" field.

func (*EpicUpsertOne) ClearStatus

func (u *EpicUpsertOne) ClearStatus() *EpicUpsertOne

ClearStatus clears the value of the "status" field.

func (*EpicUpsertOne) ClearURL

func (u *EpicUpsertOne) ClearURL() *EpicUpsertOne

ClearURL clears the value of the "url" field.

func (*EpicUpsertOne) ClearUpdatedAt

func (u *EpicUpsertOne) ClearUpdatedAt() *EpicUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*EpicUpsertOne) DoNothing

func (u *EpicUpsertOne) DoNothing() *EpicUpsertOne

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

func (*EpicUpsertOne) Exec

func (u *EpicUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*EpicUpsertOne) ExecX

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

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

func (*EpicUpsertOne) ID

func (u *EpicUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*EpicUpsertOne) IDX

func (u *EpicUpsertOne) IDX(ctx context.Context) string

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

func (*EpicUpsertOne) Ignore

func (u *EpicUpsertOne) Ignore() *EpicUpsertOne

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

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

func (*EpicUpsertOne) SetCreatedAt

func (u *EpicUpsertOne) SetCreatedAt(v time.Time) *EpicUpsertOne

SetCreatedAt sets the "created_at" field.

func (*EpicUpsertOne) SetData

func (u *EpicUpsertOne) SetData(v map[string]interface{}) *EpicUpsertOne

SetData sets the "data" field.

func (*EpicUpsertOne) SetDescription

func (u *EpicUpsertOne) SetDescription(v string) *EpicUpsertOne

SetDescription sets the "description" field.

func (*EpicUpsertOne) SetDueDate

func (u *EpicUpsertOne) SetDueDate(v string) *EpicUpsertOne

SetDueDate sets the "due_date" field.

func (*EpicUpsertOne) SetName

func (u *EpicUpsertOne) SetName(v string) *EpicUpsertOne

SetName sets the "name" field.

func (*EpicUpsertOne) SetProduct

func (u *EpicUpsertOne) SetProduct(v string) *EpicUpsertOne

SetProduct sets the "product" field.

func (*EpicUpsertOne) SetProgress

func (u *EpicUpsertOne) SetProgress(v float64) *EpicUpsertOne

SetProgress sets the "progress" field.

func (*EpicUpsertOne) SetReferenceNum

func (u *EpicUpsertOne) SetReferenceNum(v string) *EpicUpsertOne

SetReferenceNum sets the "reference_num" field.

func (*EpicUpsertOne) SetRelease

func (u *EpicUpsertOne) SetRelease(v string) *EpicUpsertOne

SetRelease sets the "release" field.

func (*EpicUpsertOne) SetStartDate

func (u *EpicUpsertOne) SetStartDate(v string) *EpicUpsertOne

SetStartDate sets the "start_date" field.

func (*EpicUpsertOne) SetStatus

func (u *EpicUpsertOne) SetStatus(v string) *EpicUpsertOne

SetStatus sets the "status" field.

func (*EpicUpsertOne) SetURL

func (u *EpicUpsertOne) SetURL(v string) *EpicUpsertOne

SetURL sets the "url" field.

func (*EpicUpsertOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EpicUpsertOne) Update

func (u *EpicUpsertOne) Update(set func(*EpicUpsert)) *EpicUpsertOne

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

func (*EpicUpsertOne) UpdateCreatedAt

func (u *EpicUpsertOne) UpdateCreatedAt() *EpicUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateData

func (u *EpicUpsertOne) UpdateData() *EpicUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateDescription

func (u *EpicUpsertOne) UpdateDescription() *EpicUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateDueDate

func (u *EpicUpsertOne) UpdateDueDate() *EpicUpsertOne

UpdateDueDate sets the "due_date" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateName

func (u *EpicUpsertOne) UpdateName() *EpicUpsertOne

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

func (*EpicUpsertOne) UpdateNewValues

func (u *EpicUpsertOne) UpdateNewValues() *EpicUpsertOne

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.Epic.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(epic.FieldID)
		}),
	).
	Exec(ctx)

func (*EpicUpsertOne) UpdateProduct

func (u *EpicUpsertOne) UpdateProduct() *EpicUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateProgress

func (u *EpicUpsertOne) UpdateProgress() *EpicUpsertOne

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateReferenceNum

func (u *EpicUpsertOne) UpdateReferenceNum() *EpicUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateRelease

func (u *EpicUpsertOne) UpdateRelease() *EpicUpsertOne

UpdateRelease sets the "release" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateStartDate

func (u *EpicUpsertOne) UpdateStartDate() *EpicUpsertOne

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateStatus

func (u *EpicUpsertOne) UpdateStatus() *EpicUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateURL

func (u *EpicUpsertOne) UpdateURL() *EpicUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*EpicUpsertOne) UpdateUpdatedAt

func (u *EpicUpsertOne) UpdateUpdatedAt() *EpicUpsertOne

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

type Epics

type Epics []*Epic

Epics is a parsable slice of Epic.

type Feature

type Feature struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// AssignedTo holds the value of the "assigned_to" field.
	AssignedTo string `json:"assigned_to,omitempty"`
	// StartDate holds the value of the "start_date" field.
	StartDate string `json:"start_date,omitempty"`
	// DueDate holds the value of the "due_date" field.
	DueDate string `json:"due_date,omitempty"`
	// Release holds the value of the "release" field.
	Release string `json:"release,omitempty"`
	// ReleaseID holds the value of the "release_id" field.
	ReleaseID string `json:"release_id,omitempty"`
	// ReleaseReferenceNum holds the value of the "release_reference_num" field.
	ReleaseReferenceNum string `json:"release_reference_num,omitempty"`
	// Tags holds the value of the "tags" field.
	Tags string `json:"tags,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Feature is the model entity for the Feature schema.

func (*Feature) String

func (_m *Feature) String() string

String implements the fmt.Stringer.

func (*Feature) Unwrap

func (_m *Feature) Unwrap() *Feature

Unwrap unwraps the Feature 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 (*Feature) Update

func (_m *Feature) Update() *FeatureUpdateOne

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

func (*Feature) Value

func (_m *Feature) Value(name string) (ent.Value, error)

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

type FeatureClient

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

FeatureClient is a client for the Feature schema.

func NewFeatureClient

func NewFeatureClient(c config) *FeatureClient

NewFeatureClient returns a client for the Feature from the given config.

func (*FeatureClient) Create

func (c *FeatureClient) Create() *FeatureCreate

Create returns a builder for creating a Feature entity.

func (*FeatureClient) CreateBulk

func (c *FeatureClient) CreateBulk(builders ...*FeatureCreate) *FeatureCreateBulk

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

func (*FeatureClient) Delete

func (c *FeatureClient) Delete() *FeatureDelete

Delete returns a delete builder for Feature.

func (*FeatureClient) DeleteOne

func (c *FeatureClient) DeleteOne(_m *Feature) *FeatureDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FeatureClient) DeleteOneID

func (c *FeatureClient) DeleteOneID(id string) *FeatureDeleteOne

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

func (*FeatureClient) Get

func (c *FeatureClient) Get(ctx context.Context, id string) (*Feature, error)

Get returns a Feature entity by its id.

func (*FeatureClient) GetX

func (c *FeatureClient) GetX(ctx context.Context, id string) *Feature

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

func (*FeatureClient) Hooks

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

Hooks returns the client hooks.

func (*FeatureClient) Intercept

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

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

func (*FeatureClient) Interceptors

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

Interceptors returns the client interceptors.

func (*FeatureClient) MapCreateBulk

func (c *FeatureClient) MapCreateBulk(slice any, setFunc func(*FeatureCreate, int)) *FeatureCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*FeatureClient) Query

func (c *FeatureClient) Query() *FeatureQuery

Query returns a query builder for Feature.

func (*FeatureClient) Update

func (c *FeatureClient) Update() *FeatureUpdate

Update returns an update builder for Feature.

func (*FeatureClient) UpdateOne

func (c *FeatureClient) UpdateOne(_m *Feature) *FeatureUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FeatureClient) UpdateOneID

func (c *FeatureClient) UpdateOneID(id string) *FeatureUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FeatureClient) Use

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

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

type FeatureCreate

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

FeatureCreate is the builder for creating a Feature entity.

func (*FeatureCreate) Exec

func (_c *FeatureCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeatureCreate) ExecX

func (_c *FeatureCreate) ExecX(ctx context.Context)

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

func (*FeatureCreate) Mutation

func (_c *FeatureCreate) Mutation() *FeatureMutation

Mutation returns the FeatureMutation object of the builder.

func (*FeatureCreate) OnConflict

func (_c *FeatureCreate) OnConflict(opts ...sql.ConflictOption) *FeatureUpsertOne

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

client.Feature.Create().
	SetProduct(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.FeatureUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*FeatureCreate) OnConflictColumns

func (_c *FeatureCreate) OnConflictColumns(columns ...string) *FeatureUpsertOne

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

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

func (*FeatureCreate) Save

func (_c *FeatureCreate) Save(ctx context.Context) (*Feature, error)

Save creates the Feature in the database.

func (*FeatureCreate) SaveX

func (_c *FeatureCreate) SaveX(ctx context.Context) *Feature

SaveX calls Save and panics if Save returns an error.

func (*FeatureCreate) SetAssignedTo

func (_c *FeatureCreate) SetAssignedTo(v string) *FeatureCreate

SetAssignedTo sets the "assigned_to" field.

func (*FeatureCreate) SetCreatedAt

func (_c *FeatureCreate) SetCreatedAt(v time.Time) *FeatureCreate

SetCreatedAt sets the "created_at" field.

func (*FeatureCreate) SetData

func (_c *FeatureCreate) SetData(v map[string]interface{}) *FeatureCreate

SetData sets the "data" field.

func (*FeatureCreate) SetDescription

func (_c *FeatureCreate) SetDescription(v string) *FeatureCreate

SetDescription sets the "description" field.

func (*FeatureCreate) SetDueDate

func (_c *FeatureCreate) SetDueDate(v string) *FeatureCreate

SetDueDate sets the "due_date" field.

func (*FeatureCreate) SetID

func (_c *FeatureCreate) SetID(v string) *FeatureCreate

SetID sets the "id" field.

func (*FeatureCreate) SetName

func (_c *FeatureCreate) SetName(v string) *FeatureCreate

SetName sets the "name" field.

func (*FeatureCreate) SetNillableAssignedTo

func (_c *FeatureCreate) SetNillableAssignedTo(v *string) *FeatureCreate

SetNillableAssignedTo sets the "assigned_to" field if the given value is not nil.

func (*FeatureCreate) SetNillableCreatedAt

func (_c *FeatureCreate) SetNillableCreatedAt(v *time.Time) *FeatureCreate

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

func (*FeatureCreate) SetNillableDescription

func (_c *FeatureCreate) SetNillableDescription(v *string) *FeatureCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*FeatureCreate) SetNillableDueDate

func (_c *FeatureCreate) SetNillableDueDate(v *string) *FeatureCreate

SetNillableDueDate sets the "due_date" field if the given value is not nil.

func (*FeatureCreate) SetNillableName

func (_c *FeatureCreate) SetNillableName(v *string) *FeatureCreate

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

func (*FeatureCreate) SetNillableReferenceNum

func (_c *FeatureCreate) SetNillableReferenceNum(v *string) *FeatureCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*FeatureCreate) SetNillableRelease

func (_c *FeatureCreate) SetNillableRelease(v *string) *FeatureCreate

SetNillableRelease sets the "release" field if the given value is not nil.

func (*FeatureCreate) SetNillableReleaseID

func (_c *FeatureCreate) SetNillableReleaseID(v *string) *FeatureCreate

SetNillableReleaseID sets the "release_id" field if the given value is not nil.

func (*FeatureCreate) SetNillableReleaseReferenceNum

func (_c *FeatureCreate) SetNillableReleaseReferenceNum(v *string) *FeatureCreate

SetNillableReleaseReferenceNum sets the "release_reference_num" field if the given value is not nil.

func (*FeatureCreate) SetNillableStartDate

func (_c *FeatureCreate) SetNillableStartDate(v *string) *FeatureCreate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*FeatureCreate) SetNillableStatus

func (_c *FeatureCreate) SetNillableStatus(v *string) *FeatureCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*FeatureCreate) SetNillableTags

func (_c *FeatureCreate) SetNillableTags(v *string) *FeatureCreate

SetNillableTags sets the "tags" field if the given value is not nil.

func (*FeatureCreate) SetNillableURL

func (_c *FeatureCreate) SetNillableURL(v *string) *FeatureCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*FeatureCreate) SetNillableUpdatedAt

func (_c *FeatureCreate) SetNillableUpdatedAt(v *time.Time) *FeatureCreate

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

func (*FeatureCreate) SetProduct

func (_c *FeatureCreate) SetProduct(v string) *FeatureCreate

SetProduct sets the "product" field.

func (*FeatureCreate) SetReferenceNum

func (_c *FeatureCreate) SetReferenceNum(v string) *FeatureCreate

SetReferenceNum sets the "reference_num" field.

func (*FeatureCreate) SetRelease

func (_c *FeatureCreate) SetRelease(v string) *FeatureCreate

SetRelease sets the "release" field.

func (*FeatureCreate) SetReleaseID

func (_c *FeatureCreate) SetReleaseID(v string) *FeatureCreate

SetReleaseID sets the "release_id" field.

func (*FeatureCreate) SetReleaseReferenceNum

func (_c *FeatureCreate) SetReleaseReferenceNum(v string) *FeatureCreate

SetReleaseReferenceNum sets the "release_reference_num" field.

func (*FeatureCreate) SetStartDate

func (_c *FeatureCreate) SetStartDate(v string) *FeatureCreate

SetStartDate sets the "start_date" field.

func (*FeatureCreate) SetStatus

func (_c *FeatureCreate) SetStatus(v string) *FeatureCreate

SetStatus sets the "status" field.

func (*FeatureCreate) SetTags

func (_c *FeatureCreate) SetTags(v string) *FeatureCreate

SetTags sets the "tags" field.

func (*FeatureCreate) SetURL

func (_c *FeatureCreate) SetURL(v string) *FeatureCreate

SetURL sets the "url" field.

func (*FeatureCreate) SetUpdatedAt

func (_c *FeatureCreate) SetUpdatedAt(v time.Time) *FeatureCreate

SetUpdatedAt sets the "updated_at" field.

type FeatureCreateBulk

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

FeatureCreateBulk is the builder for creating many Feature entities in bulk.

func (*FeatureCreateBulk) Exec

func (_c *FeatureCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FeatureCreateBulk) ExecX

func (_c *FeatureCreateBulk) ExecX(ctx context.Context)

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

func (*FeatureCreateBulk) OnConflict

func (_c *FeatureCreateBulk) OnConflict(opts ...sql.ConflictOption) *FeatureUpsertBulk

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

client.Feature.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.FeatureUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*FeatureCreateBulk) OnConflictColumns

func (_c *FeatureCreateBulk) OnConflictColumns(columns ...string) *FeatureUpsertBulk

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

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

func (*FeatureCreateBulk) Save

func (_c *FeatureCreateBulk) Save(ctx context.Context) ([]*Feature, error)

Save creates the Feature entities in the database.

func (*FeatureCreateBulk) SaveX

func (_c *FeatureCreateBulk) SaveX(ctx context.Context) []*Feature

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

type FeatureDelete

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

FeatureDelete is the builder for deleting a Feature entity.

func (*FeatureDelete) Exec

func (_d *FeatureDelete) Exec(ctx context.Context) (int, error)

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

func (*FeatureDelete) ExecX

func (_d *FeatureDelete) ExecX(ctx context.Context) int

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

func (*FeatureDelete) Where

func (_d *FeatureDelete) Where(ps ...predicate.Feature) *FeatureDelete

Where appends a list predicates to the FeatureDelete builder.

type FeatureDeleteOne

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

FeatureDeleteOne is the builder for deleting a single Feature entity.

func (*FeatureDeleteOne) Exec

func (_d *FeatureDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FeatureDeleteOne) ExecX

func (_d *FeatureDeleteOne) ExecX(ctx context.Context)

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

func (*FeatureDeleteOne) Where

Where appends a list predicates to the FeatureDelete builder.

type FeatureGroupBy

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

FeatureGroupBy is the group-by builder for Feature entities.

func (*FeatureGroupBy) Aggregate

func (_g *FeatureGroupBy) Aggregate(fns ...AggregateFunc) *FeatureGroupBy

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

func (*FeatureGroupBy) Bool

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

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

func (*FeatureGroupBy) BoolX

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

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

func (*FeatureGroupBy) Bools

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

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

func (*FeatureGroupBy) BoolsX

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

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

func (*FeatureGroupBy) Float64

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

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

func (*FeatureGroupBy) Float64X

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

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

func (*FeatureGroupBy) Float64s

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

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

func (*FeatureGroupBy) Float64sX

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

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

func (*FeatureGroupBy) Int

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

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

func (*FeatureGroupBy) IntX

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

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

func (*FeatureGroupBy) Ints

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

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

func (*FeatureGroupBy) IntsX

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

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

func (*FeatureGroupBy) Scan

func (_g *FeatureGroupBy) Scan(ctx context.Context, v any) error

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

func (*FeatureGroupBy) ScanX

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

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

func (*FeatureGroupBy) String

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

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

func (*FeatureGroupBy) StringX

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

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

func (*FeatureGroupBy) Strings

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

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

func (*FeatureGroupBy) StringsX

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

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

type FeatureMutation

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

FeatureMutation represents an operation that mutates the Feature nodes in the graph.

func (*FeatureMutation) AddField

func (m *FeatureMutation) 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 (*FeatureMutation) AddedEdges

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

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

func (*FeatureMutation) AddedField

func (m *FeatureMutation) 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 (*FeatureMutation) AddedFields

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

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

func (*FeatureMutation) AddedIDs

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

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

func (*FeatureMutation) AssignedTo

func (m *FeatureMutation) AssignedTo() (r string, exists bool)

AssignedTo returns the value of the "assigned_to" field in the mutation.

func (*FeatureMutation) AssignedToCleared

func (m *FeatureMutation) AssignedToCleared() bool

AssignedToCleared returns if the "assigned_to" field was cleared in this mutation.

func (*FeatureMutation) ClearAssignedTo

func (m *FeatureMutation) ClearAssignedTo()

ClearAssignedTo clears the value of the "assigned_to" field.

func (*FeatureMutation) ClearCreatedAt

func (m *FeatureMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*FeatureMutation) ClearData

func (m *FeatureMutation) ClearData()

ClearData clears the value of the "data" field.

func (*FeatureMutation) ClearDescription

func (m *FeatureMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*FeatureMutation) ClearDueDate

func (m *FeatureMutation) ClearDueDate()

ClearDueDate clears the value of the "due_date" field.

func (*FeatureMutation) ClearEdge

func (m *FeatureMutation) 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 (*FeatureMutation) ClearField

func (m *FeatureMutation) 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 (*FeatureMutation) ClearName

func (m *FeatureMutation) ClearName()

ClearName clears the value of the "name" field.

func (*FeatureMutation) ClearReferenceNum

func (m *FeatureMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*FeatureMutation) ClearRelease

func (m *FeatureMutation) ClearRelease()

ClearRelease clears the value of the "release" field.

func (*FeatureMutation) ClearReleaseID

func (m *FeatureMutation) ClearReleaseID()

ClearReleaseID clears the value of the "release_id" field.

func (*FeatureMutation) ClearReleaseReferenceNum

func (m *FeatureMutation) ClearReleaseReferenceNum()

ClearReleaseReferenceNum clears the value of the "release_reference_num" field.

func (*FeatureMutation) ClearStartDate

func (m *FeatureMutation) ClearStartDate()

ClearStartDate clears the value of the "start_date" field.

func (*FeatureMutation) ClearStatus

func (m *FeatureMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*FeatureMutation) ClearTags

func (m *FeatureMutation) ClearTags()

ClearTags clears the value of the "tags" field.

func (*FeatureMutation) ClearURL

func (m *FeatureMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*FeatureMutation) ClearUpdatedAt

func (m *FeatureMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FeatureMutation) ClearedEdges

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

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

func (*FeatureMutation) ClearedFields

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

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

func (FeatureMutation) Client

func (m FeatureMutation) 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 (*FeatureMutation) CreatedAt

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

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

func (*FeatureMutation) CreatedAtCleared

func (m *FeatureMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*FeatureMutation) Data

func (m *FeatureMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*FeatureMutation) DataCleared

func (m *FeatureMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*FeatureMutation) Description

func (m *FeatureMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*FeatureMutation) DescriptionCleared

func (m *FeatureMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*FeatureMutation) DueDate

func (m *FeatureMutation) DueDate() (r string, exists bool)

DueDate returns the value of the "due_date" field in the mutation.

func (*FeatureMutation) DueDateCleared

func (m *FeatureMutation) DueDateCleared() bool

DueDateCleared returns if the "due_date" field was cleared in this mutation.

func (*FeatureMutation) EdgeCleared

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

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

func (*FeatureMutation) Field

func (m *FeatureMutation) 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 (*FeatureMutation) FieldCleared

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

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

func (*FeatureMutation) Fields

func (m *FeatureMutation) 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 (*FeatureMutation) ID

func (m *FeatureMutation) ID() (id string, 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 (*FeatureMutation) IDs

func (m *FeatureMutation) IDs(ctx context.Context) ([]string, 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 (*FeatureMutation) Name

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

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

func (*FeatureMutation) NameCleared

func (m *FeatureMutation) NameCleared() bool

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

func (*FeatureMutation) OldAssignedTo

func (m *FeatureMutation) OldAssignedTo(ctx context.Context) (v string, err error)

OldAssignedTo returns the old "assigned_to" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldData

func (m *FeatureMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldDescription

func (m *FeatureMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldDueDate

func (m *FeatureMutation) OldDueDate(ctx context.Context) (v string, err error)

OldDueDate returns the old "due_date" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldField

func (m *FeatureMutation) 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 (*FeatureMutation) OldName

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

OldName returns the old "name" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldProduct

func (m *FeatureMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldReferenceNum

func (m *FeatureMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldRelease

func (m *FeatureMutation) OldRelease(ctx context.Context) (v string, err error)

OldRelease returns the old "release" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldReleaseID

func (m *FeatureMutation) OldReleaseID(ctx context.Context) (v string, err error)

OldReleaseID returns the old "release_id" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldReleaseReferenceNum

func (m *FeatureMutation) OldReleaseReferenceNum(ctx context.Context) (v string, err error)

OldReleaseReferenceNum returns the old "release_reference_num" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldStartDate

func (m *FeatureMutation) OldStartDate(ctx context.Context) (v string, err error)

OldStartDate returns the old "start_date" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldStatus

func (m *FeatureMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldTags

func (m *FeatureMutation) OldTags(ctx context.Context) (v string, err error)

OldTags returns the old "tags" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldURL

func (m *FeatureMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Feature entity. If the Feature 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 (*FeatureMutation) Op

func (m *FeatureMutation) Op() Op

Op returns the operation name.

func (*FeatureMutation) Product

func (m *FeatureMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*FeatureMutation) ReferenceNum

func (m *FeatureMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*FeatureMutation) ReferenceNumCleared

func (m *FeatureMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*FeatureMutation) Release

func (m *FeatureMutation) Release() (r string, exists bool)

Release returns the value of the "release" field in the mutation.

func (*FeatureMutation) ReleaseCleared

func (m *FeatureMutation) ReleaseCleared() bool

ReleaseCleared returns if the "release" field was cleared in this mutation.

func (*FeatureMutation) ReleaseID

func (m *FeatureMutation) ReleaseID() (r string, exists bool)

ReleaseID returns the value of the "release_id" field in the mutation.

func (*FeatureMutation) ReleaseIDCleared

func (m *FeatureMutation) ReleaseIDCleared() bool

ReleaseIDCleared returns if the "release_id" field was cleared in this mutation.

func (*FeatureMutation) ReleaseReferenceNum

func (m *FeatureMutation) ReleaseReferenceNum() (r string, exists bool)

ReleaseReferenceNum returns the value of the "release_reference_num" field in the mutation.

func (*FeatureMutation) ReleaseReferenceNumCleared

func (m *FeatureMutation) ReleaseReferenceNumCleared() bool

ReleaseReferenceNumCleared returns if the "release_reference_num" field was cleared in this mutation.

func (*FeatureMutation) RemovedEdges

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

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

func (*FeatureMutation) RemovedIDs

func (m *FeatureMutation) 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 (*FeatureMutation) ResetAssignedTo

func (m *FeatureMutation) ResetAssignedTo()

ResetAssignedTo resets all changes to the "assigned_to" field.

func (*FeatureMutation) ResetCreatedAt

func (m *FeatureMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FeatureMutation) ResetData

func (m *FeatureMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*FeatureMutation) ResetDescription

func (m *FeatureMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*FeatureMutation) ResetDueDate

func (m *FeatureMutation) ResetDueDate()

ResetDueDate resets all changes to the "due_date" field.

func (*FeatureMutation) ResetEdge

func (m *FeatureMutation) 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 (*FeatureMutation) ResetField

func (m *FeatureMutation) 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 (*FeatureMutation) ResetName

func (m *FeatureMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*FeatureMutation) ResetProduct

func (m *FeatureMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*FeatureMutation) ResetReferenceNum

func (m *FeatureMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*FeatureMutation) ResetRelease

func (m *FeatureMutation) ResetRelease()

ResetRelease resets all changes to the "release" field.

func (*FeatureMutation) ResetReleaseID

func (m *FeatureMutation) ResetReleaseID()

ResetReleaseID resets all changes to the "release_id" field.

func (*FeatureMutation) ResetReleaseReferenceNum

func (m *FeatureMutation) ResetReleaseReferenceNum()

ResetReleaseReferenceNum resets all changes to the "release_reference_num" field.

func (*FeatureMutation) ResetStartDate

func (m *FeatureMutation) ResetStartDate()

ResetStartDate resets all changes to the "start_date" field.

func (*FeatureMutation) ResetStatus

func (m *FeatureMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*FeatureMutation) ResetTags

func (m *FeatureMutation) ResetTags()

ResetTags resets all changes to the "tags" field.

func (*FeatureMutation) ResetURL

func (m *FeatureMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*FeatureMutation) ResetUpdatedAt

func (m *FeatureMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FeatureMutation) SetAssignedTo

func (m *FeatureMutation) SetAssignedTo(s string)

SetAssignedTo sets the "assigned_to" field.

func (*FeatureMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*FeatureMutation) SetData

func (m *FeatureMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*FeatureMutation) SetDescription

func (m *FeatureMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*FeatureMutation) SetDueDate

func (m *FeatureMutation) SetDueDate(s string)

SetDueDate sets the "due_date" field.

func (*FeatureMutation) SetField

func (m *FeatureMutation) 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 (*FeatureMutation) SetID

func (m *FeatureMutation) SetID(id string)

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

func (*FeatureMutation) SetName

func (m *FeatureMutation) SetName(s string)

SetName sets the "name" field.

func (*FeatureMutation) SetOp

func (m *FeatureMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FeatureMutation) SetProduct

func (m *FeatureMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*FeatureMutation) SetReferenceNum

func (m *FeatureMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*FeatureMutation) SetRelease

func (m *FeatureMutation) SetRelease(s string)

SetRelease sets the "release" field.

func (*FeatureMutation) SetReleaseID

func (m *FeatureMutation) SetReleaseID(s string)

SetReleaseID sets the "release_id" field.

func (*FeatureMutation) SetReleaseReferenceNum

func (m *FeatureMutation) SetReleaseReferenceNum(s string)

SetReleaseReferenceNum sets the "release_reference_num" field.

func (*FeatureMutation) SetStartDate

func (m *FeatureMutation) SetStartDate(s string)

SetStartDate sets the "start_date" field.

func (*FeatureMutation) SetStatus

func (m *FeatureMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*FeatureMutation) SetTags

func (m *FeatureMutation) SetTags(s string)

SetTags sets the "tags" field.

func (*FeatureMutation) SetURL

func (m *FeatureMutation) SetURL(s string)

SetURL sets the "url" field.

func (*FeatureMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*FeatureMutation) StartDate

func (m *FeatureMutation) StartDate() (r string, exists bool)

StartDate returns the value of the "start_date" field in the mutation.

func (*FeatureMutation) StartDateCleared

func (m *FeatureMutation) StartDateCleared() bool

StartDateCleared returns if the "start_date" field was cleared in this mutation.

func (*FeatureMutation) Status

func (m *FeatureMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*FeatureMutation) StatusCleared

func (m *FeatureMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*FeatureMutation) Tags

func (m *FeatureMutation) Tags() (r string, exists bool)

Tags returns the value of the "tags" field in the mutation.

func (*FeatureMutation) TagsCleared

func (m *FeatureMutation) TagsCleared() bool

TagsCleared returns if the "tags" field was cleared in this mutation.

func (FeatureMutation) Tx

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

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

func (*FeatureMutation) Type

func (m *FeatureMutation) Type() string

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

func (*FeatureMutation) URL

func (m *FeatureMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*FeatureMutation) URLCleared

func (m *FeatureMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*FeatureMutation) UpdatedAt

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

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

func (*FeatureMutation) UpdatedAtCleared

func (m *FeatureMutation) UpdatedAtCleared() bool

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

func (*FeatureMutation) Where

func (m *FeatureMutation) Where(ps ...predicate.Feature)

Where appends a list predicates to the FeatureMutation builder.

func (*FeatureMutation) WhereP

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

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

type FeatureQuery

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

FeatureQuery is the builder for querying Feature entities.

func (*FeatureQuery) Aggregate

func (_q *FeatureQuery) Aggregate(fns ...AggregateFunc) *FeatureSelect

Aggregate returns a FeatureSelect configured with the given aggregations.

func (*FeatureQuery) All

func (_q *FeatureQuery) All(ctx context.Context) ([]*Feature, error)

All executes the query and returns a list of Features.

func (*FeatureQuery) AllX

func (_q *FeatureQuery) AllX(ctx context.Context) []*Feature

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

func (*FeatureQuery) Clone

func (_q *FeatureQuery) Clone() *FeatureQuery

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

func (*FeatureQuery) Count

func (_q *FeatureQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FeatureQuery) CountX

func (_q *FeatureQuery) CountX(ctx context.Context) int

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

func (*FeatureQuery) Exist

func (_q *FeatureQuery) Exist(ctx context.Context) (bool, error)

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

func (*FeatureQuery) ExistX

func (_q *FeatureQuery) ExistX(ctx context.Context) bool

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

func (*FeatureQuery) First

func (_q *FeatureQuery) First(ctx context.Context) (*Feature, error)

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

func (*FeatureQuery) FirstID

func (_q *FeatureQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*FeatureQuery) FirstIDX

func (_q *FeatureQuery) FirstIDX(ctx context.Context) string

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

func (*FeatureQuery) FirstX

func (_q *FeatureQuery) FirstX(ctx context.Context) *Feature

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

func (*FeatureQuery) GroupBy

func (_q *FeatureQuery) GroupBy(field string, fields ...string) *FeatureGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Feature.Query().
	GroupBy(feature.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FeatureQuery) IDs

func (_q *FeatureQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*FeatureQuery) IDsX

func (_q *FeatureQuery) IDsX(ctx context.Context) []string

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

func (*FeatureQuery) Limit

func (_q *FeatureQuery) Limit(limit int) *FeatureQuery

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

func (*FeatureQuery) Offset

func (_q *FeatureQuery) Offset(offset int) *FeatureQuery

Offset to start from.

func (*FeatureQuery) Only

func (_q *FeatureQuery) Only(ctx context.Context) (*Feature, error)

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

func (*FeatureQuery) OnlyID

func (_q *FeatureQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*FeatureQuery) OnlyIDX

func (_q *FeatureQuery) OnlyIDX(ctx context.Context) string

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

func (*FeatureQuery) OnlyX

func (_q *FeatureQuery) OnlyX(ctx context.Context) *Feature

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

func (*FeatureQuery) Order

func (_q *FeatureQuery) Order(o ...feature.OrderOption) *FeatureQuery

Order specifies how the records should be ordered.

func (*FeatureQuery) Select

func (_q *FeatureQuery) Select(fields ...string) *FeatureSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Feature.Query().
	Select(feature.FieldProduct).
	Scan(ctx, &v)

func (*FeatureQuery) Unique

func (_q *FeatureQuery) Unique(unique bool) *FeatureQuery

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 (*FeatureQuery) Where

func (_q *FeatureQuery) Where(ps ...predicate.Feature) *FeatureQuery

Where adds a new predicate for the FeatureQuery builder.

type FeatureSelect

type FeatureSelect struct {
	*FeatureQuery
	// contains filtered or unexported fields
}

FeatureSelect is the builder for selecting fields of Feature entities.

func (*FeatureSelect) Aggregate

func (_s *FeatureSelect) Aggregate(fns ...AggregateFunc) *FeatureSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FeatureSelect) Bool

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

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

func (*FeatureSelect) BoolX

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

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

func (*FeatureSelect) Bools

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

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

func (*FeatureSelect) BoolsX

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

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

func (*FeatureSelect) Float64

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

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

func (*FeatureSelect) Float64X

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

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

func (*FeatureSelect) Float64s

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

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

func (*FeatureSelect) Float64sX

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

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

func (*FeatureSelect) Int

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

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

func (*FeatureSelect) IntX

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

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

func (*FeatureSelect) Ints

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

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

func (*FeatureSelect) IntsX

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

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

func (*FeatureSelect) Scan

func (_s *FeatureSelect) Scan(ctx context.Context, v any) error

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

func (*FeatureSelect) ScanX

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

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

func (*FeatureSelect) String

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

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

func (*FeatureSelect) StringX

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

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

func (*FeatureSelect) Strings

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

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

func (*FeatureSelect) StringsX

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

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

type FeatureUpdate

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

FeatureUpdate is the builder for updating Feature entities.

func (*FeatureUpdate) ClearAssignedTo

func (_u *FeatureUpdate) ClearAssignedTo() *FeatureUpdate

ClearAssignedTo clears the value of the "assigned_to" field.

func (*FeatureUpdate) ClearCreatedAt

func (_u *FeatureUpdate) ClearCreatedAt() *FeatureUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*FeatureUpdate) ClearData

func (_u *FeatureUpdate) ClearData() *FeatureUpdate

ClearData clears the value of the "data" field.

func (*FeatureUpdate) ClearDescription

func (_u *FeatureUpdate) ClearDescription() *FeatureUpdate

ClearDescription clears the value of the "description" field.

func (*FeatureUpdate) ClearDueDate

func (_u *FeatureUpdate) ClearDueDate() *FeatureUpdate

ClearDueDate clears the value of the "due_date" field.

func (*FeatureUpdate) ClearName

func (_u *FeatureUpdate) ClearName() *FeatureUpdate

ClearName clears the value of the "name" field.

func (*FeatureUpdate) ClearReferenceNum

func (_u *FeatureUpdate) ClearReferenceNum() *FeatureUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*FeatureUpdate) ClearRelease

func (_u *FeatureUpdate) ClearRelease() *FeatureUpdate

ClearRelease clears the value of the "release" field.

func (*FeatureUpdate) ClearReleaseID

func (_u *FeatureUpdate) ClearReleaseID() *FeatureUpdate

ClearReleaseID clears the value of the "release_id" field.

func (*FeatureUpdate) ClearReleaseReferenceNum

func (_u *FeatureUpdate) ClearReleaseReferenceNum() *FeatureUpdate

ClearReleaseReferenceNum clears the value of the "release_reference_num" field.

func (*FeatureUpdate) ClearStartDate

func (_u *FeatureUpdate) ClearStartDate() *FeatureUpdate

ClearStartDate clears the value of the "start_date" field.

func (*FeatureUpdate) ClearStatus

func (_u *FeatureUpdate) ClearStatus() *FeatureUpdate

ClearStatus clears the value of the "status" field.

func (*FeatureUpdate) ClearTags

func (_u *FeatureUpdate) ClearTags() *FeatureUpdate

ClearTags clears the value of the "tags" field.

func (*FeatureUpdate) ClearURL

func (_u *FeatureUpdate) ClearURL() *FeatureUpdate

ClearURL clears the value of the "url" field.

func (*FeatureUpdate) ClearUpdatedAt

func (_u *FeatureUpdate) ClearUpdatedAt() *FeatureUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FeatureUpdate) Exec

func (_u *FeatureUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FeatureUpdate) ExecX

func (_u *FeatureUpdate) ExecX(ctx context.Context)

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

func (*FeatureUpdate) Mutation

func (_u *FeatureUpdate) Mutation() *FeatureMutation

Mutation returns the FeatureMutation object of the builder.

func (*FeatureUpdate) Save

func (_u *FeatureUpdate) Save(ctx context.Context) (int, error)

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

func (*FeatureUpdate) SaveX

func (_u *FeatureUpdate) SaveX(ctx context.Context) int

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

func (*FeatureUpdate) SetAssignedTo

func (_u *FeatureUpdate) SetAssignedTo(v string) *FeatureUpdate

SetAssignedTo sets the "assigned_to" field.

func (*FeatureUpdate) SetCreatedAt

func (_u *FeatureUpdate) SetCreatedAt(v time.Time) *FeatureUpdate

SetCreatedAt sets the "created_at" field.

func (*FeatureUpdate) SetData

func (_u *FeatureUpdate) SetData(v map[string]interface{}) *FeatureUpdate

SetData sets the "data" field.

func (*FeatureUpdate) SetDescription

func (_u *FeatureUpdate) SetDescription(v string) *FeatureUpdate

SetDescription sets the "description" field.

func (*FeatureUpdate) SetDueDate

func (_u *FeatureUpdate) SetDueDate(v string) *FeatureUpdate

SetDueDate sets the "due_date" field.

func (*FeatureUpdate) SetName

func (_u *FeatureUpdate) SetName(v string) *FeatureUpdate

SetName sets the "name" field.

func (*FeatureUpdate) SetNillableAssignedTo

func (_u *FeatureUpdate) SetNillableAssignedTo(v *string) *FeatureUpdate

SetNillableAssignedTo sets the "assigned_to" field if the given value is not nil.

func (*FeatureUpdate) SetNillableCreatedAt

func (_u *FeatureUpdate) SetNillableCreatedAt(v *time.Time) *FeatureUpdate

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

func (*FeatureUpdate) SetNillableDescription

func (_u *FeatureUpdate) SetNillableDescription(v *string) *FeatureUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*FeatureUpdate) SetNillableDueDate

func (_u *FeatureUpdate) SetNillableDueDate(v *string) *FeatureUpdate

SetNillableDueDate sets the "due_date" field if the given value is not nil.

func (*FeatureUpdate) SetNillableName

func (_u *FeatureUpdate) SetNillableName(v *string) *FeatureUpdate

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

func (*FeatureUpdate) SetNillableProduct

func (_u *FeatureUpdate) SetNillableProduct(v *string) *FeatureUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*FeatureUpdate) SetNillableReferenceNum

func (_u *FeatureUpdate) SetNillableReferenceNum(v *string) *FeatureUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*FeatureUpdate) SetNillableRelease

func (_u *FeatureUpdate) SetNillableRelease(v *string) *FeatureUpdate

SetNillableRelease sets the "release" field if the given value is not nil.

func (*FeatureUpdate) SetNillableReleaseID

func (_u *FeatureUpdate) SetNillableReleaseID(v *string) *FeatureUpdate

SetNillableReleaseID sets the "release_id" field if the given value is not nil.

func (*FeatureUpdate) SetNillableReleaseReferenceNum

func (_u *FeatureUpdate) SetNillableReleaseReferenceNum(v *string) *FeatureUpdate

SetNillableReleaseReferenceNum sets the "release_reference_num" field if the given value is not nil.

func (*FeatureUpdate) SetNillableStartDate

func (_u *FeatureUpdate) SetNillableStartDate(v *string) *FeatureUpdate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*FeatureUpdate) SetNillableStatus

func (_u *FeatureUpdate) SetNillableStatus(v *string) *FeatureUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*FeatureUpdate) SetNillableTags

func (_u *FeatureUpdate) SetNillableTags(v *string) *FeatureUpdate

SetNillableTags sets the "tags" field if the given value is not nil.

func (*FeatureUpdate) SetNillableURL

func (_u *FeatureUpdate) SetNillableURL(v *string) *FeatureUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*FeatureUpdate) SetNillableUpdatedAt

func (_u *FeatureUpdate) SetNillableUpdatedAt(v *time.Time) *FeatureUpdate

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

func (*FeatureUpdate) SetProduct

func (_u *FeatureUpdate) SetProduct(v string) *FeatureUpdate

SetProduct sets the "product" field.

func (*FeatureUpdate) SetReferenceNum

func (_u *FeatureUpdate) SetReferenceNum(v string) *FeatureUpdate

SetReferenceNum sets the "reference_num" field.

func (*FeatureUpdate) SetRelease

func (_u *FeatureUpdate) SetRelease(v string) *FeatureUpdate

SetRelease sets the "release" field.

func (*FeatureUpdate) SetReleaseID

func (_u *FeatureUpdate) SetReleaseID(v string) *FeatureUpdate

SetReleaseID sets the "release_id" field.

func (*FeatureUpdate) SetReleaseReferenceNum

func (_u *FeatureUpdate) SetReleaseReferenceNum(v string) *FeatureUpdate

SetReleaseReferenceNum sets the "release_reference_num" field.

func (*FeatureUpdate) SetStartDate

func (_u *FeatureUpdate) SetStartDate(v string) *FeatureUpdate

SetStartDate sets the "start_date" field.

func (*FeatureUpdate) SetStatus

func (_u *FeatureUpdate) SetStatus(v string) *FeatureUpdate

SetStatus sets the "status" field.

func (*FeatureUpdate) SetTags

func (_u *FeatureUpdate) SetTags(v string) *FeatureUpdate

SetTags sets the "tags" field.

func (*FeatureUpdate) SetURL

func (_u *FeatureUpdate) SetURL(v string) *FeatureUpdate

SetURL sets the "url" field.

func (*FeatureUpdate) SetUpdatedAt

func (_u *FeatureUpdate) SetUpdatedAt(v time.Time) *FeatureUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FeatureUpdate) Where

func (_u *FeatureUpdate) Where(ps ...predicate.Feature) *FeatureUpdate

Where appends a list predicates to the FeatureUpdate builder.

type FeatureUpdateOne

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

FeatureUpdateOne is the builder for updating a single Feature entity.

func (*FeatureUpdateOne) ClearAssignedTo

func (_u *FeatureUpdateOne) ClearAssignedTo() *FeatureUpdateOne

ClearAssignedTo clears the value of the "assigned_to" field.

func (*FeatureUpdateOne) ClearCreatedAt

func (_u *FeatureUpdateOne) ClearCreatedAt() *FeatureUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*FeatureUpdateOne) ClearData

func (_u *FeatureUpdateOne) ClearData() *FeatureUpdateOne

ClearData clears the value of the "data" field.

func (*FeatureUpdateOne) ClearDescription

func (_u *FeatureUpdateOne) ClearDescription() *FeatureUpdateOne

ClearDescription clears the value of the "description" field.

func (*FeatureUpdateOne) ClearDueDate

func (_u *FeatureUpdateOne) ClearDueDate() *FeatureUpdateOne

ClearDueDate clears the value of the "due_date" field.

func (*FeatureUpdateOne) ClearName

func (_u *FeatureUpdateOne) ClearName() *FeatureUpdateOne

ClearName clears the value of the "name" field.

func (*FeatureUpdateOne) ClearReferenceNum

func (_u *FeatureUpdateOne) ClearReferenceNum() *FeatureUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*FeatureUpdateOne) ClearRelease

func (_u *FeatureUpdateOne) ClearRelease() *FeatureUpdateOne

ClearRelease clears the value of the "release" field.

func (*FeatureUpdateOne) ClearReleaseID

func (_u *FeatureUpdateOne) ClearReleaseID() *FeatureUpdateOne

ClearReleaseID clears the value of the "release_id" field.

func (*FeatureUpdateOne) ClearReleaseReferenceNum

func (_u *FeatureUpdateOne) ClearReleaseReferenceNum() *FeatureUpdateOne

ClearReleaseReferenceNum clears the value of the "release_reference_num" field.

func (*FeatureUpdateOne) ClearStartDate

func (_u *FeatureUpdateOne) ClearStartDate() *FeatureUpdateOne

ClearStartDate clears the value of the "start_date" field.

func (*FeatureUpdateOne) ClearStatus

func (_u *FeatureUpdateOne) ClearStatus() *FeatureUpdateOne

ClearStatus clears the value of the "status" field.

func (*FeatureUpdateOne) ClearTags

func (_u *FeatureUpdateOne) ClearTags() *FeatureUpdateOne

ClearTags clears the value of the "tags" field.

func (*FeatureUpdateOne) ClearURL

func (_u *FeatureUpdateOne) ClearURL() *FeatureUpdateOne

ClearURL clears the value of the "url" field.

func (*FeatureUpdateOne) ClearUpdatedAt

func (_u *FeatureUpdateOne) ClearUpdatedAt() *FeatureUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FeatureUpdateOne) Exec

func (_u *FeatureUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FeatureUpdateOne) ExecX

func (_u *FeatureUpdateOne) ExecX(ctx context.Context)

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

func (*FeatureUpdateOne) Mutation

func (_u *FeatureUpdateOne) Mutation() *FeatureMutation

Mutation returns the FeatureMutation object of the builder.

func (*FeatureUpdateOne) Save

func (_u *FeatureUpdateOne) Save(ctx context.Context) (*Feature, error)

Save executes the query and returns the updated Feature entity.

func (*FeatureUpdateOne) SaveX

func (_u *FeatureUpdateOne) SaveX(ctx context.Context) *Feature

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

func (*FeatureUpdateOne) Select

func (_u *FeatureUpdateOne) Select(field string, fields ...string) *FeatureUpdateOne

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

func (*FeatureUpdateOne) SetAssignedTo

func (_u *FeatureUpdateOne) SetAssignedTo(v string) *FeatureUpdateOne

SetAssignedTo sets the "assigned_to" field.

func (*FeatureUpdateOne) SetCreatedAt

func (_u *FeatureUpdateOne) SetCreatedAt(v time.Time) *FeatureUpdateOne

SetCreatedAt sets the "created_at" field.

func (*FeatureUpdateOne) SetData

func (_u *FeatureUpdateOne) SetData(v map[string]interface{}) *FeatureUpdateOne

SetData sets the "data" field.

func (*FeatureUpdateOne) SetDescription

func (_u *FeatureUpdateOne) SetDescription(v string) *FeatureUpdateOne

SetDescription sets the "description" field.

func (*FeatureUpdateOne) SetDueDate

func (_u *FeatureUpdateOne) SetDueDate(v string) *FeatureUpdateOne

SetDueDate sets the "due_date" field.

func (*FeatureUpdateOne) SetName

func (_u *FeatureUpdateOne) SetName(v string) *FeatureUpdateOne

SetName sets the "name" field.

func (*FeatureUpdateOne) SetNillableAssignedTo

func (_u *FeatureUpdateOne) SetNillableAssignedTo(v *string) *FeatureUpdateOne

SetNillableAssignedTo sets the "assigned_to" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableCreatedAt

func (_u *FeatureUpdateOne) SetNillableCreatedAt(v *time.Time) *FeatureUpdateOne

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

func (*FeatureUpdateOne) SetNillableDescription

func (_u *FeatureUpdateOne) SetNillableDescription(v *string) *FeatureUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableDueDate

func (_u *FeatureUpdateOne) SetNillableDueDate(v *string) *FeatureUpdateOne

SetNillableDueDate sets the "due_date" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableName

func (_u *FeatureUpdateOne) SetNillableName(v *string) *FeatureUpdateOne

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

func (*FeatureUpdateOne) SetNillableProduct

func (_u *FeatureUpdateOne) SetNillableProduct(v *string) *FeatureUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableReferenceNum

func (_u *FeatureUpdateOne) SetNillableReferenceNum(v *string) *FeatureUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableRelease

func (_u *FeatureUpdateOne) SetNillableRelease(v *string) *FeatureUpdateOne

SetNillableRelease sets the "release" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableReleaseID

func (_u *FeatureUpdateOne) SetNillableReleaseID(v *string) *FeatureUpdateOne

SetNillableReleaseID sets the "release_id" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableReleaseReferenceNum

func (_u *FeatureUpdateOne) SetNillableReleaseReferenceNum(v *string) *FeatureUpdateOne

SetNillableReleaseReferenceNum sets the "release_reference_num" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableStartDate

func (_u *FeatureUpdateOne) SetNillableStartDate(v *string) *FeatureUpdateOne

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableStatus

func (_u *FeatureUpdateOne) SetNillableStatus(v *string) *FeatureUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableTags

func (_u *FeatureUpdateOne) SetNillableTags(v *string) *FeatureUpdateOne

SetNillableTags sets the "tags" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableURL

func (_u *FeatureUpdateOne) SetNillableURL(v *string) *FeatureUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*FeatureUpdateOne) SetNillableUpdatedAt

func (_u *FeatureUpdateOne) SetNillableUpdatedAt(v *time.Time) *FeatureUpdateOne

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

func (*FeatureUpdateOne) SetProduct

func (_u *FeatureUpdateOne) SetProduct(v string) *FeatureUpdateOne

SetProduct sets the "product" field.

func (*FeatureUpdateOne) SetReferenceNum

func (_u *FeatureUpdateOne) SetReferenceNum(v string) *FeatureUpdateOne

SetReferenceNum sets the "reference_num" field.

func (*FeatureUpdateOne) SetRelease

func (_u *FeatureUpdateOne) SetRelease(v string) *FeatureUpdateOne

SetRelease sets the "release" field.

func (*FeatureUpdateOne) SetReleaseID

func (_u *FeatureUpdateOne) SetReleaseID(v string) *FeatureUpdateOne

SetReleaseID sets the "release_id" field.

func (*FeatureUpdateOne) SetReleaseReferenceNum

func (_u *FeatureUpdateOne) SetReleaseReferenceNum(v string) *FeatureUpdateOne

SetReleaseReferenceNum sets the "release_reference_num" field.

func (*FeatureUpdateOne) SetStartDate

func (_u *FeatureUpdateOne) SetStartDate(v string) *FeatureUpdateOne

SetStartDate sets the "start_date" field.

func (*FeatureUpdateOne) SetStatus

func (_u *FeatureUpdateOne) SetStatus(v string) *FeatureUpdateOne

SetStatus sets the "status" field.

func (*FeatureUpdateOne) SetTags

func (_u *FeatureUpdateOne) SetTags(v string) *FeatureUpdateOne

SetTags sets the "tags" field.

func (*FeatureUpdateOne) SetURL

func (_u *FeatureUpdateOne) SetURL(v string) *FeatureUpdateOne

SetURL sets the "url" field.

func (*FeatureUpdateOne) SetUpdatedAt

func (_u *FeatureUpdateOne) SetUpdatedAt(v time.Time) *FeatureUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FeatureUpdateOne) Where

Where appends a list predicates to the FeatureUpdate builder.

type FeatureUpsert

type FeatureUpsert struct {
	*sql.UpdateSet
}

FeatureUpsert is the "OnConflict" setter.

func (*FeatureUpsert) ClearAssignedTo

func (u *FeatureUpsert) ClearAssignedTo() *FeatureUpsert

ClearAssignedTo clears the value of the "assigned_to" field.

func (*FeatureUpsert) ClearCreatedAt

func (u *FeatureUpsert) ClearCreatedAt() *FeatureUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*FeatureUpsert) ClearData

func (u *FeatureUpsert) ClearData() *FeatureUpsert

ClearData clears the value of the "data" field.

func (*FeatureUpsert) ClearDescription

func (u *FeatureUpsert) ClearDescription() *FeatureUpsert

ClearDescription clears the value of the "description" field.

func (*FeatureUpsert) ClearDueDate

func (u *FeatureUpsert) ClearDueDate() *FeatureUpsert

ClearDueDate clears the value of the "due_date" field.

func (*FeatureUpsert) ClearName

func (u *FeatureUpsert) ClearName() *FeatureUpsert

ClearName clears the value of the "name" field.

func (*FeatureUpsert) ClearReferenceNum

func (u *FeatureUpsert) ClearReferenceNum() *FeatureUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*FeatureUpsert) ClearRelease

func (u *FeatureUpsert) ClearRelease() *FeatureUpsert

ClearRelease clears the value of the "release" field.

func (*FeatureUpsert) ClearReleaseID

func (u *FeatureUpsert) ClearReleaseID() *FeatureUpsert

ClearReleaseID clears the value of the "release_id" field.

func (*FeatureUpsert) ClearReleaseReferenceNum

func (u *FeatureUpsert) ClearReleaseReferenceNum() *FeatureUpsert

ClearReleaseReferenceNum clears the value of the "release_reference_num" field.

func (*FeatureUpsert) ClearStartDate

func (u *FeatureUpsert) ClearStartDate() *FeatureUpsert

ClearStartDate clears the value of the "start_date" field.

func (*FeatureUpsert) ClearStatus

func (u *FeatureUpsert) ClearStatus() *FeatureUpsert

ClearStatus clears the value of the "status" field.

func (*FeatureUpsert) ClearTags

func (u *FeatureUpsert) ClearTags() *FeatureUpsert

ClearTags clears the value of the "tags" field.

func (*FeatureUpsert) ClearURL

func (u *FeatureUpsert) ClearURL() *FeatureUpsert

ClearURL clears the value of the "url" field.

func (*FeatureUpsert) ClearUpdatedAt

func (u *FeatureUpsert) ClearUpdatedAt() *FeatureUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FeatureUpsert) SetAssignedTo

func (u *FeatureUpsert) SetAssignedTo(v string) *FeatureUpsert

SetAssignedTo sets the "assigned_to" field.

func (*FeatureUpsert) SetCreatedAt

func (u *FeatureUpsert) SetCreatedAt(v time.Time) *FeatureUpsert

SetCreatedAt sets the "created_at" field.

func (*FeatureUpsert) SetData

func (u *FeatureUpsert) SetData(v map[string]interface{}) *FeatureUpsert

SetData sets the "data" field.

func (*FeatureUpsert) SetDescription

func (u *FeatureUpsert) SetDescription(v string) *FeatureUpsert

SetDescription sets the "description" field.

func (*FeatureUpsert) SetDueDate

func (u *FeatureUpsert) SetDueDate(v string) *FeatureUpsert

SetDueDate sets the "due_date" field.

func (*FeatureUpsert) SetName

func (u *FeatureUpsert) SetName(v string) *FeatureUpsert

SetName sets the "name" field.

func (*FeatureUpsert) SetProduct

func (u *FeatureUpsert) SetProduct(v string) *FeatureUpsert

SetProduct sets the "product" field.

func (*FeatureUpsert) SetReferenceNum

func (u *FeatureUpsert) SetReferenceNum(v string) *FeatureUpsert

SetReferenceNum sets the "reference_num" field.

func (*FeatureUpsert) SetRelease

func (u *FeatureUpsert) SetRelease(v string) *FeatureUpsert

SetRelease sets the "release" field.

func (*FeatureUpsert) SetReleaseID

func (u *FeatureUpsert) SetReleaseID(v string) *FeatureUpsert

SetReleaseID sets the "release_id" field.

func (*FeatureUpsert) SetReleaseReferenceNum

func (u *FeatureUpsert) SetReleaseReferenceNum(v string) *FeatureUpsert

SetReleaseReferenceNum sets the "release_reference_num" field.

func (*FeatureUpsert) SetStartDate

func (u *FeatureUpsert) SetStartDate(v string) *FeatureUpsert

SetStartDate sets the "start_date" field.

func (*FeatureUpsert) SetStatus

func (u *FeatureUpsert) SetStatus(v string) *FeatureUpsert

SetStatus sets the "status" field.

func (*FeatureUpsert) SetTags

func (u *FeatureUpsert) SetTags(v string) *FeatureUpsert

SetTags sets the "tags" field.

func (*FeatureUpsert) SetURL

func (u *FeatureUpsert) SetURL(v string) *FeatureUpsert

SetURL sets the "url" field.

func (*FeatureUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*FeatureUpsert) UpdateAssignedTo

func (u *FeatureUpsert) UpdateAssignedTo() *FeatureUpsert

UpdateAssignedTo sets the "assigned_to" field to the value that was provided on create.

func (*FeatureUpsert) UpdateCreatedAt

func (u *FeatureUpsert) UpdateCreatedAt() *FeatureUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*FeatureUpsert) UpdateData

func (u *FeatureUpsert) UpdateData() *FeatureUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*FeatureUpsert) UpdateDescription

func (u *FeatureUpsert) UpdateDescription() *FeatureUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeatureUpsert) UpdateDueDate

func (u *FeatureUpsert) UpdateDueDate() *FeatureUpsert

UpdateDueDate sets the "due_date" field to the value that was provided on create.

func (*FeatureUpsert) UpdateName

func (u *FeatureUpsert) UpdateName() *FeatureUpsert

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

func (*FeatureUpsert) UpdateProduct

func (u *FeatureUpsert) UpdateProduct() *FeatureUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*FeatureUpsert) UpdateReferenceNum

func (u *FeatureUpsert) UpdateReferenceNum() *FeatureUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*FeatureUpsert) UpdateRelease

func (u *FeatureUpsert) UpdateRelease() *FeatureUpsert

UpdateRelease sets the "release" field to the value that was provided on create.

func (*FeatureUpsert) UpdateReleaseID

func (u *FeatureUpsert) UpdateReleaseID() *FeatureUpsert

UpdateReleaseID sets the "release_id" field to the value that was provided on create.

func (*FeatureUpsert) UpdateReleaseReferenceNum

func (u *FeatureUpsert) UpdateReleaseReferenceNum() *FeatureUpsert

UpdateReleaseReferenceNum sets the "release_reference_num" field to the value that was provided on create.

func (*FeatureUpsert) UpdateStartDate

func (u *FeatureUpsert) UpdateStartDate() *FeatureUpsert

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*FeatureUpsert) UpdateStatus

func (u *FeatureUpsert) UpdateStatus() *FeatureUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*FeatureUpsert) UpdateTags

func (u *FeatureUpsert) UpdateTags() *FeatureUpsert

UpdateTags sets the "tags" field to the value that was provided on create.

func (*FeatureUpsert) UpdateURL

func (u *FeatureUpsert) UpdateURL() *FeatureUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*FeatureUpsert) UpdateUpdatedAt

func (u *FeatureUpsert) UpdateUpdatedAt() *FeatureUpsert

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

type FeatureUpsertBulk

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

FeatureUpsertBulk is the builder for "upsert"-ing a bulk of Feature nodes.

func (*FeatureUpsertBulk) ClearAssignedTo

func (u *FeatureUpsertBulk) ClearAssignedTo() *FeatureUpsertBulk

ClearAssignedTo clears the value of the "assigned_to" field.

func (*FeatureUpsertBulk) ClearCreatedAt

func (u *FeatureUpsertBulk) ClearCreatedAt() *FeatureUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*FeatureUpsertBulk) ClearData

func (u *FeatureUpsertBulk) ClearData() *FeatureUpsertBulk

ClearData clears the value of the "data" field.

func (*FeatureUpsertBulk) ClearDescription

func (u *FeatureUpsertBulk) ClearDescription() *FeatureUpsertBulk

ClearDescription clears the value of the "description" field.

func (*FeatureUpsertBulk) ClearDueDate

func (u *FeatureUpsertBulk) ClearDueDate() *FeatureUpsertBulk

ClearDueDate clears the value of the "due_date" field.

func (*FeatureUpsertBulk) ClearName

func (u *FeatureUpsertBulk) ClearName() *FeatureUpsertBulk

ClearName clears the value of the "name" field.

func (*FeatureUpsertBulk) ClearReferenceNum

func (u *FeatureUpsertBulk) ClearReferenceNum() *FeatureUpsertBulk

ClearReferenceNum clears the value of the "reference_num" field.

func (*FeatureUpsertBulk) ClearRelease

func (u *FeatureUpsertBulk) ClearRelease() *FeatureUpsertBulk

ClearRelease clears the value of the "release" field.

func (*FeatureUpsertBulk) ClearReleaseID

func (u *FeatureUpsertBulk) ClearReleaseID() *FeatureUpsertBulk

ClearReleaseID clears the value of the "release_id" field.

func (*FeatureUpsertBulk) ClearReleaseReferenceNum

func (u *FeatureUpsertBulk) ClearReleaseReferenceNum() *FeatureUpsertBulk

ClearReleaseReferenceNum clears the value of the "release_reference_num" field.

func (*FeatureUpsertBulk) ClearStartDate

func (u *FeatureUpsertBulk) ClearStartDate() *FeatureUpsertBulk

ClearStartDate clears the value of the "start_date" field.

func (*FeatureUpsertBulk) ClearStatus

func (u *FeatureUpsertBulk) ClearStatus() *FeatureUpsertBulk

ClearStatus clears the value of the "status" field.

func (*FeatureUpsertBulk) ClearTags

func (u *FeatureUpsertBulk) ClearTags() *FeatureUpsertBulk

ClearTags clears the value of the "tags" field.

func (*FeatureUpsertBulk) ClearURL

func (u *FeatureUpsertBulk) ClearURL() *FeatureUpsertBulk

ClearURL clears the value of the "url" field.

func (*FeatureUpsertBulk) ClearUpdatedAt

func (u *FeatureUpsertBulk) ClearUpdatedAt() *FeatureUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FeatureUpsertBulk) DoNothing

func (u *FeatureUpsertBulk) DoNothing() *FeatureUpsertBulk

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

func (*FeatureUpsertBulk) Exec

func (u *FeatureUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FeatureUpsertBulk) ExecX

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

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

func (*FeatureUpsertBulk) Ignore

func (u *FeatureUpsertBulk) Ignore() *FeatureUpsertBulk

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

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

func (*FeatureUpsertBulk) SetAssignedTo

func (u *FeatureUpsertBulk) SetAssignedTo(v string) *FeatureUpsertBulk

SetAssignedTo sets the "assigned_to" field.

func (*FeatureUpsertBulk) SetCreatedAt

func (u *FeatureUpsertBulk) SetCreatedAt(v time.Time) *FeatureUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*FeatureUpsertBulk) SetData

func (u *FeatureUpsertBulk) SetData(v map[string]interface{}) *FeatureUpsertBulk

SetData sets the "data" field.

func (*FeatureUpsertBulk) SetDescription

func (u *FeatureUpsertBulk) SetDescription(v string) *FeatureUpsertBulk

SetDescription sets the "description" field.

func (*FeatureUpsertBulk) SetDueDate

func (u *FeatureUpsertBulk) SetDueDate(v string) *FeatureUpsertBulk

SetDueDate sets the "due_date" field.

func (*FeatureUpsertBulk) SetName

SetName sets the "name" field.

func (*FeatureUpsertBulk) SetProduct

func (u *FeatureUpsertBulk) SetProduct(v string) *FeatureUpsertBulk

SetProduct sets the "product" field.

func (*FeatureUpsertBulk) SetReferenceNum

func (u *FeatureUpsertBulk) SetReferenceNum(v string) *FeatureUpsertBulk

SetReferenceNum sets the "reference_num" field.

func (*FeatureUpsertBulk) SetRelease

func (u *FeatureUpsertBulk) SetRelease(v string) *FeatureUpsertBulk

SetRelease sets the "release" field.

func (*FeatureUpsertBulk) SetReleaseID

func (u *FeatureUpsertBulk) SetReleaseID(v string) *FeatureUpsertBulk

SetReleaseID sets the "release_id" field.

func (*FeatureUpsertBulk) SetReleaseReferenceNum

func (u *FeatureUpsertBulk) SetReleaseReferenceNum(v string) *FeatureUpsertBulk

SetReleaseReferenceNum sets the "release_reference_num" field.

func (*FeatureUpsertBulk) SetStartDate

func (u *FeatureUpsertBulk) SetStartDate(v string) *FeatureUpsertBulk

SetStartDate sets the "start_date" field.

func (*FeatureUpsertBulk) SetStatus

func (u *FeatureUpsertBulk) SetStatus(v string) *FeatureUpsertBulk

SetStatus sets the "status" field.

func (*FeatureUpsertBulk) SetTags

SetTags sets the "tags" field.

func (*FeatureUpsertBulk) SetURL

SetURL sets the "url" field.

func (*FeatureUpsertBulk) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*FeatureUpsertBulk) Update

func (u *FeatureUpsertBulk) Update(set func(*FeatureUpsert)) *FeatureUpsertBulk

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

func (*FeatureUpsertBulk) UpdateAssignedTo

func (u *FeatureUpsertBulk) UpdateAssignedTo() *FeatureUpsertBulk

UpdateAssignedTo sets the "assigned_to" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateCreatedAt

func (u *FeatureUpsertBulk) UpdateCreatedAt() *FeatureUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateData

func (u *FeatureUpsertBulk) UpdateData() *FeatureUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateDescription

func (u *FeatureUpsertBulk) UpdateDescription() *FeatureUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateDueDate

func (u *FeatureUpsertBulk) UpdateDueDate() *FeatureUpsertBulk

UpdateDueDate sets the "due_date" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateName

func (u *FeatureUpsertBulk) UpdateName() *FeatureUpsertBulk

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

func (*FeatureUpsertBulk) UpdateNewValues

func (u *FeatureUpsertBulk) UpdateNewValues() *FeatureUpsertBulk

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

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

func (*FeatureUpsertBulk) UpdateProduct

func (u *FeatureUpsertBulk) UpdateProduct() *FeatureUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateReferenceNum

func (u *FeatureUpsertBulk) UpdateReferenceNum() *FeatureUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateRelease

func (u *FeatureUpsertBulk) UpdateRelease() *FeatureUpsertBulk

UpdateRelease sets the "release" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateReleaseID

func (u *FeatureUpsertBulk) UpdateReleaseID() *FeatureUpsertBulk

UpdateReleaseID sets the "release_id" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateReleaseReferenceNum

func (u *FeatureUpsertBulk) UpdateReleaseReferenceNum() *FeatureUpsertBulk

UpdateReleaseReferenceNum sets the "release_reference_num" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateStartDate

func (u *FeatureUpsertBulk) UpdateStartDate() *FeatureUpsertBulk

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateStatus

func (u *FeatureUpsertBulk) UpdateStatus() *FeatureUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateTags

func (u *FeatureUpsertBulk) UpdateTags() *FeatureUpsertBulk

UpdateTags sets the "tags" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateURL

func (u *FeatureUpsertBulk) UpdateURL() *FeatureUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*FeatureUpsertBulk) UpdateUpdatedAt

func (u *FeatureUpsertBulk) UpdateUpdatedAt() *FeatureUpsertBulk

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

type FeatureUpsertOne

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

FeatureUpsertOne is the builder for "upsert"-ing

one Feature node.

func (*FeatureUpsertOne) ClearAssignedTo

func (u *FeatureUpsertOne) ClearAssignedTo() *FeatureUpsertOne

ClearAssignedTo clears the value of the "assigned_to" field.

func (*FeatureUpsertOne) ClearCreatedAt

func (u *FeatureUpsertOne) ClearCreatedAt() *FeatureUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*FeatureUpsertOne) ClearData

func (u *FeatureUpsertOne) ClearData() *FeatureUpsertOne

ClearData clears the value of the "data" field.

func (*FeatureUpsertOne) ClearDescription

func (u *FeatureUpsertOne) ClearDescription() *FeatureUpsertOne

ClearDescription clears the value of the "description" field.

func (*FeatureUpsertOne) ClearDueDate

func (u *FeatureUpsertOne) ClearDueDate() *FeatureUpsertOne

ClearDueDate clears the value of the "due_date" field.

func (*FeatureUpsertOne) ClearName

func (u *FeatureUpsertOne) ClearName() *FeatureUpsertOne

ClearName clears the value of the "name" field.

func (*FeatureUpsertOne) ClearReferenceNum

func (u *FeatureUpsertOne) ClearReferenceNum() *FeatureUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*FeatureUpsertOne) ClearRelease

func (u *FeatureUpsertOne) ClearRelease() *FeatureUpsertOne

ClearRelease clears the value of the "release" field.

func (*FeatureUpsertOne) ClearReleaseID

func (u *FeatureUpsertOne) ClearReleaseID() *FeatureUpsertOne

ClearReleaseID clears the value of the "release_id" field.

func (*FeatureUpsertOne) ClearReleaseReferenceNum

func (u *FeatureUpsertOne) ClearReleaseReferenceNum() *FeatureUpsertOne

ClearReleaseReferenceNum clears the value of the "release_reference_num" field.

func (*FeatureUpsertOne) ClearStartDate

func (u *FeatureUpsertOne) ClearStartDate() *FeatureUpsertOne

ClearStartDate clears the value of the "start_date" field.

func (*FeatureUpsertOne) ClearStatus

func (u *FeatureUpsertOne) ClearStatus() *FeatureUpsertOne

ClearStatus clears the value of the "status" field.

func (*FeatureUpsertOne) ClearTags

func (u *FeatureUpsertOne) ClearTags() *FeatureUpsertOne

ClearTags clears the value of the "tags" field.

func (*FeatureUpsertOne) ClearURL

func (u *FeatureUpsertOne) ClearURL() *FeatureUpsertOne

ClearURL clears the value of the "url" field.

func (*FeatureUpsertOne) ClearUpdatedAt

func (u *FeatureUpsertOne) ClearUpdatedAt() *FeatureUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FeatureUpsertOne) DoNothing

func (u *FeatureUpsertOne) DoNothing() *FeatureUpsertOne

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

func (*FeatureUpsertOne) Exec

func (u *FeatureUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*FeatureUpsertOne) ExecX

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

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

func (*FeatureUpsertOne) ID

func (u *FeatureUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*FeatureUpsertOne) IDX

func (u *FeatureUpsertOne) IDX(ctx context.Context) string

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

func (*FeatureUpsertOne) Ignore

func (u *FeatureUpsertOne) Ignore() *FeatureUpsertOne

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

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

func (*FeatureUpsertOne) SetAssignedTo

func (u *FeatureUpsertOne) SetAssignedTo(v string) *FeatureUpsertOne

SetAssignedTo sets the "assigned_to" field.

func (*FeatureUpsertOne) SetCreatedAt

func (u *FeatureUpsertOne) SetCreatedAt(v time.Time) *FeatureUpsertOne

SetCreatedAt sets the "created_at" field.

func (*FeatureUpsertOne) SetData

func (u *FeatureUpsertOne) SetData(v map[string]interface{}) *FeatureUpsertOne

SetData sets the "data" field.

func (*FeatureUpsertOne) SetDescription

func (u *FeatureUpsertOne) SetDescription(v string) *FeatureUpsertOne

SetDescription sets the "description" field.

func (*FeatureUpsertOne) SetDueDate

func (u *FeatureUpsertOne) SetDueDate(v string) *FeatureUpsertOne

SetDueDate sets the "due_date" field.

func (*FeatureUpsertOne) SetName

func (u *FeatureUpsertOne) SetName(v string) *FeatureUpsertOne

SetName sets the "name" field.

func (*FeatureUpsertOne) SetProduct

func (u *FeatureUpsertOne) SetProduct(v string) *FeatureUpsertOne

SetProduct sets the "product" field.

func (*FeatureUpsertOne) SetReferenceNum

func (u *FeatureUpsertOne) SetReferenceNum(v string) *FeatureUpsertOne

SetReferenceNum sets the "reference_num" field.

func (*FeatureUpsertOne) SetRelease

func (u *FeatureUpsertOne) SetRelease(v string) *FeatureUpsertOne

SetRelease sets the "release" field.

func (*FeatureUpsertOne) SetReleaseID

func (u *FeatureUpsertOne) SetReleaseID(v string) *FeatureUpsertOne

SetReleaseID sets the "release_id" field.

func (*FeatureUpsertOne) SetReleaseReferenceNum

func (u *FeatureUpsertOne) SetReleaseReferenceNum(v string) *FeatureUpsertOne

SetReleaseReferenceNum sets the "release_reference_num" field.

func (*FeatureUpsertOne) SetStartDate

func (u *FeatureUpsertOne) SetStartDate(v string) *FeatureUpsertOne

SetStartDate sets the "start_date" field.

func (*FeatureUpsertOne) SetStatus

func (u *FeatureUpsertOne) SetStatus(v string) *FeatureUpsertOne

SetStatus sets the "status" field.

func (*FeatureUpsertOne) SetTags

func (u *FeatureUpsertOne) SetTags(v string) *FeatureUpsertOne

SetTags sets the "tags" field.

func (*FeatureUpsertOne) SetURL

SetURL sets the "url" field.

func (*FeatureUpsertOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*FeatureUpsertOne) Update

func (u *FeatureUpsertOne) Update(set func(*FeatureUpsert)) *FeatureUpsertOne

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

func (*FeatureUpsertOne) UpdateAssignedTo

func (u *FeatureUpsertOne) UpdateAssignedTo() *FeatureUpsertOne

UpdateAssignedTo sets the "assigned_to" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateCreatedAt

func (u *FeatureUpsertOne) UpdateCreatedAt() *FeatureUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateData

func (u *FeatureUpsertOne) UpdateData() *FeatureUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateDescription

func (u *FeatureUpsertOne) UpdateDescription() *FeatureUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateDueDate

func (u *FeatureUpsertOne) UpdateDueDate() *FeatureUpsertOne

UpdateDueDate sets the "due_date" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateName

func (u *FeatureUpsertOne) UpdateName() *FeatureUpsertOne

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

func (*FeatureUpsertOne) UpdateNewValues

func (u *FeatureUpsertOne) UpdateNewValues() *FeatureUpsertOne

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.Feature.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(feature.FieldID)
		}),
	).
	Exec(ctx)

func (*FeatureUpsertOne) UpdateProduct

func (u *FeatureUpsertOne) UpdateProduct() *FeatureUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateReferenceNum

func (u *FeatureUpsertOne) UpdateReferenceNum() *FeatureUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateRelease

func (u *FeatureUpsertOne) UpdateRelease() *FeatureUpsertOne

UpdateRelease sets the "release" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateReleaseID

func (u *FeatureUpsertOne) UpdateReleaseID() *FeatureUpsertOne

UpdateReleaseID sets the "release_id" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateReleaseReferenceNum

func (u *FeatureUpsertOne) UpdateReleaseReferenceNum() *FeatureUpsertOne

UpdateReleaseReferenceNum sets the "release_reference_num" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateStartDate

func (u *FeatureUpsertOne) UpdateStartDate() *FeatureUpsertOne

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateStatus

func (u *FeatureUpsertOne) UpdateStatus() *FeatureUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateTags

func (u *FeatureUpsertOne) UpdateTags() *FeatureUpsertOne

UpdateTags sets the "tags" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateURL

func (u *FeatureUpsertOne) UpdateURL() *FeatureUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*FeatureUpsertOne) UpdateUpdatedAt

func (u *FeatureUpsertOne) UpdateUpdatedAt() *FeatureUpsertOne

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

type Features

type Features []*Feature

Features is a parsable slice of Feature.

type Goal

type Goal struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// Progress holds the value of the "progress" field.
	Progress *float64 `json:"progress,omitempty"`
	// StartDate holds the value of the "start_date" field.
	StartDate string `json:"start_date,omitempty"`
	// EndDate holds the value of the "end_date" field.
	EndDate string `json:"end_date,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Goal is the model entity for the Goal schema.

func (*Goal) String

func (_m *Goal) String() string

String implements the fmt.Stringer.

func (*Goal) Unwrap

func (_m *Goal) Unwrap() *Goal

Unwrap unwraps the Goal 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 (*Goal) Update

func (_m *Goal) Update() *GoalUpdateOne

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

func (*Goal) Value

func (_m *Goal) Value(name string) (ent.Value, error)

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

type GoalClient

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

GoalClient is a client for the Goal schema.

func NewGoalClient

func NewGoalClient(c config) *GoalClient

NewGoalClient returns a client for the Goal from the given config.

func (*GoalClient) Create

func (c *GoalClient) Create() *GoalCreate

Create returns a builder for creating a Goal entity.

func (*GoalClient) CreateBulk

func (c *GoalClient) CreateBulk(builders ...*GoalCreate) *GoalCreateBulk

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

func (*GoalClient) Delete

func (c *GoalClient) Delete() *GoalDelete

Delete returns a delete builder for Goal.

func (*GoalClient) DeleteOne

func (c *GoalClient) DeleteOne(_m *Goal) *GoalDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GoalClient) DeleteOneID

func (c *GoalClient) DeleteOneID(id string) *GoalDeleteOne

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

func (*GoalClient) Get

func (c *GoalClient) Get(ctx context.Context, id string) (*Goal, error)

Get returns a Goal entity by its id.

func (*GoalClient) GetX

func (c *GoalClient) GetX(ctx context.Context, id string) *Goal

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

func (*GoalClient) Hooks

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

Hooks returns the client hooks.

func (*GoalClient) Intercept

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

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

func (*GoalClient) Interceptors

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

Interceptors returns the client interceptors.

func (*GoalClient) MapCreateBulk

func (c *GoalClient) MapCreateBulk(slice any, setFunc func(*GoalCreate, int)) *GoalCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*GoalClient) Query

func (c *GoalClient) Query() *GoalQuery

Query returns a query builder for Goal.

func (*GoalClient) Update

func (c *GoalClient) Update() *GoalUpdate

Update returns an update builder for Goal.

func (*GoalClient) UpdateOne

func (c *GoalClient) UpdateOne(_m *Goal) *GoalUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GoalClient) UpdateOneID

func (c *GoalClient) UpdateOneID(id string) *GoalUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GoalClient) Use

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

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

type GoalCreate

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

GoalCreate is the builder for creating a Goal entity.

func (*GoalCreate) Exec

func (_c *GoalCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GoalCreate) ExecX

func (_c *GoalCreate) ExecX(ctx context.Context)

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

func (*GoalCreate) Mutation

func (_c *GoalCreate) Mutation() *GoalMutation

Mutation returns the GoalMutation object of the builder.

func (*GoalCreate) OnConflict

func (_c *GoalCreate) OnConflict(opts ...sql.ConflictOption) *GoalUpsertOne

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

client.Goal.Create().
	SetProduct(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.GoalUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*GoalCreate) OnConflictColumns

func (_c *GoalCreate) OnConflictColumns(columns ...string) *GoalUpsertOne

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

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

func (*GoalCreate) Save

func (_c *GoalCreate) Save(ctx context.Context) (*Goal, error)

Save creates the Goal in the database.

func (*GoalCreate) SaveX

func (_c *GoalCreate) SaveX(ctx context.Context) *Goal

SaveX calls Save and panics if Save returns an error.

func (*GoalCreate) SetCreatedAt

func (_c *GoalCreate) SetCreatedAt(v time.Time) *GoalCreate

SetCreatedAt sets the "created_at" field.

func (*GoalCreate) SetData

func (_c *GoalCreate) SetData(v map[string]interface{}) *GoalCreate

SetData sets the "data" field.

func (*GoalCreate) SetDescription

func (_c *GoalCreate) SetDescription(v string) *GoalCreate

SetDescription sets the "description" field.

func (*GoalCreate) SetEndDate

func (_c *GoalCreate) SetEndDate(v string) *GoalCreate

SetEndDate sets the "end_date" field.

func (*GoalCreate) SetID

func (_c *GoalCreate) SetID(v string) *GoalCreate

SetID sets the "id" field.

func (*GoalCreate) SetName

func (_c *GoalCreate) SetName(v string) *GoalCreate

SetName sets the "name" field.

func (*GoalCreate) SetNillableCreatedAt

func (_c *GoalCreate) SetNillableCreatedAt(v *time.Time) *GoalCreate

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

func (*GoalCreate) SetNillableDescription

func (_c *GoalCreate) SetNillableDescription(v *string) *GoalCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*GoalCreate) SetNillableEndDate

func (_c *GoalCreate) SetNillableEndDate(v *string) *GoalCreate

SetNillableEndDate sets the "end_date" field if the given value is not nil.

func (*GoalCreate) SetNillableName

func (_c *GoalCreate) SetNillableName(v *string) *GoalCreate

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

func (*GoalCreate) SetNillableProgress

func (_c *GoalCreate) SetNillableProgress(v *float64) *GoalCreate

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*GoalCreate) SetNillableReferenceNum

func (_c *GoalCreate) SetNillableReferenceNum(v *string) *GoalCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*GoalCreate) SetNillableStartDate

func (_c *GoalCreate) SetNillableStartDate(v *string) *GoalCreate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*GoalCreate) SetNillableStatus

func (_c *GoalCreate) SetNillableStatus(v *string) *GoalCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*GoalCreate) SetNillableURL

func (_c *GoalCreate) SetNillableURL(v *string) *GoalCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*GoalCreate) SetNillableUpdatedAt

func (_c *GoalCreate) SetNillableUpdatedAt(v *time.Time) *GoalCreate

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

func (*GoalCreate) SetProduct

func (_c *GoalCreate) SetProduct(v string) *GoalCreate

SetProduct sets the "product" field.

func (*GoalCreate) SetProgress

func (_c *GoalCreate) SetProgress(v float64) *GoalCreate

SetProgress sets the "progress" field.

func (*GoalCreate) SetReferenceNum

func (_c *GoalCreate) SetReferenceNum(v string) *GoalCreate

SetReferenceNum sets the "reference_num" field.

func (*GoalCreate) SetStartDate

func (_c *GoalCreate) SetStartDate(v string) *GoalCreate

SetStartDate sets the "start_date" field.

func (*GoalCreate) SetStatus

func (_c *GoalCreate) SetStatus(v string) *GoalCreate

SetStatus sets the "status" field.

func (*GoalCreate) SetURL

func (_c *GoalCreate) SetURL(v string) *GoalCreate

SetURL sets the "url" field.

func (*GoalCreate) SetUpdatedAt

func (_c *GoalCreate) SetUpdatedAt(v time.Time) *GoalCreate

SetUpdatedAt sets the "updated_at" field.

type GoalCreateBulk

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

GoalCreateBulk is the builder for creating many Goal entities in bulk.

func (*GoalCreateBulk) Exec

func (_c *GoalCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GoalCreateBulk) ExecX

func (_c *GoalCreateBulk) ExecX(ctx context.Context)

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

func (*GoalCreateBulk) OnConflict

func (_c *GoalCreateBulk) OnConflict(opts ...sql.ConflictOption) *GoalUpsertBulk

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

client.Goal.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.GoalUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*GoalCreateBulk) OnConflictColumns

func (_c *GoalCreateBulk) OnConflictColumns(columns ...string) *GoalUpsertBulk

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

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

func (*GoalCreateBulk) Save

func (_c *GoalCreateBulk) Save(ctx context.Context) ([]*Goal, error)

Save creates the Goal entities in the database.

func (*GoalCreateBulk) SaveX

func (_c *GoalCreateBulk) SaveX(ctx context.Context) []*Goal

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

type GoalDelete

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

GoalDelete is the builder for deleting a Goal entity.

func (*GoalDelete) Exec

func (_d *GoalDelete) Exec(ctx context.Context) (int, error)

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

func (*GoalDelete) ExecX

func (_d *GoalDelete) ExecX(ctx context.Context) int

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

func (*GoalDelete) Where

func (_d *GoalDelete) Where(ps ...predicate.Goal) *GoalDelete

Where appends a list predicates to the GoalDelete builder.

type GoalDeleteOne

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

GoalDeleteOne is the builder for deleting a single Goal entity.

func (*GoalDeleteOne) Exec

func (_d *GoalDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GoalDeleteOne) ExecX

func (_d *GoalDeleteOne) ExecX(ctx context.Context)

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

func (*GoalDeleteOne) Where

func (_d *GoalDeleteOne) Where(ps ...predicate.Goal) *GoalDeleteOne

Where appends a list predicates to the GoalDelete builder.

type GoalGroupBy

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

GoalGroupBy is the group-by builder for Goal entities.

func (*GoalGroupBy) Aggregate

func (_g *GoalGroupBy) Aggregate(fns ...AggregateFunc) *GoalGroupBy

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

func (*GoalGroupBy) Bool

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

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

func (*GoalGroupBy) BoolX

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

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

func (*GoalGroupBy) Bools

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

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

func (*GoalGroupBy) BoolsX

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

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

func (*GoalGroupBy) Float64

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

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

func (*GoalGroupBy) Float64X

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

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

func (*GoalGroupBy) Float64s

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

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

func (*GoalGroupBy) Float64sX

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

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

func (*GoalGroupBy) Int

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

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

func (*GoalGroupBy) IntX

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

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

func (*GoalGroupBy) Ints

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

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

func (*GoalGroupBy) IntsX

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

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

func (*GoalGroupBy) Scan

func (_g *GoalGroupBy) Scan(ctx context.Context, v any) error

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

func (*GoalGroupBy) ScanX

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

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

func (*GoalGroupBy) String

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

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

func (*GoalGroupBy) StringX

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

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

func (*GoalGroupBy) Strings

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

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

func (*GoalGroupBy) StringsX

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

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

type GoalMutation

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

GoalMutation represents an operation that mutates the Goal nodes in the graph.

func (*GoalMutation) AddField

func (m *GoalMutation) 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 (*GoalMutation) AddProgress

func (m *GoalMutation) AddProgress(f float64)

AddProgress adds f to the "progress" field.

func (*GoalMutation) AddedEdges

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

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

func (*GoalMutation) AddedField

func (m *GoalMutation) 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 (*GoalMutation) AddedFields

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

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

func (*GoalMutation) AddedIDs

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

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

func (*GoalMutation) AddedProgress

func (m *GoalMutation) AddedProgress() (r float64, exists bool)

AddedProgress returns the value that was added to the "progress" field in this mutation.

func (*GoalMutation) ClearCreatedAt

func (m *GoalMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*GoalMutation) ClearData

func (m *GoalMutation) ClearData()

ClearData clears the value of the "data" field.

func (*GoalMutation) ClearDescription

func (m *GoalMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*GoalMutation) ClearEdge

func (m *GoalMutation) 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 (*GoalMutation) ClearEndDate

func (m *GoalMutation) ClearEndDate()

ClearEndDate clears the value of the "end_date" field.

func (*GoalMutation) ClearField

func (m *GoalMutation) 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 (*GoalMutation) ClearName

func (m *GoalMutation) ClearName()

ClearName clears the value of the "name" field.

func (*GoalMutation) ClearProgress

func (m *GoalMutation) ClearProgress()

ClearProgress clears the value of the "progress" field.

func (*GoalMutation) ClearReferenceNum

func (m *GoalMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*GoalMutation) ClearStartDate

func (m *GoalMutation) ClearStartDate()

ClearStartDate clears the value of the "start_date" field.

func (*GoalMutation) ClearStatus

func (m *GoalMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*GoalMutation) ClearURL

func (m *GoalMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*GoalMutation) ClearUpdatedAt

func (m *GoalMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*GoalMutation) ClearedEdges

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

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

func (*GoalMutation) ClearedFields

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

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

func (GoalMutation) Client

func (m GoalMutation) 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 (*GoalMutation) CreatedAt

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

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

func (*GoalMutation) CreatedAtCleared

func (m *GoalMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*GoalMutation) Data

func (m *GoalMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*GoalMutation) DataCleared

func (m *GoalMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*GoalMutation) Description

func (m *GoalMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*GoalMutation) DescriptionCleared

func (m *GoalMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*GoalMutation) EdgeCleared

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

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

func (*GoalMutation) EndDate

func (m *GoalMutation) EndDate() (r string, exists bool)

EndDate returns the value of the "end_date" field in the mutation.

func (*GoalMutation) EndDateCleared

func (m *GoalMutation) EndDateCleared() bool

EndDateCleared returns if the "end_date" field was cleared in this mutation.

func (*GoalMutation) Field

func (m *GoalMutation) 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 (*GoalMutation) FieldCleared

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

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

func (*GoalMutation) Fields

func (m *GoalMutation) 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 (*GoalMutation) ID

func (m *GoalMutation) ID() (id string, 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 (*GoalMutation) IDs

func (m *GoalMutation) IDs(ctx context.Context) ([]string, 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 (*GoalMutation) Name

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

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

func (*GoalMutation) NameCleared

func (m *GoalMutation) NameCleared() bool

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

func (*GoalMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldData

func (m *GoalMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldDescription

func (m *GoalMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldEndDate

func (m *GoalMutation) OldEndDate(ctx context.Context) (v string, err error)

OldEndDate returns the old "end_date" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldField

func (m *GoalMutation) 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 (*GoalMutation) OldName

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

OldName returns the old "name" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldProduct

func (m *GoalMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldProgress

func (m *GoalMutation) OldProgress(ctx context.Context) (v *float64, err error)

OldProgress returns the old "progress" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldReferenceNum

func (m *GoalMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldStartDate

func (m *GoalMutation) OldStartDate(ctx context.Context) (v string, err error)

OldStartDate returns the old "start_date" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldStatus

func (m *GoalMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldURL

func (m *GoalMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Goal entity. If the Goal 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 (*GoalMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Goal entity. If the Goal 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 (*GoalMutation) Op

func (m *GoalMutation) Op() Op

Op returns the operation name.

func (*GoalMutation) Product

func (m *GoalMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*GoalMutation) Progress

func (m *GoalMutation) Progress() (r float64, exists bool)

Progress returns the value of the "progress" field in the mutation.

func (*GoalMutation) ProgressCleared

func (m *GoalMutation) ProgressCleared() bool

ProgressCleared returns if the "progress" field was cleared in this mutation.

func (*GoalMutation) ReferenceNum

func (m *GoalMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*GoalMutation) ReferenceNumCleared

func (m *GoalMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*GoalMutation) RemovedEdges

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

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

func (*GoalMutation) RemovedIDs

func (m *GoalMutation) 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 (*GoalMutation) ResetCreatedAt

func (m *GoalMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GoalMutation) ResetData

func (m *GoalMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*GoalMutation) ResetDescription

func (m *GoalMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*GoalMutation) ResetEdge

func (m *GoalMutation) 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 (*GoalMutation) ResetEndDate

func (m *GoalMutation) ResetEndDate()

ResetEndDate resets all changes to the "end_date" field.

func (*GoalMutation) ResetField

func (m *GoalMutation) 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 (*GoalMutation) ResetName

func (m *GoalMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*GoalMutation) ResetProduct

func (m *GoalMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*GoalMutation) ResetProgress

func (m *GoalMutation) ResetProgress()

ResetProgress resets all changes to the "progress" field.

func (*GoalMutation) ResetReferenceNum

func (m *GoalMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*GoalMutation) ResetStartDate

func (m *GoalMutation) ResetStartDate()

ResetStartDate resets all changes to the "start_date" field.

func (*GoalMutation) ResetStatus

func (m *GoalMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*GoalMutation) ResetURL

func (m *GoalMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*GoalMutation) ResetUpdatedAt

func (m *GoalMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*GoalMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*GoalMutation) SetData

func (m *GoalMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*GoalMutation) SetDescription

func (m *GoalMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*GoalMutation) SetEndDate

func (m *GoalMutation) SetEndDate(s string)

SetEndDate sets the "end_date" field.

func (*GoalMutation) SetField

func (m *GoalMutation) 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 (*GoalMutation) SetID

func (m *GoalMutation) SetID(id string)

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

func (*GoalMutation) SetName

func (m *GoalMutation) SetName(s string)

SetName sets the "name" field.

func (*GoalMutation) SetOp

func (m *GoalMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GoalMutation) SetProduct

func (m *GoalMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*GoalMutation) SetProgress

func (m *GoalMutation) SetProgress(f float64)

SetProgress sets the "progress" field.

func (*GoalMutation) SetReferenceNum

func (m *GoalMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*GoalMutation) SetStartDate

func (m *GoalMutation) SetStartDate(s string)

SetStartDate sets the "start_date" field.

func (*GoalMutation) SetStatus

func (m *GoalMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*GoalMutation) SetURL

func (m *GoalMutation) SetURL(s string)

SetURL sets the "url" field.

func (*GoalMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*GoalMutation) StartDate

func (m *GoalMutation) StartDate() (r string, exists bool)

StartDate returns the value of the "start_date" field in the mutation.

func (*GoalMutation) StartDateCleared

func (m *GoalMutation) StartDateCleared() bool

StartDateCleared returns if the "start_date" field was cleared in this mutation.

func (*GoalMutation) Status

func (m *GoalMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*GoalMutation) StatusCleared

func (m *GoalMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (GoalMutation) Tx

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

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

func (*GoalMutation) Type

func (m *GoalMutation) Type() string

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

func (*GoalMutation) URL

func (m *GoalMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*GoalMutation) URLCleared

func (m *GoalMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*GoalMutation) UpdatedAt

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

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

func (*GoalMutation) UpdatedAtCleared

func (m *GoalMutation) UpdatedAtCleared() bool

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

func (*GoalMutation) Where

func (m *GoalMutation) Where(ps ...predicate.Goal)

Where appends a list predicates to the GoalMutation builder.

func (*GoalMutation) WhereP

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

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

type GoalQuery

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

GoalQuery is the builder for querying Goal entities.

func (*GoalQuery) Aggregate

func (_q *GoalQuery) Aggregate(fns ...AggregateFunc) *GoalSelect

Aggregate returns a GoalSelect configured with the given aggregations.

func (*GoalQuery) All

func (_q *GoalQuery) All(ctx context.Context) ([]*Goal, error)

All executes the query and returns a list of Goals.

func (*GoalQuery) AllX

func (_q *GoalQuery) AllX(ctx context.Context) []*Goal

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

func (*GoalQuery) Clone

func (_q *GoalQuery) Clone() *GoalQuery

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

func (*GoalQuery) Count

func (_q *GoalQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GoalQuery) CountX

func (_q *GoalQuery) CountX(ctx context.Context) int

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

func (*GoalQuery) Exist

func (_q *GoalQuery) Exist(ctx context.Context) (bool, error)

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

func (*GoalQuery) ExistX

func (_q *GoalQuery) ExistX(ctx context.Context) bool

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

func (*GoalQuery) First

func (_q *GoalQuery) First(ctx context.Context) (*Goal, error)

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

func (*GoalQuery) FirstID

func (_q *GoalQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*GoalQuery) FirstIDX

func (_q *GoalQuery) FirstIDX(ctx context.Context) string

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

func (*GoalQuery) FirstX

func (_q *GoalQuery) FirstX(ctx context.Context) *Goal

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

func (*GoalQuery) GroupBy

func (_q *GoalQuery) GroupBy(field string, fields ...string) *GoalGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Goal.Query().
	GroupBy(goal.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GoalQuery) IDs

func (_q *GoalQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*GoalQuery) IDsX

func (_q *GoalQuery) IDsX(ctx context.Context) []string

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

func (*GoalQuery) Limit

func (_q *GoalQuery) Limit(limit int) *GoalQuery

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

func (*GoalQuery) Offset

func (_q *GoalQuery) Offset(offset int) *GoalQuery

Offset to start from.

func (*GoalQuery) Only

func (_q *GoalQuery) Only(ctx context.Context) (*Goal, error)

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

func (*GoalQuery) OnlyID

func (_q *GoalQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*GoalQuery) OnlyIDX

func (_q *GoalQuery) OnlyIDX(ctx context.Context) string

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

func (*GoalQuery) OnlyX

func (_q *GoalQuery) OnlyX(ctx context.Context) *Goal

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

func (*GoalQuery) Order

func (_q *GoalQuery) Order(o ...goal.OrderOption) *GoalQuery

Order specifies how the records should be ordered.

func (*GoalQuery) Select

func (_q *GoalQuery) Select(fields ...string) *GoalSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Goal.Query().
	Select(goal.FieldProduct).
	Scan(ctx, &v)

func (*GoalQuery) Unique

func (_q *GoalQuery) Unique(unique bool) *GoalQuery

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 (*GoalQuery) Where

func (_q *GoalQuery) Where(ps ...predicate.Goal) *GoalQuery

Where adds a new predicate for the GoalQuery builder.

type GoalSelect

type GoalSelect struct {
	*GoalQuery
	// contains filtered or unexported fields
}

GoalSelect is the builder for selecting fields of Goal entities.

func (*GoalSelect) Aggregate

func (_s *GoalSelect) Aggregate(fns ...AggregateFunc) *GoalSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GoalSelect) Bool

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

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

func (*GoalSelect) BoolX

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

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

func (*GoalSelect) Bools

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

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

func (*GoalSelect) BoolsX

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

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

func (*GoalSelect) Float64

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

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

func (*GoalSelect) Float64X

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

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

func (*GoalSelect) Float64s

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

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

func (*GoalSelect) Float64sX

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

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

func (*GoalSelect) Int

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

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

func (*GoalSelect) IntX

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

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

func (*GoalSelect) Ints

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

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

func (*GoalSelect) IntsX

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

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

func (*GoalSelect) Scan

func (_s *GoalSelect) Scan(ctx context.Context, v any) error

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

func (*GoalSelect) ScanX

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

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

func (*GoalSelect) String

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

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

func (*GoalSelect) StringX

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

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

func (*GoalSelect) Strings

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

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

func (*GoalSelect) StringsX

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

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

type GoalUpdate

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

GoalUpdate is the builder for updating Goal entities.

func (*GoalUpdate) AddProgress

func (_u *GoalUpdate) AddProgress(v float64) *GoalUpdate

AddProgress adds value to the "progress" field.

func (*GoalUpdate) ClearCreatedAt

func (_u *GoalUpdate) ClearCreatedAt() *GoalUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*GoalUpdate) ClearData

func (_u *GoalUpdate) ClearData() *GoalUpdate

ClearData clears the value of the "data" field.

func (*GoalUpdate) ClearDescription

func (_u *GoalUpdate) ClearDescription() *GoalUpdate

ClearDescription clears the value of the "description" field.

func (*GoalUpdate) ClearEndDate

func (_u *GoalUpdate) ClearEndDate() *GoalUpdate

ClearEndDate clears the value of the "end_date" field.

func (*GoalUpdate) ClearName

func (_u *GoalUpdate) ClearName() *GoalUpdate

ClearName clears the value of the "name" field.

func (*GoalUpdate) ClearProgress

func (_u *GoalUpdate) ClearProgress() *GoalUpdate

ClearProgress clears the value of the "progress" field.

func (*GoalUpdate) ClearReferenceNum

func (_u *GoalUpdate) ClearReferenceNum() *GoalUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*GoalUpdate) ClearStartDate

func (_u *GoalUpdate) ClearStartDate() *GoalUpdate

ClearStartDate clears the value of the "start_date" field.

func (*GoalUpdate) ClearStatus

func (_u *GoalUpdate) ClearStatus() *GoalUpdate

ClearStatus clears the value of the "status" field.

func (*GoalUpdate) ClearURL

func (_u *GoalUpdate) ClearURL() *GoalUpdate

ClearURL clears the value of the "url" field.

func (*GoalUpdate) ClearUpdatedAt

func (_u *GoalUpdate) ClearUpdatedAt() *GoalUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*GoalUpdate) Exec

func (_u *GoalUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GoalUpdate) ExecX

func (_u *GoalUpdate) ExecX(ctx context.Context)

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

func (*GoalUpdate) Mutation

func (_u *GoalUpdate) Mutation() *GoalMutation

Mutation returns the GoalMutation object of the builder.

func (*GoalUpdate) Save

func (_u *GoalUpdate) Save(ctx context.Context) (int, error)

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

func (*GoalUpdate) SaveX

func (_u *GoalUpdate) SaveX(ctx context.Context) int

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

func (*GoalUpdate) SetCreatedAt

func (_u *GoalUpdate) SetCreatedAt(v time.Time) *GoalUpdate

SetCreatedAt sets the "created_at" field.

func (*GoalUpdate) SetData

func (_u *GoalUpdate) SetData(v map[string]interface{}) *GoalUpdate

SetData sets the "data" field.

func (*GoalUpdate) SetDescription

func (_u *GoalUpdate) SetDescription(v string) *GoalUpdate

SetDescription sets the "description" field.

func (*GoalUpdate) SetEndDate

func (_u *GoalUpdate) SetEndDate(v string) *GoalUpdate

SetEndDate sets the "end_date" field.

func (*GoalUpdate) SetName

func (_u *GoalUpdate) SetName(v string) *GoalUpdate

SetName sets the "name" field.

func (*GoalUpdate) SetNillableCreatedAt

func (_u *GoalUpdate) SetNillableCreatedAt(v *time.Time) *GoalUpdate

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

func (*GoalUpdate) SetNillableDescription

func (_u *GoalUpdate) SetNillableDescription(v *string) *GoalUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*GoalUpdate) SetNillableEndDate

func (_u *GoalUpdate) SetNillableEndDate(v *string) *GoalUpdate

SetNillableEndDate sets the "end_date" field if the given value is not nil.

func (*GoalUpdate) SetNillableName

func (_u *GoalUpdate) SetNillableName(v *string) *GoalUpdate

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

func (*GoalUpdate) SetNillableProduct

func (_u *GoalUpdate) SetNillableProduct(v *string) *GoalUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*GoalUpdate) SetNillableProgress

func (_u *GoalUpdate) SetNillableProgress(v *float64) *GoalUpdate

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*GoalUpdate) SetNillableReferenceNum

func (_u *GoalUpdate) SetNillableReferenceNum(v *string) *GoalUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*GoalUpdate) SetNillableStartDate

func (_u *GoalUpdate) SetNillableStartDate(v *string) *GoalUpdate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*GoalUpdate) SetNillableStatus

func (_u *GoalUpdate) SetNillableStatus(v *string) *GoalUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*GoalUpdate) SetNillableURL

func (_u *GoalUpdate) SetNillableURL(v *string) *GoalUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*GoalUpdate) SetNillableUpdatedAt

func (_u *GoalUpdate) SetNillableUpdatedAt(v *time.Time) *GoalUpdate

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

func (*GoalUpdate) SetProduct

func (_u *GoalUpdate) SetProduct(v string) *GoalUpdate

SetProduct sets the "product" field.

func (*GoalUpdate) SetProgress

func (_u *GoalUpdate) SetProgress(v float64) *GoalUpdate

SetProgress sets the "progress" field.

func (*GoalUpdate) SetReferenceNum

func (_u *GoalUpdate) SetReferenceNum(v string) *GoalUpdate

SetReferenceNum sets the "reference_num" field.

func (*GoalUpdate) SetStartDate

func (_u *GoalUpdate) SetStartDate(v string) *GoalUpdate

SetStartDate sets the "start_date" field.

func (*GoalUpdate) SetStatus

func (_u *GoalUpdate) SetStatus(v string) *GoalUpdate

SetStatus sets the "status" field.

func (*GoalUpdate) SetURL

func (_u *GoalUpdate) SetURL(v string) *GoalUpdate

SetURL sets the "url" field.

func (*GoalUpdate) SetUpdatedAt

func (_u *GoalUpdate) SetUpdatedAt(v time.Time) *GoalUpdate

SetUpdatedAt sets the "updated_at" field.

func (*GoalUpdate) Where

func (_u *GoalUpdate) Where(ps ...predicate.Goal) *GoalUpdate

Where appends a list predicates to the GoalUpdate builder.

type GoalUpdateOne

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

GoalUpdateOne is the builder for updating a single Goal entity.

func (*GoalUpdateOne) AddProgress

func (_u *GoalUpdateOne) AddProgress(v float64) *GoalUpdateOne

AddProgress adds value to the "progress" field.

func (*GoalUpdateOne) ClearCreatedAt

func (_u *GoalUpdateOne) ClearCreatedAt() *GoalUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*GoalUpdateOne) ClearData

func (_u *GoalUpdateOne) ClearData() *GoalUpdateOne

ClearData clears the value of the "data" field.

func (*GoalUpdateOne) ClearDescription

func (_u *GoalUpdateOne) ClearDescription() *GoalUpdateOne

ClearDescription clears the value of the "description" field.

func (*GoalUpdateOne) ClearEndDate

func (_u *GoalUpdateOne) ClearEndDate() *GoalUpdateOne

ClearEndDate clears the value of the "end_date" field.

func (*GoalUpdateOne) ClearName

func (_u *GoalUpdateOne) ClearName() *GoalUpdateOne

ClearName clears the value of the "name" field.

func (*GoalUpdateOne) ClearProgress

func (_u *GoalUpdateOne) ClearProgress() *GoalUpdateOne

ClearProgress clears the value of the "progress" field.

func (*GoalUpdateOne) ClearReferenceNum

func (_u *GoalUpdateOne) ClearReferenceNum() *GoalUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*GoalUpdateOne) ClearStartDate

func (_u *GoalUpdateOne) ClearStartDate() *GoalUpdateOne

ClearStartDate clears the value of the "start_date" field.

func (*GoalUpdateOne) ClearStatus

func (_u *GoalUpdateOne) ClearStatus() *GoalUpdateOne

ClearStatus clears the value of the "status" field.

func (*GoalUpdateOne) ClearURL

func (_u *GoalUpdateOne) ClearURL() *GoalUpdateOne

ClearURL clears the value of the "url" field.

func (*GoalUpdateOne) ClearUpdatedAt

func (_u *GoalUpdateOne) ClearUpdatedAt() *GoalUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*GoalUpdateOne) Exec

func (_u *GoalUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GoalUpdateOne) ExecX

func (_u *GoalUpdateOne) ExecX(ctx context.Context)

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

func (*GoalUpdateOne) Mutation

func (_u *GoalUpdateOne) Mutation() *GoalMutation

Mutation returns the GoalMutation object of the builder.

func (*GoalUpdateOne) Save

func (_u *GoalUpdateOne) Save(ctx context.Context) (*Goal, error)

Save executes the query and returns the updated Goal entity.

func (*GoalUpdateOne) SaveX

func (_u *GoalUpdateOne) SaveX(ctx context.Context) *Goal

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

func (*GoalUpdateOne) Select

func (_u *GoalUpdateOne) Select(field string, fields ...string) *GoalUpdateOne

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

func (*GoalUpdateOne) SetCreatedAt

func (_u *GoalUpdateOne) SetCreatedAt(v time.Time) *GoalUpdateOne

SetCreatedAt sets the "created_at" field.

func (*GoalUpdateOne) SetData

func (_u *GoalUpdateOne) SetData(v map[string]interface{}) *GoalUpdateOne

SetData sets the "data" field.

func (*GoalUpdateOne) SetDescription

func (_u *GoalUpdateOne) SetDescription(v string) *GoalUpdateOne

SetDescription sets the "description" field.

func (*GoalUpdateOne) SetEndDate

func (_u *GoalUpdateOne) SetEndDate(v string) *GoalUpdateOne

SetEndDate sets the "end_date" field.

func (*GoalUpdateOne) SetName

func (_u *GoalUpdateOne) SetName(v string) *GoalUpdateOne

SetName sets the "name" field.

func (*GoalUpdateOne) SetNillableCreatedAt

func (_u *GoalUpdateOne) SetNillableCreatedAt(v *time.Time) *GoalUpdateOne

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

func (*GoalUpdateOne) SetNillableDescription

func (_u *GoalUpdateOne) SetNillableDescription(v *string) *GoalUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableEndDate

func (_u *GoalUpdateOne) SetNillableEndDate(v *string) *GoalUpdateOne

SetNillableEndDate sets the "end_date" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableName

func (_u *GoalUpdateOne) SetNillableName(v *string) *GoalUpdateOne

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

func (*GoalUpdateOne) SetNillableProduct

func (_u *GoalUpdateOne) SetNillableProduct(v *string) *GoalUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableProgress

func (_u *GoalUpdateOne) SetNillableProgress(v *float64) *GoalUpdateOne

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableReferenceNum

func (_u *GoalUpdateOne) SetNillableReferenceNum(v *string) *GoalUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableStartDate

func (_u *GoalUpdateOne) SetNillableStartDate(v *string) *GoalUpdateOne

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableStatus

func (_u *GoalUpdateOne) SetNillableStatus(v *string) *GoalUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableURL

func (_u *GoalUpdateOne) SetNillableURL(v *string) *GoalUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*GoalUpdateOne) SetNillableUpdatedAt

func (_u *GoalUpdateOne) SetNillableUpdatedAt(v *time.Time) *GoalUpdateOne

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

func (*GoalUpdateOne) SetProduct

func (_u *GoalUpdateOne) SetProduct(v string) *GoalUpdateOne

SetProduct sets the "product" field.

func (*GoalUpdateOne) SetProgress

func (_u *GoalUpdateOne) SetProgress(v float64) *GoalUpdateOne

SetProgress sets the "progress" field.

func (*GoalUpdateOne) SetReferenceNum

func (_u *GoalUpdateOne) SetReferenceNum(v string) *GoalUpdateOne

SetReferenceNum sets the "reference_num" field.

func (*GoalUpdateOne) SetStartDate

func (_u *GoalUpdateOne) SetStartDate(v string) *GoalUpdateOne

SetStartDate sets the "start_date" field.

func (*GoalUpdateOne) SetStatus

func (_u *GoalUpdateOne) SetStatus(v string) *GoalUpdateOne

SetStatus sets the "status" field.

func (*GoalUpdateOne) SetURL

func (_u *GoalUpdateOne) SetURL(v string) *GoalUpdateOne

SetURL sets the "url" field.

func (*GoalUpdateOne) SetUpdatedAt

func (_u *GoalUpdateOne) SetUpdatedAt(v time.Time) *GoalUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*GoalUpdateOne) Where

func (_u *GoalUpdateOne) Where(ps ...predicate.Goal) *GoalUpdateOne

Where appends a list predicates to the GoalUpdate builder.

type GoalUpsert

type GoalUpsert struct {
	*sql.UpdateSet
}

GoalUpsert is the "OnConflict" setter.

func (*GoalUpsert) AddProgress

func (u *GoalUpsert) AddProgress(v float64) *GoalUpsert

AddProgress adds v to the "progress" field.

func (*GoalUpsert) ClearCreatedAt

func (u *GoalUpsert) ClearCreatedAt() *GoalUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*GoalUpsert) ClearData

func (u *GoalUpsert) ClearData() *GoalUpsert

ClearData clears the value of the "data" field.

func (*GoalUpsert) ClearDescription

func (u *GoalUpsert) ClearDescription() *GoalUpsert

ClearDescription clears the value of the "description" field.

func (*GoalUpsert) ClearEndDate

func (u *GoalUpsert) ClearEndDate() *GoalUpsert

ClearEndDate clears the value of the "end_date" field.

func (*GoalUpsert) ClearName

func (u *GoalUpsert) ClearName() *GoalUpsert

ClearName clears the value of the "name" field.

func (*GoalUpsert) ClearProgress

func (u *GoalUpsert) ClearProgress() *GoalUpsert

ClearProgress clears the value of the "progress" field.

func (*GoalUpsert) ClearReferenceNum

func (u *GoalUpsert) ClearReferenceNum() *GoalUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*GoalUpsert) ClearStartDate

func (u *GoalUpsert) ClearStartDate() *GoalUpsert

ClearStartDate clears the value of the "start_date" field.

func (*GoalUpsert) ClearStatus

func (u *GoalUpsert) ClearStatus() *GoalUpsert

ClearStatus clears the value of the "status" field.

func (*GoalUpsert) ClearURL

func (u *GoalUpsert) ClearURL() *GoalUpsert

ClearURL clears the value of the "url" field.

func (*GoalUpsert) ClearUpdatedAt

func (u *GoalUpsert) ClearUpdatedAt() *GoalUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*GoalUpsert) SetCreatedAt

func (u *GoalUpsert) SetCreatedAt(v time.Time) *GoalUpsert

SetCreatedAt sets the "created_at" field.

func (*GoalUpsert) SetData

func (u *GoalUpsert) SetData(v map[string]interface{}) *GoalUpsert

SetData sets the "data" field.

func (*GoalUpsert) SetDescription

func (u *GoalUpsert) SetDescription(v string) *GoalUpsert

SetDescription sets the "description" field.

func (*GoalUpsert) SetEndDate

func (u *GoalUpsert) SetEndDate(v string) *GoalUpsert

SetEndDate sets the "end_date" field.

func (*GoalUpsert) SetName

func (u *GoalUpsert) SetName(v string) *GoalUpsert

SetName sets the "name" field.

func (*GoalUpsert) SetProduct

func (u *GoalUpsert) SetProduct(v string) *GoalUpsert

SetProduct sets the "product" field.

func (*GoalUpsert) SetProgress

func (u *GoalUpsert) SetProgress(v float64) *GoalUpsert

SetProgress sets the "progress" field.

func (*GoalUpsert) SetReferenceNum

func (u *GoalUpsert) SetReferenceNum(v string) *GoalUpsert

SetReferenceNum sets the "reference_num" field.

func (*GoalUpsert) SetStartDate

func (u *GoalUpsert) SetStartDate(v string) *GoalUpsert

SetStartDate sets the "start_date" field.

func (*GoalUpsert) SetStatus

func (u *GoalUpsert) SetStatus(v string) *GoalUpsert

SetStatus sets the "status" field.

func (*GoalUpsert) SetURL

func (u *GoalUpsert) SetURL(v string) *GoalUpsert

SetURL sets the "url" field.

func (*GoalUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*GoalUpsert) UpdateCreatedAt

func (u *GoalUpsert) UpdateCreatedAt() *GoalUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*GoalUpsert) UpdateData

func (u *GoalUpsert) UpdateData() *GoalUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*GoalUpsert) UpdateDescription

func (u *GoalUpsert) UpdateDescription() *GoalUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*GoalUpsert) UpdateEndDate

func (u *GoalUpsert) UpdateEndDate() *GoalUpsert

UpdateEndDate sets the "end_date" field to the value that was provided on create.

func (*GoalUpsert) UpdateName

func (u *GoalUpsert) UpdateName() *GoalUpsert

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

func (*GoalUpsert) UpdateProduct

func (u *GoalUpsert) UpdateProduct() *GoalUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*GoalUpsert) UpdateProgress

func (u *GoalUpsert) UpdateProgress() *GoalUpsert

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*GoalUpsert) UpdateReferenceNum

func (u *GoalUpsert) UpdateReferenceNum() *GoalUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*GoalUpsert) UpdateStartDate

func (u *GoalUpsert) UpdateStartDate() *GoalUpsert

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*GoalUpsert) UpdateStatus

func (u *GoalUpsert) UpdateStatus() *GoalUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*GoalUpsert) UpdateURL

func (u *GoalUpsert) UpdateURL() *GoalUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*GoalUpsert) UpdateUpdatedAt

func (u *GoalUpsert) UpdateUpdatedAt() *GoalUpsert

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

type GoalUpsertBulk

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

GoalUpsertBulk is the builder for "upsert"-ing a bulk of Goal nodes.

func (*GoalUpsertBulk) AddProgress

func (u *GoalUpsertBulk) AddProgress(v float64) *GoalUpsertBulk

AddProgress adds v to the "progress" field.

func (*GoalUpsertBulk) ClearCreatedAt

func (u *GoalUpsertBulk) ClearCreatedAt() *GoalUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*GoalUpsertBulk) ClearData

func (u *GoalUpsertBulk) ClearData() *GoalUpsertBulk

ClearData clears the value of the "data" field.

func (*GoalUpsertBulk) ClearDescription

func (u *GoalUpsertBulk) ClearDescription() *GoalUpsertBulk

ClearDescription clears the value of the "description" field.

func (*GoalUpsertBulk) ClearEndDate

func (u *GoalUpsertBulk) ClearEndDate() *GoalUpsertBulk

ClearEndDate clears the value of the "end_date" field.

func (*GoalUpsertBulk) ClearName

func (u *GoalUpsertBulk) ClearName() *GoalUpsertBulk

ClearName clears the value of the "name" field.

func (*GoalUpsertBulk) ClearProgress

func (u *GoalUpsertBulk) ClearProgress() *GoalUpsertBulk

ClearProgress clears the value of the "progress" field.

func (*GoalUpsertBulk) ClearReferenceNum

func (u *GoalUpsertBulk) ClearReferenceNum() *GoalUpsertBulk

ClearReferenceNum clears the value of the "reference_num" field.

func (*GoalUpsertBulk) ClearStartDate

func (u *GoalUpsertBulk) ClearStartDate() *GoalUpsertBulk

ClearStartDate clears the value of the "start_date" field.

func (*GoalUpsertBulk) ClearStatus

func (u *GoalUpsertBulk) ClearStatus() *GoalUpsertBulk

ClearStatus clears the value of the "status" field.

func (*GoalUpsertBulk) ClearURL

func (u *GoalUpsertBulk) ClearURL() *GoalUpsertBulk

ClearURL clears the value of the "url" field.

func (*GoalUpsertBulk) ClearUpdatedAt

func (u *GoalUpsertBulk) ClearUpdatedAt() *GoalUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*GoalUpsertBulk) DoNothing

func (u *GoalUpsertBulk) DoNothing() *GoalUpsertBulk

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

func (*GoalUpsertBulk) Exec

func (u *GoalUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GoalUpsertBulk) ExecX

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

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

func (*GoalUpsertBulk) Ignore

func (u *GoalUpsertBulk) Ignore() *GoalUpsertBulk

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

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

func (*GoalUpsertBulk) SetCreatedAt

func (u *GoalUpsertBulk) SetCreatedAt(v time.Time) *GoalUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*GoalUpsertBulk) SetData

func (u *GoalUpsertBulk) SetData(v map[string]interface{}) *GoalUpsertBulk

SetData sets the "data" field.

func (*GoalUpsertBulk) SetDescription

func (u *GoalUpsertBulk) SetDescription(v string) *GoalUpsertBulk

SetDescription sets the "description" field.

func (*GoalUpsertBulk) SetEndDate

func (u *GoalUpsertBulk) SetEndDate(v string) *GoalUpsertBulk

SetEndDate sets the "end_date" field.

func (*GoalUpsertBulk) SetName

func (u *GoalUpsertBulk) SetName(v string) *GoalUpsertBulk

SetName sets the "name" field.

func (*GoalUpsertBulk) SetProduct

func (u *GoalUpsertBulk) SetProduct(v string) *GoalUpsertBulk

SetProduct sets the "product" field.

func (*GoalUpsertBulk) SetProgress

func (u *GoalUpsertBulk) SetProgress(v float64) *GoalUpsertBulk

SetProgress sets the "progress" field.

func (*GoalUpsertBulk) SetReferenceNum

func (u *GoalUpsertBulk) SetReferenceNum(v string) *GoalUpsertBulk

SetReferenceNum sets the "reference_num" field.

func (*GoalUpsertBulk) SetStartDate

func (u *GoalUpsertBulk) SetStartDate(v string) *GoalUpsertBulk

SetStartDate sets the "start_date" field.

func (*GoalUpsertBulk) SetStatus

func (u *GoalUpsertBulk) SetStatus(v string) *GoalUpsertBulk

SetStatus sets the "status" field.

func (*GoalUpsertBulk) SetURL

func (u *GoalUpsertBulk) SetURL(v string) *GoalUpsertBulk

SetURL sets the "url" field.

func (*GoalUpsertBulk) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*GoalUpsertBulk) Update

func (u *GoalUpsertBulk) Update(set func(*GoalUpsert)) *GoalUpsertBulk

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

func (*GoalUpsertBulk) UpdateCreatedAt

func (u *GoalUpsertBulk) UpdateCreatedAt() *GoalUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateData

func (u *GoalUpsertBulk) UpdateData() *GoalUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateDescription

func (u *GoalUpsertBulk) UpdateDescription() *GoalUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateEndDate

func (u *GoalUpsertBulk) UpdateEndDate() *GoalUpsertBulk

UpdateEndDate sets the "end_date" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateName

func (u *GoalUpsertBulk) UpdateName() *GoalUpsertBulk

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

func (*GoalUpsertBulk) UpdateNewValues

func (u *GoalUpsertBulk) UpdateNewValues() *GoalUpsertBulk

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

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

func (*GoalUpsertBulk) UpdateProduct

func (u *GoalUpsertBulk) UpdateProduct() *GoalUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateProgress

func (u *GoalUpsertBulk) UpdateProgress() *GoalUpsertBulk

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateReferenceNum

func (u *GoalUpsertBulk) UpdateReferenceNum() *GoalUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateStartDate

func (u *GoalUpsertBulk) UpdateStartDate() *GoalUpsertBulk

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateStatus

func (u *GoalUpsertBulk) UpdateStatus() *GoalUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateURL

func (u *GoalUpsertBulk) UpdateURL() *GoalUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*GoalUpsertBulk) UpdateUpdatedAt

func (u *GoalUpsertBulk) UpdateUpdatedAt() *GoalUpsertBulk

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

type GoalUpsertOne

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

GoalUpsertOne is the builder for "upsert"-ing

one Goal node.

func (*GoalUpsertOne) AddProgress

func (u *GoalUpsertOne) AddProgress(v float64) *GoalUpsertOne

AddProgress adds v to the "progress" field.

func (*GoalUpsertOne) ClearCreatedAt

func (u *GoalUpsertOne) ClearCreatedAt() *GoalUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*GoalUpsertOne) ClearData

func (u *GoalUpsertOne) ClearData() *GoalUpsertOne

ClearData clears the value of the "data" field.

func (*GoalUpsertOne) ClearDescription

func (u *GoalUpsertOne) ClearDescription() *GoalUpsertOne

ClearDescription clears the value of the "description" field.

func (*GoalUpsertOne) ClearEndDate

func (u *GoalUpsertOne) ClearEndDate() *GoalUpsertOne

ClearEndDate clears the value of the "end_date" field.

func (*GoalUpsertOne) ClearName

func (u *GoalUpsertOne) ClearName() *GoalUpsertOne

ClearName clears the value of the "name" field.

func (*GoalUpsertOne) ClearProgress

func (u *GoalUpsertOne) ClearProgress() *GoalUpsertOne

ClearProgress clears the value of the "progress" field.

func (*GoalUpsertOne) ClearReferenceNum

func (u *GoalUpsertOne) ClearReferenceNum() *GoalUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*GoalUpsertOne) ClearStartDate

func (u *GoalUpsertOne) ClearStartDate() *GoalUpsertOne

ClearStartDate clears the value of the "start_date" field.

func (*GoalUpsertOne) ClearStatus

func (u *GoalUpsertOne) ClearStatus() *GoalUpsertOne

ClearStatus clears the value of the "status" field.

func (*GoalUpsertOne) ClearURL

func (u *GoalUpsertOne) ClearURL() *GoalUpsertOne

ClearURL clears the value of the "url" field.

func (*GoalUpsertOne) ClearUpdatedAt

func (u *GoalUpsertOne) ClearUpdatedAt() *GoalUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*GoalUpsertOne) DoNothing

func (u *GoalUpsertOne) DoNothing() *GoalUpsertOne

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

func (*GoalUpsertOne) Exec

func (u *GoalUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*GoalUpsertOne) ExecX

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

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

func (*GoalUpsertOne) ID

func (u *GoalUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*GoalUpsertOne) IDX

func (u *GoalUpsertOne) IDX(ctx context.Context) string

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

func (*GoalUpsertOne) Ignore

func (u *GoalUpsertOne) Ignore() *GoalUpsertOne

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

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

func (*GoalUpsertOne) SetCreatedAt

func (u *GoalUpsertOne) SetCreatedAt(v time.Time) *GoalUpsertOne

SetCreatedAt sets the "created_at" field.

func (*GoalUpsertOne) SetData

func (u *GoalUpsertOne) SetData(v map[string]interface{}) *GoalUpsertOne

SetData sets the "data" field.

func (*GoalUpsertOne) SetDescription

func (u *GoalUpsertOne) SetDescription(v string) *GoalUpsertOne

SetDescription sets the "description" field.

func (*GoalUpsertOne) SetEndDate

func (u *GoalUpsertOne) SetEndDate(v string) *GoalUpsertOne

SetEndDate sets the "end_date" field.

func (*GoalUpsertOne) SetName

func (u *GoalUpsertOne) SetName(v string) *GoalUpsertOne

SetName sets the "name" field.

func (*GoalUpsertOne) SetProduct

func (u *GoalUpsertOne) SetProduct(v string) *GoalUpsertOne

SetProduct sets the "product" field.

func (*GoalUpsertOne) SetProgress

func (u *GoalUpsertOne) SetProgress(v float64) *GoalUpsertOne

SetProgress sets the "progress" field.

func (*GoalUpsertOne) SetReferenceNum

func (u *GoalUpsertOne) SetReferenceNum(v string) *GoalUpsertOne

SetReferenceNum sets the "reference_num" field.

func (*GoalUpsertOne) SetStartDate

func (u *GoalUpsertOne) SetStartDate(v string) *GoalUpsertOne

SetStartDate sets the "start_date" field.

func (*GoalUpsertOne) SetStatus

func (u *GoalUpsertOne) SetStatus(v string) *GoalUpsertOne

SetStatus sets the "status" field.

func (*GoalUpsertOne) SetURL

func (u *GoalUpsertOne) SetURL(v string) *GoalUpsertOne

SetURL sets the "url" field.

func (*GoalUpsertOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*GoalUpsertOne) Update

func (u *GoalUpsertOne) Update(set func(*GoalUpsert)) *GoalUpsertOne

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

func (*GoalUpsertOne) UpdateCreatedAt

func (u *GoalUpsertOne) UpdateCreatedAt() *GoalUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateData

func (u *GoalUpsertOne) UpdateData() *GoalUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateDescription

func (u *GoalUpsertOne) UpdateDescription() *GoalUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateEndDate

func (u *GoalUpsertOne) UpdateEndDate() *GoalUpsertOne

UpdateEndDate sets the "end_date" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateName

func (u *GoalUpsertOne) UpdateName() *GoalUpsertOne

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

func (*GoalUpsertOne) UpdateNewValues

func (u *GoalUpsertOne) UpdateNewValues() *GoalUpsertOne

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.Goal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(goal.FieldID)
		}),
	).
	Exec(ctx)

func (*GoalUpsertOne) UpdateProduct

func (u *GoalUpsertOne) UpdateProduct() *GoalUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateProgress

func (u *GoalUpsertOne) UpdateProgress() *GoalUpsertOne

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateReferenceNum

func (u *GoalUpsertOne) UpdateReferenceNum() *GoalUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateStartDate

func (u *GoalUpsertOne) UpdateStartDate() *GoalUpsertOne

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateStatus

func (u *GoalUpsertOne) UpdateStatus() *GoalUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateURL

func (u *GoalUpsertOne) UpdateURL() *GoalUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*GoalUpsertOne) UpdateUpdatedAt

func (u *GoalUpsertOne) UpdateUpdatedAt() *GoalUpsertOne

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

type Goals

type Goals []*Goal

Goals is a parsable slice of Goal.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type Idea

type Idea struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// Votes holds the value of the "votes" field.
	Votes int `json:"votes,omitempty"`
	// Tags holds the value of the "tags" field.
	Tags string `json:"tags,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Idea is the model entity for the Idea schema.

func (*Idea) String

func (_m *Idea) String() string

String implements the fmt.Stringer.

func (*Idea) Unwrap

func (_m *Idea) Unwrap() *Idea

Unwrap unwraps the Idea 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 (*Idea) Update

func (_m *Idea) Update() *IdeaUpdateOne

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

func (*Idea) Value

func (_m *Idea) Value(name string) (ent.Value, error)

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

type IdeaClient

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

IdeaClient is a client for the Idea schema.

func NewIdeaClient

func NewIdeaClient(c config) *IdeaClient

NewIdeaClient returns a client for the Idea from the given config.

func (*IdeaClient) Create

func (c *IdeaClient) Create() *IdeaCreate

Create returns a builder for creating a Idea entity.

func (*IdeaClient) CreateBulk

func (c *IdeaClient) CreateBulk(builders ...*IdeaCreate) *IdeaCreateBulk

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

func (*IdeaClient) Delete

func (c *IdeaClient) Delete() *IdeaDelete

Delete returns a delete builder for Idea.

func (*IdeaClient) DeleteOne

func (c *IdeaClient) DeleteOne(_m *Idea) *IdeaDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IdeaClient) DeleteOneID

func (c *IdeaClient) DeleteOneID(id string) *IdeaDeleteOne

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

func (*IdeaClient) Get

func (c *IdeaClient) Get(ctx context.Context, id string) (*Idea, error)

Get returns a Idea entity by its id.

func (*IdeaClient) GetX

func (c *IdeaClient) GetX(ctx context.Context, id string) *Idea

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

func (*IdeaClient) Hooks

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

Hooks returns the client hooks.

func (*IdeaClient) Intercept

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

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

func (*IdeaClient) Interceptors

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

Interceptors returns the client interceptors.

func (*IdeaClient) MapCreateBulk

func (c *IdeaClient) MapCreateBulk(slice any, setFunc func(*IdeaCreate, int)) *IdeaCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*IdeaClient) Query

func (c *IdeaClient) Query() *IdeaQuery

Query returns a query builder for Idea.

func (*IdeaClient) Update

func (c *IdeaClient) Update() *IdeaUpdate

Update returns an update builder for Idea.

func (*IdeaClient) UpdateOne

func (c *IdeaClient) UpdateOne(_m *Idea) *IdeaUpdateOne

UpdateOne returns an update builder for the given entity.

func (*IdeaClient) UpdateOneID

func (c *IdeaClient) UpdateOneID(id string) *IdeaUpdateOne

UpdateOneID returns an update builder for the given id.

func (*IdeaClient) Use

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

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

type IdeaCreate

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

IdeaCreate is the builder for creating a Idea entity.

func (*IdeaCreate) Exec

func (_c *IdeaCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaCreate) ExecX

func (_c *IdeaCreate) ExecX(ctx context.Context)

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

func (*IdeaCreate) Mutation

func (_c *IdeaCreate) Mutation() *IdeaMutation

Mutation returns the IdeaMutation object of the builder.

func (*IdeaCreate) OnConflict

func (_c *IdeaCreate) OnConflict(opts ...sql.ConflictOption) *IdeaUpsertOne

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

client.Idea.Create().
	SetProduct(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.IdeaUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*IdeaCreate) OnConflictColumns

func (_c *IdeaCreate) OnConflictColumns(columns ...string) *IdeaUpsertOne

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

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

func (*IdeaCreate) Save

func (_c *IdeaCreate) Save(ctx context.Context) (*Idea, error)

Save creates the Idea in the database.

func (*IdeaCreate) SaveX

func (_c *IdeaCreate) SaveX(ctx context.Context) *Idea

SaveX calls Save and panics if Save returns an error.

func (*IdeaCreate) SetCreatedAt

func (_c *IdeaCreate) SetCreatedAt(v time.Time) *IdeaCreate

SetCreatedAt sets the "created_at" field.

func (*IdeaCreate) SetData

func (_c *IdeaCreate) SetData(v map[string]interface{}) *IdeaCreate

SetData sets the "data" field.

func (*IdeaCreate) SetDescription

func (_c *IdeaCreate) SetDescription(v string) *IdeaCreate

SetDescription sets the "description" field.

func (*IdeaCreate) SetID

func (_c *IdeaCreate) SetID(v string) *IdeaCreate

SetID sets the "id" field.

func (*IdeaCreate) SetName

func (_c *IdeaCreate) SetName(v string) *IdeaCreate

SetName sets the "name" field.

func (*IdeaCreate) SetNillableCreatedAt

func (_c *IdeaCreate) SetNillableCreatedAt(v *time.Time) *IdeaCreate

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

func (*IdeaCreate) SetNillableDescription

func (_c *IdeaCreate) SetNillableDescription(v *string) *IdeaCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*IdeaCreate) SetNillableName

func (_c *IdeaCreate) SetNillableName(v *string) *IdeaCreate

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

func (*IdeaCreate) SetNillableReferenceNum

func (_c *IdeaCreate) SetNillableReferenceNum(v *string) *IdeaCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*IdeaCreate) SetNillableStatus

func (_c *IdeaCreate) SetNillableStatus(v *string) *IdeaCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*IdeaCreate) SetNillableTags

func (_c *IdeaCreate) SetNillableTags(v *string) *IdeaCreate

SetNillableTags sets the "tags" field if the given value is not nil.

func (*IdeaCreate) SetNillableURL

func (_c *IdeaCreate) SetNillableURL(v *string) *IdeaCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*IdeaCreate) SetNillableUpdatedAt

func (_c *IdeaCreate) SetNillableUpdatedAt(v *time.Time) *IdeaCreate

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

func (*IdeaCreate) SetNillableVotes

func (_c *IdeaCreate) SetNillableVotes(v *int) *IdeaCreate

SetNillableVotes sets the "votes" field if the given value is not nil.

func (*IdeaCreate) SetProduct

func (_c *IdeaCreate) SetProduct(v string) *IdeaCreate

SetProduct sets the "product" field.

func (*IdeaCreate) SetReferenceNum

func (_c *IdeaCreate) SetReferenceNum(v string) *IdeaCreate

SetReferenceNum sets the "reference_num" field.

func (*IdeaCreate) SetStatus

func (_c *IdeaCreate) SetStatus(v string) *IdeaCreate

SetStatus sets the "status" field.

func (*IdeaCreate) SetTags

func (_c *IdeaCreate) SetTags(v string) *IdeaCreate

SetTags sets the "tags" field.

func (*IdeaCreate) SetURL

func (_c *IdeaCreate) SetURL(v string) *IdeaCreate

SetURL sets the "url" field.

func (*IdeaCreate) SetUpdatedAt

func (_c *IdeaCreate) SetUpdatedAt(v time.Time) *IdeaCreate

SetUpdatedAt sets the "updated_at" field.

func (*IdeaCreate) SetVotes

func (_c *IdeaCreate) SetVotes(v int) *IdeaCreate

SetVotes sets the "votes" field.

type IdeaCreateBulk

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

IdeaCreateBulk is the builder for creating many Idea entities in bulk.

func (*IdeaCreateBulk) Exec

func (_c *IdeaCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaCreateBulk) ExecX

func (_c *IdeaCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaCreateBulk) OnConflict

func (_c *IdeaCreateBulk) OnConflict(opts ...sql.ConflictOption) *IdeaUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Idea.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.IdeaUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*IdeaCreateBulk) OnConflictColumns

func (_c *IdeaCreateBulk) OnConflictColumns(columns ...string) *IdeaUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Idea.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdeaCreateBulk) Save

func (_c *IdeaCreateBulk) Save(ctx context.Context) ([]*Idea, error)

Save creates the Idea entities in the database.

func (*IdeaCreateBulk) SaveX

func (_c *IdeaCreateBulk) SaveX(ctx context.Context) []*Idea

SaveX is like Save, but panics if an error occurs.

type IdeaDelete

type IdeaDelete struct {
	// contains filtered or unexported fields
}

IdeaDelete is the builder for deleting a Idea entity.

func (*IdeaDelete) Exec

func (_d *IdeaDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*IdeaDelete) ExecX

func (_d *IdeaDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*IdeaDelete) Where

func (_d *IdeaDelete) Where(ps ...predicate.Idea) *IdeaDelete

Where appends a list predicates to the IdeaDelete builder.

type IdeaDeleteOne

type IdeaDeleteOne struct {
	// contains filtered or unexported fields
}

IdeaDeleteOne is the builder for deleting a single Idea entity.

func (*IdeaDeleteOne) Exec

func (_d *IdeaDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*IdeaDeleteOne) ExecX

func (_d *IdeaDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaDeleteOne) Where

func (_d *IdeaDeleteOne) Where(ps ...predicate.Idea) *IdeaDeleteOne

Where appends a list predicates to the IdeaDelete builder.

type IdeaEndorsement

type IdeaEndorsement struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// IdeaID holds the value of the "idea_id" field.
	IdeaID string `json:"idea_id,omitempty"`
	// Weight holds the value of the "weight" field.
	Weight int `json:"weight,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// Link holds the value of the "link" field.
	Link string `json:"link,omitempty"`
	// PortalUserID holds the value of the "portal_user_id" field.
	PortalUserID string `json:"portal_user_id,omitempty"`
	// PortalUserName holds the value of the "portal_user_name" field.
	PortalUserName string `json:"portal_user_name,omitempty"`
	// PortalUserEmail holds the value of the "portal_user_email" field.
	PortalUserEmail string `json:"portal_user_email,omitempty"`
	// PortalUserCreatedAt holds the value of the "portal_user_created_at" field.
	PortalUserCreatedAt *time.Time `json:"portal_user_created_at,omitempty"`
	// IdeaUserID holds the value of the "idea_user_id" field.
	IdeaUserID string `json:"idea_user_id,omitempty"`
	// IdeaUserName holds the value of the "idea_user_name" field.
	IdeaUserName string `json:"idea_user_name,omitempty"`
	// IdeaUserEmail holds the value of the "idea_user_email" field.
	IdeaUserEmail string `json:"idea_user_email,omitempty"`
	// IdeaUserTitle holds the value of the "idea_user_title" field.
	IdeaUserTitle string `json:"idea_user_title,omitempty"`
	// IdeaUserCreatedAt holds the value of the "idea_user_created_at" field.
	IdeaUserCreatedAt *time.Time `json:"idea_user_created_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

IdeaEndorsement is the model entity for the IdeaEndorsement schema.

func (*IdeaEndorsement) GetValue

func (_m *IdeaEndorsement) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the IdeaEndorsement. This includes values selected through modifiers, order, etc.

func (*IdeaEndorsement) String

func (_m *IdeaEndorsement) String() string

String implements the fmt.Stringer.

func (*IdeaEndorsement) Unwrap

func (_m *IdeaEndorsement) Unwrap() *IdeaEndorsement

Unwrap unwraps the IdeaEndorsement 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 (*IdeaEndorsement) Update

Update returns a builder for updating this IdeaEndorsement. Note that you need to call IdeaEndorsement.Unwrap() before calling this method if this IdeaEndorsement was returned from a transaction, and the transaction was committed or rolled back.

type IdeaEndorsementClient

type IdeaEndorsementClient struct {
	// contains filtered or unexported fields
}

IdeaEndorsementClient is a client for the IdeaEndorsement schema.

func NewIdeaEndorsementClient

func NewIdeaEndorsementClient(c config) *IdeaEndorsementClient

NewIdeaEndorsementClient returns a client for the IdeaEndorsement from the given config.

func (*IdeaEndorsementClient) Create

Create returns a builder for creating a IdeaEndorsement entity.

func (*IdeaEndorsementClient) CreateBulk

CreateBulk returns a builder for creating a bulk of IdeaEndorsement entities.

func (*IdeaEndorsementClient) Delete

Delete returns a delete builder for IdeaEndorsement.

func (*IdeaEndorsementClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IdeaEndorsementClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*IdeaEndorsementClient) Get

Get returns a IdeaEndorsement entity by its id.

func (*IdeaEndorsementClient) GetX

GetX is like Get, but panics if an error occurs.

func (*IdeaEndorsementClient) Hooks

func (c *IdeaEndorsementClient) Hooks() []Hook

Hooks returns the client hooks.

func (*IdeaEndorsementClient) Intercept

func (c *IdeaEndorsementClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ideaendorsement.Intercept(f(g(h())))`.

func (*IdeaEndorsementClient) Interceptors

func (c *IdeaEndorsementClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*IdeaEndorsementClient) MapCreateBulk

func (c *IdeaEndorsementClient) MapCreateBulk(slice any, setFunc func(*IdeaEndorsementCreate, int)) *IdeaEndorsementCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*IdeaEndorsementClient) Query

Query returns a query builder for IdeaEndorsement.

func (*IdeaEndorsementClient) Update

Update returns an update builder for IdeaEndorsement.

func (*IdeaEndorsementClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IdeaEndorsementClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*IdeaEndorsementClient) Use

func (c *IdeaEndorsementClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ideaendorsement.Hooks(f(g(h())))`.

type IdeaEndorsementCreate

type IdeaEndorsementCreate struct {
	// contains filtered or unexported fields
}

IdeaEndorsementCreate is the builder for creating a IdeaEndorsement entity.

func (*IdeaEndorsementCreate) Exec

Exec executes the query.

func (*IdeaEndorsementCreate) ExecX

func (_c *IdeaEndorsementCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementCreate) Mutation

Mutation returns the IdeaEndorsementMutation object of the builder.

func (*IdeaEndorsementCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdeaEndorsement.Create().
	SetProduct(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.IdeaEndorsementUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*IdeaEndorsementCreate) OnConflictColumns

func (_c *IdeaEndorsementCreate) OnConflictColumns(columns ...string) *IdeaEndorsementUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdeaEndorsement.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdeaEndorsementCreate) Save

Save creates the IdeaEndorsement in the database.

func (*IdeaEndorsementCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*IdeaEndorsementCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaEndorsementCreate) SetID

SetID sets the "id" field.

func (*IdeaEndorsementCreate) SetIdeaID

SetIdeaID sets the "idea_id" field.

func (*IdeaEndorsementCreate) SetIdeaUserCreatedAt

func (_c *IdeaEndorsementCreate) SetIdeaUserCreatedAt(v time.Time) *IdeaEndorsementCreate

SetIdeaUserCreatedAt sets the "idea_user_created_at" field.

func (*IdeaEndorsementCreate) SetIdeaUserEmail

func (_c *IdeaEndorsementCreate) SetIdeaUserEmail(v string) *IdeaEndorsementCreate

SetIdeaUserEmail sets the "idea_user_email" field.

func (*IdeaEndorsementCreate) SetIdeaUserID

func (_c *IdeaEndorsementCreate) SetIdeaUserID(v string) *IdeaEndorsementCreate

SetIdeaUserID sets the "idea_user_id" field.

func (*IdeaEndorsementCreate) SetIdeaUserName

func (_c *IdeaEndorsementCreate) SetIdeaUserName(v string) *IdeaEndorsementCreate

SetIdeaUserName sets the "idea_user_name" field.

func (*IdeaEndorsementCreate) SetIdeaUserTitle

func (_c *IdeaEndorsementCreate) SetIdeaUserTitle(v string) *IdeaEndorsementCreate

SetIdeaUserTitle sets the "idea_user_title" field.

SetLink sets the "link" field.

func (*IdeaEndorsementCreate) SetNillableCreatedAt

func (_c *IdeaEndorsementCreate) SetNillableCreatedAt(v *time.Time) *IdeaEndorsementCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableIdeaID

func (_c *IdeaEndorsementCreate) SetNillableIdeaID(v *string) *IdeaEndorsementCreate

SetNillableIdeaID sets the "idea_id" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableIdeaUserCreatedAt

func (_c *IdeaEndorsementCreate) SetNillableIdeaUserCreatedAt(v *time.Time) *IdeaEndorsementCreate

SetNillableIdeaUserCreatedAt sets the "idea_user_created_at" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableIdeaUserEmail

func (_c *IdeaEndorsementCreate) SetNillableIdeaUserEmail(v *string) *IdeaEndorsementCreate

SetNillableIdeaUserEmail sets the "idea_user_email" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableIdeaUserID

func (_c *IdeaEndorsementCreate) SetNillableIdeaUserID(v *string) *IdeaEndorsementCreate

SetNillableIdeaUserID sets the "idea_user_id" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableIdeaUserName

func (_c *IdeaEndorsementCreate) SetNillableIdeaUserName(v *string) *IdeaEndorsementCreate

SetNillableIdeaUserName sets the "idea_user_name" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableIdeaUserTitle

func (_c *IdeaEndorsementCreate) SetNillableIdeaUserTitle(v *string) *IdeaEndorsementCreate

SetNillableIdeaUserTitle sets the "idea_user_title" field if the given value is not nil.

func (_c *IdeaEndorsementCreate) SetNillableLink(v *string) *IdeaEndorsementCreate

SetNillableLink sets the "link" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillablePortalUserCreatedAt

func (_c *IdeaEndorsementCreate) SetNillablePortalUserCreatedAt(v *time.Time) *IdeaEndorsementCreate

SetNillablePortalUserCreatedAt sets the "portal_user_created_at" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillablePortalUserEmail

func (_c *IdeaEndorsementCreate) SetNillablePortalUserEmail(v *string) *IdeaEndorsementCreate

SetNillablePortalUserEmail sets the "portal_user_email" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillablePortalUserID

func (_c *IdeaEndorsementCreate) SetNillablePortalUserID(v *string) *IdeaEndorsementCreate

SetNillablePortalUserID sets the "portal_user_id" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillablePortalUserName

func (_c *IdeaEndorsementCreate) SetNillablePortalUserName(v *string) *IdeaEndorsementCreate

SetNillablePortalUserName sets the "portal_user_name" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableProduct

func (_c *IdeaEndorsementCreate) SetNillableProduct(v *string) *IdeaEndorsementCreate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableUpdatedAt

func (_c *IdeaEndorsementCreate) SetNillableUpdatedAt(v *time.Time) *IdeaEndorsementCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableValue

func (_c *IdeaEndorsementCreate) SetNillableValue(v *string) *IdeaEndorsementCreate

SetNillableValue sets the "value" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetNillableWeight

func (_c *IdeaEndorsementCreate) SetNillableWeight(v *int) *IdeaEndorsementCreate

SetNillableWeight sets the "weight" field if the given value is not nil.

func (*IdeaEndorsementCreate) SetPortalUserCreatedAt

func (_c *IdeaEndorsementCreate) SetPortalUserCreatedAt(v time.Time) *IdeaEndorsementCreate

SetPortalUserCreatedAt sets the "portal_user_created_at" field.

func (*IdeaEndorsementCreate) SetPortalUserEmail

func (_c *IdeaEndorsementCreate) SetPortalUserEmail(v string) *IdeaEndorsementCreate

SetPortalUserEmail sets the "portal_user_email" field.

func (*IdeaEndorsementCreate) SetPortalUserID

func (_c *IdeaEndorsementCreate) SetPortalUserID(v string) *IdeaEndorsementCreate

SetPortalUserID sets the "portal_user_id" field.

func (*IdeaEndorsementCreate) SetPortalUserName

func (_c *IdeaEndorsementCreate) SetPortalUserName(v string) *IdeaEndorsementCreate

SetPortalUserName sets the "portal_user_name" field.

func (*IdeaEndorsementCreate) SetProduct

SetProduct sets the "product" field.

func (*IdeaEndorsementCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaEndorsementCreate) SetValue

SetValue sets the "value" field.

func (*IdeaEndorsementCreate) SetWeight

SetWeight sets the "weight" field.

type IdeaEndorsementCreateBulk

type IdeaEndorsementCreateBulk struct {
	// contains filtered or unexported fields
}

IdeaEndorsementCreateBulk is the builder for creating many IdeaEndorsement entities in bulk.

func (*IdeaEndorsementCreateBulk) Exec

Exec executes the query.

func (*IdeaEndorsementCreateBulk) ExecX

func (_c *IdeaEndorsementCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdeaEndorsement.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.IdeaEndorsementUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*IdeaEndorsementCreateBulk) OnConflictColumns

func (_c *IdeaEndorsementCreateBulk) OnConflictColumns(columns ...string) *IdeaEndorsementUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdeaEndorsement.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdeaEndorsementCreateBulk) Save

Save creates the IdeaEndorsement entities in the database.

func (*IdeaEndorsementCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type IdeaEndorsementDelete

type IdeaEndorsementDelete struct {
	// contains filtered or unexported fields
}

IdeaEndorsementDelete is the builder for deleting a IdeaEndorsement entity.

func (*IdeaEndorsementDelete) Exec

func (_d *IdeaEndorsementDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*IdeaEndorsementDelete) ExecX

func (_d *IdeaEndorsementDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementDelete) Where

Where appends a list predicates to the IdeaEndorsementDelete builder.

type IdeaEndorsementDeleteOne

type IdeaEndorsementDeleteOne struct {
	// contains filtered or unexported fields
}

IdeaEndorsementDeleteOne is the builder for deleting a single IdeaEndorsement entity.

func (*IdeaEndorsementDeleteOne) Exec

Exec executes the deletion query.

func (*IdeaEndorsementDeleteOne) ExecX

func (_d *IdeaEndorsementDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementDeleteOne) Where

Where appends a list predicates to the IdeaEndorsementDelete builder.

type IdeaEndorsementGroupBy

type IdeaEndorsementGroupBy struct {
	// contains filtered or unexported fields
}

IdeaEndorsementGroupBy is the group-by builder for IdeaEndorsement entities.

func (*IdeaEndorsementGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*IdeaEndorsementGroupBy) Bool

func (s *IdeaEndorsementGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) BoolX

func (s *IdeaEndorsementGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) Bools

func (s *IdeaEndorsementGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) BoolsX

func (s *IdeaEndorsementGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) Float64

func (s *IdeaEndorsementGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) Float64X

func (s *IdeaEndorsementGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) Float64s

func (s *IdeaEndorsementGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) Float64sX

func (s *IdeaEndorsementGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) Int

func (s *IdeaEndorsementGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) IntX

func (s *IdeaEndorsementGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) Ints

func (s *IdeaEndorsementGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) IntsX

func (s *IdeaEndorsementGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) Scan

func (_g *IdeaEndorsementGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaEndorsementGroupBy) ScanX

func (s *IdeaEndorsementGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) String

func (s *IdeaEndorsementGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) StringX

func (s *IdeaEndorsementGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaEndorsementGroupBy) Strings

func (s *IdeaEndorsementGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementGroupBy) StringsX

func (s *IdeaEndorsementGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaEndorsementMutation

type IdeaEndorsementMutation struct {
	// contains filtered or unexported fields
}

IdeaEndorsementMutation represents an operation that mutates the IdeaEndorsement nodes in the graph.

func (*IdeaEndorsementMutation) AddField

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) AddWeight

func (m *IdeaEndorsementMutation) AddWeight(i int)

AddWeight adds i to the "weight" field.

func (*IdeaEndorsementMutation) AddedEdges

func (m *IdeaEndorsementMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*IdeaEndorsementMutation) AddedField

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) AddedFields

func (m *IdeaEndorsementMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*IdeaEndorsementMutation) AddedIDs

func (m *IdeaEndorsementMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*IdeaEndorsementMutation) AddedWeight

func (m *IdeaEndorsementMutation) AddedWeight() (r int, exists bool)

AddedWeight returns the value that was added to the "weight" field in this mutation.

func (*IdeaEndorsementMutation) ClearCreatedAt

func (m *IdeaEndorsementMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaEndorsementMutation) ClearEdge

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) ClearField

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) ClearIdeaID

func (m *IdeaEndorsementMutation) ClearIdeaID()

ClearIdeaID clears the value of the "idea_id" field.

func (*IdeaEndorsementMutation) ClearIdeaUserCreatedAt

func (m *IdeaEndorsementMutation) ClearIdeaUserCreatedAt()

ClearIdeaUserCreatedAt clears the value of the "idea_user_created_at" field.

func (*IdeaEndorsementMutation) ClearIdeaUserEmail

func (m *IdeaEndorsementMutation) ClearIdeaUserEmail()

ClearIdeaUserEmail clears the value of the "idea_user_email" field.

func (*IdeaEndorsementMutation) ClearIdeaUserID

func (m *IdeaEndorsementMutation) ClearIdeaUserID()

ClearIdeaUserID clears the value of the "idea_user_id" field.

func (*IdeaEndorsementMutation) ClearIdeaUserName

func (m *IdeaEndorsementMutation) ClearIdeaUserName()

ClearIdeaUserName clears the value of the "idea_user_name" field.

func (*IdeaEndorsementMutation) ClearIdeaUserTitle

func (m *IdeaEndorsementMutation) ClearIdeaUserTitle()

ClearIdeaUserTitle clears the value of the "idea_user_title" field.

func (m *IdeaEndorsementMutation) ClearLink()

ClearLink clears the value of the "link" field.

func (*IdeaEndorsementMutation) ClearPortalUserCreatedAt

func (m *IdeaEndorsementMutation) ClearPortalUserCreatedAt()

ClearPortalUserCreatedAt clears the value of the "portal_user_created_at" field.

func (*IdeaEndorsementMutation) ClearPortalUserEmail

func (m *IdeaEndorsementMutation) ClearPortalUserEmail()

ClearPortalUserEmail clears the value of the "portal_user_email" field.

func (*IdeaEndorsementMutation) ClearPortalUserID

func (m *IdeaEndorsementMutation) ClearPortalUserID()

ClearPortalUserID clears the value of the "portal_user_id" field.

func (*IdeaEndorsementMutation) ClearPortalUserName

func (m *IdeaEndorsementMutation) ClearPortalUserName()

ClearPortalUserName clears the value of the "portal_user_name" field.

func (*IdeaEndorsementMutation) ClearProduct

func (m *IdeaEndorsementMutation) ClearProduct()

ClearProduct clears the value of the "product" field.

func (*IdeaEndorsementMutation) ClearUpdatedAt

func (m *IdeaEndorsementMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaEndorsementMutation) ClearValue

func (m *IdeaEndorsementMutation) ClearValue()

ClearValue clears the value of the "value" field.

func (*IdeaEndorsementMutation) ClearWeight

func (m *IdeaEndorsementMutation) ClearWeight()

ClearWeight clears the value of the "weight" field.

func (*IdeaEndorsementMutation) ClearedEdges

func (m *IdeaEndorsementMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*IdeaEndorsementMutation) ClearedFields

func (m *IdeaEndorsementMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (IdeaEndorsementMutation) Client

func (m IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) CreatedAt

func (m *IdeaEndorsementMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IdeaEndorsementMutation) CreatedAtCleared

func (m *IdeaEndorsementMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*IdeaEndorsementMutation) EdgeCleared

func (m *IdeaEndorsementMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*IdeaEndorsementMutation) Field

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) FieldCleared

func (m *IdeaEndorsementMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*IdeaEndorsementMutation) Fields

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) ID

func (m *IdeaEndorsementMutation) ID() (id string, 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 (*IdeaEndorsementMutation) IDs

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 (*IdeaEndorsementMutation) IdeaID

func (m *IdeaEndorsementMutation) IdeaID() (r string, exists bool)

IdeaID returns the value of the "idea_id" field in the mutation.

func (*IdeaEndorsementMutation) IdeaIDCleared

func (m *IdeaEndorsementMutation) IdeaIDCleared() bool

IdeaIDCleared returns if the "idea_id" field was cleared in this mutation.

func (*IdeaEndorsementMutation) IdeaUserCreatedAt

func (m *IdeaEndorsementMutation) IdeaUserCreatedAt() (r time.Time, exists bool)

IdeaUserCreatedAt returns the value of the "idea_user_created_at" field in the mutation.

func (*IdeaEndorsementMutation) IdeaUserCreatedAtCleared

func (m *IdeaEndorsementMutation) IdeaUserCreatedAtCleared() bool

IdeaUserCreatedAtCleared returns if the "idea_user_created_at" field was cleared in this mutation.

func (*IdeaEndorsementMutation) IdeaUserEmail

func (m *IdeaEndorsementMutation) IdeaUserEmail() (r string, exists bool)

IdeaUserEmail returns the value of the "idea_user_email" field in the mutation.

func (*IdeaEndorsementMutation) IdeaUserEmailCleared

func (m *IdeaEndorsementMutation) IdeaUserEmailCleared() bool

IdeaUserEmailCleared returns if the "idea_user_email" field was cleared in this mutation.

func (*IdeaEndorsementMutation) IdeaUserID

func (m *IdeaEndorsementMutation) IdeaUserID() (r string, exists bool)

IdeaUserID returns the value of the "idea_user_id" field in the mutation.

func (*IdeaEndorsementMutation) IdeaUserIDCleared

func (m *IdeaEndorsementMutation) IdeaUserIDCleared() bool

IdeaUserIDCleared returns if the "idea_user_id" field was cleared in this mutation.

func (*IdeaEndorsementMutation) IdeaUserName

func (m *IdeaEndorsementMutation) IdeaUserName() (r string, exists bool)

IdeaUserName returns the value of the "idea_user_name" field in the mutation.

func (*IdeaEndorsementMutation) IdeaUserNameCleared

func (m *IdeaEndorsementMutation) IdeaUserNameCleared() bool

IdeaUserNameCleared returns if the "idea_user_name" field was cleared in this mutation.

func (*IdeaEndorsementMutation) IdeaUserTitle

func (m *IdeaEndorsementMutation) IdeaUserTitle() (r string, exists bool)

IdeaUserTitle returns the value of the "idea_user_title" field in the mutation.

func (*IdeaEndorsementMutation) IdeaUserTitleCleared

func (m *IdeaEndorsementMutation) IdeaUserTitleCleared() bool

IdeaUserTitleCleared returns if the "idea_user_title" field was cleared in this mutation.

func (m *IdeaEndorsementMutation) Link() (r string, exists bool)

Link returns the value of the "link" field in the mutation.

func (*IdeaEndorsementMutation) LinkCleared

func (m *IdeaEndorsementMutation) LinkCleared() bool

LinkCleared returns if the "link" field was cleared in this mutation.

func (*IdeaEndorsementMutation) OldCreatedAt

func (m *IdeaEndorsementMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldField

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) OldIdeaID

func (m *IdeaEndorsementMutation) OldIdeaID(ctx context.Context) (v string, err error)

OldIdeaID returns the old "idea_id" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldIdeaUserCreatedAt

func (m *IdeaEndorsementMutation) OldIdeaUserCreatedAt(ctx context.Context) (v *time.Time, err error)

OldIdeaUserCreatedAt returns the old "idea_user_created_at" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldIdeaUserEmail

func (m *IdeaEndorsementMutation) OldIdeaUserEmail(ctx context.Context) (v string, err error)

OldIdeaUserEmail returns the old "idea_user_email" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldIdeaUserID

func (m *IdeaEndorsementMutation) OldIdeaUserID(ctx context.Context) (v string, err error)

OldIdeaUserID returns the old "idea_user_id" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldIdeaUserName

func (m *IdeaEndorsementMutation) OldIdeaUserName(ctx context.Context) (v string, err error)

OldIdeaUserName returns the old "idea_user_name" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldIdeaUserTitle

func (m *IdeaEndorsementMutation) OldIdeaUserTitle(ctx context.Context) (v string, err error)

OldIdeaUserTitle returns the old "idea_user_title" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (m *IdeaEndorsementMutation) OldLink(ctx context.Context) (v string, err error)

OldLink returns the old "link" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldPortalUserCreatedAt

func (m *IdeaEndorsementMutation) OldPortalUserCreatedAt(ctx context.Context) (v *time.Time, err error)

OldPortalUserCreatedAt returns the old "portal_user_created_at" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldPortalUserEmail

func (m *IdeaEndorsementMutation) OldPortalUserEmail(ctx context.Context) (v string, err error)

OldPortalUserEmail returns the old "portal_user_email" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldPortalUserID

func (m *IdeaEndorsementMutation) OldPortalUserID(ctx context.Context) (v string, err error)

OldPortalUserID returns the old "portal_user_id" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldPortalUserName

func (m *IdeaEndorsementMutation) OldPortalUserName(ctx context.Context) (v string, err error)

OldPortalUserName returns the old "portal_user_name" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldProduct

func (m *IdeaEndorsementMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldUpdatedAt

func (m *IdeaEndorsementMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldValue

func (m *IdeaEndorsementMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) OldWeight

func (m *IdeaEndorsementMutation) OldWeight(ctx context.Context) (v int, err error)

OldWeight returns the old "weight" field's value of the IdeaEndorsement entity. If the IdeaEndorsement 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 (*IdeaEndorsementMutation) Op

func (m *IdeaEndorsementMutation) Op() Op

Op returns the operation name.

func (*IdeaEndorsementMutation) PortalUserCreatedAt

func (m *IdeaEndorsementMutation) PortalUserCreatedAt() (r time.Time, exists bool)

PortalUserCreatedAt returns the value of the "portal_user_created_at" field in the mutation.

func (*IdeaEndorsementMutation) PortalUserCreatedAtCleared

func (m *IdeaEndorsementMutation) PortalUserCreatedAtCleared() bool

PortalUserCreatedAtCleared returns if the "portal_user_created_at" field was cleared in this mutation.

func (*IdeaEndorsementMutation) PortalUserEmail

func (m *IdeaEndorsementMutation) PortalUserEmail() (r string, exists bool)

PortalUserEmail returns the value of the "portal_user_email" field in the mutation.

func (*IdeaEndorsementMutation) PortalUserEmailCleared

func (m *IdeaEndorsementMutation) PortalUserEmailCleared() bool

PortalUserEmailCleared returns if the "portal_user_email" field was cleared in this mutation.

func (*IdeaEndorsementMutation) PortalUserID

func (m *IdeaEndorsementMutation) PortalUserID() (r string, exists bool)

PortalUserID returns the value of the "portal_user_id" field in the mutation.

func (*IdeaEndorsementMutation) PortalUserIDCleared

func (m *IdeaEndorsementMutation) PortalUserIDCleared() bool

PortalUserIDCleared returns if the "portal_user_id" field was cleared in this mutation.

func (*IdeaEndorsementMutation) PortalUserName

func (m *IdeaEndorsementMutation) PortalUserName() (r string, exists bool)

PortalUserName returns the value of the "portal_user_name" field in the mutation.

func (*IdeaEndorsementMutation) PortalUserNameCleared

func (m *IdeaEndorsementMutation) PortalUserNameCleared() bool

PortalUserNameCleared returns if the "portal_user_name" field was cleared in this mutation.

func (*IdeaEndorsementMutation) Product

func (m *IdeaEndorsementMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*IdeaEndorsementMutation) ProductCleared

func (m *IdeaEndorsementMutation) ProductCleared() bool

ProductCleared returns if the "product" field was cleared in this mutation.

func (*IdeaEndorsementMutation) RemovedEdges

func (m *IdeaEndorsementMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*IdeaEndorsementMutation) RemovedIDs

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) ResetCreatedAt

func (m *IdeaEndorsementMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IdeaEndorsementMutation) ResetEdge

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) ResetField

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) ResetIdeaID

func (m *IdeaEndorsementMutation) ResetIdeaID()

ResetIdeaID resets all changes to the "idea_id" field.

func (*IdeaEndorsementMutation) ResetIdeaUserCreatedAt

func (m *IdeaEndorsementMutation) ResetIdeaUserCreatedAt()

ResetIdeaUserCreatedAt resets all changes to the "idea_user_created_at" field.

func (*IdeaEndorsementMutation) ResetIdeaUserEmail

func (m *IdeaEndorsementMutation) ResetIdeaUserEmail()

ResetIdeaUserEmail resets all changes to the "idea_user_email" field.

func (*IdeaEndorsementMutation) ResetIdeaUserID

func (m *IdeaEndorsementMutation) ResetIdeaUserID()

ResetIdeaUserID resets all changes to the "idea_user_id" field.

func (*IdeaEndorsementMutation) ResetIdeaUserName

func (m *IdeaEndorsementMutation) ResetIdeaUserName()

ResetIdeaUserName resets all changes to the "idea_user_name" field.

func (*IdeaEndorsementMutation) ResetIdeaUserTitle

func (m *IdeaEndorsementMutation) ResetIdeaUserTitle()

ResetIdeaUserTitle resets all changes to the "idea_user_title" field.

func (m *IdeaEndorsementMutation) ResetLink()

ResetLink resets all changes to the "link" field.

func (*IdeaEndorsementMutation) ResetPortalUserCreatedAt

func (m *IdeaEndorsementMutation) ResetPortalUserCreatedAt()

ResetPortalUserCreatedAt resets all changes to the "portal_user_created_at" field.

func (*IdeaEndorsementMutation) ResetPortalUserEmail

func (m *IdeaEndorsementMutation) ResetPortalUserEmail()

ResetPortalUserEmail resets all changes to the "portal_user_email" field.

func (*IdeaEndorsementMutation) ResetPortalUserID

func (m *IdeaEndorsementMutation) ResetPortalUserID()

ResetPortalUserID resets all changes to the "portal_user_id" field.

func (*IdeaEndorsementMutation) ResetPortalUserName

func (m *IdeaEndorsementMutation) ResetPortalUserName()

ResetPortalUserName resets all changes to the "portal_user_name" field.

func (*IdeaEndorsementMutation) ResetProduct

func (m *IdeaEndorsementMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*IdeaEndorsementMutation) ResetUpdatedAt

func (m *IdeaEndorsementMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*IdeaEndorsementMutation) ResetValue

func (m *IdeaEndorsementMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*IdeaEndorsementMutation) ResetWeight

func (m *IdeaEndorsementMutation) ResetWeight()

ResetWeight resets all changes to the "weight" field.

func (*IdeaEndorsementMutation) SetCreatedAt

func (m *IdeaEndorsementMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IdeaEndorsementMutation) SetField

func (m *IdeaEndorsementMutation) 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 (*IdeaEndorsementMutation) SetID

func (m *IdeaEndorsementMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of IdeaEndorsement entities.

func (*IdeaEndorsementMutation) SetIdeaID

func (m *IdeaEndorsementMutation) SetIdeaID(s string)

SetIdeaID sets the "idea_id" field.

func (*IdeaEndorsementMutation) SetIdeaUserCreatedAt

func (m *IdeaEndorsementMutation) SetIdeaUserCreatedAt(t time.Time)

SetIdeaUserCreatedAt sets the "idea_user_created_at" field.

func (*IdeaEndorsementMutation) SetIdeaUserEmail

func (m *IdeaEndorsementMutation) SetIdeaUserEmail(s string)

SetIdeaUserEmail sets the "idea_user_email" field.

func (*IdeaEndorsementMutation) SetIdeaUserID

func (m *IdeaEndorsementMutation) SetIdeaUserID(s string)

SetIdeaUserID sets the "idea_user_id" field.

func (*IdeaEndorsementMutation) SetIdeaUserName

func (m *IdeaEndorsementMutation) SetIdeaUserName(s string)

SetIdeaUserName sets the "idea_user_name" field.

func (*IdeaEndorsementMutation) SetIdeaUserTitle

func (m *IdeaEndorsementMutation) SetIdeaUserTitle(s string)

SetIdeaUserTitle sets the "idea_user_title" field.

func (m *IdeaEndorsementMutation) SetLink(s string)

SetLink sets the "link" field.

func (*IdeaEndorsementMutation) SetOp

func (m *IdeaEndorsementMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IdeaEndorsementMutation) SetPortalUserCreatedAt

func (m *IdeaEndorsementMutation) SetPortalUserCreatedAt(t time.Time)

SetPortalUserCreatedAt sets the "portal_user_created_at" field.

func (*IdeaEndorsementMutation) SetPortalUserEmail

func (m *IdeaEndorsementMutation) SetPortalUserEmail(s string)

SetPortalUserEmail sets the "portal_user_email" field.

func (*IdeaEndorsementMutation) SetPortalUserID

func (m *IdeaEndorsementMutation) SetPortalUserID(s string)

SetPortalUserID sets the "portal_user_id" field.

func (*IdeaEndorsementMutation) SetPortalUserName

func (m *IdeaEndorsementMutation) SetPortalUserName(s string)

SetPortalUserName sets the "portal_user_name" field.

func (*IdeaEndorsementMutation) SetProduct

func (m *IdeaEndorsementMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*IdeaEndorsementMutation) SetUpdatedAt

func (m *IdeaEndorsementMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*IdeaEndorsementMutation) SetValue

func (m *IdeaEndorsementMutation) SetValue(s string)

SetValue sets the "value" field.

func (*IdeaEndorsementMutation) SetWeight

func (m *IdeaEndorsementMutation) SetWeight(i int)

SetWeight sets the "weight" field.

func (IdeaEndorsementMutation) Tx

func (m IdeaEndorsementMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*IdeaEndorsementMutation) Type

func (m *IdeaEndorsementMutation) Type() string

Type returns the node type of this mutation (IdeaEndorsement).

func (*IdeaEndorsementMutation) UpdatedAt

func (m *IdeaEndorsementMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*IdeaEndorsementMutation) UpdatedAtCleared

func (m *IdeaEndorsementMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*IdeaEndorsementMutation) Value

func (m *IdeaEndorsementMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*IdeaEndorsementMutation) ValueCleared

func (m *IdeaEndorsementMutation) ValueCleared() bool

ValueCleared returns if the "value" field was cleared in this mutation.

func (*IdeaEndorsementMutation) Weight

func (m *IdeaEndorsementMutation) Weight() (r int, exists bool)

Weight returns the value of the "weight" field in the mutation.

func (*IdeaEndorsementMutation) WeightCleared

func (m *IdeaEndorsementMutation) WeightCleared() bool

WeightCleared returns if the "weight" field was cleared in this mutation.

func (*IdeaEndorsementMutation) Where

Where appends a list predicates to the IdeaEndorsementMutation builder.

func (*IdeaEndorsementMutation) WhereP

func (m *IdeaEndorsementMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IdeaEndorsementMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IdeaEndorsementQuery

type IdeaEndorsementQuery struct {
	// contains filtered or unexported fields
}

IdeaEndorsementQuery is the builder for querying IdeaEndorsement entities.

func (*IdeaEndorsementQuery) Aggregate

Aggregate returns a IdeaEndorsementSelect configured with the given aggregations.

func (*IdeaEndorsementQuery) All

All executes the query and returns a list of IdeaEndorsements.

func (*IdeaEndorsementQuery) AllX

AllX is like All, but panics if an error occurs.

func (*IdeaEndorsementQuery) Clone

Clone returns a duplicate of the IdeaEndorsementQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*IdeaEndorsementQuery) Count

func (_q *IdeaEndorsementQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IdeaEndorsementQuery) CountX

func (_q *IdeaEndorsementQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*IdeaEndorsementQuery) Exist

func (_q *IdeaEndorsementQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*IdeaEndorsementQuery) ExistX

func (_q *IdeaEndorsementQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*IdeaEndorsementQuery) First

First returns the first IdeaEndorsement entity from the query. Returns a *NotFoundError when no IdeaEndorsement was found.

func (*IdeaEndorsementQuery) FirstID

func (_q *IdeaEndorsementQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first IdeaEndorsement ID from the query. Returns a *NotFoundError when no IdeaEndorsement ID was found.

func (*IdeaEndorsementQuery) FirstIDX

func (_q *IdeaEndorsementQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*IdeaEndorsementQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*IdeaEndorsementQuery) GroupBy

func (_q *IdeaEndorsementQuery) GroupBy(field string, fields ...string) *IdeaEndorsementGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IdeaEndorsement.Query().
	GroupBy(ideaendorsement.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IdeaEndorsementQuery) IDs

func (_q *IdeaEndorsementQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of IdeaEndorsement IDs.

func (*IdeaEndorsementQuery) IDsX

func (_q *IdeaEndorsementQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*IdeaEndorsementQuery) Limit

func (_q *IdeaEndorsementQuery) Limit(limit int) *IdeaEndorsementQuery

Limit the number of records to be returned by this query.

func (*IdeaEndorsementQuery) Offset

func (_q *IdeaEndorsementQuery) Offset(offset int) *IdeaEndorsementQuery

Offset to start from.

func (*IdeaEndorsementQuery) Only

Only returns a single IdeaEndorsement entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IdeaEndorsement entity is found. Returns a *NotFoundError when no IdeaEndorsement entities are found.

func (*IdeaEndorsementQuery) OnlyID

func (_q *IdeaEndorsementQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only IdeaEndorsement ID in the query. Returns a *NotSingularError when more than one IdeaEndorsement ID is found. Returns a *NotFoundError when no entities are found.

func (*IdeaEndorsementQuery) OnlyIDX

func (_q *IdeaEndorsementQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*IdeaEndorsementQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*IdeaEndorsementQuery) Order

Order specifies how the records should be ordered.

func (*IdeaEndorsementQuery) Select

func (_q *IdeaEndorsementQuery) Select(fields ...string) *IdeaEndorsementSelect

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 {
	Product string `json:"product,omitempty"`
}

client.IdeaEndorsement.Query().
	Select(ideaendorsement.FieldProduct).
	Scan(ctx, &v)

func (*IdeaEndorsementQuery) Unique

func (_q *IdeaEndorsementQuery) Unique(unique bool) *IdeaEndorsementQuery

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 (*IdeaEndorsementQuery) Where

Where adds a new predicate for the IdeaEndorsementQuery builder.

type IdeaEndorsementSelect

type IdeaEndorsementSelect struct {
	*IdeaEndorsementQuery
	// contains filtered or unexported fields
}

IdeaEndorsementSelect is the builder for selecting fields of IdeaEndorsement entities.

func (*IdeaEndorsementSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*IdeaEndorsementSelect) Bool

func (s *IdeaEndorsementSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) BoolX

func (s *IdeaEndorsementSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaEndorsementSelect) Bools

func (s *IdeaEndorsementSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) BoolsX

func (s *IdeaEndorsementSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaEndorsementSelect) Float64

func (s *IdeaEndorsementSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) Float64X

func (s *IdeaEndorsementSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaEndorsementSelect) Float64s

func (s *IdeaEndorsementSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) Float64sX

func (s *IdeaEndorsementSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaEndorsementSelect) Int

func (s *IdeaEndorsementSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) IntX

func (s *IdeaEndorsementSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaEndorsementSelect) Ints

func (s *IdeaEndorsementSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) IntsX

func (s *IdeaEndorsementSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaEndorsementSelect) Scan

func (_s *IdeaEndorsementSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaEndorsementSelect) ScanX

func (s *IdeaEndorsementSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaEndorsementSelect) String

func (s *IdeaEndorsementSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) StringX

func (s *IdeaEndorsementSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaEndorsementSelect) Strings

func (s *IdeaEndorsementSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaEndorsementSelect) StringsX

func (s *IdeaEndorsementSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaEndorsementUpdate

type IdeaEndorsementUpdate struct {
	// contains filtered or unexported fields
}

IdeaEndorsementUpdate is the builder for updating IdeaEndorsement entities.

func (*IdeaEndorsementUpdate) AddWeight

AddWeight adds value to the "weight" field.

func (*IdeaEndorsementUpdate) ClearCreatedAt

func (_u *IdeaEndorsementUpdate) ClearCreatedAt() *IdeaEndorsementUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaEndorsementUpdate) ClearIdeaID

func (_u *IdeaEndorsementUpdate) ClearIdeaID() *IdeaEndorsementUpdate

ClearIdeaID clears the value of the "idea_id" field.

func (*IdeaEndorsementUpdate) ClearIdeaUserCreatedAt

func (_u *IdeaEndorsementUpdate) ClearIdeaUserCreatedAt() *IdeaEndorsementUpdate

ClearIdeaUserCreatedAt clears the value of the "idea_user_created_at" field.

func (*IdeaEndorsementUpdate) ClearIdeaUserEmail

func (_u *IdeaEndorsementUpdate) ClearIdeaUserEmail() *IdeaEndorsementUpdate

ClearIdeaUserEmail clears the value of the "idea_user_email" field.

func (*IdeaEndorsementUpdate) ClearIdeaUserID

func (_u *IdeaEndorsementUpdate) ClearIdeaUserID() *IdeaEndorsementUpdate

ClearIdeaUserID clears the value of the "idea_user_id" field.

func (*IdeaEndorsementUpdate) ClearIdeaUserName

func (_u *IdeaEndorsementUpdate) ClearIdeaUserName() *IdeaEndorsementUpdate

ClearIdeaUserName clears the value of the "idea_user_name" field.

func (*IdeaEndorsementUpdate) ClearIdeaUserTitle

func (_u *IdeaEndorsementUpdate) ClearIdeaUserTitle() *IdeaEndorsementUpdate

ClearIdeaUserTitle clears the value of the "idea_user_title" field.

ClearLink clears the value of the "link" field.

func (*IdeaEndorsementUpdate) ClearPortalUserCreatedAt

func (_u *IdeaEndorsementUpdate) ClearPortalUserCreatedAt() *IdeaEndorsementUpdate

ClearPortalUserCreatedAt clears the value of the "portal_user_created_at" field.

func (*IdeaEndorsementUpdate) ClearPortalUserEmail

func (_u *IdeaEndorsementUpdate) ClearPortalUserEmail() *IdeaEndorsementUpdate

ClearPortalUserEmail clears the value of the "portal_user_email" field.

func (*IdeaEndorsementUpdate) ClearPortalUserID

func (_u *IdeaEndorsementUpdate) ClearPortalUserID() *IdeaEndorsementUpdate

ClearPortalUserID clears the value of the "portal_user_id" field.

func (*IdeaEndorsementUpdate) ClearPortalUserName

func (_u *IdeaEndorsementUpdate) ClearPortalUserName() *IdeaEndorsementUpdate

ClearPortalUserName clears the value of the "portal_user_name" field.

func (*IdeaEndorsementUpdate) ClearProduct

func (_u *IdeaEndorsementUpdate) ClearProduct() *IdeaEndorsementUpdate

ClearProduct clears the value of the "product" field.

func (*IdeaEndorsementUpdate) ClearUpdatedAt

func (_u *IdeaEndorsementUpdate) ClearUpdatedAt() *IdeaEndorsementUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaEndorsementUpdate) ClearValue

func (_u *IdeaEndorsementUpdate) ClearValue() *IdeaEndorsementUpdate

ClearValue clears the value of the "value" field.

func (*IdeaEndorsementUpdate) ClearWeight

func (_u *IdeaEndorsementUpdate) ClearWeight() *IdeaEndorsementUpdate

ClearWeight clears the value of the "weight" field.

func (*IdeaEndorsementUpdate) Exec

Exec executes the query.

func (*IdeaEndorsementUpdate) ExecX

func (_u *IdeaEndorsementUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementUpdate) Mutation

Mutation returns the IdeaEndorsementMutation object of the builder.

func (*IdeaEndorsementUpdate) Save

func (_u *IdeaEndorsementUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*IdeaEndorsementUpdate) SaveX

func (_u *IdeaEndorsementUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*IdeaEndorsementUpdate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaEndorsementUpdate) SetIdeaID

SetIdeaID sets the "idea_id" field.

func (*IdeaEndorsementUpdate) SetIdeaUserCreatedAt

func (_u *IdeaEndorsementUpdate) SetIdeaUserCreatedAt(v time.Time) *IdeaEndorsementUpdate

SetIdeaUserCreatedAt sets the "idea_user_created_at" field.

func (*IdeaEndorsementUpdate) SetIdeaUserEmail

func (_u *IdeaEndorsementUpdate) SetIdeaUserEmail(v string) *IdeaEndorsementUpdate

SetIdeaUserEmail sets the "idea_user_email" field.

func (*IdeaEndorsementUpdate) SetIdeaUserID

func (_u *IdeaEndorsementUpdate) SetIdeaUserID(v string) *IdeaEndorsementUpdate

SetIdeaUserID sets the "idea_user_id" field.

func (*IdeaEndorsementUpdate) SetIdeaUserName

func (_u *IdeaEndorsementUpdate) SetIdeaUserName(v string) *IdeaEndorsementUpdate

SetIdeaUserName sets the "idea_user_name" field.

func (*IdeaEndorsementUpdate) SetIdeaUserTitle

func (_u *IdeaEndorsementUpdate) SetIdeaUserTitle(v string) *IdeaEndorsementUpdate

SetIdeaUserTitle sets the "idea_user_title" field.

SetLink sets the "link" field.

func (*IdeaEndorsementUpdate) SetNillableCreatedAt

func (_u *IdeaEndorsementUpdate) SetNillableCreatedAt(v *time.Time) *IdeaEndorsementUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableIdeaID

func (_u *IdeaEndorsementUpdate) SetNillableIdeaID(v *string) *IdeaEndorsementUpdate

SetNillableIdeaID sets the "idea_id" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableIdeaUserCreatedAt

func (_u *IdeaEndorsementUpdate) SetNillableIdeaUserCreatedAt(v *time.Time) *IdeaEndorsementUpdate

SetNillableIdeaUserCreatedAt sets the "idea_user_created_at" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableIdeaUserEmail

func (_u *IdeaEndorsementUpdate) SetNillableIdeaUserEmail(v *string) *IdeaEndorsementUpdate

SetNillableIdeaUserEmail sets the "idea_user_email" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableIdeaUserID

func (_u *IdeaEndorsementUpdate) SetNillableIdeaUserID(v *string) *IdeaEndorsementUpdate

SetNillableIdeaUserID sets the "idea_user_id" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableIdeaUserName

func (_u *IdeaEndorsementUpdate) SetNillableIdeaUserName(v *string) *IdeaEndorsementUpdate

SetNillableIdeaUserName sets the "idea_user_name" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableIdeaUserTitle

func (_u *IdeaEndorsementUpdate) SetNillableIdeaUserTitle(v *string) *IdeaEndorsementUpdate

SetNillableIdeaUserTitle sets the "idea_user_title" field if the given value is not nil.

func (_u *IdeaEndorsementUpdate) SetNillableLink(v *string) *IdeaEndorsementUpdate

SetNillableLink sets the "link" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillablePortalUserCreatedAt

func (_u *IdeaEndorsementUpdate) SetNillablePortalUserCreatedAt(v *time.Time) *IdeaEndorsementUpdate

SetNillablePortalUserCreatedAt sets the "portal_user_created_at" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillablePortalUserEmail

func (_u *IdeaEndorsementUpdate) SetNillablePortalUserEmail(v *string) *IdeaEndorsementUpdate

SetNillablePortalUserEmail sets the "portal_user_email" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillablePortalUserID

func (_u *IdeaEndorsementUpdate) SetNillablePortalUserID(v *string) *IdeaEndorsementUpdate

SetNillablePortalUserID sets the "portal_user_id" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillablePortalUserName

func (_u *IdeaEndorsementUpdate) SetNillablePortalUserName(v *string) *IdeaEndorsementUpdate

SetNillablePortalUserName sets the "portal_user_name" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableProduct

func (_u *IdeaEndorsementUpdate) SetNillableProduct(v *string) *IdeaEndorsementUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableUpdatedAt

func (_u *IdeaEndorsementUpdate) SetNillableUpdatedAt(v *time.Time) *IdeaEndorsementUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableValue

func (_u *IdeaEndorsementUpdate) SetNillableValue(v *string) *IdeaEndorsementUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetNillableWeight

func (_u *IdeaEndorsementUpdate) SetNillableWeight(v *int) *IdeaEndorsementUpdate

SetNillableWeight sets the "weight" field if the given value is not nil.

func (*IdeaEndorsementUpdate) SetPortalUserCreatedAt

func (_u *IdeaEndorsementUpdate) SetPortalUserCreatedAt(v time.Time) *IdeaEndorsementUpdate

SetPortalUserCreatedAt sets the "portal_user_created_at" field.

func (*IdeaEndorsementUpdate) SetPortalUserEmail

func (_u *IdeaEndorsementUpdate) SetPortalUserEmail(v string) *IdeaEndorsementUpdate

SetPortalUserEmail sets the "portal_user_email" field.

func (*IdeaEndorsementUpdate) SetPortalUserID

func (_u *IdeaEndorsementUpdate) SetPortalUserID(v string) *IdeaEndorsementUpdate

SetPortalUserID sets the "portal_user_id" field.

func (*IdeaEndorsementUpdate) SetPortalUserName

func (_u *IdeaEndorsementUpdate) SetPortalUserName(v string) *IdeaEndorsementUpdate

SetPortalUserName sets the "portal_user_name" field.

func (*IdeaEndorsementUpdate) SetProduct

SetProduct sets the "product" field.

func (*IdeaEndorsementUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaEndorsementUpdate) SetValue

SetValue sets the "value" field.

func (*IdeaEndorsementUpdate) SetWeight

SetWeight sets the "weight" field.

func (*IdeaEndorsementUpdate) Where

Where appends a list predicates to the IdeaEndorsementUpdate builder.

type IdeaEndorsementUpdateOne

type IdeaEndorsementUpdateOne struct {
	// contains filtered or unexported fields
}

IdeaEndorsementUpdateOne is the builder for updating a single IdeaEndorsement entity.

func (*IdeaEndorsementUpdateOne) AddWeight

AddWeight adds value to the "weight" field.

func (*IdeaEndorsementUpdateOne) ClearCreatedAt

func (_u *IdeaEndorsementUpdateOne) ClearCreatedAt() *IdeaEndorsementUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaEndorsementUpdateOne) ClearIdeaID

ClearIdeaID clears the value of the "idea_id" field.

func (*IdeaEndorsementUpdateOne) ClearIdeaUserCreatedAt

func (_u *IdeaEndorsementUpdateOne) ClearIdeaUserCreatedAt() *IdeaEndorsementUpdateOne

ClearIdeaUserCreatedAt clears the value of the "idea_user_created_at" field.

func (*IdeaEndorsementUpdateOne) ClearIdeaUserEmail

func (_u *IdeaEndorsementUpdateOne) ClearIdeaUserEmail() *IdeaEndorsementUpdateOne

ClearIdeaUserEmail clears the value of the "idea_user_email" field.

func (*IdeaEndorsementUpdateOne) ClearIdeaUserID

func (_u *IdeaEndorsementUpdateOne) ClearIdeaUserID() *IdeaEndorsementUpdateOne

ClearIdeaUserID clears the value of the "idea_user_id" field.

func (*IdeaEndorsementUpdateOne) ClearIdeaUserName

func (_u *IdeaEndorsementUpdateOne) ClearIdeaUserName() *IdeaEndorsementUpdateOne

ClearIdeaUserName clears the value of the "idea_user_name" field.

func (*IdeaEndorsementUpdateOne) ClearIdeaUserTitle

func (_u *IdeaEndorsementUpdateOne) ClearIdeaUserTitle() *IdeaEndorsementUpdateOne

ClearIdeaUserTitle clears the value of the "idea_user_title" field.

ClearLink clears the value of the "link" field.

func (*IdeaEndorsementUpdateOne) ClearPortalUserCreatedAt

func (_u *IdeaEndorsementUpdateOne) ClearPortalUserCreatedAt() *IdeaEndorsementUpdateOne

ClearPortalUserCreatedAt clears the value of the "portal_user_created_at" field.

func (*IdeaEndorsementUpdateOne) ClearPortalUserEmail

func (_u *IdeaEndorsementUpdateOne) ClearPortalUserEmail() *IdeaEndorsementUpdateOne

ClearPortalUserEmail clears the value of the "portal_user_email" field.

func (*IdeaEndorsementUpdateOne) ClearPortalUserID

func (_u *IdeaEndorsementUpdateOne) ClearPortalUserID() *IdeaEndorsementUpdateOne

ClearPortalUserID clears the value of the "portal_user_id" field.

func (*IdeaEndorsementUpdateOne) ClearPortalUserName

func (_u *IdeaEndorsementUpdateOne) ClearPortalUserName() *IdeaEndorsementUpdateOne

ClearPortalUserName clears the value of the "portal_user_name" field.

func (*IdeaEndorsementUpdateOne) ClearProduct

ClearProduct clears the value of the "product" field.

func (*IdeaEndorsementUpdateOne) ClearUpdatedAt

func (_u *IdeaEndorsementUpdateOne) ClearUpdatedAt() *IdeaEndorsementUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaEndorsementUpdateOne) ClearValue

ClearValue clears the value of the "value" field.

func (*IdeaEndorsementUpdateOne) ClearWeight

ClearWeight clears the value of the "weight" field.

func (*IdeaEndorsementUpdateOne) Exec

Exec executes the query on the entity.

func (*IdeaEndorsementUpdateOne) ExecX

func (_u *IdeaEndorsementUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementUpdateOne) Mutation

Mutation returns the IdeaEndorsementMutation object of the builder.

func (*IdeaEndorsementUpdateOne) Save

Save executes the query and returns the updated IdeaEndorsement entity.

func (*IdeaEndorsementUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*IdeaEndorsementUpdateOne) Select

func (_u *IdeaEndorsementUpdateOne) Select(field string, fields ...string) *IdeaEndorsementUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IdeaEndorsementUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaEndorsementUpdateOne) SetIdeaID

SetIdeaID sets the "idea_id" field.

func (*IdeaEndorsementUpdateOne) SetIdeaUserCreatedAt

func (_u *IdeaEndorsementUpdateOne) SetIdeaUserCreatedAt(v time.Time) *IdeaEndorsementUpdateOne

SetIdeaUserCreatedAt sets the "idea_user_created_at" field.

func (*IdeaEndorsementUpdateOne) SetIdeaUserEmail

func (_u *IdeaEndorsementUpdateOne) SetIdeaUserEmail(v string) *IdeaEndorsementUpdateOne

SetIdeaUserEmail sets the "idea_user_email" field.

func (*IdeaEndorsementUpdateOne) SetIdeaUserID

SetIdeaUserID sets the "idea_user_id" field.

func (*IdeaEndorsementUpdateOne) SetIdeaUserName

SetIdeaUserName sets the "idea_user_name" field.

func (*IdeaEndorsementUpdateOne) SetIdeaUserTitle

func (_u *IdeaEndorsementUpdateOne) SetIdeaUserTitle(v string) *IdeaEndorsementUpdateOne

SetIdeaUserTitle sets the "idea_user_title" field.

SetLink sets the "link" field.

func (*IdeaEndorsementUpdateOne) SetNillableCreatedAt

func (_u *IdeaEndorsementUpdateOne) SetNillableCreatedAt(v *time.Time) *IdeaEndorsementUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableIdeaID

func (_u *IdeaEndorsementUpdateOne) SetNillableIdeaID(v *string) *IdeaEndorsementUpdateOne

SetNillableIdeaID sets the "idea_id" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableIdeaUserCreatedAt

func (_u *IdeaEndorsementUpdateOne) SetNillableIdeaUserCreatedAt(v *time.Time) *IdeaEndorsementUpdateOne

SetNillableIdeaUserCreatedAt sets the "idea_user_created_at" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableIdeaUserEmail

func (_u *IdeaEndorsementUpdateOne) SetNillableIdeaUserEmail(v *string) *IdeaEndorsementUpdateOne

SetNillableIdeaUserEmail sets the "idea_user_email" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableIdeaUserID

func (_u *IdeaEndorsementUpdateOne) SetNillableIdeaUserID(v *string) *IdeaEndorsementUpdateOne

SetNillableIdeaUserID sets the "idea_user_id" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableIdeaUserName

func (_u *IdeaEndorsementUpdateOne) SetNillableIdeaUserName(v *string) *IdeaEndorsementUpdateOne

SetNillableIdeaUserName sets the "idea_user_name" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableIdeaUserTitle

func (_u *IdeaEndorsementUpdateOne) SetNillableIdeaUserTitle(v *string) *IdeaEndorsementUpdateOne

SetNillableIdeaUserTitle sets the "idea_user_title" field if the given value is not nil.

func (_u *IdeaEndorsementUpdateOne) SetNillableLink(v *string) *IdeaEndorsementUpdateOne

SetNillableLink sets the "link" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillablePortalUserCreatedAt

func (_u *IdeaEndorsementUpdateOne) SetNillablePortalUserCreatedAt(v *time.Time) *IdeaEndorsementUpdateOne

SetNillablePortalUserCreatedAt sets the "portal_user_created_at" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillablePortalUserEmail

func (_u *IdeaEndorsementUpdateOne) SetNillablePortalUserEmail(v *string) *IdeaEndorsementUpdateOne

SetNillablePortalUserEmail sets the "portal_user_email" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillablePortalUserID

func (_u *IdeaEndorsementUpdateOne) SetNillablePortalUserID(v *string) *IdeaEndorsementUpdateOne

SetNillablePortalUserID sets the "portal_user_id" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillablePortalUserName

func (_u *IdeaEndorsementUpdateOne) SetNillablePortalUserName(v *string) *IdeaEndorsementUpdateOne

SetNillablePortalUserName sets the "portal_user_name" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableProduct

func (_u *IdeaEndorsementUpdateOne) SetNillableProduct(v *string) *IdeaEndorsementUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableUpdatedAt

func (_u *IdeaEndorsementUpdateOne) SetNillableUpdatedAt(v *time.Time) *IdeaEndorsementUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableValue

func (_u *IdeaEndorsementUpdateOne) SetNillableValue(v *string) *IdeaEndorsementUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetNillableWeight

func (_u *IdeaEndorsementUpdateOne) SetNillableWeight(v *int) *IdeaEndorsementUpdateOne

SetNillableWeight sets the "weight" field if the given value is not nil.

func (*IdeaEndorsementUpdateOne) SetPortalUserCreatedAt

func (_u *IdeaEndorsementUpdateOne) SetPortalUserCreatedAt(v time.Time) *IdeaEndorsementUpdateOne

SetPortalUserCreatedAt sets the "portal_user_created_at" field.

func (*IdeaEndorsementUpdateOne) SetPortalUserEmail

func (_u *IdeaEndorsementUpdateOne) SetPortalUserEmail(v string) *IdeaEndorsementUpdateOne

SetPortalUserEmail sets the "portal_user_email" field.

func (*IdeaEndorsementUpdateOne) SetPortalUserID

SetPortalUserID sets the "portal_user_id" field.

func (*IdeaEndorsementUpdateOne) SetPortalUserName

func (_u *IdeaEndorsementUpdateOne) SetPortalUserName(v string) *IdeaEndorsementUpdateOne

SetPortalUserName sets the "portal_user_name" field.

func (*IdeaEndorsementUpdateOne) SetProduct

SetProduct sets the "product" field.

func (*IdeaEndorsementUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaEndorsementUpdateOne) SetValue

SetValue sets the "value" field.

func (*IdeaEndorsementUpdateOne) SetWeight

SetWeight sets the "weight" field.

func (*IdeaEndorsementUpdateOne) Where

Where appends a list predicates to the IdeaEndorsementUpdate builder.

type IdeaEndorsementUpsert

type IdeaEndorsementUpsert struct {
	*sql.UpdateSet
}

IdeaEndorsementUpsert is the "OnConflict" setter.

func (*IdeaEndorsementUpsert) AddWeight

AddWeight adds v to the "weight" field.

func (*IdeaEndorsementUpsert) ClearCreatedAt

func (u *IdeaEndorsementUpsert) ClearCreatedAt() *IdeaEndorsementUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaEndorsementUpsert) ClearIdeaID

func (u *IdeaEndorsementUpsert) ClearIdeaID() *IdeaEndorsementUpsert

ClearIdeaID clears the value of the "idea_id" field.

func (*IdeaEndorsementUpsert) ClearIdeaUserCreatedAt

func (u *IdeaEndorsementUpsert) ClearIdeaUserCreatedAt() *IdeaEndorsementUpsert

ClearIdeaUserCreatedAt clears the value of the "idea_user_created_at" field.

func (*IdeaEndorsementUpsert) ClearIdeaUserEmail

func (u *IdeaEndorsementUpsert) ClearIdeaUserEmail() *IdeaEndorsementUpsert

ClearIdeaUserEmail clears the value of the "idea_user_email" field.

func (*IdeaEndorsementUpsert) ClearIdeaUserID

func (u *IdeaEndorsementUpsert) ClearIdeaUserID() *IdeaEndorsementUpsert

ClearIdeaUserID clears the value of the "idea_user_id" field.

func (*IdeaEndorsementUpsert) ClearIdeaUserName

func (u *IdeaEndorsementUpsert) ClearIdeaUserName() *IdeaEndorsementUpsert

ClearIdeaUserName clears the value of the "idea_user_name" field.

func (*IdeaEndorsementUpsert) ClearIdeaUserTitle

func (u *IdeaEndorsementUpsert) ClearIdeaUserTitle() *IdeaEndorsementUpsert

ClearIdeaUserTitle clears the value of the "idea_user_title" field.

ClearLink clears the value of the "link" field.

func (*IdeaEndorsementUpsert) ClearPortalUserCreatedAt

func (u *IdeaEndorsementUpsert) ClearPortalUserCreatedAt() *IdeaEndorsementUpsert

ClearPortalUserCreatedAt clears the value of the "portal_user_created_at" field.

func (*IdeaEndorsementUpsert) ClearPortalUserEmail

func (u *IdeaEndorsementUpsert) ClearPortalUserEmail() *IdeaEndorsementUpsert

ClearPortalUserEmail clears the value of the "portal_user_email" field.

func (*IdeaEndorsementUpsert) ClearPortalUserID

func (u *IdeaEndorsementUpsert) ClearPortalUserID() *IdeaEndorsementUpsert

ClearPortalUserID clears the value of the "portal_user_id" field.

func (*IdeaEndorsementUpsert) ClearPortalUserName

func (u *IdeaEndorsementUpsert) ClearPortalUserName() *IdeaEndorsementUpsert

ClearPortalUserName clears the value of the "portal_user_name" field.

func (*IdeaEndorsementUpsert) ClearProduct

func (u *IdeaEndorsementUpsert) ClearProduct() *IdeaEndorsementUpsert

ClearProduct clears the value of the "product" field.

func (*IdeaEndorsementUpsert) ClearUpdatedAt

func (u *IdeaEndorsementUpsert) ClearUpdatedAt() *IdeaEndorsementUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaEndorsementUpsert) ClearValue

ClearValue clears the value of the "value" field.

func (*IdeaEndorsementUpsert) ClearWeight

func (u *IdeaEndorsementUpsert) ClearWeight() *IdeaEndorsementUpsert

ClearWeight clears the value of the "weight" field.

func (*IdeaEndorsementUpsert) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaEndorsementUpsert) SetIdeaID

SetIdeaID sets the "idea_id" field.

func (*IdeaEndorsementUpsert) SetIdeaUserCreatedAt

func (u *IdeaEndorsementUpsert) SetIdeaUserCreatedAt(v time.Time) *IdeaEndorsementUpsert

SetIdeaUserCreatedAt sets the "idea_user_created_at" field.

func (*IdeaEndorsementUpsert) SetIdeaUserEmail

func (u *IdeaEndorsementUpsert) SetIdeaUserEmail(v string) *IdeaEndorsementUpsert

SetIdeaUserEmail sets the "idea_user_email" field.

func (*IdeaEndorsementUpsert) SetIdeaUserID

func (u *IdeaEndorsementUpsert) SetIdeaUserID(v string) *IdeaEndorsementUpsert

SetIdeaUserID sets the "idea_user_id" field.

func (*IdeaEndorsementUpsert) SetIdeaUserName

func (u *IdeaEndorsementUpsert) SetIdeaUserName(v string) *IdeaEndorsementUpsert

SetIdeaUserName sets the "idea_user_name" field.

func (*IdeaEndorsementUpsert) SetIdeaUserTitle

func (u *IdeaEndorsementUpsert) SetIdeaUserTitle(v string) *IdeaEndorsementUpsert

SetIdeaUserTitle sets the "idea_user_title" field.

SetLink sets the "link" field.

func (*IdeaEndorsementUpsert) SetPortalUserCreatedAt

func (u *IdeaEndorsementUpsert) SetPortalUserCreatedAt(v time.Time) *IdeaEndorsementUpsert

SetPortalUserCreatedAt sets the "portal_user_created_at" field.

func (*IdeaEndorsementUpsert) SetPortalUserEmail

func (u *IdeaEndorsementUpsert) SetPortalUserEmail(v string) *IdeaEndorsementUpsert

SetPortalUserEmail sets the "portal_user_email" field.

func (*IdeaEndorsementUpsert) SetPortalUserID

func (u *IdeaEndorsementUpsert) SetPortalUserID(v string) *IdeaEndorsementUpsert

SetPortalUserID sets the "portal_user_id" field.

func (*IdeaEndorsementUpsert) SetPortalUserName

func (u *IdeaEndorsementUpsert) SetPortalUserName(v string) *IdeaEndorsementUpsert

SetPortalUserName sets the "portal_user_name" field.

func (*IdeaEndorsementUpsert) SetProduct

SetProduct sets the "product" field.

func (*IdeaEndorsementUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaEndorsementUpsert) SetValue

SetValue sets the "value" field.

func (*IdeaEndorsementUpsert) SetWeight

SetWeight sets the "weight" field.

func (*IdeaEndorsementUpsert) UpdateCreatedAt

func (u *IdeaEndorsementUpsert) UpdateCreatedAt() *IdeaEndorsementUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateIdeaID

func (u *IdeaEndorsementUpsert) UpdateIdeaID() *IdeaEndorsementUpsert

UpdateIdeaID sets the "idea_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateIdeaUserCreatedAt

func (u *IdeaEndorsementUpsert) UpdateIdeaUserCreatedAt() *IdeaEndorsementUpsert

UpdateIdeaUserCreatedAt sets the "idea_user_created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateIdeaUserEmail

func (u *IdeaEndorsementUpsert) UpdateIdeaUserEmail() *IdeaEndorsementUpsert

UpdateIdeaUserEmail sets the "idea_user_email" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateIdeaUserID

func (u *IdeaEndorsementUpsert) UpdateIdeaUserID() *IdeaEndorsementUpsert

UpdateIdeaUserID sets the "idea_user_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateIdeaUserName

func (u *IdeaEndorsementUpsert) UpdateIdeaUserName() *IdeaEndorsementUpsert

UpdateIdeaUserName sets the "idea_user_name" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateIdeaUserTitle

func (u *IdeaEndorsementUpsert) UpdateIdeaUserTitle() *IdeaEndorsementUpsert

UpdateIdeaUserTitle sets the "idea_user_title" field to the value that was provided on create.

UpdateLink sets the "link" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdatePortalUserCreatedAt

func (u *IdeaEndorsementUpsert) UpdatePortalUserCreatedAt() *IdeaEndorsementUpsert

UpdatePortalUserCreatedAt sets the "portal_user_created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdatePortalUserEmail

func (u *IdeaEndorsementUpsert) UpdatePortalUserEmail() *IdeaEndorsementUpsert

UpdatePortalUserEmail sets the "portal_user_email" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdatePortalUserID

func (u *IdeaEndorsementUpsert) UpdatePortalUserID() *IdeaEndorsementUpsert

UpdatePortalUserID sets the "portal_user_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdatePortalUserName

func (u *IdeaEndorsementUpsert) UpdatePortalUserName() *IdeaEndorsementUpsert

UpdatePortalUserName sets the "portal_user_name" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateProduct

func (u *IdeaEndorsementUpsert) UpdateProduct() *IdeaEndorsementUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateUpdatedAt

func (u *IdeaEndorsementUpsert) UpdateUpdatedAt() *IdeaEndorsementUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateValue

func (u *IdeaEndorsementUpsert) UpdateValue() *IdeaEndorsementUpsert

UpdateValue sets the "value" field to the value that was provided on create.

func (*IdeaEndorsementUpsert) UpdateWeight

func (u *IdeaEndorsementUpsert) UpdateWeight() *IdeaEndorsementUpsert

UpdateWeight sets the "weight" field to the value that was provided on create.

type IdeaEndorsementUpsertBulk

type IdeaEndorsementUpsertBulk struct {
	// contains filtered or unexported fields
}

IdeaEndorsementUpsertBulk is the builder for "upsert"-ing a bulk of IdeaEndorsement nodes.

func (*IdeaEndorsementUpsertBulk) AddWeight

AddWeight adds v to the "weight" field.

func (*IdeaEndorsementUpsertBulk) ClearCreatedAt

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaEndorsementUpsertBulk) ClearIdeaID

ClearIdeaID clears the value of the "idea_id" field.

func (*IdeaEndorsementUpsertBulk) ClearIdeaUserCreatedAt

func (u *IdeaEndorsementUpsertBulk) ClearIdeaUserCreatedAt() *IdeaEndorsementUpsertBulk

ClearIdeaUserCreatedAt clears the value of the "idea_user_created_at" field.

func (*IdeaEndorsementUpsertBulk) ClearIdeaUserEmail

func (u *IdeaEndorsementUpsertBulk) ClearIdeaUserEmail() *IdeaEndorsementUpsertBulk

ClearIdeaUserEmail clears the value of the "idea_user_email" field.

func (*IdeaEndorsementUpsertBulk) ClearIdeaUserID

ClearIdeaUserID clears the value of the "idea_user_id" field.

func (*IdeaEndorsementUpsertBulk) ClearIdeaUserName

func (u *IdeaEndorsementUpsertBulk) ClearIdeaUserName() *IdeaEndorsementUpsertBulk

ClearIdeaUserName clears the value of the "idea_user_name" field.

func (*IdeaEndorsementUpsertBulk) ClearIdeaUserTitle

func (u *IdeaEndorsementUpsertBulk) ClearIdeaUserTitle() *IdeaEndorsementUpsertBulk

ClearIdeaUserTitle clears the value of the "idea_user_title" field.

ClearLink clears the value of the "link" field.

func (*IdeaEndorsementUpsertBulk) ClearPortalUserCreatedAt

func (u *IdeaEndorsementUpsertBulk) ClearPortalUserCreatedAt() *IdeaEndorsementUpsertBulk

ClearPortalUserCreatedAt clears the value of the "portal_user_created_at" field.

func (*IdeaEndorsementUpsertBulk) ClearPortalUserEmail

func (u *IdeaEndorsementUpsertBulk) ClearPortalUserEmail() *IdeaEndorsementUpsertBulk

ClearPortalUserEmail clears the value of the "portal_user_email" field.

func (*IdeaEndorsementUpsertBulk) ClearPortalUserID

func (u *IdeaEndorsementUpsertBulk) ClearPortalUserID() *IdeaEndorsementUpsertBulk

ClearPortalUserID clears the value of the "portal_user_id" field.

func (*IdeaEndorsementUpsertBulk) ClearPortalUserName

func (u *IdeaEndorsementUpsertBulk) ClearPortalUserName() *IdeaEndorsementUpsertBulk

ClearPortalUserName clears the value of the "portal_user_name" field.

func (*IdeaEndorsementUpsertBulk) ClearProduct

ClearProduct clears the value of the "product" field.

func (*IdeaEndorsementUpsertBulk) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaEndorsementUpsertBulk) ClearValue

ClearValue clears the value of the "value" field.

func (*IdeaEndorsementUpsertBulk) ClearWeight

ClearWeight clears the value of the "weight" field.

func (*IdeaEndorsementUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaEndorsementUpsertBulk) Exec

Exec executes the query.

func (*IdeaEndorsementUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdeaEndorsement.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*IdeaEndorsementUpsertBulk) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaEndorsementUpsertBulk) SetIdeaID

SetIdeaID sets the "idea_id" field.

func (*IdeaEndorsementUpsertBulk) SetIdeaUserCreatedAt

func (u *IdeaEndorsementUpsertBulk) SetIdeaUserCreatedAt(v time.Time) *IdeaEndorsementUpsertBulk

SetIdeaUserCreatedAt sets the "idea_user_created_at" field.

func (*IdeaEndorsementUpsertBulk) SetIdeaUserEmail

SetIdeaUserEmail sets the "idea_user_email" field.

func (*IdeaEndorsementUpsertBulk) SetIdeaUserID

SetIdeaUserID sets the "idea_user_id" field.

func (*IdeaEndorsementUpsertBulk) SetIdeaUserName

SetIdeaUserName sets the "idea_user_name" field.

func (*IdeaEndorsementUpsertBulk) SetIdeaUserTitle

SetIdeaUserTitle sets the "idea_user_title" field.

SetLink sets the "link" field.

func (*IdeaEndorsementUpsertBulk) SetPortalUserCreatedAt

func (u *IdeaEndorsementUpsertBulk) SetPortalUserCreatedAt(v time.Time) *IdeaEndorsementUpsertBulk

SetPortalUserCreatedAt sets the "portal_user_created_at" field.

func (*IdeaEndorsementUpsertBulk) SetPortalUserEmail

SetPortalUserEmail sets the "portal_user_email" field.

func (*IdeaEndorsementUpsertBulk) SetPortalUserID

SetPortalUserID sets the "portal_user_id" field.

func (*IdeaEndorsementUpsertBulk) SetPortalUserName

SetPortalUserName sets the "portal_user_name" field.

func (*IdeaEndorsementUpsertBulk) SetProduct

SetProduct sets the "product" field.

func (*IdeaEndorsementUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaEndorsementUpsertBulk) SetValue

SetValue sets the "value" field.

func (*IdeaEndorsementUpsertBulk) SetWeight

SetWeight sets the "weight" field.

func (*IdeaEndorsementUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the IdeaEndorsementCreateBulk.OnConflict documentation for more info.

func (*IdeaEndorsementUpsertBulk) UpdateCreatedAt

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateIdeaID

UpdateIdeaID sets the "idea_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateIdeaUserCreatedAt

func (u *IdeaEndorsementUpsertBulk) UpdateIdeaUserCreatedAt() *IdeaEndorsementUpsertBulk

UpdateIdeaUserCreatedAt sets the "idea_user_created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateIdeaUserEmail

func (u *IdeaEndorsementUpsertBulk) UpdateIdeaUserEmail() *IdeaEndorsementUpsertBulk

UpdateIdeaUserEmail sets the "idea_user_email" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateIdeaUserID

UpdateIdeaUserID sets the "idea_user_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateIdeaUserName

func (u *IdeaEndorsementUpsertBulk) UpdateIdeaUserName() *IdeaEndorsementUpsertBulk

UpdateIdeaUserName sets the "idea_user_name" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateIdeaUserTitle

func (u *IdeaEndorsementUpsertBulk) UpdateIdeaUserTitle() *IdeaEndorsementUpsertBulk

UpdateIdeaUserTitle sets the "idea_user_title" field to the value that was provided on create.

UpdateLink sets the "link" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.IdeaEndorsement.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ideaendorsement.FieldID)
		}),
	).
	Exec(ctx)

func (*IdeaEndorsementUpsertBulk) UpdatePortalUserCreatedAt

func (u *IdeaEndorsementUpsertBulk) UpdatePortalUserCreatedAt() *IdeaEndorsementUpsertBulk

UpdatePortalUserCreatedAt sets the "portal_user_created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdatePortalUserEmail

func (u *IdeaEndorsementUpsertBulk) UpdatePortalUserEmail() *IdeaEndorsementUpsertBulk

UpdatePortalUserEmail sets the "portal_user_email" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdatePortalUserID

func (u *IdeaEndorsementUpsertBulk) UpdatePortalUserID() *IdeaEndorsementUpsertBulk

UpdatePortalUserID sets the "portal_user_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdatePortalUserName

func (u *IdeaEndorsementUpsertBulk) UpdatePortalUserName() *IdeaEndorsementUpsertBulk

UpdatePortalUserName sets the "portal_user_name" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateProduct

UpdateProduct sets the "product" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateValue

UpdateValue sets the "value" field to the value that was provided on create.

func (*IdeaEndorsementUpsertBulk) UpdateWeight

UpdateWeight sets the "weight" field to the value that was provided on create.

type IdeaEndorsementUpsertOne

type IdeaEndorsementUpsertOne struct {
	// contains filtered or unexported fields
}

IdeaEndorsementUpsertOne is the builder for "upsert"-ing

one IdeaEndorsement node.

func (*IdeaEndorsementUpsertOne) AddWeight

AddWeight adds v to the "weight" field.

func (*IdeaEndorsementUpsertOne) ClearCreatedAt

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaEndorsementUpsertOne) ClearIdeaID

ClearIdeaID clears the value of the "idea_id" field.

func (*IdeaEndorsementUpsertOne) ClearIdeaUserCreatedAt

func (u *IdeaEndorsementUpsertOne) ClearIdeaUserCreatedAt() *IdeaEndorsementUpsertOne

ClearIdeaUserCreatedAt clears the value of the "idea_user_created_at" field.

func (*IdeaEndorsementUpsertOne) ClearIdeaUserEmail

func (u *IdeaEndorsementUpsertOne) ClearIdeaUserEmail() *IdeaEndorsementUpsertOne

ClearIdeaUserEmail clears the value of the "idea_user_email" field.

func (*IdeaEndorsementUpsertOne) ClearIdeaUserID

func (u *IdeaEndorsementUpsertOne) ClearIdeaUserID() *IdeaEndorsementUpsertOne

ClearIdeaUserID clears the value of the "idea_user_id" field.

func (*IdeaEndorsementUpsertOne) ClearIdeaUserName

func (u *IdeaEndorsementUpsertOne) ClearIdeaUserName() *IdeaEndorsementUpsertOne

ClearIdeaUserName clears the value of the "idea_user_name" field.

func (*IdeaEndorsementUpsertOne) ClearIdeaUserTitle

func (u *IdeaEndorsementUpsertOne) ClearIdeaUserTitle() *IdeaEndorsementUpsertOne

ClearIdeaUserTitle clears the value of the "idea_user_title" field.

ClearLink clears the value of the "link" field.

func (*IdeaEndorsementUpsertOne) ClearPortalUserCreatedAt

func (u *IdeaEndorsementUpsertOne) ClearPortalUserCreatedAt() *IdeaEndorsementUpsertOne

ClearPortalUserCreatedAt clears the value of the "portal_user_created_at" field.

func (*IdeaEndorsementUpsertOne) ClearPortalUserEmail

func (u *IdeaEndorsementUpsertOne) ClearPortalUserEmail() *IdeaEndorsementUpsertOne

ClearPortalUserEmail clears the value of the "portal_user_email" field.

func (*IdeaEndorsementUpsertOne) ClearPortalUserID

func (u *IdeaEndorsementUpsertOne) ClearPortalUserID() *IdeaEndorsementUpsertOne

ClearPortalUserID clears the value of the "portal_user_id" field.

func (*IdeaEndorsementUpsertOne) ClearPortalUserName

func (u *IdeaEndorsementUpsertOne) ClearPortalUserName() *IdeaEndorsementUpsertOne

ClearPortalUserName clears the value of the "portal_user_name" field.

func (*IdeaEndorsementUpsertOne) ClearProduct

ClearProduct clears the value of the "product" field.

func (*IdeaEndorsementUpsertOne) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaEndorsementUpsertOne) ClearValue

ClearValue clears the value of the "value" field.

func (*IdeaEndorsementUpsertOne) ClearWeight

ClearWeight clears the value of the "weight" field.

func (*IdeaEndorsementUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaEndorsementUpsertOne) Exec

Exec executes the query.

func (*IdeaEndorsementUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*IdeaEndorsementUpsertOne) ID

func (u *IdeaEndorsementUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*IdeaEndorsementUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*IdeaEndorsementUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdeaEndorsement.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*IdeaEndorsementUpsertOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaEndorsementUpsertOne) SetIdeaID

SetIdeaID sets the "idea_id" field.

func (*IdeaEndorsementUpsertOne) SetIdeaUserCreatedAt

func (u *IdeaEndorsementUpsertOne) SetIdeaUserCreatedAt(v time.Time) *IdeaEndorsementUpsertOne

SetIdeaUserCreatedAt sets the "idea_user_created_at" field.

func (*IdeaEndorsementUpsertOne) SetIdeaUserEmail

SetIdeaUserEmail sets the "idea_user_email" field.

func (*IdeaEndorsementUpsertOne) SetIdeaUserID

SetIdeaUserID sets the "idea_user_id" field.

func (*IdeaEndorsementUpsertOne) SetIdeaUserName

SetIdeaUserName sets the "idea_user_name" field.

func (*IdeaEndorsementUpsertOne) SetIdeaUserTitle

SetIdeaUserTitle sets the "idea_user_title" field.

SetLink sets the "link" field.

func (*IdeaEndorsementUpsertOne) SetPortalUserCreatedAt

func (u *IdeaEndorsementUpsertOne) SetPortalUserCreatedAt(v time.Time) *IdeaEndorsementUpsertOne

SetPortalUserCreatedAt sets the "portal_user_created_at" field.

func (*IdeaEndorsementUpsertOne) SetPortalUserEmail

func (u *IdeaEndorsementUpsertOne) SetPortalUserEmail(v string) *IdeaEndorsementUpsertOne

SetPortalUserEmail sets the "portal_user_email" field.

func (*IdeaEndorsementUpsertOne) SetPortalUserID

SetPortalUserID sets the "portal_user_id" field.

func (*IdeaEndorsementUpsertOne) SetPortalUserName

func (u *IdeaEndorsementUpsertOne) SetPortalUserName(v string) *IdeaEndorsementUpsertOne

SetPortalUserName sets the "portal_user_name" field.

func (*IdeaEndorsementUpsertOne) SetProduct

SetProduct sets the "product" field.

func (*IdeaEndorsementUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaEndorsementUpsertOne) SetValue

SetValue sets the "value" field.

func (*IdeaEndorsementUpsertOne) SetWeight

SetWeight sets the "weight" field.

func (*IdeaEndorsementUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the IdeaEndorsementCreate.OnConflict documentation for more info.

func (*IdeaEndorsementUpsertOne) UpdateCreatedAt

func (u *IdeaEndorsementUpsertOne) UpdateCreatedAt() *IdeaEndorsementUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateIdeaID

UpdateIdeaID sets the "idea_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateIdeaUserCreatedAt

func (u *IdeaEndorsementUpsertOne) UpdateIdeaUserCreatedAt() *IdeaEndorsementUpsertOne

UpdateIdeaUserCreatedAt sets the "idea_user_created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateIdeaUserEmail

func (u *IdeaEndorsementUpsertOne) UpdateIdeaUserEmail() *IdeaEndorsementUpsertOne

UpdateIdeaUserEmail sets the "idea_user_email" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateIdeaUserID

func (u *IdeaEndorsementUpsertOne) UpdateIdeaUserID() *IdeaEndorsementUpsertOne

UpdateIdeaUserID sets the "idea_user_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateIdeaUserName

func (u *IdeaEndorsementUpsertOne) UpdateIdeaUserName() *IdeaEndorsementUpsertOne

UpdateIdeaUserName sets the "idea_user_name" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateIdeaUserTitle

func (u *IdeaEndorsementUpsertOne) UpdateIdeaUserTitle() *IdeaEndorsementUpsertOne

UpdateIdeaUserTitle sets the "idea_user_title" field to the value that was provided on create.

UpdateLink sets the "link" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateNewValues

func (u *IdeaEndorsementUpsertOne) UpdateNewValues() *IdeaEndorsementUpsertOne

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.IdeaEndorsement.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ideaendorsement.FieldID)
		}),
	).
	Exec(ctx)

func (*IdeaEndorsementUpsertOne) UpdatePortalUserCreatedAt

func (u *IdeaEndorsementUpsertOne) UpdatePortalUserCreatedAt() *IdeaEndorsementUpsertOne

UpdatePortalUserCreatedAt sets the "portal_user_created_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdatePortalUserEmail

func (u *IdeaEndorsementUpsertOne) UpdatePortalUserEmail() *IdeaEndorsementUpsertOne

UpdatePortalUserEmail sets the "portal_user_email" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdatePortalUserID

func (u *IdeaEndorsementUpsertOne) UpdatePortalUserID() *IdeaEndorsementUpsertOne

UpdatePortalUserID sets the "portal_user_id" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdatePortalUserName

func (u *IdeaEndorsementUpsertOne) UpdatePortalUserName() *IdeaEndorsementUpsertOne

UpdatePortalUserName sets the "portal_user_name" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateProduct

UpdateProduct sets the "product" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateUpdatedAt

func (u *IdeaEndorsementUpsertOne) UpdateUpdatedAt() *IdeaEndorsementUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateValue

UpdateValue sets the "value" field to the value that was provided on create.

func (*IdeaEndorsementUpsertOne) UpdateWeight

UpdateWeight sets the "weight" field to the value that was provided on create.

type IdeaEndorsements

type IdeaEndorsements []*IdeaEndorsement

IdeaEndorsements is a parsable slice of IdeaEndorsement.

type IdeaGroupBy

type IdeaGroupBy struct {
	// contains filtered or unexported fields
}

IdeaGroupBy is the group-by builder for Idea entities.

func (*IdeaGroupBy) Aggregate

func (_g *IdeaGroupBy) Aggregate(fns ...AggregateFunc) *IdeaGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*IdeaGroupBy) Bool

func (s *IdeaGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) BoolX

func (s *IdeaGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaGroupBy) Bools

func (s *IdeaGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) BoolsX

func (s *IdeaGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaGroupBy) Float64

func (s *IdeaGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) Float64X

func (s *IdeaGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaGroupBy) Float64s

func (s *IdeaGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) Float64sX

func (s *IdeaGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaGroupBy) Int

func (s *IdeaGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) IntX

func (s *IdeaGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaGroupBy) Ints

func (s *IdeaGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) IntsX

func (s *IdeaGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaGroupBy) Scan

func (_g *IdeaGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaGroupBy) ScanX

func (s *IdeaGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaGroupBy) String

func (s *IdeaGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) StringX

func (s *IdeaGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaGroupBy) Strings

func (s *IdeaGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaGroupBy) StringsX

func (s *IdeaGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaMutation

type IdeaMutation struct {
	// contains filtered or unexported fields
}

IdeaMutation represents an operation that mutates the Idea nodes in the graph.

func (*IdeaMutation) AddField

func (m *IdeaMutation) 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 (*IdeaMutation) AddVotes

func (m *IdeaMutation) AddVotes(i int)

AddVotes adds i to the "votes" field.

func (*IdeaMutation) AddedEdges

func (m *IdeaMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*IdeaMutation) AddedField

func (m *IdeaMutation) 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 (*IdeaMutation) AddedFields

func (m *IdeaMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*IdeaMutation) AddedIDs

func (m *IdeaMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*IdeaMutation) AddedVotes

func (m *IdeaMutation) AddedVotes() (r int, exists bool)

AddedVotes returns the value that was added to the "votes" field in this mutation.

func (*IdeaMutation) ClearCreatedAt

func (m *IdeaMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaMutation) ClearData

func (m *IdeaMutation) ClearData()

ClearData clears the value of the "data" field.

func (*IdeaMutation) ClearDescription

func (m *IdeaMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*IdeaMutation) ClearEdge

func (m *IdeaMutation) 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 (*IdeaMutation) ClearField

func (m *IdeaMutation) 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 (*IdeaMutation) ClearName

func (m *IdeaMutation) ClearName()

ClearName clears the value of the "name" field.

func (*IdeaMutation) ClearReferenceNum

func (m *IdeaMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaMutation) ClearStatus

func (m *IdeaMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*IdeaMutation) ClearTags

func (m *IdeaMutation) ClearTags()

ClearTags clears the value of the "tags" field.

func (*IdeaMutation) ClearURL

func (m *IdeaMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*IdeaMutation) ClearUpdatedAt

func (m *IdeaMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaMutation) ClearVotes

func (m *IdeaMutation) ClearVotes()

ClearVotes clears the value of the "votes" field.

func (*IdeaMutation) ClearedEdges

func (m *IdeaMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*IdeaMutation) ClearedFields

func (m *IdeaMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (IdeaMutation) Client

func (m IdeaMutation) 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 (*IdeaMutation) CreatedAt

func (m *IdeaMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IdeaMutation) CreatedAtCleared

func (m *IdeaMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*IdeaMutation) Data

func (m *IdeaMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*IdeaMutation) DataCleared

func (m *IdeaMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*IdeaMutation) Description

func (m *IdeaMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*IdeaMutation) DescriptionCleared

func (m *IdeaMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*IdeaMutation) EdgeCleared

func (m *IdeaMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*IdeaMutation) Field

func (m *IdeaMutation) 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 (*IdeaMutation) FieldCleared

func (m *IdeaMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*IdeaMutation) Fields

func (m *IdeaMutation) 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 (*IdeaMutation) ID

func (m *IdeaMutation) ID() (id string, 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 (*IdeaMutation) IDs

func (m *IdeaMutation) IDs(ctx context.Context) ([]string, 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 (*IdeaMutation) Name

func (m *IdeaMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*IdeaMutation) NameCleared

func (m *IdeaMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*IdeaMutation) OldCreatedAt

func (m *IdeaMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldData

func (m *IdeaMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldDescription

func (m *IdeaMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldField

func (m *IdeaMutation) 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 (*IdeaMutation) OldName

func (m *IdeaMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldProduct

func (m *IdeaMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldReferenceNum

func (m *IdeaMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldStatus

func (m *IdeaMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldTags

func (m *IdeaMutation) OldTags(ctx context.Context) (v string, err error)

OldTags returns the old "tags" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldURL

func (m *IdeaMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldUpdatedAt

func (m *IdeaMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) OldVotes

func (m *IdeaMutation) OldVotes(ctx context.Context) (v int, err error)

OldVotes returns the old "votes" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) Op

func (m *IdeaMutation) Op() Op

Op returns the operation name.

func (*IdeaMutation) Product

func (m *IdeaMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*IdeaMutation) ReferenceNum

func (m *IdeaMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*IdeaMutation) ReferenceNumCleared

func (m *IdeaMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*IdeaMutation) RemovedEdges

func (m *IdeaMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*IdeaMutation) RemovedIDs

func (m *IdeaMutation) 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 (*IdeaMutation) ResetCreatedAt

func (m *IdeaMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IdeaMutation) ResetData

func (m *IdeaMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*IdeaMutation) ResetDescription

func (m *IdeaMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*IdeaMutation) ResetEdge

func (m *IdeaMutation) 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 (*IdeaMutation) ResetField

func (m *IdeaMutation) 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 (*IdeaMutation) ResetName

func (m *IdeaMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*IdeaMutation) ResetProduct

func (m *IdeaMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*IdeaMutation) ResetReferenceNum

func (m *IdeaMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*IdeaMutation) ResetStatus

func (m *IdeaMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*IdeaMutation) ResetTags

func (m *IdeaMutation) ResetTags()

ResetTags resets all changes to the "tags" field.

func (*IdeaMutation) ResetURL

func (m *IdeaMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*IdeaMutation) ResetUpdatedAt

func (m *IdeaMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*IdeaMutation) ResetVotes

func (m *IdeaMutation) ResetVotes()

ResetVotes resets all changes to the "votes" field.

func (*IdeaMutation) SetCreatedAt

func (m *IdeaMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IdeaMutation) SetData

func (m *IdeaMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*IdeaMutation) SetDescription

func (m *IdeaMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*IdeaMutation) SetField

func (m *IdeaMutation) 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 (*IdeaMutation) SetID

func (m *IdeaMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Idea entities.

func (*IdeaMutation) SetName

func (m *IdeaMutation) SetName(s string)

SetName sets the "name" field.

func (*IdeaMutation) SetOp

func (m *IdeaMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IdeaMutation) SetProduct

func (m *IdeaMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*IdeaMutation) SetReferenceNum

func (m *IdeaMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*IdeaMutation) SetStatus

func (m *IdeaMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*IdeaMutation) SetTags

func (m *IdeaMutation) SetTags(s string)

SetTags sets the "tags" field.

func (*IdeaMutation) SetURL

func (m *IdeaMutation) SetURL(s string)

SetURL sets the "url" field.

func (*IdeaMutation) SetUpdatedAt

func (m *IdeaMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*IdeaMutation) SetVotes

func (m *IdeaMutation) SetVotes(i int)

SetVotes sets the "votes" field.

func (*IdeaMutation) Status

func (m *IdeaMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*IdeaMutation) StatusCleared

func (m *IdeaMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*IdeaMutation) Tags

func (m *IdeaMutation) Tags() (r string, exists bool)

Tags returns the value of the "tags" field in the mutation.

func (*IdeaMutation) TagsCleared

func (m *IdeaMutation) TagsCleared() bool

TagsCleared returns if the "tags" field was cleared in this mutation.

func (IdeaMutation) Tx

func (m IdeaMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*IdeaMutation) Type

func (m *IdeaMutation) Type() string

Type returns the node type of this mutation (Idea).

func (*IdeaMutation) URL

func (m *IdeaMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*IdeaMutation) URLCleared

func (m *IdeaMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*IdeaMutation) UpdatedAt

func (m *IdeaMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*IdeaMutation) UpdatedAtCleared

func (m *IdeaMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*IdeaMutation) Votes

func (m *IdeaMutation) Votes() (r int, exists bool)

Votes returns the value of the "votes" field in the mutation.

func (*IdeaMutation) VotesCleared

func (m *IdeaMutation) VotesCleared() bool

VotesCleared returns if the "votes" field was cleared in this mutation.

func (*IdeaMutation) Where

func (m *IdeaMutation) Where(ps ...predicate.Idea)

Where appends a list predicates to the IdeaMutation builder.

func (*IdeaMutation) WhereP

func (m *IdeaMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IdeaMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IdeaOrganization

type IdeaOrganization struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// EmailDomains holds the value of the "email_domains" field.
	EmailDomains string `json:"email_domains,omitempty"`
	// Revenue holds the value of the "revenue" field.
	Revenue *float64 `json:"revenue,omitempty"`
	// EndorsementsCount holds the value of the "endorsements_count" field.
	EndorsementsCount int `json:"endorsements_count,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

IdeaOrganization is the model entity for the IdeaOrganization schema.

func (*IdeaOrganization) String

func (_m *IdeaOrganization) String() string

String implements the fmt.Stringer.

func (*IdeaOrganization) Unwrap

func (_m *IdeaOrganization) Unwrap() *IdeaOrganization

Unwrap unwraps the IdeaOrganization 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 (*IdeaOrganization) Update

Update returns a builder for updating this IdeaOrganization. Note that you need to call IdeaOrganization.Unwrap() before calling this method if this IdeaOrganization was returned from a transaction, and the transaction was committed or rolled back.

func (*IdeaOrganization) Value

func (_m *IdeaOrganization) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the IdeaOrganization. This includes values selected through modifiers, order, etc.

type IdeaOrganizationClient

type IdeaOrganizationClient struct {
	// contains filtered or unexported fields
}

IdeaOrganizationClient is a client for the IdeaOrganization schema.

func NewIdeaOrganizationClient

func NewIdeaOrganizationClient(c config) *IdeaOrganizationClient

NewIdeaOrganizationClient returns a client for the IdeaOrganization from the given config.

func (*IdeaOrganizationClient) Create

Create returns a builder for creating a IdeaOrganization entity.

func (*IdeaOrganizationClient) CreateBulk

CreateBulk returns a builder for creating a bulk of IdeaOrganization entities.

func (*IdeaOrganizationClient) Delete

Delete returns a delete builder for IdeaOrganization.

func (*IdeaOrganizationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IdeaOrganizationClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*IdeaOrganizationClient) Get

Get returns a IdeaOrganization entity by its id.

func (*IdeaOrganizationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*IdeaOrganizationClient) Hooks

func (c *IdeaOrganizationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*IdeaOrganizationClient) Intercept

func (c *IdeaOrganizationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ideaorganization.Intercept(f(g(h())))`.

func (*IdeaOrganizationClient) Interceptors

func (c *IdeaOrganizationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*IdeaOrganizationClient) MapCreateBulk

func (c *IdeaOrganizationClient) MapCreateBulk(slice any, setFunc func(*IdeaOrganizationCreate, int)) *IdeaOrganizationCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*IdeaOrganizationClient) Query

Query returns a query builder for IdeaOrganization.

func (*IdeaOrganizationClient) Update

Update returns an update builder for IdeaOrganization.

func (*IdeaOrganizationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IdeaOrganizationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*IdeaOrganizationClient) Use

func (c *IdeaOrganizationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ideaorganization.Hooks(f(g(h())))`.

type IdeaOrganizationCreate

type IdeaOrganizationCreate struct {
	// contains filtered or unexported fields
}

IdeaOrganizationCreate is the builder for creating a IdeaOrganization entity.

func (*IdeaOrganizationCreate) Exec

Exec executes the query.

func (*IdeaOrganizationCreate) ExecX

func (_c *IdeaOrganizationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationCreate) Mutation

Mutation returns the IdeaOrganizationMutation object of the builder.

func (*IdeaOrganizationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdeaOrganization.Create().
	SetName(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.IdeaOrganizationUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*IdeaOrganizationCreate) OnConflictColumns

func (_c *IdeaOrganizationCreate) OnConflictColumns(columns ...string) *IdeaOrganizationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdeaOrganization.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdeaOrganizationCreate) Save

Save creates the IdeaOrganization in the database.

func (*IdeaOrganizationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*IdeaOrganizationCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaOrganizationCreate) SetEmailDomains

func (_c *IdeaOrganizationCreate) SetEmailDomains(v string) *IdeaOrganizationCreate

SetEmailDomains sets the "email_domains" field.

func (*IdeaOrganizationCreate) SetEndorsementsCount

func (_c *IdeaOrganizationCreate) SetEndorsementsCount(v int) *IdeaOrganizationCreate

SetEndorsementsCount sets the "endorsements_count" field.

func (*IdeaOrganizationCreate) SetID

SetID sets the "id" field.

func (*IdeaOrganizationCreate) SetName

SetName sets the "name" field.

func (*IdeaOrganizationCreate) SetNillableCreatedAt

func (_c *IdeaOrganizationCreate) SetNillableCreatedAt(v *time.Time) *IdeaOrganizationCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetNillableEmailDomains

func (_c *IdeaOrganizationCreate) SetNillableEmailDomains(v *string) *IdeaOrganizationCreate

SetNillableEmailDomains sets the "email_domains" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetNillableEndorsementsCount

func (_c *IdeaOrganizationCreate) SetNillableEndorsementsCount(v *int) *IdeaOrganizationCreate

SetNillableEndorsementsCount sets the "endorsements_count" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetNillableName

func (_c *IdeaOrganizationCreate) SetNillableName(v *string) *IdeaOrganizationCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetNillableReferenceNum

func (_c *IdeaOrganizationCreate) SetNillableReferenceNum(v *string) *IdeaOrganizationCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetNillableRevenue

func (_c *IdeaOrganizationCreate) SetNillableRevenue(v *float64) *IdeaOrganizationCreate

SetNillableRevenue sets the "revenue" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetNillableURL

func (_c *IdeaOrganizationCreate) SetNillableURL(v *string) *IdeaOrganizationCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetNillableUpdatedAt

func (_c *IdeaOrganizationCreate) SetNillableUpdatedAt(v *time.Time) *IdeaOrganizationCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaOrganizationCreate) SetReferenceNum

func (_c *IdeaOrganizationCreate) SetReferenceNum(v string) *IdeaOrganizationCreate

SetReferenceNum sets the "reference_num" field.

func (*IdeaOrganizationCreate) SetRevenue

SetRevenue sets the "revenue" field.

func (*IdeaOrganizationCreate) SetURL

SetURL sets the "url" field.

func (*IdeaOrganizationCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type IdeaOrganizationCreateBulk

type IdeaOrganizationCreateBulk struct {
	// contains filtered or unexported fields
}

IdeaOrganizationCreateBulk is the builder for creating many IdeaOrganization entities in bulk.

func (*IdeaOrganizationCreateBulk) Exec

Exec executes the query.

func (*IdeaOrganizationCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdeaOrganization.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.IdeaOrganizationUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*IdeaOrganizationCreateBulk) OnConflictColumns

func (_c *IdeaOrganizationCreateBulk) OnConflictColumns(columns ...string) *IdeaOrganizationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdeaOrganization.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdeaOrganizationCreateBulk) Save

Save creates the IdeaOrganization entities in the database.

func (*IdeaOrganizationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type IdeaOrganizationDelete

type IdeaOrganizationDelete struct {
	// contains filtered or unexported fields
}

IdeaOrganizationDelete is the builder for deleting a IdeaOrganization entity.

func (*IdeaOrganizationDelete) Exec

func (_d *IdeaOrganizationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*IdeaOrganizationDelete) ExecX

func (_d *IdeaOrganizationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationDelete) Where

Where appends a list predicates to the IdeaOrganizationDelete builder.

type IdeaOrganizationDeleteOne

type IdeaOrganizationDeleteOne struct {
	// contains filtered or unexported fields
}

IdeaOrganizationDeleteOne is the builder for deleting a single IdeaOrganization entity.

func (*IdeaOrganizationDeleteOne) Exec

Exec executes the deletion query.

func (*IdeaOrganizationDeleteOne) ExecX

func (_d *IdeaOrganizationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationDeleteOne) Where

Where appends a list predicates to the IdeaOrganizationDelete builder.

type IdeaOrganizationGroupBy

type IdeaOrganizationGroupBy struct {
	// contains filtered or unexported fields
}

IdeaOrganizationGroupBy is the group-by builder for IdeaOrganization entities.

func (*IdeaOrganizationGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*IdeaOrganizationGroupBy) Bool

func (s *IdeaOrganizationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) BoolX

func (s *IdeaOrganizationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) Bools

func (s *IdeaOrganizationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) BoolsX

func (s *IdeaOrganizationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) Float64

func (s *IdeaOrganizationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) Float64X

func (s *IdeaOrganizationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) Float64s

func (s *IdeaOrganizationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) Float64sX

func (s *IdeaOrganizationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) Int

func (s *IdeaOrganizationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) IntX

func (s *IdeaOrganizationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) Ints

func (s *IdeaOrganizationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) IntsX

func (s *IdeaOrganizationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) Scan

func (_g *IdeaOrganizationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaOrganizationGroupBy) ScanX

func (s *IdeaOrganizationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) String

func (s *IdeaOrganizationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) StringX

func (s *IdeaOrganizationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaOrganizationGroupBy) Strings

func (s *IdeaOrganizationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationGroupBy) StringsX

func (s *IdeaOrganizationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaOrganizationMutation

type IdeaOrganizationMutation struct {
	// contains filtered or unexported fields
}

IdeaOrganizationMutation represents an operation that mutates the IdeaOrganization nodes in the graph.

func (*IdeaOrganizationMutation) AddEndorsementsCount

func (m *IdeaOrganizationMutation) AddEndorsementsCount(i int)

AddEndorsementsCount adds i to the "endorsements_count" field.

func (*IdeaOrganizationMutation) AddField

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) AddRevenue

func (m *IdeaOrganizationMutation) AddRevenue(f float64)

AddRevenue adds f to the "revenue" field.

func (*IdeaOrganizationMutation) AddedEdges

func (m *IdeaOrganizationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*IdeaOrganizationMutation) AddedEndorsementsCount

func (m *IdeaOrganizationMutation) AddedEndorsementsCount() (r int, exists bool)

AddedEndorsementsCount returns the value that was added to the "endorsements_count" field in this mutation.

func (*IdeaOrganizationMutation) AddedField

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) AddedFields

func (m *IdeaOrganizationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*IdeaOrganizationMutation) AddedIDs

func (m *IdeaOrganizationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*IdeaOrganizationMutation) AddedRevenue

func (m *IdeaOrganizationMutation) AddedRevenue() (r float64, exists bool)

AddedRevenue returns the value that was added to the "revenue" field in this mutation.

func (*IdeaOrganizationMutation) ClearCreatedAt

func (m *IdeaOrganizationMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaOrganizationMutation) ClearEdge

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) ClearEmailDomains

func (m *IdeaOrganizationMutation) ClearEmailDomains()

ClearEmailDomains clears the value of the "email_domains" field.

func (*IdeaOrganizationMutation) ClearEndorsementsCount

func (m *IdeaOrganizationMutation) ClearEndorsementsCount()

ClearEndorsementsCount clears the value of the "endorsements_count" field.

func (*IdeaOrganizationMutation) ClearField

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) ClearName

func (m *IdeaOrganizationMutation) ClearName()

ClearName clears the value of the "name" field.

func (*IdeaOrganizationMutation) ClearReferenceNum

func (m *IdeaOrganizationMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaOrganizationMutation) ClearRevenue

func (m *IdeaOrganizationMutation) ClearRevenue()

ClearRevenue clears the value of the "revenue" field.

func (*IdeaOrganizationMutation) ClearURL

func (m *IdeaOrganizationMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*IdeaOrganizationMutation) ClearUpdatedAt

func (m *IdeaOrganizationMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaOrganizationMutation) ClearedEdges

func (m *IdeaOrganizationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*IdeaOrganizationMutation) ClearedFields

func (m *IdeaOrganizationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (IdeaOrganizationMutation) Client

func (m IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) CreatedAt

func (m *IdeaOrganizationMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IdeaOrganizationMutation) CreatedAtCleared

func (m *IdeaOrganizationMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*IdeaOrganizationMutation) EdgeCleared

func (m *IdeaOrganizationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*IdeaOrganizationMutation) EmailDomains

func (m *IdeaOrganizationMutation) EmailDomains() (r string, exists bool)

EmailDomains returns the value of the "email_domains" field in the mutation.

func (*IdeaOrganizationMutation) EmailDomainsCleared

func (m *IdeaOrganizationMutation) EmailDomainsCleared() bool

EmailDomainsCleared returns if the "email_domains" field was cleared in this mutation.

func (*IdeaOrganizationMutation) EndorsementsCount

func (m *IdeaOrganizationMutation) EndorsementsCount() (r int, exists bool)

EndorsementsCount returns the value of the "endorsements_count" field in the mutation.

func (*IdeaOrganizationMutation) EndorsementsCountCleared

func (m *IdeaOrganizationMutation) EndorsementsCountCleared() bool

EndorsementsCountCleared returns if the "endorsements_count" field was cleared in this mutation.

func (*IdeaOrganizationMutation) Field

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) FieldCleared

func (m *IdeaOrganizationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*IdeaOrganizationMutation) Fields

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) ID

func (m *IdeaOrganizationMutation) ID() (id string, 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 (*IdeaOrganizationMutation) IDs

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 (*IdeaOrganizationMutation) Name

func (m *IdeaOrganizationMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*IdeaOrganizationMutation) NameCleared

func (m *IdeaOrganizationMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*IdeaOrganizationMutation) OldCreatedAt

func (m *IdeaOrganizationMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) OldEmailDomains

func (m *IdeaOrganizationMutation) OldEmailDomains(ctx context.Context) (v string, err error)

OldEmailDomains returns the old "email_domains" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) OldEndorsementsCount

func (m *IdeaOrganizationMutation) OldEndorsementsCount(ctx context.Context) (v int, err error)

OldEndorsementsCount returns the old "endorsements_count" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) OldField

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) OldName

func (m *IdeaOrganizationMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) OldReferenceNum

func (m *IdeaOrganizationMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) OldRevenue

func (m *IdeaOrganizationMutation) OldRevenue(ctx context.Context) (v *float64, err error)

OldRevenue returns the old "revenue" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) OldURL

func (m *IdeaOrganizationMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) OldUpdatedAt

func (m *IdeaOrganizationMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the IdeaOrganization entity. If the IdeaOrganization 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 (*IdeaOrganizationMutation) Op

func (m *IdeaOrganizationMutation) Op() Op

Op returns the operation name.

func (*IdeaOrganizationMutation) ReferenceNum

func (m *IdeaOrganizationMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*IdeaOrganizationMutation) ReferenceNumCleared

func (m *IdeaOrganizationMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*IdeaOrganizationMutation) RemovedEdges

func (m *IdeaOrganizationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*IdeaOrganizationMutation) RemovedIDs

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) ResetCreatedAt

func (m *IdeaOrganizationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IdeaOrganizationMutation) ResetEdge

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) ResetEmailDomains

func (m *IdeaOrganizationMutation) ResetEmailDomains()

ResetEmailDomains resets all changes to the "email_domains" field.

func (*IdeaOrganizationMutation) ResetEndorsementsCount

func (m *IdeaOrganizationMutation) ResetEndorsementsCount()

ResetEndorsementsCount resets all changes to the "endorsements_count" field.

func (*IdeaOrganizationMutation) ResetField

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) ResetName

func (m *IdeaOrganizationMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*IdeaOrganizationMutation) ResetReferenceNum

func (m *IdeaOrganizationMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*IdeaOrganizationMutation) ResetRevenue

func (m *IdeaOrganizationMutation) ResetRevenue()

ResetRevenue resets all changes to the "revenue" field.

func (*IdeaOrganizationMutation) ResetURL

func (m *IdeaOrganizationMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*IdeaOrganizationMutation) ResetUpdatedAt

func (m *IdeaOrganizationMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*IdeaOrganizationMutation) Revenue

func (m *IdeaOrganizationMutation) Revenue() (r float64, exists bool)

Revenue returns the value of the "revenue" field in the mutation.

func (*IdeaOrganizationMutation) RevenueCleared

func (m *IdeaOrganizationMutation) RevenueCleared() bool

RevenueCleared returns if the "revenue" field was cleared in this mutation.

func (*IdeaOrganizationMutation) SetCreatedAt

func (m *IdeaOrganizationMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IdeaOrganizationMutation) SetEmailDomains

func (m *IdeaOrganizationMutation) SetEmailDomains(s string)

SetEmailDomains sets the "email_domains" field.

func (*IdeaOrganizationMutation) SetEndorsementsCount

func (m *IdeaOrganizationMutation) SetEndorsementsCount(i int)

SetEndorsementsCount sets the "endorsements_count" field.

func (*IdeaOrganizationMutation) SetField

func (m *IdeaOrganizationMutation) 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 (*IdeaOrganizationMutation) SetID

func (m *IdeaOrganizationMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of IdeaOrganization entities.

func (*IdeaOrganizationMutation) SetName

func (m *IdeaOrganizationMutation) SetName(s string)

SetName sets the "name" field.

func (*IdeaOrganizationMutation) SetOp

func (m *IdeaOrganizationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IdeaOrganizationMutation) SetReferenceNum

func (m *IdeaOrganizationMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*IdeaOrganizationMutation) SetRevenue

func (m *IdeaOrganizationMutation) SetRevenue(f float64)

SetRevenue sets the "revenue" field.

func (*IdeaOrganizationMutation) SetURL

func (m *IdeaOrganizationMutation) SetURL(s string)

SetURL sets the "url" field.

func (*IdeaOrganizationMutation) SetUpdatedAt

func (m *IdeaOrganizationMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (IdeaOrganizationMutation) Tx

func (m IdeaOrganizationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*IdeaOrganizationMutation) Type

func (m *IdeaOrganizationMutation) Type() string

Type returns the node type of this mutation (IdeaOrganization).

func (*IdeaOrganizationMutation) URL

func (m *IdeaOrganizationMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*IdeaOrganizationMutation) URLCleared

func (m *IdeaOrganizationMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*IdeaOrganizationMutation) UpdatedAt

func (m *IdeaOrganizationMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*IdeaOrganizationMutation) UpdatedAtCleared

func (m *IdeaOrganizationMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*IdeaOrganizationMutation) Where

Where appends a list predicates to the IdeaOrganizationMutation builder.

func (*IdeaOrganizationMutation) WhereP

func (m *IdeaOrganizationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IdeaOrganizationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IdeaOrganizationQuery

type IdeaOrganizationQuery struct {
	// contains filtered or unexported fields
}

IdeaOrganizationQuery is the builder for querying IdeaOrganization entities.

func (*IdeaOrganizationQuery) Aggregate

Aggregate returns a IdeaOrganizationSelect configured with the given aggregations.

func (*IdeaOrganizationQuery) All

All executes the query and returns a list of IdeaOrganizations.

func (*IdeaOrganizationQuery) AllX

AllX is like All, but panics if an error occurs.

func (*IdeaOrganizationQuery) Clone

Clone returns a duplicate of the IdeaOrganizationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*IdeaOrganizationQuery) Count

func (_q *IdeaOrganizationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IdeaOrganizationQuery) CountX

func (_q *IdeaOrganizationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*IdeaOrganizationQuery) Exist

func (_q *IdeaOrganizationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*IdeaOrganizationQuery) ExistX

func (_q *IdeaOrganizationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*IdeaOrganizationQuery) First

First returns the first IdeaOrganization entity from the query. Returns a *NotFoundError when no IdeaOrganization was found.

func (*IdeaOrganizationQuery) FirstID

func (_q *IdeaOrganizationQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first IdeaOrganization ID from the query. Returns a *NotFoundError when no IdeaOrganization ID was found.

func (*IdeaOrganizationQuery) FirstIDX

func (_q *IdeaOrganizationQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*IdeaOrganizationQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*IdeaOrganizationQuery) GroupBy

func (_q *IdeaOrganizationQuery) GroupBy(field string, fields ...string) *IdeaOrganizationGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IdeaOrganization.Query().
	GroupBy(ideaorganization.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IdeaOrganizationQuery) IDs

func (_q *IdeaOrganizationQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of IdeaOrganization IDs.

func (*IdeaOrganizationQuery) IDsX

func (_q *IdeaOrganizationQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*IdeaOrganizationQuery) Limit

Limit the number of records to be returned by this query.

func (*IdeaOrganizationQuery) Offset

func (_q *IdeaOrganizationQuery) Offset(offset int) *IdeaOrganizationQuery

Offset to start from.

func (*IdeaOrganizationQuery) Only

Only returns a single IdeaOrganization entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IdeaOrganization entity is found. Returns a *NotFoundError when no IdeaOrganization entities are found.

func (*IdeaOrganizationQuery) OnlyID

func (_q *IdeaOrganizationQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only IdeaOrganization ID in the query. Returns a *NotSingularError when more than one IdeaOrganization ID is found. Returns a *NotFoundError when no entities are found.

func (*IdeaOrganizationQuery) OnlyIDX

func (_q *IdeaOrganizationQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*IdeaOrganizationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*IdeaOrganizationQuery) Order

Order specifies how the records should be ordered.

func (*IdeaOrganizationQuery) Select

func (_q *IdeaOrganizationQuery) Select(fields ...string) *IdeaOrganizationSelect

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 {
	Name string `json:"name,omitempty"`
}

client.IdeaOrganization.Query().
	Select(ideaorganization.FieldName).
	Scan(ctx, &v)

func (*IdeaOrganizationQuery) Unique

func (_q *IdeaOrganizationQuery) Unique(unique bool) *IdeaOrganizationQuery

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 (*IdeaOrganizationQuery) Where

Where adds a new predicate for the IdeaOrganizationQuery builder.

type IdeaOrganizationSelect

type IdeaOrganizationSelect struct {
	*IdeaOrganizationQuery
	// contains filtered or unexported fields
}

IdeaOrganizationSelect is the builder for selecting fields of IdeaOrganization entities.

func (*IdeaOrganizationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*IdeaOrganizationSelect) Bool

func (s *IdeaOrganizationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) BoolX

func (s *IdeaOrganizationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaOrganizationSelect) Bools

func (s *IdeaOrganizationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) BoolsX

func (s *IdeaOrganizationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaOrganizationSelect) Float64

func (s *IdeaOrganizationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) Float64X

func (s *IdeaOrganizationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaOrganizationSelect) Float64s

func (s *IdeaOrganizationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) Float64sX

func (s *IdeaOrganizationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaOrganizationSelect) Int

func (s *IdeaOrganizationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) IntX

func (s *IdeaOrganizationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaOrganizationSelect) Ints

func (s *IdeaOrganizationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) IntsX

func (s *IdeaOrganizationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaOrganizationSelect) Scan

func (_s *IdeaOrganizationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaOrganizationSelect) ScanX

func (s *IdeaOrganizationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaOrganizationSelect) String

func (s *IdeaOrganizationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) StringX

func (s *IdeaOrganizationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaOrganizationSelect) Strings

func (s *IdeaOrganizationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaOrganizationSelect) StringsX

func (s *IdeaOrganizationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaOrganizationUpdate

type IdeaOrganizationUpdate struct {
	// contains filtered or unexported fields
}

IdeaOrganizationUpdate is the builder for updating IdeaOrganization entities.

func (*IdeaOrganizationUpdate) AddEndorsementsCount

func (_u *IdeaOrganizationUpdate) AddEndorsementsCount(v int) *IdeaOrganizationUpdate

AddEndorsementsCount adds value to the "endorsements_count" field.

func (*IdeaOrganizationUpdate) AddRevenue

AddRevenue adds value to the "revenue" field.

func (*IdeaOrganizationUpdate) ClearCreatedAt

func (_u *IdeaOrganizationUpdate) ClearCreatedAt() *IdeaOrganizationUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaOrganizationUpdate) ClearEmailDomains

func (_u *IdeaOrganizationUpdate) ClearEmailDomains() *IdeaOrganizationUpdate

ClearEmailDomains clears the value of the "email_domains" field.

func (*IdeaOrganizationUpdate) ClearEndorsementsCount

func (_u *IdeaOrganizationUpdate) ClearEndorsementsCount() *IdeaOrganizationUpdate

ClearEndorsementsCount clears the value of the "endorsements_count" field.

func (*IdeaOrganizationUpdate) ClearName

ClearName clears the value of the "name" field.

func (*IdeaOrganizationUpdate) ClearReferenceNum

func (_u *IdeaOrganizationUpdate) ClearReferenceNum() *IdeaOrganizationUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaOrganizationUpdate) ClearRevenue

func (_u *IdeaOrganizationUpdate) ClearRevenue() *IdeaOrganizationUpdate

ClearRevenue clears the value of the "revenue" field.

func (*IdeaOrganizationUpdate) ClearURL

ClearURL clears the value of the "url" field.

func (*IdeaOrganizationUpdate) ClearUpdatedAt

func (_u *IdeaOrganizationUpdate) ClearUpdatedAt() *IdeaOrganizationUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaOrganizationUpdate) Exec

Exec executes the query.

func (*IdeaOrganizationUpdate) ExecX

func (_u *IdeaOrganizationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationUpdate) Mutation

Mutation returns the IdeaOrganizationMutation object of the builder.

func (*IdeaOrganizationUpdate) Save

func (_u *IdeaOrganizationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*IdeaOrganizationUpdate) SaveX

func (_u *IdeaOrganizationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*IdeaOrganizationUpdate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaOrganizationUpdate) SetEmailDomains

func (_u *IdeaOrganizationUpdate) SetEmailDomains(v string) *IdeaOrganizationUpdate

SetEmailDomains sets the "email_domains" field.

func (*IdeaOrganizationUpdate) SetEndorsementsCount

func (_u *IdeaOrganizationUpdate) SetEndorsementsCount(v int) *IdeaOrganizationUpdate

SetEndorsementsCount sets the "endorsements_count" field.

func (*IdeaOrganizationUpdate) SetName

SetName sets the "name" field.

func (*IdeaOrganizationUpdate) SetNillableCreatedAt

func (_u *IdeaOrganizationUpdate) SetNillableCreatedAt(v *time.Time) *IdeaOrganizationUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetNillableEmailDomains

func (_u *IdeaOrganizationUpdate) SetNillableEmailDomains(v *string) *IdeaOrganizationUpdate

SetNillableEmailDomains sets the "email_domains" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetNillableEndorsementsCount

func (_u *IdeaOrganizationUpdate) SetNillableEndorsementsCount(v *int) *IdeaOrganizationUpdate

SetNillableEndorsementsCount sets the "endorsements_count" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetNillableName

func (_u *IdeaOrganizationUpdate) SetNillableName(v *string) *IdeaOrganizationUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetNillableReferenceNum

func (_u *IdeaOrganizationUpdate) SetNillableReferenceNum(v *string) *IdeaOrganizationUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetNillableRevenue

func (_u *IdeaOrganizationUpdate) SetNillableRevenue(v *float64) *IdeaOrganizationUpdate

SetNillableRevenue sets the "revenue" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetNillableURL

func (_u *IdeaOrganizationUpdate) SetNillableURL(v *string) *IdeaOrganizationUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetNillableUpdatedAt

func (_u *IdeaOrganizationUpdate) SetNillableUpdatedAt(v *time.Time) *IdeaOrganizationUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaOrganizationUpdate) SetReferenceNum

func (_u *IdeaOrganizationUpdate) SetReferenceNum(v string) *IdeaOrganizationUpdate

SetReferenceNum sets the "reference_num" field.

func (*IdeaOrganizationUpdate) SetRevenue

SetRevenue sets the "revenue" field.

func (*IdeaOrganizationUpdate) SetURL

SetURL sets the "url" field.

func (*IdeaOrganizationUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaOrganizationUpdate) Where

Where appends a list predicates to the IdeaOrganizationUpdate builder.

type IdeaOrganizationUpdateOne

type IdeaOrganizationUpdateOne struct {
	// contains filtered or unexported fields
}

IdeaOrganizationUpdateOne is the builder for updating a single IdeaOrganization entity.

func (*IdeaOrganizationUpdateOne) AddEndorsementsCount

func (_u *IdeaOrganizationUpdateOne) AddEndorsementsCount(v int) *IdeaOrganizationUpdateOne

AddEndorsementsCount adds value to the "endorsements_count" field.

func (*IdeaOrganizationUpdateOne) AddRevenue

AddRevenue adds value to the "revenue" field.

func (*IdeaOrganizationUpdateOne) ClearCreatedAt

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaOrganizationUpdateOne) ClearEmailDomains

func (_u *IdeaOrganizationUpdateOne) ClearEmailDomains() *IdeaOrganizationUpdateOne

ClearEmailDomains clears the value of the "email_domains" field.

func (*IdeaOrganizationUpdateOne) ClearEndorsementsCount

func (_u *IdeaOrganizationUpdateOne) ClearEndorsementsCount() *IdeaOrganizationUpdateOne

ClearEndorsementsCount clears the value of the "endorsements_count" field.

func (*IdeaOrganizationUpdateOne) ClearName

ClearName clears the value of the "name" field.

func (*IdeaOrganizationUpdateOne) ClearReferenceNum

func (_u *IdeaOrganizationUpdateOne) ClearReferenceNum() *IdeaOrganizationUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaOrganizationUpdateOne) ClearRevenue

ClearRevenue clears the value of the "revenue" field.

func (*IdeaOrganizationUpdateOne) ClearURL

ClearURL clears the value of the "url" field.

func (*IdeaOrganizationUpdateOne) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaOrganizationUpdateOne) Exec

Exec executes the query on the entity.

func (*IdeaOrganizationUpdateOne) ExecX

func (_u *IdeaOrganizationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationUpdateOne) Mutation

Mutation returns the IdeaOrganizationMutation object of the builder.

func (*IdeaOrganizationUpdateOne) Save

Save executes the query and returns the updated IdeaOrganization entity.

func (*IdeaOrganizationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*IdeaOrganizationUpdateOne) Select

func (_u *IdeaOrganizationUpdateOne) Select(field string, fields ...string) *IdeaOrganizationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IdeaOrganizationUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaOrganizationUpdateOne) SetEmailDomains

SetEmailDomains sets the "email_domains" field.

func (*IdeaOrganizationUpdateOne) SetEndorsementsCount

func (_u *IdeaOrganizationUpdateOne) SetEndorsementsCount(v int) *IdeaOrganizationUpdateOne

SetEndorsementsCount sets the "endorsements_count" field.

func (*IdeaOrganizationUpdateOne) SetName

SetName sets the "name" field.

func (*IdeaOrganizationUpdateOne) SetNillableCreatedAt

func (_u *IdeaOrganizationUpdateOne) SetNillableCreatedAt(v *time.Time) *IdeaOrganizationUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetNillableEmailDomains

func (_u *IdeaOrganizationUpdateOne) SetNillableEmailDomains(v *string) *IdeaOrganizationUpdateOne

SetNillableEmailDomains sets the "email_domains" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetNillableEndorsementsCount

func (_u *IdeaOrganizationUpdateOne) SetNillableEndorsementsCount(v *int) *IdeaOrganizationUpdateOne

SetNillableEndorsementsCount sets the "endorsements_count" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetNillableName

SetNillableName sets the "name" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetNillableReferenceNum

func (_u *IdeaOrganizationUpdateOne) SetNillableReferenceNum(v *string) *IdeaOrganizationUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetNillableRevenue

func (_u *IdeaOrganizationUpdateOne) SetNillableRevenue(v *float64) *IdeaOrganizationUpdateOne

SetNillableRevenue sets the "revenue" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetNillableURL

SetNillableURL sets the "url" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetNillableUpdatedAt

func (_u *IdeaOrganizationUpdateOne) SetNillableUpdatedAt(v *time.Time) *IdeaOrganizationUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaOrganizationUpdateOne) SetReferenceNum

SetReferenceNum sets the "reference_num" field.

func (*IdeaOrganizationUpdateOne) SetRevenue

SetRevenue sets the "revenue" field.

func (*IdeaOrganizationUpdateOne) SetURL

SetURL sets the "url" field.

func (*IdeaOrganizationUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaOrganizationUpdateOne) Where

Where appends a list predicates to the IdeaOrganizationUpdate builder.

type IdeaOrganizationUpsert

type IdeaOrganizationUpsert struct {
	*sql.UpdateSet
}

IdeaOrganizationUpsert is the "OnConflict" setter.

func (*IdeaOrganizationUpsert) AddEndorsementsCount

func (u *IdeaOrganizationUpsert) AddEndorsementsCount(v int) *IdeaOrganizationUpsert

AddEndorsementsCount adds v to the "endorsements_count" field.

func (*IdeaOrganizationUpsert) AddRevenue

AddRevenue adds v to the "revenue" field.

func (*IdeaOrganizationUpsert) ClearCreatedAt

func (u *IdeaOrganizationUpsert) ClearCreatedAt() *IdeaOrganizationUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaOrganizationUpsert) ClearEmailDomains

func (u *IdeaOrganizationUpsert) ClearEmailDomains() *IdeaOrganizationUpsert

ClearEmailDomains clears the value of the "email_domains" field.

func (*IdeaOrganizationUpsert) ClearEndorsementsCount

func (u *IdeaOrganizationUpsert) ClearEndorsementsCount() *IdeaOrganizationUpsert

ClearEndorsementsCount clears the value of the "endorsements_count" field.

func (*IdeaOrganizationUpsert) ClearName

ClearName clears the value of the "name" field.

func (*IdeaOrganizationUpsert) ClearReferenceNum

func (u *IdeaOrganizationUpsert) ClearReferenceNum() *IdeaOrganizationUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaOrganizationUpsert) ClearRevenue

ClearRevenue clears the value of the "revenue" field.

func (*IdeaOrganizationUpsert) ClearURL

ClearURL clears the value of the "url" field.

func (*IdeaOrganizationUpsert) ClearUpdatedAt

func (u *IdeaOrganizationUpsert) ClearUpdatedAt() *IdeaOrganizationUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaOrganizationUpsert) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaOrganizationUpsert) SetEmailDomains

func (u *IdeaOrganizationUpsert) SetEmailDomains(v string) *IdeaOrganizationUpsert

SetEmailDomains sets the "email_domains" field.

func (*IdeaOrganizationUpsert) SetEndorsementsCount

func (u *IdeaOrganizationUpsert) SetEndorsementsCount(v int) *IdeaOrganizationUpsert

SetEndorsementsCount sets the "endorsements_count" field.

func (*IdeaOrganizationUpsert) SetName

SetName sets the "name" field.

func (*IdeaOrganizationUpsert) SetReferenceNum

func (u *IdeaOrganizationUpsert) SetReferenceNum(v string) *IdeaOrganizationUpsert

SetReferenceNum sets the "reference_num" field.

func (*IdeaOrganizationUpsert) SetRevenue

SetRevenue sets the "revenue" field.

func (*IdeaOrganizationUpsert) SetURL

SetURL sets the "url" field.

func (*IdeaOrganizationUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaOrganizationUpsert) UpdateCreatedAt

func (u *IdeaOrganizationUpsert) UpdateCreatedAt() *IdeaOrganizationUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaOrganizationUpsert) UpdateEmailDomains

func (u *IdeaOrganizationUpsert) UpdateEmailDomains() *IdeaOrganizationUpsert

UpdateEmailDomains sets the "email_domains" field to the value that was provided on create.

func (*IdeaOrganizationUpsert) UpdateEndorsementsCount

func (u *IdeaOrganizationUpsert) UpdateEndorsementsCount() *IdeaOrganizationUpsert

UpdateEndorsementsCount sets the "endorsements_count" field to the value that was provided on create.

func (*IdeaOrganizationUpsert) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaOrganizationUpsert) UpdateReferenceNum

func (u *IdeaOrganizationUpsert) UpdateReferenceNum() *IdeaOrganizationUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*IdeaOrganizationUpsert) UpdateRevenue

func (u *IdeaOrganizationUpsert) UpdateRevenue() *IdeaOrganizationUpsert

UpdateRevenue sets the "revenue" field to the value that was provided on create.

func (*IdeaOrganizationUpsert) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*IdeaOrganizationUpsert) UpdateUpdatedAt

func (u *IdeaOrganizationUpsert) UpdateUpdatedAt() *IdeaOrganizationUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type IdeaOrganizationUpsertBulk

type IdeaOrganizationUpsertBulk struct {
	// contains filtered or unexported fields
}

IdeaOrganizationUpsertBulk is the builder for "upsert"-ing a bulk of IdeaOrganization nodes.

func (*IdeaOrganizationUpsertBulk) AddEndorsementsCount

func (u *IdeaOrganizationUpsertBulk) AddEndorsementsCount(v int) *IdeaOrganizationUpsertBulk

AddEndorsementsCount adds v to the "endorsements_count" field.

func (*IdeaOrganizationUpsertBulk) AddRevenue

AddRevenue adds v to the "revenue" field.

func (*IdeaOrganizationUpsertBulk) ClearCreatedAt

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaOrganizationUpsertBulk) ClearEmailDomains

ClearEmailDomains clears the value of the "email_domains" field.

func (*IdeaOrganizationUpsertBulk) ClearEndorsementsCount

func (u *IdeaOrganizationUpsertBulk) ClearEndorsementsCount() *IdeaOrganizationUpsertBulk

ClearEndorsementsCount clears the value of the "endorsements_count" field.

func (*IdeaOrganizationUpsertBulk) ClearName

ClearName clears the value of the "name" field.

func (*IdeaOrganizationUpsertBulk) ClearReferenceNum

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaOrganizationUpsertBulk) ClearRevenue

ClearRevenue clears the value of the "revenue" field.

func (*IdeaOrganizationUpsertBulk) ClearURL

ClearURL clears the value of the "url" field.

func (*IdeaOrganizationUpsertBulk) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaOrganizationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaOrganizationUpsertBulk) Exec

Exec executes the query.

func (*IdeaOrganizationUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdeaOrganization.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*IdeaOrganizationUpsertBulk) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaOrganizationUpsertBulk) SetEmailDomains

SetEmailDomains sets the "email_domains" field.

func (*IdeaOrganizationUpsertBulk) SetEndorsementsCount

func (u *IdeaOrganizationUpsertBulk) SetEndorsementsCount(v int) *IdeaOrganizationUpsertBulk

SetEndorsementsCount sets the "endorsements_count" field.

func (*IdeaOrganizationUpsertBulk) SetName

SetName sets the "name" field.

func (*IdeaOrganizationUpsertBulk) SetReferenceNum

SetReferenceNum sets the "reference_num" field.

func (*IdeaOrganizationUpsertBulk) SetRevenue

SetRevenue sets the "revenue" field.

func (*IdeaOrganizationUpsertBulk) SetURL

SetURL sets the "url" field.

func (*IdeaOrganizationUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaOrganizationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the IdeaOrganizationCreateBulk.OnConflict documentation for more info.

func (*IdeaOrganizationUpsertBulk) UpdateCreatedAt

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaOrganizationUpsertBulk) UpdateEmailDomains

func (u *IdeaOrganizationUpsertBulk) UpdateEmailDomains() *IdeaOrganizationUpsertBulk

UpdateEmailDomains sets the "email_domains" field to the value that was provided on create.

func (*IdeaOrganizationUpsertBulk) UpdateEndorsementsCount

func (u *IdeaOrganizationUpsertBulk) UpdateEndorsementsCount() *IdeaOrganizationUpsertBulk

UpdateEndorsementsCount sets the "endorsements_count" field to the value that was provided on create.

func (*IdeaOrganizationUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaOrganizationUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.IdeaOrganization.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ideaorganization.FieldID)
		}),
	).
	Exec(ctx)

func (*IdeaOrganizationUpsertBulk) UpdateReferenceNum

func (u *IdeaOrganizationUpsertBulk) UpdateReferenceNum() *IdeaOrganizationUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*IdeaOrganizationUpsertBulk) UpdateRevenue

UpdateRevenue sets the "revenue" field to the value that was provided on create.

func (*IdeaOrganizationUpsertBulk) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*IdeaOrganizationUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type IdeaOrganizationUpsertOne

type IdeaOrganizationUpsertOne struct {
	// contains filtered or unexported fields
}

IdeaOrganizationUpsertOne is the builder for "upsert"-ing

one IdeaOrganization node.

func (*IdeaOrganizationUpsertOne) AddEndorsementsCount

func (u *IdeaOrganizationUpsertOne) AddEndorsementsCount(v int) *IdeaOrganizationUpsertOne

AddEndorsementsCount adds v to the "endorsements_count" field.

func (*IdeaOrganizationUpsertOne) AddRevenue

AddRevenue adds v to the "revenue" field.

func (*IdeaOrganizationUpsertOne) ClearCreatedAt

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaOrganizationUpsertOne) ClearEmailDomains

func (u *IdeaOrganizationUpsertOne) ClearEmailDomains() *IdeaOrganizationUpsertOne

ClearEmailDomains clears the value of the "email_domains" field.

func (*IdeaOrganizationUpsertOne) ClearEndorsementsCount

func (u *IdeaOrganizationUpsertOne) ClearEndorsementsCount() *IdeaOrganizationUpsertOne

ClearEndorsementsCount clears the value of the "endorsements_count" field.

func (*IdeaOrganizationUpsertOne) ClearName

ClearName clears the value of the "name" field.

func (*IdeaOrganizationUpsertOne) ClearReferenceNum

func (u *IdeaOrganizationUpsertOne) ClearReferenceNum() *IdeaOrganizationUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaOrganizationUpsertOne) ClearRevenue

ClearRevenue clears the value of the "revenue" field.

func (*IdeaOrganizationUpsertOne) ClearURL

ClearURL clears the value of the "url" field.

func (*IdeaOrganizationUpsertOne) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaOrganizationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaOrganizationUpsertOne) Exec

Exec executes the query.

func (*IdeaOrganizationUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*IdeaOrganizationUpsertOne) ID

func (u *IdeaOrganizationUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*IdeaOrganizationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*IdeaOrganizationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdeaOrganization.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*IdeaOrganizationUpsertOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IdeaOrganizationUpsertOne) SetEmailDomains

SetEmailDomains sets the "email_domains" field.

func (*IdeaOrganizationUpsertOne) SetEndorsementsCount

func (u *IdeaOrganizationUpsertOne) SetEndorsementsCount(v int) *IdeaOrganizationUpsertOne

SetEndorsementsCount sets the "endorsements_count" field.

func (*IdeaOrganizationUpsertOne) SetName

SetName sets the "name" field.

func (*IdeaOrganizationUpsertOne) SetReferenceNum

SetReferenceNum sets the "reference_num" field.

func (*IdeaOrganizationUpsertOne) SetRevenue

SetRevenue sets the "revenue" field.

func (*IdeaOrganizationUpsertOne) SetURL

SetURL sets the "url" field.

func (*IdeaOrganizationUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IdeaOrganizationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the IdeaOrganizationCreate.OnConflict documentation for more info.

func (*IdeaOrganizationUpsertOne) UpdateCreatedAt

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaOrganizationUpsertOne) UpdateEmailDomains

func (u *IdeaOrganizationUpsertOne) UpdateEmailDomains() *IdeaOrganizationUpsertOne

UpdateEmailDomains sets the "email_domains" field to the value that was provided on create.

func (*IdeaOrganizationUpsertOne) UpdateEndorsementsCount

func (u *IdeaOrganizationUpsertOne) UpdateEndorsementsCount() *IdeaOrganizationUpsertOne

UpdateEndorsementsCount sets the "endorsements_count" field to the value that was provided on create.

func (*IdeaOrganizationUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaOrganizationUpsertOne) UpdateNewValues

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.IdeaOrganization.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ideaorganization.FieldID)
		}),
	).
	Exec(ctx)

func (*IdeaOrganizationUpsertOne) UpdateReferenceNum

func (u *IdeaOrganizationUpsertOne) UpdateReferenceNum() *IdeaOrganizationUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*IdeaOrganizationUpsertOne) UpdateRevenue

UpdateRevenue sets the "revenue" field to the value that was provided on create.

func (*IdeaOrganizationUpsertOne) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*IdeaOrganizationUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type IdeaOrganizations

type IdeaOrganizations []*IdeaOrganization

IdeaOrganizations is a parsable slice of IdeaOrganization.

type IdeaQuery

type IdeaQuery struct {
	// contains filtered or unexported fields
}

IdeaQuery is the builder for querying Idea entities.

func (*IdeaQuery) Aggregate

func (_q *IdeaQuery) Aggregate(fns ...AggregateFunc) *IdeaSelect

Aggregate returns a IdeaSelect configured with the given aggregations.

func (*IdeaQuery) All

func (_q *IdeaQuery) All(ctx context.Context) ([]*Idea, error)

All executes the query and returns a list of Ideas.

func (*IdeaQuery) AllX

func (_q *IdeaQuery) AllX(ctx context.Context) []*Idea

AllX is like All, but panics if an error occurs.

func (*IdeaQuery) Clone

func (_q *IdeaQuery) Clone() *IdeaQuery

Clone returns a duplicate of the IdeaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*IdeaQuery) Count

func (_q *IdeaQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IdeaQuery) CountX

func (_q *IdeaQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*IdeaQuery) Exist

func (_q *IdeaQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*IdeaQuery) ExistX

func (_q *IdeaQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*IdeaQuery) First

func (_q *IdeaQuery) First(ctx context.Context) (*Idea, error)

First returns the first Idea entity from the query. Returns a *NotFoundError when no Idea was found.

func (*IdeaQuery) FirstID

func (_q *IdeaQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Idea ID from the query. Returns a *NotFoundError when no Idea ID was found.

func (*IdeaQuery) FirstIDX

func (_q *IdeaQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*IdeaQuery) FirstX

func (_q *IdeaQuery) FirstX(ctx context.Context) *Idea

FirstX is like First, but panics if an error occurs.

func (*IdeaQuery) GroupBy

func (_q *IdeaQuery) GroupBy(field string, fields ...string) *IdeaGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Idea.Query().
	GroupBy(idea.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IdeaQuery) IDs

func (_q *IdeaQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Idea IDs.

func (*IdeaQuery) IDsX

func (_q *IdeaQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*IdeaQuery) Limit

func (_q *IdeaQuery) Limit(limit int) *IdeaQuery

Limit the number of records to be returned by this query.

func (*IdeaQuery) Offset

func (_q *IdeaQuery) Offset(offset int) *IdeaQuery

Offset to start from.

func (*IdeaQuery) Only

func (_q *IdeaQuery) Only(ctx context.Context) (*Idea, error)

Only returns a single Idea entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Idea entity is found. Returns a *NotFoundError when no Idea entities are found.

func (*IdeaQuery) OnlyID

func (_q *IdeaQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Idea ID in the query. Returns a *NotSingularError when more than one Idea ID is found. Returns a *NotFoundError when no entities are found.

func (*IdeaQuery) OnlyIDX

func (_q *IdeaQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*IdeaQuery) OnlyX

func (_q *IdeaQuery) OnlyX(ctx context.Context) *Idea

OnlyX is like Only, but panics if an error occurs.

func (*IdeaQuery) Order

func (_q *IdeaQuery) Order(o ...idea.OrderOption) *IdeaQuery

Order specifies how the records should be ordered.

func (*IdeaQuery) Select

func (_q *IdeaQuery) Select(fields ...string) *IdeaSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Idea.Query().
	Select(idea.FieldProduct).
	Scan(ctx, &v)

func (*IdeaQuery) Unique

func (_q *IdeaQuery) Unique(unique bool) *IdeaQuery

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 (*IdeaQuery) Where

func (_q *IdeaQuery) Where(ps ...predicate.Idea) *IdeaQuery

Where adds a new predicate for the IdeaQuery builder.

type IdeaSelect

type IdeaSelect struct {
	*IdeaQuery
	// contains filtered or unexported fields
}

IdeaSelect is the builder for selecting fields of Idea entities.

func (*IdeaSelect) Aggregate

func (_s *IdeaSelect) Aggregate(fns ...AggregateFunc) *IdeaSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IdeaSelect) Bool

func (s *IdeaSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) BoolX

func (s *IdeaSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaSelect) Bools

func (s *IdeaSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) BoolsX

func (s *IdeaSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaSelect) Float64

func (s *IdeaSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) Float64X

func (s *IdeaSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaSelect) Float64s

func (s *IdeaSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) Float64sX

func (s *IdeaSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaSelect) Int

func (s *IdeaSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) IntX

func (s *IdeaSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaSelect) Ints

func (s *IdeaSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) IntsX

func (s *IdeaSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaSelect) Scan

func (_s *IdeaSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaSelect) ScanX

func (s *IdeaSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaSelect) String

func (s *IdeaSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) StringX

func (s *IdeaSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaSelect) Strings

func (s *IdeaSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaSelect) StringsX

func (s *IdeaSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaUpdate

type IdeaUpdate struct {
	// contains filtered or unexported fields
}

IdeaUpdate is the builder for updating Idea entities.

func (*IdeaUpdate) AddVotes

func (_u *IdeaUpdate) AddVotes(v int) *IdeaUpdate

AddVotes adds value to the "votes" field.

func (*IdeaUpdate) ClearCreatedAt

func (_u *IdeaUpdate) ClearCreatedAt() *IdeaUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUpdate) ClearData

func (_u *IdeaUpdate) ClearData() *IdeaUpdate

ClearData clears the value of the "data" field.

func (*IdeaUpdate) ClearDescription

func (_u *IdeaUpdate) ClearDescription() *IdeaUpdate

ClearDescription clears the value of the "description" field.

func (*IdeaUpdate) ClearName

func (_u *IdeaUpdate) ClearName() *IdeaUpdate

ClearName clears the value of the "name" field.

func (*IdeaUpdate) ClearReferenceNum

func (_u *IdeaUpdate) ClearReferenceNum() *IdeaUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaUpdate) ClearStatus

func (_u *IdeaUpdate) ClearStatus() *IdeaUpdate

ClearStatus clears the value of the "status" field.

func (*IdeaUpdate) ClearTags

func (_u *IdeaUpdate) ClearTags() *IdeaUpdate

ClearTags clears the value of the "tags" field.

func (*IdeaUpdate) ClearURL

func (_u *IdeaUpdate) ClearURL() *IdeaUpdate

ClearURL clears the value of the "url" field.

func (*IdeaUpdate) ClearUpdatedAt

func (_u *IdeaUpdate) ClearUpdatedAt() *IdeaUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaUpdate) ClearVotes

func (_u *IdeaUpdate) ClearVotes() *IdeaUpdate

ClearVotes clears the value of the "votes" field.

func (*IdeaUpdate) Exec

func (_u *IdeaUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUpdate) ExecX

func (_u *IdeaUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUpdate) Mutation

func (_u *IdeaUpdate) Mutation() *IdeaMutation

Mutation returns the IdeaMutation object of the builder.

func (*IdeaUpdate) Save

func (_u *IdeaUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*IdeaUpdate) SaveX

func (_u *IdeaUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*IdeaUpdate) SetCreatedAt

func (_u *IdeaUpdate) SetCreatedAt(v time.Time) *IdeaUpdate

SetCreatedAt sets the "created_at" field.

func (*IdeaUpdate) SetData

func (_u *IdeaUpdate) SetData(v map[string]interface{}) *IdeaUpdate

SetData sets the "data" field.

func (*IdeaUpdate) SetDescription

func (_u *IdeaUpdate) SetDescription(v string) *IdeaUpdate

SetDescription sets the "description" field.

func (*IdeaUpdate) SetName

func (_u *IdeaUpdate) SetName(v string) *IdeaUpdate

SetName sets the "name" field.

func (*IdeaUpdate) SetNillableCreatedAt

func (_u *IdeaUpdate) SetNillableCreatedAt(v *time.Time) *IdeaUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaUpdate) SetNillableDescription

func (_u *IdeaUpdate) SetNillableDescription(v *string) *IdeaUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*IdeaUpdate) SetNillableName

func (_u *IdeaUpdate) SetNillableName(v *string) *IdeaUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*IdeaUpdate) SetNillableProduct

func (_u *IdeaUpdate) SetNillableProduct(v *string) *IdeaUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*IdeaUpdate) SetNillableReferenceNum

func (_u *IdeaUpdate) SetNillableReferenceNum(v *string) *IdeaUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*IdeaUpdate) SetNillableStatus

func (_u *IdeaUpdate) SetNillableStatus(v *string) *IdeaUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*IdeaUpdate) SetNillableTags

func (_u *IdeaUpdate) SetNillableTags(v *string) *IdeaUpdate

SetNillableTags sets the "tags" field if the given value is not nil.

func (*IdeaUpdate) SetNillableURL

func (_u *IdeaUpdate) SetNillableURL(v *string) *IdeaUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*IdeaUpdate) SetNillableUpdatedAt

func (_u *IdeaUpdate) SetNillableUpdatedAt(v *time.Time) *IdeaUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaUpdate) SetNillableVotes

func (_u *IdeaUpdate) SetNillableVotes(v *int) *IdeaUpdate

SetNillableVotes sets the "votes" field if the given value is not nil.

func (*IdeaUpdate) SetProduct

func (_u *IdeaUpdate) SetProduct(v string) *IdeaUpdate

SetProduct sets the "product" field.

func (*IdeaUpdate) SetReferenceNum

func (_u *IdeaUpdate) SetReferenceNum(v string) *IdeaUpdate

SetReferenceNum sets the "reference_num" field.

func (*IdeaUpdate) SetStatus

func (_u *IdeaUpdate) SetStatus(v string) *IdeaUpdate

SetStatus sets the "status" field.

func (*IdeaUpdate) SetTags

func (_u *IdeaUpdate) SetTags(v string) *IdeaUpdate

SetTags sets the "tags" field.

func (*IdeaUpdate) SetURL

func (_u *IdeaUpdate) SetURL(v string) *IdeaUpdate

SetURL sets the "url" field.

func (*IdeaUpdate) SetUpdatedAt

func (_u *IdeaUpdate) SetUpdatedAt(v time.Time) *IdeaUpdate

SetUpdatedAt sets the "updated_at" field.

func (*IdeaUpdate) SetVotes

func (_u *IdeaUpdate) SetVotes(v int) *IdeaUpdate

SetVotes sets the "votes" field.

func (*IdeaUpdate) Where

func (_u *IdeaUpdate) Where(ps ...predicate.Idea) *IdeaUpdate

Where appends a list predicates to the IdeaUpdate builder.

type IdeaUpdateOne

type IdeaUpdateOne struct {
	// contains filtered or unexported fields
}

IdeaUpdateOne is the builder for updating a single Idea entity.

func (*IdeaUpdateOne) AddVotes

func (_u *IdeaUpdateOne) AddVotes(v int) *IdeaUpdateOne

AddVotes adds value to the "votes" field.

func (*IdeaUpdateOne) ClearCreatedAt

func (_u *IdeaUpdateOne) ClearCreatedAt() *IdeaUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUpdateOne) ClearData

func (_u *IdeaUpdateOne) ClearData() *IdeaUpdateOne

ClearData clears the value of the "data" field.

func (*IdeaUpdateOne) ClearDescription

func (_u *IdeaUpdateOne) ClearDescription() *IdeaUpdateOne

ClearDescription clears the value of the "description" field.

func (*IdeaUpdateOne) ClearName

func (_u *IdeaUpdateOne) ClearName() *IdeaUpdateOne

ClearName clears the value of the "name" field.

func (*IdeaUpdateOne) ClearReferenceNum

func (_u *IdeaUpdateOne) ClearReferenceNum() *IdeaUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaUpdateOne) ClearStatus

func (_u *IdeaUpdateOne) ClearStatus() *IdeaUpdateOne

ClearStatus clears the value of the "status" field.

func (*IdeaUpdateOne) ClearTags

func (_u *IdeaUpdateOne) ClearTags() *IdeaUpdateOne

ClearTags clears the value of the "tags" field.

func (*IdeaUpdateOne) ClearURL

func (_u *IdeaUpdateOne) ClearURL() *IdeaUpdateOne

ClearURL clears the value of the "url" field.

func (*IdeaUpdateOne) ClearUpdatedAt

func (_u *IdeaUpdateOne) ClearUpdatedAt() *IdeaUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaUpdateOne) ClearVotes

func (_u *IdeaUpdateOne) ClearVotes() *IdeaUpdateOne

ClearVotes clears the value of the "votes" field.

func (*IdeaUpdateOne) Exec

func (_u *IdeaUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*IdeaUpdateOne) ExecX

func (_u *IdeaUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUpdateOne) Mutation

func (_u *IdeaUpdateOne) Mutation() *IdeaMutation

Mutation returns the IdeaMutation object of the builder.

func (*IdeaUpdateOne) Save

func (_u *IdeaUpdateOne) Save(ctx context.Context) (*Idea, error)

Save executes the query and returns the updated Idea entity.

func (*IdeaUpdateOne) SaveX

func (_u *IdeaUpdateOne) SaveX(ctx context.Context) *Idea

SaveX is like Save, but panics if an error occurs.

func (*IdeaUpdateOne) Select

func (_u *IdeaUpdateOne) Select(field string, fields ...string) *IdeaUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IdeaUpdateOne) SetCreatedAt

func (_u *IdeaUpdateOne) SetCreatedAt(v time.Time) *IdeaUpdateOne

SetCreatedAt sets the "created_at" field.

func (*IdeaUpdateOne) SetData

func (_u *IdeaUpdateOne) SetData(v map[string]interface{}) *IdeaUpdateOne

SetData sets the "data" field.

func (*IdeaUpdateOne) SetDescription

func (_u *IdeaUpdateOne) SetDescription(v string) *IdeaUpdateOne

SetDescription sets the "description" field.

func (*IdeaUpdateOne) SetName

func (_u *IdeaUpdateOne) SetName(v string) *IdeaUpdateOne

SetName sets the "name" field.

func (*IdeaUpdateOne) SetNillableCreatedAt

func (_u *IdeaUpdateOne) SetNillableCreatedAt(v *time.Time) *IdeaUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableDescription

func (_u *IdeaUpdateOne) SetNillableDescription(v *string) *IdeaUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableName

func (_u *IdeaUpdateOne) SetNillableName(v *string) *IdeaUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableProduct

func (_u *IdeaUpdateOne) SetNillableProduct(v *string) *IdeaUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableReferenceNum

func (_u *IdeaUpdateOne) SetNillableReferenceNum(v *string) *IdeaUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableStatus

func (_u *IdeaUpdateOne) SetNillableStatus(v *string) *IdeaUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableTags

func (_u *IdeaUpdateOne) SetNillableTags(v *string) *IdeaUpdateOne

SetNillableTags sets the "tags" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableURL

func (_u *IdeaUpdateOne) SetNillableURL(v *string) *IdeaUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableUpdatedAt

func (_u *IdeaUpdateOne) SetNillableUpdatedAt(v *time.Time) *IdeaUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IdeaUpdateOne) SetNillableVotes

func (_u *IdeaUpdateOne) SetNillableVotes(v *int) *IdeaUpdateOne

SetNillableVotes sets the "votes" field if the given value is not nil.

func (*IdeaUpdateOne) SetProduct

func (_u *IdeaUpdateOne) SetProduct(v string) *IdeaUpdateOne

SetProduct sets the "product" field.

func (*IdeaUpdateOne) SetReferenceNum

func (_u *IdeaUpdateOne) SetReferenceNum(v string) *IdeaUpdateOne

SetReferenceNum sets the "reference_num" field.

func (*IdeaUpdateOne) SetStatus

func (_u *IdeaUpdateOne) SetStatus(v string) *IdeaUpdateOne

SetStatus sets the "status" field.

func (*IdeaUpdateOne) SetTags

func (_u *IdeaUpdateOne) SetTags(v string) *IdeaUpdateOne

SetTags sets the "tags" field.

func (*IdeaUpdateOne) SetURL

func (_u *IdeaUpdateOne) SetURL(v string) *IdeaUpdateOne

SetURL sets the "url" field.

func (*IdeaUpdateOne) SetUpdatedAt

func (_u *IdeaUpdateOne) SetUpdatedAt(v time.Time) *IdeaUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*IdeaUpdateOne) SetVotes

func (_u *IdeaUpdateOne) SetVotes(v int) *IdeaUpdateOne

SetVotes sets the "votes" field.

func (*IdeaUpdateOne) Where

func (_u *IdeaUpdateOne) Where(ps ...predicate.Idea) *IdeaUpdateOne

Where appends a list predicates to the IdeaUpdate builder.

type IdeaUpsert

type IdeaUpsert struct {
	*sql.UpdateSet
}

IdeaUpsert is the "OnConflict" setter.

func (*IdeaUpsert) AddVotes

func (u *IdeaUpsert) AddVotes(v int) *IdeaUpsert

AddVotes adds v to the "votes" field.

func (*IdeaUpsert) ClearCreatedAt

func (u *IdeaUpsert) ClearCreatedAt() *IdeaUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUpsert) ClearData

func (u *IdeaUpsert) ClearData() *IdeaUpsert

ClearData clears the value of the "data" field.

func (*IdeaUpsert) ClearDescription

func (u *IdeaUpsert) ClearDescription() *IdeaUpsert

ClearDescription clears the value of the "description" field.

func (*IdeaUpsert) ClearName

func (u *IdeaUpsert) ClearName() *IdeaUpsert

ClearName clears the value of the "name" field.

func (*IdeaUpsert) ClearReferenceNum

func (u *IdeaUpsert) ClearReferenceNum() *IdeaUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaUpsert) ClearStatus

func (u *IdeaUpsert) ClearStatus() *IdeaUpsert

ClearStatus clears the value of the "status" field.

func (*IdeaUpsert) ClearTags

func (u *IdeaUpsert) ClearTags() *IdeaUpsert

ClearTags clears the value of the "tags" field.

func (*IdeaUpsert) ClearURL

func (u *IdeaUpsert) ClearURL() *IdeaUpsert

ClearURL clears the value of the "url" field.

func (*IdeaUpsert) ClearUpdatedAt

func (u *IdeaUpsert) ClearUpdatedAt() *IdeaUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaUpsert) ClearVotes

func (u *IdeaUpsert) ClearVotes() *IdeaUpsert

ClearVotes clears the value of the "votes" field.

func (*IdeaUpsert) SetCreatedAt

func (u *IdeaUpsert) SetCreatedAt(v time.Time) *IdeaUpsert

SetCreatedAt sets the "created_at" field.

func (*IdeaUpsert) SetData

func (u *IdeaUpsert) SetData(v map[string]interface{}) *IdeaUpsert

SetData sets the "data" field.

func (*IdeaUpsert) SetDescription

func (u *IdeaUpsert) SetDescription(v string) *IdeaUpsert

SetDescription sets the "description" field.

func (*IdeaUpsert) SetName

func (u *IdeaUpsert) SetName(v string) *IdeaUpsert

SetName sets the "name" field.

func (*IdeaUpsert) SetProduct

func (u *IdeaUpsert) SetProduct(v string) *IdeaUpsert

SetProduct sets the "product" field.

func (*IdeaUpsert) SetReferenceNum

func (u *IdeaUpsert) SetReferenceNum(v string) *IdeaUpsert

SetReferenceNum sets the "reference_num" field.

func (*IdeaUpsert) SetStatus

func (u *IdeaUpsert) SetStatus(v string) *IdeaUpsert

SetStatus sets the "status" field.

func (*IdeaUpsert) SetTags

func (u *IdeaUpsert) SetTags(v string) *IdeaUpsert

SetTags sets the "tags" field.

func (*IdeaUpsert) SetURL

func (u *IdeaUpsert) SetURL(v string) *IdeaUpsert

SetURL sets the "url" field.

func (*IdeaUpsert) SetUpdatedAt

func (u *IdeaUpsert) SetUpdatedAt(v time.Time) *IdeaUpsert

SetUpdatedAt sets the "updated_at" field.

func (*IdeaUpsert) SetVotes

func (u *IdeaUpsert) SetVotes(v int) *IdeaUpsert

SetVotes sets the "votes" field.

func (*IdeaUpsert) UpdateCreatedAt

func (u *IdeaUpsert) UpdateCreatedAt() *IdeaUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaUpsert) UpdateData

func (u *IdeaUpsert) UpdateData() *IdeaUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*IdeaUpsert) UpdateDescription

func (u *IdeaUpsert) UpdateDescription() *IdeaUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*IdeaUpsert) UpdateName

func (u *IdeaUpsert) UpdateName() *IdeaUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaUpsert) UpdateProduct

func (u *IdeaUpsert) UpdateProduct() *IdeaUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*IdeaUpsert) UpdateReferenceNum

func (u *IdeaUpsert) UpdateReferenceNum() *IdeaUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*IdeaUpsert) UpdateStatus

func (u *IdeaUpsert) UpdateStatus() *IdeaUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*IdeaUpsert) UpdateTags

func (u *IdeaUpsert) UpdateTags() *IdeaUpsert

UpdateTags sets the "tags" field to the value that was provided on create.

func (*IdeaUpsert) UpdateURL

func (u *IdeaUpsert) UpdateURL() *IdeaUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*IdeaUpsert) UpdateUpdatedAt

func (u *IdeaUpsert) UpdateUpdatedAt() *IdeaUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*IdeaUpsert) UpdateVotes

func (u *IdeaUpsert) UpdateVotes() *IdeaUpsert

UpdateVotes sets the "votes" field to the value that was provided on create.

type IdeaUpsertBulk

type IdeaUpsertBulk struct {
	// contains filtered or unexported fields
}

IdeaUpsertBulk is the builder for "upsert"-ing a bulk of Idea nodes.

func (*IdeaUpsertBulk) AddVotes

func (u *IdeaUpsertBulk) AddVotes(v int) *IdeaUpsertBulk

AddVotes adds v to the "votes" field.

func (*IdeaUpsertBulk) ClearCreatedAt

func (u *IdeaUpsertBulk) ClearCreatedAt() *IdeaUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUpsertBulk) ClearData

func (u *IdeaUpsertBulk) ClearData() *IdeaUpsertBulk

ClearData clears the value of the "data" field.

func (*IdeaUpsertBulk) ClearDescription

func (u *IdeaUpsertBulk) ClearDescription() *IdeaUpsertBulk

ClearDescription clears the value of the "description" field.

func (*IdeaUpsertBulk) ClearName

func (u *IdeaUpsertBulk) ClearName() *IdeaUpsertBulk

ClearName clears the value of the "name" field.

func (*IdeaUpsertBulk) ClearReferenceNum

func (u *IdeaUpsertBulk) ClearReferenceNum() *IdeaUpsertBulk

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaUpsertBulk) ClearStatus

func (u *IdeaUpsertBulk) ClearStatus() *IdeaUpsertBulk

ClearStatus clears the value of the "status" field.

func (*IdeaUpsertBulk) ClearTags

func (u *IdeaUpsertBulk) ClearTags() *IdeaUpsertBulk

ClearTags clears the value of the "tags" field.

func (*IdeaUpsertBulk) ClearURL

func (u *IdeaUpsertBulk) ClearURL() *IdeaUpsertBulk

ClearURL clears the value of the "url" field.

func (*IdeaUpsertBulk) ClearUpdatedAt

func (u *IdeaUpsertBulk) ClearUpdatedAt() *IdeaUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaUpsertBulk) ClearVotes

func (u *IdeaUpsertBulk) ClearVotes() *IdeaUpsertBulk

ClearVotes clears the value of the "votes" field.

func (*IdeaUpsertBulk) DoNothing

func (u *IdeaUpsertBulk) DoNothing() *IdeaUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaUpsertBulk) Exec

func (u *IdeaUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUpsertBulk) ExecX

func (u *IdeaUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUpsertBulk) Ignore

func (u *IdeaUpsertBulk) Ignore() *IdeaUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Idea.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*IdeaUpsertBulk) SetCreatedAt

func (u *IdeaUpsertBulk) SetCreatedAt(v time.Time) *IdeaUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*IdeaUpsertBulk) SetData

func (u *IdeaUpsertBulk) SetData(v map[string]interface{}) *IdeaUpsertBulk

SetData sets the "data" field.

func (*IdeaUpsertBulk) SetDescription

func (u *IdeaUpsertBulk) SetDescription(v string) *IdeaUpsertBulk

SetDescription sets the "description" field.

func (*IdeaUpsertBulk) SetName

func (u *IdeaUpsertBulk) SetName(v string) *IdeaUpsertBulk

SetName sets the "name" field.

func (*IdeaUpsertBulk) SetProduct

func (u *IdeaUpsertBulk) SetProduct(v string) *IdeaUpsertBulk

SetProduct sets the "product" field.

func (*IdeaUpsertBulk) SetReferenceNum

func (u *IdeaUpsertBulk) SetReferenceNum(v string) *IdeaUpsertBulk

SetReferenceNum sets the "reference_num" field.

func (*IdeaUpsertBulk) SetStatus

func (u *IdeaUpsertBulk) SetStatus(v string) *IdeaUpsertBulk

SetStatus sets the "status" field.

func (*IdeaUpsertBulk) SetTags

func (u *IdeaUpsertBulk) SetTags(v string) *IdeaUpsertBulk

SetTags sets the "tags" field.

func (*IdeaUpsertBulk) SetURL

func (u *IdeaUpsertBulk) SetURL(v string) *IdeaUpsertBulk

SetURL sets the "url" field.

func (*IdeaUpsertBulk) SetUpdatedAt

func (u *IdeaUpsertBulk) SetUpdatedAt(v time.Time) *IdeaUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*IdeaUpsertBulk) SetVotes

func (u *IdeaUpsertBulk) SetVotes(v int) *IdeaUpsertBulk

SetVotes sets the "votes" field.

func (*IdeaUpsertBulk) Update

func (u *IdeaUpsertBulk) Update(set func(*IdeaUpsert)) *IdeaUpsertBulk

Update allows overriding fields `UPDATE` values. See the IdeaCreateBulk.OnConflict documentation for more info.

func (*IdeaUpsertBulk) UpdateCreatedAt

func (u *IdeaUpsertBulk) UpdateCreatedAt() *IdeaUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateData

func (u *IdeaUpsertBulk) UpdateData() *IdeaUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateDescription

func (u *IdeaUpsertBulk) UpdateDescription() *IdeaUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateName

func (u *IdeaUpsertBulk) UpdateName() *IdeaUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateNewValues

func (u *IdeaUpsertBulk) UpdateNewValues() *IdeaUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Idea.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(idea.FieldID)
		}),
	).
	Exec(ctx)

func (*IdeaUpsertBulk) UpdateProduct

func (u *IdeaUpsertBulk) UpdateProduct() *IdeaUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateReferenceNum

func (u *IdeaUpsertBulk) UpdateReferenceNum() *IdeaUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateStatus

func (u *IdeaUpsertBulk) UpdateStatus() *IdeaUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateTags

func (u *IdeaUpsertBulk) UpdateTags() *IdeaUpsertBulk

UpdateTags sets the "tags" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateURL

func (u *IdeaUpsertBulk) UpdateURL() *IdeaUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateUpdatedAt

func (u *IdeaUpsertBulk) UpdateUpdatedAt() *IdeaUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*IdeaUpsertBulk) UpdateVotes

func (u *IdeaUpsertBulk) UpdateVotes() *IdeaUpsertBulk

UpdateVotes sets the "votes" field to the value that was provided on create.

type IdeaUpsertOne

type IdeaUpsertOne struct {
	// contains filtered or unexported fields
}

IdeaUpsertOne is the builder for "upsert"-ing

one Idea node.

func (*IdeaUpsertOne) AddVotes

func (u *IdeaUpsertOne) AddVotes(v int) *IdeaUpsertOne

AddVotes adds v to the "votes" field.

func (*IdeaUpsertOne) ClearCreatedAt

func (u *IdeaUpsertOne) ClearCreatedAt() *IdeaUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUpsertOne) ClearData

func (u *IdeaUpsertOne) ClearData() *IdeaUpsertOne

ClearData clears the value of the "data" field.

func (*IdeaUpsertOne) ClearDescription

func (u *IdeaUpsertOne) ClearDescription() *IdeaUpsertOne

ClearDescription clears the value of the "description" field.

func (*IdeaUpsertOne) ClearName

func (u *IdeaUpsertOne) ClearName() *IdeaUpsertOne

ClearName clears the value of the "name" field.

func (*IdeaUpsertOne) ClearReferenceNum

func (u *IdeaUpsertOne) ClearReferenceNum() *IdeaUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*IdeaUpsertOne) ClearStatus

func (u *IdeaUpsertOne) ClearStatus() *IdeaUpsertOne

ClearStatus clears the value of the "status" field.

func (*IdeaUpsertOne) ClearTags

func (u *IdeaUpsertOne) ClearTags() *IdeaUpsertOne

ClearTags clears the value of the "tags" field.

func (*IdeaUpsertOne) ClearURL

func (u *IdeaUpsertOne) ClearURL() *IdeaUpsertOne

ClearURL clears the value of the "url" field.

func (*IdeaUpsertOne) ClearUpdatedAt

func (u *IdeaUpsertOne) ClearUpdatedAt() *IdeaUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*IdeaUpsertOne) ClearVotes

func (u *IdeaUpsertOne) ClearVotes() *IdeaUpsertOne

ClearVotes clears the value of the "votes" field.

func (*IdeaUpsertOne) DoNothing

func (u *IdeaUpsertOne) DoNothing() *IdeaUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaUpsertOne) Exec

func (u *IdeaUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUpsertOne) ExecX

func (u *IdeaUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUpsertOne) ID

func (u *IdeaUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*IdeaUpsertOne) IDX

func (u *IdeaUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*IdeaUpsertOne) Ignore

func (u *IdeaUpsertOne) Ignore() *IdeaUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Idea.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*IdeaUpsertOne) SetCreatedAt

func (u *IdeaUpsertOne) SetCreatedAt(v time.Time) *IdeaUpsertOne

SetCreatedAt sets the "created_at" field.

func (*IdeaUpsertOne) SetData

func (u *IdeaUpsertOne) SetData(v map[string]interface{}) *IdeaUpsertOne

SetData sets the "data" field.

func (*IdeaUpsertOne) SetDescription

func (u *IdeaUpsertOne) SetDescription(v string) *IdeaUpsertOne

SetDescription sets the "description" field.

func (*IdeaUpsertOne) SetName

func (u *IdeaUpsertOne) SetName(v string) *IdeaUpsertOne

SetName sets the "name" field.

func (*IdeaUpsertOne) SetProduct

func (u *IdeaUpsertOne) SetProduct(v string) *IdeaUpsertOne

SetProduct sets the "product" field.

func (*IdeaUpsertOne) SetReferenceNum

func (u *IdeaUpsertOne) SetReferenceNum(v string) *IdeaUpsertOne

SetReferenceNum sets the "reference_num" field.

func (*IdeaUpsertOne) SetStatus

func (u *IdeaUpsertOne) SetStatus(v string) *IdeaUpsertOne

SetStatus sets the "status" field.

func (*IdeaUpsertOne) SetTags

func (u *IdeaUpsertOne) SetTags(v string) *IdeaUpsertOne

SetTags sets the "tags" field.

func (*IdeaUpsertOne) SetURL

func (u *IdeaUpsertOne) SetURL(v string) *IdeaUpsertOne

SetURL sets the "url" field.

func (*IdeaUpsertOne) SetUpdatedAt

func (u *IdeaUpsertOne) SetUpdatedAt(v time.Time) *IdeaUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*IdeaUpsertOne) SetVotes

func (u *IdeaUpsertOne) SetVotes(v int) *IdeaUpsertOne

SetVotes sets the "votes" field.

func (*IdeaUpsertOne) Update

func (u *IdeaUpsertOne) Update(set func(*IdeaUpsert)) *IdeaUpsertOne

Update allows overriding fields `UPDATE` values. See the IdeaCreate.OnConflict documentation for more info.

func (*IdeaUpsertOne) UpdateCreatedAt

func (u *IdeaUpsertOne) UpdateCreatedAt() *IdeaUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateData

func (u *IdeaUpsertOne) UpdateData() *IdeaUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateDescription

func (u *IdeaUpsertOne) UpdateDescription() *IdeaUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateName

func (u *IdeaUpsertOne) UpdateName() *IdeaUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateNewValues

func (u *IdeaUpsertOne) UpdateNewValues() *IdeaUpsertOne

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.Idea.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(idea.FieldID)
		}),
	).
	Exec(ctx)

func (*IdeaUpsertOne) UpdateProduct

func (u *IdeaUpsertOne) UpdateProduct() *IdeaUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateReferenceNum

func (u *IdeaUpsertOne) UpdateReferenceNum() *IdeaUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateStatus

func (u *IdeaUpsertOne) UpdateStatus() *IdeaUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateTags

func (u *IdeaUpsertOne) UpdateTags() *IdeaUpsertOne

UpdateTags sets the "tags" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateURL

func (u *IdeaUpsertOne) UpdateURL() *IdeaUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateUpdatedAt

func (u *IdeaUpsertOne) UpdateUpdatedAt() *IdeaUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*IdeaUpsertOne) UpdateVotes

func (u *IdeaUpsertOne) UpdateVotes() *IdeaUpsertOne

UpdateVotes sets the "votes" field to the value that was provided on create.

type IdeaUser

type IdeaUser struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// IdeaOrganizations holds the value of the "idea_organizations" field.
	IdeaOrganizations []map[string]interface{} `json:"idea_organizations,omitempty"`
	// contains filtered or unexported fields
}

IdeaUser is the model entity for the IdeaUser schema.

func (*IdeaUser) String

func (_m *IdeaUser) String() string

String implements the fmt.Stringer.

func (*IdeaUser) Unwrap

func (_m *IdeaUser) Unwrap() *IdeaUser

Unwrap unwraps the IdeaUser 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 (*IdeaUser) Update

func (_m *IdeaUser) Update() *IdeaUserUpdateOne

Update returns a builder for updating this IdeaUser. Note that you need to call IdeaUser.Unwrap() before calling this method if this IdeaUser was returned from a transaction, and the transaction was committed or rolled back.

func (*IdeaUser) Value

func (_m *IdeaUser) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the IdeaUser. This includes values selected through modifiers, order, etc.

type IdeaUserClient

type IdeaUserClient struct {
	// contains filtered or unexported fields
}

IdeaUserClient is a client for the IdeaUser schema.

func NewIdeaUserClient

func NewIdeaUserClient(c config) *IdeaUserClient

NewIdeaUserClient returns a client for the IdeaUser from the given config.

func (*IdeaUserClient) Create

func (c *IdeaUserClient) Create() *IdeaUserCreate

Create returns a builder for creating a IdeaUser entity.

func (*IdeaUserClient) CreateBulk

func (c *IdeaUserClient) CreateBulk(builders ...*IdeaUserCreate) *IdeaUserCreateBulk

CreateBulk returns a builder for creating a bulk of IdeaUser entities.

func (*IdeaUserClient) Delete

func (c *IdeaUserClient) Delete() *IdeaUserDelete

Delete returns a delete builder for IdeaUser.

func (*IdeaUserClient) DeleteOne

func (c *IdeaUserClient) DeleteOne(_m *IdeaUser) *IdeaUserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IdeaUserClient) DeleteOneID

func (c *IdeaUserClient) DeleteOneID(id string) *IdeaUserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*IdeaUserClient) Get

func (c *IdeaUserClient) Get(ctx context.Context, id string) (*IdeaUser, error)

Get returns a IdeaUser entity by its id.

func (*IdeaUserClient) GetX

func (c *IdeaUserClient) GetX(ctx context.Context, id string) *IdeaUser

GetX is like Get, but panics if an error occurs.

func (*IdeaUserClient) Hooks

func (c *IdeaUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*IdeaUserClient) Intercept

func (c *IdeaUserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ideauser.Intercept(f(g(h())))`.

func (*IdeaUserClient) Interceptors

func (c *IdeaUserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*IdeaUserClient) MapCreateBulk

func (c *IdeaUserClient) MapCreateBulk(slice any, setFunc func(*IdeaUserCreate, int)) *IdeaUserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*IdeaUserClient) Query

func (c *IdeaUserClient) Query() *IdeaUserQuery

Query returns a query builder for IdeaUser.

func (*IdeaUserClient) Update

func (c *IdeaUserClient) Update() *IdeaUserUpdate

Update returns an update builder for IdeaUser.

func (*IdeaUserClient) UpdateOne

func (c *IdeaUserClient) UpdateOne(_m *IdeaUser) *IdeaUserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*IdeaUserClient) UpdateOneID

func (c *IdeaUserClient) UpdateOneID(id string) *IdeaUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*IdeaUserClient) Use

func (c *IdeaUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ideauser.Hooks(f(g(h())))`.

type IdeaUserCreate

type IdeaUserCreate struct {
	// contains filtered or unexported fields
}

IdeaUserCreate is the builder for creating a IdeaUser entity.

func (*IdeaUserCreate) Exec

func (_c *IdeaUserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUserCreate) ExecX

func (_c *IdeaUserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserCreate) Mutation

func (_c *IdeaUserCreate) Mutation() *IdeaUserMutation

Mutation returns the IdeaUserMutation object of the builder.

func (*IdeaUserCreate) OnConflict

func (_c *IdeaUserCreate) OnConflict(opts ...sql.ConflictOption) *IdeaUserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdeaUser.Create().
	SetName(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.IdeaUserUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*IdeaUserCreate) OnConflictColumns

func (_c *IdeaUserCreate) OnConflictColumns(columns ...string) *IdeaUserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdeaUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdeaUserCreate) Save

func (_c *IdeaUserCreate) Save(ctx context.Context) (*IdeaUser, error)

Save creates the IdeaUser in the database.

func (*IdeaUserCreate) SaveX

func (_c *IdeaUserCreate) SaveX(ctx context.Context) *IdeaUser

SaveX calls Save and panics if Save returns an error.

func (*IdeaUserCreate) SetCreatedAt

func (_c *IdeaUserCreate) SetCreatedAt(v time.Time) *IdeaUserCreate

SetCreatedAt sets the "created_at" field.

func (*IdeaUserCreate) SetEmail

func (_c *IdeaUserCreate) SetEmail(v string) *IdeaUserCreate

SetEmail sets the "email" field.

func (*IdeaUserCreate) SetID

func (_c *IdeaUserCreate) SetID(v string) *IdeaUserCreate

SetID sets the "id" field.

func (*IdeaUserCreate) SetIdeaOrganizations

func (_c *IdeaUserCreate) SetIdeaOrganizations(v []map[string]interface{}) *IdeaUserCreate

SetIdeaOrganizations sets the "idea_organizations" field.

func (*IdeaUserCreate) SetName

func (_c *IdeaUserCreate) SetName(v string) *IdeaUserCreate

SetName sets the "name" field.

func (*IdeaUserCreate) SetNillableCreatedAt

func (_c *IdeaUserCreate) SetNillableCreatedAt(v *time.Time) *IdeaUserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaUserCreate) SetNillableEmail

func (_c *IdeaUserCreate) SetNillableEmail(v *string) *IdeaUserCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*IdeaUserCreate) SetNillableName

func (_c *IdeaUserCreate) SetNillableName(v *string) *IdeaUserCreate

SetNillableName sets the "name" field if the given value is not nil.

type IdeaUserCreateBulk

type IdeaUserCreateBulk struct {
	// contains filtered or unexported fields
}

IdeaUserCreateBulk is the builder for creating many IdeaUser entities in bulk.

func (*IdeaUserCreateBulk) Exec

func (_c *IdeaUserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUserCreateBulk) ExecX

func (_c *IdeaUserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserCreateBulk) OnConflict

func (_c *IdeaUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *IdeaUserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IdeaUser.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.IdeaUserUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*IdeaUserCreateBulk) OnConflictColumns

func (_c *IdeaUserCreateBulk) OnConflictColumns(columns ...string) *IdeaUserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IdeaUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IdeaUserCreateBulk) Save

func (_c *IdeaUserCreateBulk) Save(ctx context.Context) ([]*IdeaUser, error)

Save creates the IdeaUser entities in the database.

func (*IdeaUserCreateBulk) SaveX

func (_c *IdeaUserCreateBulk) SaveX(ctx context.Context) []*IdeaUser

SaveX is like Save, but panics if an error occurs.

type IdeaUserDelete

type IdeaUserDelete struct {
	// contains filtered or unexported fields
}

IdeaUserDelete is the builder for deleting a IdeaUser entity.

func (*IdeaUserDelete) Exec

func (_d *IdeaUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*IdeaUserDelete) ExecX

func (_d *IdeaUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserDelete) Where

func (_d *IdeaUserDelete) Where(ps ...predicate.IdeaUser) *IdeaUserDelete

Where appends a list predicates to the IdeaUserDelete builder.

type IdeaUserDeleteOne

type IdeaUserDeleteOne struct {
	// contains filtered or unexported fields
}

IdeaUserDeleteOne is the builder for deleting a single IdeaUser entity.

func (*IdeaUserDeleteOne) Exec

func (_d *IdeaUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*IdeaUserDeleteOne) ExecX

func (_d *IdeaUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserDeleteOne) Where

Where appends a list predicates to the IdeaUserDelete builder.

type IdeaUserGroupBy

type IdeaUserGroupBy struct {
	// contains filtered or unexported fields
}

IdeaUserGroupBy is the group-by builder for IdeaUser entities.

func (*IdeaUserGroupBy) Aggregate

func (_g *IdeaUserGroupBy) Aggregate(fns ...AggregateFunc) *IdeaUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*IdeaUserGroupBy) Bool

func (s *IdeaUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) BoolX

func (s *IdeaUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaUserGroupBy) Bools

func (s *IdeaUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) BoolsX

func (s *IdeaUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaUserGroupBy) Float64

func (s *IdeaUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) Float64X

func (s *IdeaUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaUserGroupBy) Float64s

func (s *IdeaUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) Float64sX

func (s *IdeaUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaUserGroupBy) Int

func (s *IdeaUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) IntX

func (s *IdeaUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaUserGroupBy) Ints

func (s *IdeaUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) IntsX

func (s *IdeaUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaUserGroupBy) Scan

func (_g *IdeaUserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaUserGroupBy) ScanX

func (s *IdeaUserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaUserGroupBy) String

func (s *IdeaUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) StringX

func (s *IdeaUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaUserGroupBy) Strings

func (s *IdeaUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaUserGroupBy) StringsX

func (s *IdeaUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaUserMutation

type IdeaUserMutation struct {
	// contains filtered or unexported fields
}

IdeaUserMutation represents an operation that mutates the IdeaUser nodes in the graph.

func (*IdeaUserMutation) AddField

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) AddedEdges

func (m *IdeaUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*IdeaUserMutation) AddedField

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) AddedFields

func (m *IdeaUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*IdeaUserMutation) AddedIDs

func (m *IdeaUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*IdeaUserMutation) AppendIdeaOrganizations

func (m *IdeaUserMutation) AppendIdeaOrganizations(value []map[string]interface{})

AppendIdeaOrganizations adds value to the "idea_organizations" field.

func (*IdeaUserMutation) AppendedIdeaOrganizations

func (m *IdeaUserMutation) AppendedIdeaOrganizations() ([]map[string]interface{}, bool)

AppendedIdeaOrganizations returns the list of values that were appended to the "idea_organizations" field in this mutation.

func (*IdeaUserMutation) ClearCreatedAt

func (m *IdeaUserMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUserMutation) ClearEdge

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) ClearEmail

func (m *IdeaUserMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*IdeaUserMutation) ClearField

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) ClearIdeaOrganizations

func (m *IdeaUserMutation) ClearIdeaOrganizations()

ClearIdeaOrganizations clears the value of the "idea_organizations" field.

func (*IdeaUserMutation) ClearName

func (m *IdeaUserMutation) ClearName()

ClearName clears the value of the "name" field.

func (*IdeaUserMutation) ClearedEdges

func (m *IdeaUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*IdeaUserMutation) ClearedFields

func (m *IdeaUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (IdeaUserMutation) Client

func (m IdeaUserMutation) 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 (*IdeaUserMutation) CreatedAt

func (m *IdeaUserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IdeaUserMutation) CreatedAtCleared

func (m *IdeaUserMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*IdeaUserMutation) EdgeCleared

func (m *IdeaUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*IdeaUserMutation) Email

func (m *IdeaUserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*IdeaUserMutation) EmailCleared

func (m *IdeaUserMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*IdeaUserMutation) Field

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) FieldCleared

func (m *IdeaUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*IdeaUserMutation) Fields

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) ID

func (m *IdeaUserMutation) ID() (id string, 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 (*IdeaUserMutation) IDs

func (m *IdeaUserMutation) IDs(ctx context.Context) ([]string, 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 (*IdeaUserMutation) IdeaOrganizations

func (m *IdeaUserMutation) IdeaOrganizations() (r []map[string]interface{}, exists bool)

IdeaOrganizations returns the value of the "idea_organizations" field in the mutation.

func (*IdeaUserMutation) IdeaOrganizationsCleared

func (m *IdeaUserMutation) IdeaOrganizationsCleared() bool

IdeaOrganizationsCleared returns if the "idea_organizations" field was cleared in this mutation.

func (*IdeaUserMutation) Name

func (m *IdeaUserMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*IdeaUserMutation) NameCleared

func (m *IdeaUserMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*IdeaUserMutation) OldCreatedAt

func (m *IdeaUserMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the IdeaUser entity. If the IdeaUser 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 (*IdeaUserMutation) OldEmail

func (m *IdeaUserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the IdeaUser entity. If the IdeaUser 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 (*IdeaUserMutation) OldField

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) OldIdeaOrganizations

func (m *IdeaUserMutation) OldIdeaOrganizations(ctx context.Context) (v []map[string]interface{}, err error)

OldIdeaOrganizations returns the old "idea_organizations" field's value of the IdeaUser entity. If the IdeaUser 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 (*IdeaUserMutation) OldName

func (m *IdeaUserMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the IdeaUser entity. If the IdeaUser 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 (*IdeaUserMutation) Op

func (m *IdeaUserMutation) Op() Op

Op returns the operation name.

func (*IdeaUserMutation) RemovedEdges

func (m *IdeaUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*IdeaUserMutation) RemovedIDs

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) ResetCreatedAt

func (m *IdeaUserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IdeaUserMutation) ResetEdge

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) ResetEmail

func (m *IdeaUserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*IdeaUserMutation) ResetField

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) ResetIdeaOrganizations

func (m *IdeaUserMutation) ResetIdeaOrganizations()

ResetIdeaOrganizations resets all changes to the "idea_organizations" field.

func (*IdeaUserMutation) ResetName

func (m *IdeaUserMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*IdeaUserMutation) SetCreatedAt

func (m *IdeaUserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IdeaUserMutation) SetEmail

func (m *IdeaUserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*IdeaUserMutation) SetField

func (m *IdeaUserMutation) 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 (*IdeaUserMutation) SetID

func (m *IdeaUserMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of IdeaUser entities.

func (*IdeaUserMutation) SetIdeaOrganizations

func (m *IdeaUserMutation) SetIdeaOrganizations(value []map[string]interface{})

SetIdeaOrganizations sets the "idea_organizations" field.

func (*IdeaUserMutation) SetName

func (m *IdeaUserMutation) SetName(s string)

SetName sets the "name" field.

func (*IdeaUserMutation) SetOp

func (m *IdeaUserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (IdeaUserMutation) Tx

func (m IdeaUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*IdeaUserMutation) Type

func (m *IdeaUserMutation) Type() string

Type returns the node type of this mutation (IdeaUser).

func (*IdeaUserMutation) Where

func (m *IdeaUserMutation) Where(ps ...predicate.IdeaUser)

Where appends a list predicates to the IdeaUserMutation builder.

func (*IdeaUserMutation) WhereP

func (m *IdeaUserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IdeaUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IdeaUserQuery

type IdeaUserQuery struct {
	// contains filtered or unexported fields
}

IdeaUserQuery is the builder for querying IdeaUser entities.

func (*IdeaUserQuery) Aggregate

func (_q *IdeaUserQuery) Aggregate(fns ...AggregateFunc) *IdeaUserSelect

Aggregate returns a IdeaUserSelect configured with the given aggregations.

func (*IdeaUserQuery) All

func (_q *IdeaUserQuery) All(ctx context.Context) ([]*IdeaUser, error)

All executes the query and returns a list of IdeaUsers.

func (*IdeaUserQuery) AllX

func (_q *IdeaUserQuery) AllX(ctx context.Context) []*IdeaUser

AllX is like All, but panics if an error occurs.

func (*IdeaUserQuery) Clone

func (_q *IdeaUserQuery) Clone() *IdeaUserQuery

Clone returns a duplicate of the IdeaUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*IdeaUserQuery) Count

func (_q *IdeaUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IdeaUserQuery) CountX

func (_q *IdeaUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*IdeaUserQuery) Exist

func (_q *IdeaUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*IdeaUserQuery) ExistX

func (_q *IdeaUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*IdeaUserQuery) First

func (_q *IdeaUserQuery) First(ctx context.Context) (*IdeaUser, error)

First returns the first IdeaUser entity from the query. Returns a *NotFoundError when no IdeaUser was found.

func (*IdeaUserQuery) FirstID

func (_q *IdeaUserQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first IdeaUser ID from the query. Returns a *NotFoundError when no IdeaUser ID was found.

func (*IdeaUserQuery) FirstIDX

func (_q *IdeaUserQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*IdeaUserQuery) FirstX

func (_q *IdeaUserQuery) FirstX(ctx context.Context) *IdeaUser

FirstX is like First, but panics if an error occurs.

func (*IdeaUserQuery) GroupBy

func (_q *IdeaUserQuery) GroupBy(field string, fields ...string) *IdeaUserGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IdeaUser.Query().
	GroupBy(ideauser.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IdeaUserQuery) IDs

func (_q *IdeaUserQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of IdeaUser IDs.

func (*IdeaUserQuery) IDsX

func (_q *IdeaUserQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*IdeaUserQuery) Limit

func (_q *IdeaUserQuery) Limit(limit int) *IdeaUserQuery

Limit the number of records to be returned by this query.

func (*IdeaUserQuery) Offset

func (_q *IdeaUserQuery) Offset(offset int) *IdeaUserQuery

Offset to start from.

func (*IdeaUserQuery) Only

func (_q *IdeaUserQuery) Only(ctx context.Context) (*IdeaUser, error)

Only returns a single IdeaUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IdeaUser entity is found. Returns a *NotFoundError when no IdeaUser entities are found.

func (*IdeaUserQuery) OnlyID

func (_q *IdeaUserQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only IdeaUser ID in the query. Returns a *NotSingularError when more than one IdeaUser ID is found. Returns a *NotFoundError when no entities are found.

func (*IdeaUserQuery) OnlyIDX

func (_q *IdeaUserQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*IdeaUserQuery) OnlyX

func (_q *IdeaUserQuery) OnlyX(ctx context.Context) *IdeaUser

OnlyX is like Only, but panics if an error occurs.

func (*IdeaUserQuery) Order

Order specifies how the records should be ordered.

func (*IdeaUserQuery) Select

func (_q *IdeaUserQuery) Select(fields ...string) *IdeaUserSelect

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 {
	Name string `json:"name,omitempty"`
}

client.IdeaUser.Query().
	Select(ideauser.FieldName).
	Scan(ctx, &v)

func (*IdeaUserQuery) Unique

func (_q *IdeaUserQuery) Unique(unique bool) *IdeaUserQuery

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 (*IdeaUserQuery) Where

func (_q *IdeaUserQuery) Where(ps ...predicate.IdeaUser) *IdeaUserQuery

Where adds a new predicate for the IdeaUserQuery builder.

type IdeaUserSelect

type IdeaUserSelect struct {
	*IdeaUserQuery
	// contains filtered or unexported fields
}

IdeaUserSelect is the builder for selecting fields of IdeaUser entities.

func (*IdeaUserSelect) Aggregate

func (_s *IdeaUserSelect) Aggregate(fns ...AggregateFunc) *IdeaUserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IdeaUserSelect) Bool

func (s *IdeaUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) BoolX

func (s *IdeaUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IdeaUserSelect) Bools

func (s *IdeaUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) BoolsX

func (s *IdeaUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IdeaUserSelect) Float64

func (s *IdeaUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) Float64X

func (s *IdeaUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IdeaUserSelect) Float64s

func (s *IdeaUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) Float64sX

func (s *IdeaUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IdeaUserSelect) Int

func (s *IdeaUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) IntX

func (s *IdeaUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IdeaUserSelect) Ints

func (s *IdeaUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) IntsX

func (s *IdeaUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IdeaUserSelect) Scan

func (_s *IdeaUserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IdeaUserSelect) ScanX

func (s *IdeaUserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IdeaUserSelect) String

func (s *IdeaUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) StringX

func (s *IdeaUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IdeaUserSelect) Strings

func (s *IdeaUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IdeaUserSelect) StringsX

func (s *IdeaUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IdeaUserUpdate

type IdeaUserUpdate struct {
	// contains filtered or unexported fields
}

IdeaUserUpdate is the builder for updating IdeaUser entities.

func (*IdeaUserUpdate) AppendIdeaOrganizations

func (_u *IdeaUserUpdate) AppendIdeaOrganizations(v []map[string]interface{}) *IdeaUserUpdate

AppendIdeaOrganizations appends value to the "idea_organizations" field.

func (*IdeaUserUpdate) ClearCreatedAt

func (_u *IdeaUserUpdate) ClearCreatedAt() *IdeaUserUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUserUpdate) ClearEmail

func (_u *IdeaUserUpdate) ClearEmail() *IdeaUserUpdate

ClearEmail clears the value of the "email" field.

func (*IdeaUserUpdate) ClearIdeaOrganizations

func (_u *IdeaUserUpdate) ClearIdeaOrganizations() *IdeaUserUpdate

ClearIdeaOrganizations clears the value of the "idea_organizations" field.

func (*IdeaUserUpdate) ClearName

func (_u *IdeaUserUpdate) ClearName() *IdeaUserUpdate

ClearName clears the value of the "name" field.

func (*IdeaUserUpdate) Exec

func (_u *IdeaUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUserUpdate) ExecX

func (_u *IdeaUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserUpdate) Mutation

func (_u *IdeaUserUpdate) Mutation() *IdeaUserMutation

Mutation returns the IdeaUserMutation object of the builder.

func (*IdeaUserUpdate) Save

func (_u *IdeaUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*IdeaUserUpdate) SaveX

func (_u *IdeaUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*IdeaUserUpdate) SetCreatedAt

func (_u *IdeaUserUpdate) SetCreatedAt(v time.Time) *IdeaUserUpdate

SetCreatedAt sets the "created_at" field.

func (*IdeaUserUpdate) SetEmail

func (_u *IdeaUserUpdate) SetEmail(v string) *IdeaUserUpdate

SetEmail sets the "email" field.

func (*IdeaUserUpdate) SetIdeaOrganizations

func (_u *IdeaUserUpdate) SetIdeaOrganizations(v []map[string]interface{}) *IdeaUserUpdate

SetIdeaOrganizations sets the "idea_organizations" field.

func (*IdeaUserUpdate) SetName

func (_u *IdeaUserUpdate) SetName(v string) *IdeaUserUpdate

SetName sets the "name" field.

func (*IdeaUserUpdate) SetNillableCreatedAt

func (_u *IdeaUserUpdate) SetNillableCreatedAt(v *time.Time) *IdeaUserUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaUserUpdate) SetNillableEmail

func (_u *IdeaUserUpdate) SetNillableEmail(v *string) *IdeaUserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*IdeaUserUpdate) SetNillableName

func (_u *IdeaUserUpdate) SetNillableName(v *string) *IdeaUserUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*IdeaUserUpdate) Where

func (_u *IdeaUserUpdate) Where(ps ...predicate.IdeaUser) *IdeaUserUpdate

Where appends a list predicates to the IdeaUserUpdate builder.

type IdeaUserUpdateOne

type IdeaUserUpdateOne struct {
	// contains filtered or unexported fields
}

IdeaUserUpdateOne is the builder for updating a single IdeaUser entity.

func (*IdeaUserUpdateOne) AppendIdeaOrganizations

func (_u *IdeaUserUpdateOne) AppendIdeaOrganizations(v []map[string]interface{}) *IdeaUserUpdateOne

AppendIdeaOrganizations appends value to the "idea_organizations" field.

func (*IdeaUserUpdateOne) ClearCreatedAt

func (_u *IdeaUserUpdateOne) ClearCreatedAt() *IdeaUserUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUserUpdateOne) ClearEmail

func (_u *IdeaUserUpdateOne) ClearEmail() *IdeaUserUpdateOne

ClearEmail clears the value of the "email" field.

func (*IdeaUserUpdateOne) ClearIdeaOrganizations

func (_u *IdeaUserUpdateOne) ClearIdeaOrganizations() *IdeaUserUpdateOne

ClearIdeaOrganizations clears the value of the "idea_organizations" field.

func (*IdeaUserUpdateOne) ClearName

func (_u *IdeaUserUpdateOne) ClearName() *IdeaUserUpdateOne

ClearName clears the value of the "name" field.

func (*IdeaUserUpdateOne) Exec

func (_u *IdeaUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*IdeaUserUpdateOne) ExecX

func (_u *IdeaUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserUpdateOne) Mutation

func (_u *IdeaUserUpdateOne) Mutation() *IdeaUserMutation

Mutation returns the IdeaUserMutation object of the builder.

func (*IdeaUserUpdateOne) Save

func (_u *IdeaUserUpdateOne) Save(ctx context.Context) (*IdeaUser, error)

Save executes the query and returns the updated IdeaUser entity.

func (*IdeaUserUpdateOne) SaveX

func (_u *IdeaUserUpdateOne) SaveX(ctx context.Context) *IdeaUser

SaveX is like Save, but panics if an error occurs.

func (*IdeaUserUpdateOne) Select

func (_u *IdeaUserUpdateOne) Select(field string, fields ...string) *IdeaUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IdeaUserUpdateOne) SetCreatedAt

func (_u *IdeaUserUpdateOne) SetCreatedAt(v time.Time) *IdeaUserUpdateOne

SetCreatedAt sets the "created_at" field.

func (*IdeaUserUpdateOne) SetEmail

func (_u *IdeaUserUpdateOne) SetEmail(v string) *IdeaUserUpdateOne

SetEmail sets the "email" field.

func (*IdeaUserUpdateOne) SetIdeaOrganizations

func (_u *IdeaUserUpdateOne) SetIdeaOrganizations(v []map[string]interface{}) *IdeaUserUpdateOne

SetIdeaOrganizations sets the "idea_organizations" field.

func (*IdeaUserUpdateOne) SetName

func (_u *IdeaUserUpdateOne) SetName(v string) *IdeaUserUpdateOne

SetName sets the "name" field.

func (*IdeaUserUpdateOne) SetNillableCreatedAt

func (_u *IdeaUserUpdateOne) SetNillableCreatedAt(v *time.Time) *IdeaUserUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IdeaUserUpdateOne) SetNillableEmail

func (_u *IdeaUserUpdateOne) SetNillableEmail(v *string) *IdeaUserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*IdeaUserUpdateOne) SetNillableName

func (_u *IdeaUserUpdateOne) SetNillableName(v *string) *IdeaUserUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*IdeaUserUpdateOne) Where

Where appends a list predicates to the IdeaUserUpdate builder.

type IdeaUserUpsert

type IdeaUserUpsert struct {
	*sql.UpdateSet
}

IdeaUserUpsert is the "OnConflict" setter.

func (*IdeaUserUpsert) ClearCreatedAt

func (u *IdeaUserUpsert) ClearCreatedAt() *IdeaUserUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUserUpsert) ClearEmail

func (u *IdeaUserUpsert) ClearEmail() *IdeaUserUpsert

ClearEmail clears the value of the "email" field.

func (*IdeaUserUpsert) ClearIdeaOrganizations

func (u *IdeaUserUpsert) ClearIdeaOrganizations() *IdeaUserUpsert

ClearIdeaOrganizations clears the value of the "idea_organizations" field.

func (*IdeaUserUpsert) ClearName

func (u *IdeaUserUpsert) ClearName() *IdeaUserUpsert

ClearName clears the value of the "name" field.

func (*IdeaUserUpsert) SetCreatedAt

func (u *IdeaUserUpsert) SetCreatedAt(v time.Time) *IdeaUserUpsert

SetCreatedAt sets the "created_at" field.

func (*IdeaUserUpsert) SetEmail

func (u *IdeaUserUpsert) SetEmail(v string) *IdeaUserUpsert

SetEmail sets the "email" field.

func (*IdeaUserUpsert) SetIdeaOrganizations

func (u *IdeaUserUpsert) SetIdeaOrganizations(v []map[string]interface{}) *IdeaUserUpsert

SetIdeaOrganizations sets the "idea_organizations" field.

func (*IdeaUserUpsert) SetName

func (u *IdeaUserUpsert) SetName(v string) *IdeaUserUpsert

SetName sets the "name" field.

func (*IdeaUserUpsert) UpdateCreatedAt

func (u *IdeaUserUpsert) UpdateCreatedAt() *IdeaUserUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaUserUpsert) UpdateEmail

func (u *IdeaUserUpsert) UpdateEmail() *IdeaUserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*IdeaUserUpsert) UpdateIdeaOrganizations

func (u *IdeaUserUpsert) UpdateIdeaOrganizations() *IdeaUserUpsert

UpdateIdeaOrganizations sets the "idea_organizations" field to the value that was provided on create.

func (*IdeaUserUpsert) UpdateName

func (u *IdeaUserUpsert) UpdateName() *IdeaUserUpsert

UpdateName sets the "name" field to the value that was provided on create.

type IdeaUserUpsertBulk

type IdeaUserUpsertBulk struct {
	// contains filtered or unexported fields
}

IdeaUserUpsertBulk is the builder for "upsert"-ing a bulk of IdeaUser nodes.

func (*IdeaUserUpsertBulk) ClearCreatedAt

func (u *IdeaUserUpsertBulk) ClearCreatedAt() *IdeaUserUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUserUpsertBulk) ClearEmail

func (u *IdeaUserUpsertBulk) ClearEmail() *IdeaUserUpsertBulk

ClearEmail clears the value of the "email" field.

func (*IdeaUserUpsertBulk) ClearIdeaOrganizations

func (u *IdeaUserUpsertBulk) ClearIdeaOrganizations() *IdeaUserUpsertBulk

ClearIdeaOrganizations clears the value of the "idea_organizations" field.

func (*IdeaUserUpsertBulk) ClearName

func (u *IdeaUserUpsertBulk) ClearName() *IdeaUserUpsertBulk

ClearName clears the value of the "name" field.

func (*IdeaUserUpsertBulk) DoNothing

func (u *IdeaUserUpsertBulk) DoNothing() *IdeaUserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaUserUpsertBulk) Exec

func (u *IdeaUserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUserUpsertBulk) ExecX

func (u *IdeaUserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdeaUser.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*IdeaUserUpsertBulk) SetCreatedAt

func (u *IdeaUserUpsertBulk) SetCreatedAt(v time.Time) *IdeaUserUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*IdeaUserUpsertBulk) SetEmail

SetEmail sets the "email" field.

func (*IdeaUserUpsertBulk) SetIdeaOrganizations

func (u *IdeaUserUpsertBulk) SetIdeaOrganizations(v []map[string]interface{}) *IdeaUserUpsertBulk

SetIdeaOrganizations sets the "idea_organizations" field.

func (*IdeaUserUpsertBulk) SetName

SetName sets the "name" field.

func (*IdeaUserUpsertBulk) Update

func (u *IdeaUserUpsertBulk) Update(set func(*IdeaUserUpsert)) *IdeaUserUpsertBulk

Update allows overriding fields `UPDATE` values. See the IdeaUserCreateBulk.OnConflict documentation for more info.

func (*IdeaUserUpsertBulk) UpdateCreatedAt

func (u *IdeaUserUpsertBulk) UpdateCreatedAt() *IdeaUserUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaUserUpsertBulk) UpdateEmail

func (u *IdeaUserUpsertBulk) UpdateEmail() *IdeaUserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*IdeaUserUpsertBulk) UpdateIdeaOrganizations

func (u *IdeaUserUpsertBulk) UpdateIdeaOrganizations() *IdeaUserUpsertBulk

UpdateIdeaOrganizations sets the "idea_organizations" field to the value that was provided on create.

func (*IdeaUserUpsertBulk) UpdateName

func (u *IdeaUserUpsertBulk) UpdateName() *IdeaUserUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaUserUpsertBulk) UpdateNewValues

func (u *IdeaUserUpsertBulk) UpdateNewValues() *IdeaUserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.IdeaUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ideauser.FieldID)
		}),
	).
	Exec(ctx)

type IdeaUserUpsertOne

type IdeaUserUpsertOne struct {
	// contains filtered or unexported fields
}

IdeaUserUpsertOne is the builder for "upsert"-ing

one IdeaUser node.

func (*IdeaUserUpsertOne) ClearCreatedAt

func (u *IdeaUserUpsertOne) ClearCreatedAt() *IdeaUserUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*IdeaUserUpsertOne) ClearEmail

func (u *IdeaUserUpsertOne) ClearEmail() *IdeaUserUpsertOne

ClearEmail clears the value of the "email" field.

func (*IdeaUserUpsertOne) ClearIdeaOrganizations

func (u *IdeaUserUpsertOne) ClearIdeaOrganizations() *IdeaUserUpsertOne

ClearIdeaOrganizations clears the value of the "idea_organizations" field.

func (*IdeaUserUpsertOne) ClearName

func (u *IdeaUserUpsertOne) ClearName() *IdeaUserUpsertOne

ClearName clears the value of the "name" field.

func (*IdeaUserUpsertOne) DoNothing

func (u *IdeaUserUpsertOne) DoNothing() *IdeaUserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IdeaUserUpsertOne) Exec

func (u *IdeaUserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*IdeaUserUpsertOne) ExecX

func (u *IdeaUserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IdeaUserUpsertOne) ID

func (u *IdeaUserUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*IdeaUserUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*IdeaUserUpsertOne) Ignore

func (u *IdeaUserUpsertOne) Ignore() *IdeaUserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IdeaUser.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*IdeaUserUpsertOne) SetCreatedAt

func (u *IdeaUserUpsertOne) SetCreatedAt(v time.Time) *IdeaUserUpsertOne

SetCreatedAt sets the "created_at" field.

func (*IdeaUserUpsertOne) SetEmail

func (u *IdeaUserUpsertOne) SetEmail(v string) *IdeaUserUpsertOne

SetEmail sets the "email" field.

func (*IdeaUserUpsertOne) SetIdeaOrganizations

func (u *IdeaUserUpsertOne) SetIdeaOrganizations(v []map[string]interface{}) *IdeaUserUpsertOne

SetIdeaOrganizations sets the "idea_organizations" field.

func (*IdeaUserUpsertOne) SetName

SetName sets the "name" field.

func (*IdeaUserUpsertOne) Update

func (u *IdeaUserUpsertOne) Update(set func(*IdeaUserUpsert)) *IdeaUserUpsertOne

Update allows overriding fields `UPDATE` values. See the IdeaUserCreate.OnConflict documentation for more info.

func (*IdeaUserUpsertOne) UpdateCreatedAt

func (u *IdeaUserUpsertOne) UpdateCreatedAt() *IdeaUserUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*IdeaUserUpsertOne) UpdateEmail

func (u *IdeaUserUpsertOne) UpdateEmail() *IdeaUserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*IdeaUserUpsertOne) UpdateIdeaOrganizations

func (u *IdeaUserUpsertOne) UpdateIdeaOrganizations() *IdeaUserUpsertOne

UpdateIdeaOrganizations sets the "idea_organizations" field to the value that was provided on create.

func (*IdeaUserUpsertOne) UpdateName

func (u *IdeaUserUpsertOne) UpdateName() *IdeaUserUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*IdeaUserUpsertOne) UpdateNewValues

func (u *IdeaUserUpsertOne) UpdateNewValues() *IdeaUserUpsertOne

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.IdeaUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ideauser.FieldID)
		}),
	).
	Exec(ctx)

type IdeaUsers

type IdeaUsers []*IdeaUser

IdeaUsers is a parsable slice of IdeaUser.

type Ideas

type Ideas []*Idea

Ideas is a parsable slice of Idea.

type Initiative

type Initiative struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// Value holds the value of the "value" field.
	Value *float64 `json:"value,omitempty"`
	// Effort holds the value of the "effort" field.
	Effort *float64 `json:"effort,omitempty"`
	// Progress holds the value of the "progress" field.
	Progress *float64 `json:"progress,omitempty"`
	// StartDate holds the value of the "start_date" field.
	StartDate string `json:"start_date,omitempty"`
	// EndDate holds the value of the "end_date" field.
	EndDate string `json:"end_date,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Initiative is the model entity for the Initiative schema.

func (*Initiative) GetValue

func (_m *Initiative) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the Initiative. This includes values selected through modifiers, order, etc.

func (*Initiative) String

func (_m *Initiative) String() string

String implements the fmt.Stringer.

func (*Initiative) Unwrap

func (_m *Initiative) Unwrap() *Initiative

Unwrap unwraps the Initiative 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 (*Initiative) Update

func (_m *Initiative) Update() *InitiativeUpdateOne

Update returns a builder for updating this Initiative. Note that you need to call Initiative.Unwrap() before calling this method if this Initiative was returned from a transaction, and the transaction was committed or rolled back.

type InitiativeClient

type InitiativeClient struct {
	// contains filtered or unexported fields
}

InitiativeClient is a client for the Initiative schema.

func NewInitiativeClient

func NewInitiativeClient(c config) *InitiativeClient

NewInitiativeClient returns a client for the Initiative from the given config.

func (*InitiativeClient) Create

func (c *InitiativeClient) Create() *InitiativeCreate

Create returns a builder for creating a Initiative entity.

func (*InitiativeClient) CreateBulk

func (c *InitiativeClient) CreateBulk(builders ...*InitiativeCreate) *InitiativeCreateBulk

CreateBulk returns a builder for creating a bulk of Initiative entities.

func (*InitiativeClient) Delete

func (c *InitiativeClient) Delete() *InitiativeDelete

Delete returns a delete builder for Initiative.

func (*InitiativeClient) DeleteOne

func (c *InitiativeClient) DeleteOne(_m *Initiative) *InitiativeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*InitiativeClient) DeleteOneID

func (c *InitiativeClient) DeleteOneID(id string) *InitiativeDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*InitiativeClient) Get

func (c *InitiativeClient) Get(ctx context.Context, id string) (*Initiative, error)

Get returns a Initiative entity by its id.

func (*InitiativeClient) GetX

func (c *InitiativeClient) GetX(ctx context.Context, id string) *Initiative

GetX is like Get, but panics if an error occurs.

func (*InitiativeClient) Hooks

func (c *InitiativeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*InitiativeClient) Intercept

func (c *InitiativeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `initiative.Intercept(f(g(h())))`.

func (*InitiativeClient) Interceptors

func (c *InitiativeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*InitiativeClient) MapCreateBulk

func (c *InitiativeClient) MapCreateBulk(slice any, setFunc func(*InitiativeCreate, int)) *InitiativeCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*InitiativeClient) Query

func (c *InitiativeClient) Query() *InitiativeQuery

Query returns a query builder for Initiative.

func (*InitiativeClient) Update

func (c *InitiativeClient) Update() *InitiativeUpdate

Update returns an update builder for Initiative.

func (*InitiativeClient) UpdateOne

func (c *InitiativeClient) UpdateOne(_m *Initiative) *InitiativeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*InitiativeClient) UpdateOneID

func (c *InitiativeClient) UpdateOneID(id string) *InitiativeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*InitiativeClient) Use

func (c *InitiativeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `initiative.Hooks(f(g(h())))`.

type InitiativeCreate

type InitiativeCreate struct {
	// contains filtered or unexported fields
}

InitiativeCreate is the builder for creating a Initiative entity.

func (*InitiativeCreate) Exec

func (_c *InitiativeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*InitiativeCreate) ExecX

func (_c *InitiativeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeCreate) Mutation

func (_c *InitiativeCreate) Mutation() *InitiativeMutation

Mutation returns the InitiativeMutation object of the builder.

func (*InitiativeCreate) OnConflict

func (_c *InitiativeCreate) OnConflict(opts ...sql.ConflictOption) *InitiativeUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Initiative.Create().
	SetProduct(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.InitiativeUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*InitiativeCreate) OnConflictColumns

func (_c *InitiativeCreate) OnConflictColumns(columns ...string) *InitiativeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Initiative.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*InitiativeCreate) Save

func (_c *InitiativeCreate) Save(ctx context.Context) (*Initiative, error)

Save creates the Initiative in the database.

func (*InitiativeCreate) SaveX

func (_c *InitiativeCreate) SaveX(ctx context.Context) *Initiative

SaveX calls Save and panics if Save returns an error.

func (*InitiativeCreate) SetCreatedAt

func (_c *InitiativeCreate) SetCreatedAt(v time.Time) *InitiativeCreate

SetCreatedAt sets the "created_at" field.

func (*InitiativeCreate) SetData

func (_c *InitiativeCreate) SetData(v map[string]interface{}) *InitiativeCreate

SetData sets the "data" field.

func (*InitiativeCreate) SetDescription

func (_c *InitiativeCreate) SetDescription(v string) *InitiativeCreate

SetDescription sets the "description" field.

func (*InitiativeCreate) SetEffort

func (_c *InitiativeCreate) SetEffort(v float64) *InitiativeCreate

SetEffort sets the "effort" field.

func (*InitiativeCreate) SetEndDate

func (_c *InitiativeCreate) SetEndDate(v string) *InitiativeCreate

SetEndDate sets the "end_date" field.

func (*InitiativeCreate) SetID

SetID sets the "id" field.

func (*InitiativeCreate) SetName

func (_c *InitiativeCreate) SetName(v string) *InitiativeCreate

SetName sets the "name" field.

func (*InitiativeCreate) SetNillableCreatedAt

func (_c *InitiativeCreate) SetNillableCreatedAt(v *time.Time) *InitiativeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*InitiativeCreate) SetNillableDescription

func (_c *InitiativeCreate) SetNillableDescription(v *string) *InitiativeCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*InitiativeCreate) SetNillableEffort

func (_c *InitiativeCreate) SetNillableEffort(v *float64) *InitiativeCreate

SetNillableEffort sets the "effort" field if the given value is not nil.

func (*InitiativeCreate) SetNillableEndDate

func (_c *InitiativeCreate) SetNillableEndDate(v *string) *InitiativeCreate

SetNillableEndDate sets the "end_date" field if the given value is not nil.

func (*InitiativeCreate) SetNillableName

func (_c *InitiativeCreate) SetNillableName(v *string) *InitiativeCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*InitiativeCreate) SetNillableProgress

func (_c *InitiativeCreate) SetNillableProgress(v *float64) *InitiativeCreate

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*InitiativeCreate) SetNillableReferenceNum

func (_c *InitiativeCreate) SetNillableReferenceNum(v *string) *InitiativeCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*InitiativeCreate) SetNillableStartDate

func (_c *InitiativeCreate) SetNillableStartDate(v *string) *InitiativeCreate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*InitiativeCreate) SetNillableStatus

func (_c *InitiativeCreate) SetNillableStatus(v *string) *InitiativeCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*InitiativeCreate) SetNillableURL

func (_c *InitiativeCreate) SetNillableURL(v *string) *InitiativeCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*InitiativeCreate) SetNillableUpdatedAt

func (_c *InitiativeCreate) SetNillableUpdatedAt(v *time.Time) *InitiativeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*InitiativeCreate) SetNillableValue

func (_c *InitiativeCreate) SetNillableValue(v *float64) *InitiativeCreate

SetNillableValue sets the "value" field if the given value is not nil.

func (*InitiativeCreate) SetProduct

func (_c *InitiativeCreate) SetProduct(v string) *InitiativeCreate

SetProduct sets the "product" field.

func (*InitiativeCreate) SetProgress

func (_c *InitiativeCreate) SetProgress(v float64) *InitiativeCreate

SetProgress sets the "progress" field.

func (*InitiativeCreate) SetReferenceNum

func (_c *InitiativeCreate) SetReferenceNum(v string) *InitiativeCreate

SetReferenceNum sets the "reference_num" field.

func (*InitiativeCreate) SetStartDate

func (_c *InitiativeCreate) SetStartDate(v string) *InitiativeCreate

SetStartDate sets the "start_date" field.

func (*InitiativeCreate) SetStatus

func (_c *InitiativeCreate) SetStatus(v string) *InitiativeCreate

SetStatus sets the "status" field.

func (*InitiativeCreate) SetURL

func (_c *InitiativeCreate) SetURL(v string) *InitiativeCreate

SetURL sets the "url" field.

func (*InitiativeCreate) SetUpdatedAt

func (_c *InitiativeCreate) SetUpdatedAt(v time.Time) *InitiativeCreate

SetUpdatedAt sets the "updated_at" field.

func (*InitiativeCreate) SetValue

func (_c *InitiativeCreate) SetValue(v float64) *InitiativeCreate

SetValue sets the "value" field.

type InitiativeCreateBulk

type InitiativeCreateBulk struct {
	// contains filtered or unexported fields
}

InitiativeCreateBulk is the builder for creating many Initiative entities in bulk.

func (*InitiativeCreateBulk) Exec

func (_c *InitiativeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*InitiativeCreateBulk) ExecX

func (_c *InitiativeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Initiative.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.InitiativeUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*InitiativeCreateBulk) OnConflictColumns

func (_c *InitiativeCreateBulk) OnConflictColumns(columns ...string) *InitiativeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Initiative.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*InitiativeCreateBulk) Save

func (_c *InitiativeCreateBulk) Save(ctx context.Context) ([]*Initiative, error)

Save creates the Initiative entities in the database.

func (*InitiativeCreateBulk) SaveX

func (_c *InitiativeCreateBulk) SaveX(ctx context.Context) []*Initiative

SaveX is like Save, but panics if an error occurs.

type InitiativeDelete

type InitiativeDelete struct {
	// contains filtered or unexported fields
}

InitiativeDelete is the builder for deleting a Initiative entity.

func (*InitiativeDelete) Exec

func (_d *InitiativeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*InitiativeDelete) ExecX

func (_d *InitiativeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeDelete) Where

Where appends a list predicates to the InitiativeDelete builder.

type InitiativeDeleteOne

type InitiativeDeleteOne struct {
	// contains filtered or unexported fields
}

InitiativeDeleteOne is the builder for deleting a single Initiative entity.

func (*InitiativeDeleteOne) Exec

func (_d *InitiativeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*InitiativeDeleteOne) ExecX

func (_d *InitiativeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeDeleteOne) Where

Where appends a list predicates to the InitiativeDelete builder.

type InitiativeGroupBy

type InitiativeGroupBy struct {
	// contains filtered or unexported fields
}

InitiativeGroupBy is the group-by builder for Initiative entities.

func (*InitiativeGroupBy) Aggregate

func (_g *InitiativeGroupBy) Aggregate(fns ...AggregateFunc) *InitiativeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*InitiativeGroupBy) Bool

func (s *InitiativeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) BoolX

func (s *InitiativeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InitiativeGroupBy) Bools

func (s *InitiativeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) BoolsX

func (s *InitiativeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InitiativeGroupBy) Float64

func (s *InitiativeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) Float64X

func (s *InitiativeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InitiativeGroupBy) Float64s

func (s *InitiativeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) Float64sX

func (s *InitiativeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InitiativeGroupBy) Int

func (s *InitiativeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) IntX

func (s *InitiativeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InitiativeGroupBy) Ints

func (s *InitiativeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) IntsX

func (s *InitiativeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InitiativeGroupBy) Scan

func (_g *InitiativeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InitiativeGroupBy) ScanX

func (s *InitiativeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InitiativeGroupBy) String

func (s *InitiativeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) StringX

func (s *InitiativeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InitiativeGroupBy) Strings

func (s *InitiativeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InitiativeGroupBy) StringsX

func (s *InitiativeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InitiativeMutation

type InitiativeMutation struct {
	// contains filtered or unexported fields
}

InitiativeMutation represents an operation that mutates the Initiative nodes in the graph.

func (*InitiativeMutation) AddEffort

func (m *InitiativeMutation) AddEffort(f float64)

AddEffort adds f to the "effort" field.

func (*InitiativeMutation) AddField

func (m *InitiativeMutation) 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 (*InitiativeMutation) AddProgress

func (m *InitiativeMutation) AddProgress(f float64)

AddProgress adds f to the "progress" field.

func (*InitiativeMutation) AddValue

func (m *InitiativeMutation) AddValue(f float64)

AddValue adds f to the "value" field.

func (*InitiativeMutation) AddedEdges

func (m *InitiativeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*InitiativeMutation) AddedEffort

func (m *InitiativeMutation) AddedEffort() (r float64, exists bool)

AddedEffort returns the value that was added to the "effort" field in this mutation.

func (*InitiativeMutation) AddedField

func (m *InitiativeMutation) 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 (*InitiativeMutation) AddedFields

func (m *InitiativeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*InitiativeMutation) AddedIDs

func (m *InitiativeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*InitiativeMutation) AddedProgress

func (m *InitiativeMutation) AddedProgress() (r float64, exists bool)

AddedProgress returns the value that was added to the "progress" field in this mutation.

func (*InitiativeMutation) AddedValue

func (m *InitiativeMutation) AddedValue() (r float64, exists bool)

AddedValue returns the value that was added to the "value" field in this mutation.

func (*InitiativeMutation) ClearCreatedAt

func (m *InitiativeMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*InitiativeMutation) ClearData

func (m *InitiativeMutation) ClearData()

ClearData clears the value of the "data" field.

func (*InitiativeMutation) ClearDescription

func (m *InitiativeMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*InitiativeMutation) ClearEdge

func (m *InitiativeMutation) 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 (*InitiativeMutation) ClearEffort

func (m *InitiativeMutation) ClearEffort()

ClearEffort clears the value of the "effort" field.

func (*InitiativeMutation) ClearEndDate

func (m *InitiativeMutation) ClearEndDate()

ClearEndDate clears the value of the "end_date" field.

func (*InitiativeMutation) ClearField

func (m *InitiativeMutation) 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 (*InitiativeMutation) ClearName

func (m *InitiativeMutation) ClearName()

ClearName clears the value of the "name" field.

func (*InitiativeMutation) ClearProgress

func (m *InitiativeMutation) ClearProgress()

ClearProgress clears the value of the "progress" field.

func (*InitiativeMutation) ClearReferenceNum

func (m *InitiativeMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*InitiativeMutation) ClearStartDate

func (m *InitiativeMutation) ClearStartDate()

ClearStartDate clears the value of the "start_date" field.

func (*InitiativeMutation) ClearStatus

func (m *InitiativeMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*InitiativeMutation) ClearURL

func (m *InitiativeMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*InitiativeMutation) ClearUpdatedAt

func (m *InitiativeMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*InitiativeMutation) ClearValue

func (m *InitiativeMutation) ClearValue()

ClearValue clears the value of the "value" field.

func (*InitiativeMutation) ClearedEdges

func (m *InitiativeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*InitiativeMutation) ClearedFields

func (m *InitiativeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (InitiativeMutation) Client

func (m InitiativeMutation) 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 (*InitiativeMutation) CreatedAt

func (m *InitiativeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*InitiativeMutation) CreatedAtCleared

func (m *InitiativeMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*InitiativeMutation) Data

func (m *InitiativeMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*InitiativeMutation) DataCleared

func (m *InitiativeMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*InitiativeMutation) Description

func (m *InitiativeMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*InitiativeMutation) DescriptionCleared

func (m *InitiativeMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*InitiativeMutation) EdgeCleared

func (m *InitiativeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*InitiativeMutation) Effort

func (m *InitiativeMutation) Effort() (r float64, exists bool)

Effort returns the value of the "effort" field in the mutation.

func (*InitiativeMutation) EffortCleared

func (m *InitiativeMutation) EffortCleared() bool

EffortCleared returns if the "effort" field was cleared in this mutation.

func (*InitiativeMutation) EndDate

func (m *InitiativeMutation) EndDate() (r string, exists bool)

EndDate returns the value of the "end_date" field in the mutation.

func (*InitiativeMutation) EndDateCleared

func (m *InitiativeMutation) EndDateCleared() bool

EndDateCleared returns if the "end_date" field was cleared in this mutation.

func (*InitiativeMutation) Field

func (m *InitiativeMutation) 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 (*InitiativeMutation) FieldCleared

func (m *InitiativeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*InitiativeMutation) Fields

func (m *InitiativeMutation) 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 (*InitiativeMutation) ID

func (m *InitiativeMutation) ID() (id string, 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 (*InitiativeMutation) IDs

func (m *InitiativeMutation) IDs(ctx context.Context) ([]string, 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 (*InitiativeMutation) Name

func (m *InitiativeMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*InitiativeMutation) NameCleared

func (m *InitiativeMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*InitiativeMutation) OldCreatedAt

func (m *InitiativeMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldData

func (m *InitiativeMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldDescription

func (m *InitiativeMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldEffort

func (m *InitiativeMutation) OldEffort(ctx context.Context) (v *float64, err error)

OldEffort returns the old "effort" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldEndDate

func (m *InitiativeMutation) OldEndDate(ctx context.Context) (v string, err error)

OldEndDate returns the old "end_date" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldField

func (m *InitiativeMutation) 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 (*InitiativeMutation) OldName

func (m *InitiativeMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldProduct

func (m *InitiativeMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldProgress

func (m *InitiativeMutation) OldProgress(ctx context.Context) (v *float64, err error)

OldProgress returns the old "progress" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldReferenceNum

func (m *InitiativeMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldStartDate

func (m *InitiativeMutation) OldStartDate(ctx context.Context) (v string, err error)

OldStartDate returns the old "start_date" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldStatus

func (m *InitiativeMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldURL

func (m *InitiativeMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldUpdatedAt

func (m *InitiativeMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) OldValue

func (m *InitiativeMutation) OldValue(ctx context.Context) (v *float64, err error)

OldValue returns the old "value" field's value of the Initiative entity. If the Initiative 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 (*InitiativeMutation) Op

func (m *InitiativeMutation) Op() Op

Op returns the operation name.

func (*InitiativeMutation) Product

func (m *InitiativeMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*InitiativeMutation) Progress

func (m *InitiativeMutation) Progress() (r float64, exists bool)

Progress returns the value of the "progress" field in the mutation.

func (*InitiativeMutation) ProgressCleared

func (m *InitiativeMutation) ProgressCleared() bool

ProgressCleared returns if the "progress" field was cleared in this mutation.

func (*InitiativeMutation) ReferenceNum

func (m *InitiativeMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*InitiativeMutation) ReferenceNumCleared

func (m *InitiativeMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*InitiativeMutation) RemovedEdges

func (m *InitiativeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*InitiativeMutation) RemovedIDs

func (m *InitiativeMutation) 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 (*InitiativeMutation) ResetCreatedAt

func (m *InitiativeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*InitiativeMutation) ResetData

func (m *InitiativeMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*InitiativeMutation) ResetDescription

func (m *InitiativeMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*InitiativeMutation) ResetEdge

func (m *InitiativeMutation) 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 (*InitiativeMutation) ResetEffort

func (m *InitiativeMutation) ResetEffort()

ResetEffort resets all changes to the "effort" field.

func (*InitiativeMutation) ResetEndDate

func (m *InitiativeMutation) ResetEndDate()

ResetEndDate resets all changes to the "end_date" field.

func (*InitiativeMutation) ResetField

func (m *InitiativeMutation) 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 (*InitiativeMutation) ResetName

func (m *InitiativeMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*InitiativeMutation) ResetProduct

func (m *InitiativeMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*InitiativeMutation) ResetProgress

func (m *InitiativeMutation) ResetProgress()

ResetProgress resets all changes to the "progress" field.

func (*InitiativeMutation) ResetReferenceNum

func (m *InitiativeMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*InitiativeMutation) ResetStartDate

func (m *InitiativeMutation) ResetStartDate()

ResetStartDate resets all changes to the "start_date" field.

func (*InitiativeMutation) ResetStatus

func (m *InitiativeMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*InitiativeMutation) ResetURL

func (m *InitiativeMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*InitiativeMutation) ResetUpdatedAt

func (m *InitiativeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*InitiativeMutation) ResetValue

func (m *InitiativeMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*InitiativeMutation) SetCreatedAt

func (m *InitiativeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*InitiativeMutation) SetData

func (m *InitiativeMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*InitiativeMutation) SetDescription

func (m *InitiativeMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*InitiativeMutation) SetEffort

func (m *InitiativeMutation) SetEffort(f float64)

SetEffort sets the "effort" field.

func (*InitiativeMutation) SetEndDate

func (m *InitiativeMutation) SetEndDate(s string)

SetEndDate sets the "end_date" field.

func (*InitiativeMutation) SetField

func (m *InitiativeMutation) 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 (*InitiativeMutation) SetID

func (m *InitiativeMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Initiative entities.

func (*InitiativeMutation) SetName

func (m *InitiativeMutation) SetName(s string)

SetName sets the "name" field.

func (*InitiativeMutation) SetOp

func (m *InitiativeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*InitiativeMutation) SetProduct

func (m *InitiativeMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*InitiativeMutation) SetProgress

func (m *InitiativeMutation) SetProgress(f float64)

SetProgress sets the "progress" field.

func (*InitiativeMutation) SetReferenceNum

func (m *InitiativeMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*InitiativeMutation) SetStartDate

func (m *InitiativeMutation) SetStartDate(s string)

SetStartDate sets the "start_date" field.

func (*InitiativeMutation) SetStatus

func (m *InitiativeMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*InitiativeMutation) SetURL

func (m *InitiativeMutation) SetURL(s string)

SetURL sets the "url" field.

func (*InitiativeMutation) SetUpdatedAt

func (m *InitiativeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*InitiativeMutation) SetValue

func (m *InitiativeMutation) SetValue(f float64)

SetValue sets the "value" field.

func (*InitiativeMutation) StartDate

func (m *InitiativeMutation) StartDate() (r string, exists bool)

StartDate returns the value of the "start_date" field in the mutation.

func (*InitiativeMutation) StartDateCleared

func (m *InitiativeMutation) StartDateCleared() bool

StartDateCleared returns if the "start_date" field was cleared in this mutation.

func (*InitiativeMutation) Status

func (m *InitiativeMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*InitiativeMutation) StatusCleared

func (m *InitiativeMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (InitiativeMutation) Tx

func (m InitiativeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*InitiativeMutation) Type

func (m *InitiativeMutation) Type() string

Type returns the node type of this mutation (Initiative).

func (*InitiativeMutation) URL

func (m *InitiativeMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*InitiativeMutation) URLCleared

func (m *InitiativeMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*InitiativeMutation) UpdatedAt

func (m *InitiativeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*InitiativeMutation) UpdatedAtCleared

func (m *InitiativeMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*InitiativeMutation) Value

func (m *InitiativeMutation) Value() (r float64, exists bool)

Value returns the value of the "value" field in the mutation.

func (*InitiativeMutation) ValueCleared

func (m *InitiativeMutation) ValueCleared() bool

ValueCleared returns if the "value" field was cleared in this mutation.

func (*InitiativeMutation) Where

func (m *InitiativeMutation) Where(ps ...predicate.Initiative)

Where appends a list predicates to the InitiativeMutation builder.

func (*InitiativeMutation) WhereP

func (m *InitiativeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the InitiativeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type InitiativeQuery

type InitiativeQuery struct {
	// contains filtered or unexported fields
}

InitiativeQuery is the builder for querying Initiative entities.

func (*InitiativeQuery) Aggregate

func (_q *InitiativeQuery) Aggregate(fns ...AggregateFunc) *InitiativeSelect

Aggregate returns a InitiativeSelect configured with the given aggregations.

func (*InitiativeQuery) All

func (_q *InitiativeQuery) All(ctx context.Context) ([]*Initiative, error)

All executes the query and returns a list of Initiatives.

func (*InitiativeQuery) AllX

func (_q *InitiativeQuery) AllX(ctx context.Context) []*Initiative

AllX is like All, but panics if an error occurs.

func (*InitiativeQuery) Clone

func (_q *InitiativeQuery) Clone() *InitiativeQuery

Clone returns a duplicate of the InitiativeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*InitiativeQuery) Count

func (_q *InitiativeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*InitiativeQuery) CountX

func (_q *InitiativeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*InitiativeQuery) Exist

func (_q *InitiativeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*InitiativeQuery) ExistX

func (_q *InitiativeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*InitiativeQuery) First

func (_q *InitiativeQuery) First(ctx context.Context) (*Initiative, error)

First returns the first Initiative entity from the query. Returns a *NotFoundError when no Initiative was found.

func (*InitiativeQuery) FirstID

func (_q *InitiativeQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Initiative ID from the query. Returns a *NotFoundError when no Initiative ID was found.

func (*InitiativeQuery) FirstIDX

func (_q *InitiativeQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*InitiativeQuery) FirstX

func (_q *InitiativeQuery) FirstX(ctx context.Context) *Initiative

FirstX is like First, but panics if an error occurs.

func (*InitiativeQuery) GroupBy

func (_q *InitiativeQuery) GroupBy(field string, fields ...string) *InitiativeGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Initiative.Query().
	GroupBy(initiative.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*InitiativeQuery) IDs

func (_q *InitiativeQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Initiative IDs.

func (*InitiativeQuery) IDsX

func (_q *InitiativeQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*InitiativeQuery) Limit

func (_q *InitiativeQuery) Limit(limit int) *InitiativeQuery

Limit the number of records to be returned by this query.

func (*InitiativeQuery) Offset

func (_q *InitiativeQuery) Offset(offset int) *InitiativeQuery

Offset to start from.

func (*InitiativeQuery) Only

func (_q *InitiativeQuery) Only(ctx context.Context) (*Initiative, error)

Only returns a single Initiative entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Initiative entity is found. Returns a *NotFoundError when no Initiative entities are found.

func (*InitiativeQuery) OnlyID

func (_q *InitiativeQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Initiative ID in the query. Returns a *NotSingularError when more than one Initiative ID is found. Returns a *NotFoundError when no entities are found.

func (*InitiativeQuery) OnlyIDX

func (_q *InitiativeQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*InitiativeQuery) OnlyX

func (_q *InitiativeQuery) OnlyX(ctx context.Context) *Initiative

OnlyX is like Only, but panics if an error occurs.

func (*InitiativeQuery) Order

Order specifies how the records should be ordered.

func (*InitiativeQuery) Select

func (_q *InitiativeQuery) Select(fields ...string) *InitiativeSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Initiative.Query().
	Select(initiative.FieldProduct).
	Scan(ctx, &v)

func (*InitiativeQuery) Unique

func (_q *InitiativeQuery) Unique(unique bool) *InitiativeQuery

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 (*InitiativeQuery) Where

Where adds a new predicate for the InitiativeQuery builder.

type InitiativeSelect

type InitiativeSelect struct {
	*InitiativeQuery
	// contains filtered or unexported fields
}

InitiativeSelect is the builder for selecting fields of Initiative entities.

func (*InitiativeSelect) Aggregate

func (_s *InitiativeSelect) Aggregate(fns ...AggregateFunc) *InitiativeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*InitiativeSelect) Bool

func (s *InitiativeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) BoolX

func (s *InitiativeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InitiativeSelect) Bools

func (s *InitiativeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) BoolsX

func (s *InitiativeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InitiativeSelect) Float64

func (s *InitiativeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) Float64X

func (s *InitiativeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InitiativeSelect) Float64s

func (s *InitiativeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) Float64sX

func (s *InitiativeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InitiativeSelect) Int

func (s *InitiativeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) IntX

func (s *InitiativeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InitiativeSelect) Ints

func (s *InitiativeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) IntsX

func (s *InitiativeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InitiativeSelect) Scan

func (_s *InitiativeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InitiativeSelect) ScanX

func (s *InitiativeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InitiativeSelect) String

func (s *InitiativeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) StringX

func (s *InitiativeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InitiativeSelect) Strings

func (s *InitiativeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InitiativeSelect) StringsX

func (s *InitiativeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InitiativeUpdate

type InitiativeUpdate struct {
	// contains filtered or unexported fields
}

InitiativeUpdate is the builder for updating Initiative entities.

func (*InitiativeUpdate) AddEffort

func (_u *InitiativeUpdate) AddEffort(v float64) *InitiativeUpdate

AddEffort adds value to the "effort" field.

func (*InitiativeUpdate) AddProgress

func (_u *InitiativeUpdate) AddProgress(v float64) *InitiativeUpdate

AddProgress adds value to the "progress" field.

func (*InitiativeUpdate) AddValue

func (_u *InitiativeUpdate) AddValue(v float64) *InitiativeUpdate

AddValue adds value to the "value" field.

func (*InitiativeUpdate) ClearCreatedAt

func (_u *InitiativeUpdate) ClearCreatedAt() *InitiativeUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*InitiativeUpdate) ClearData

func (_u *InitiativeUpdate) ClearData() *InitiativeUpdate

ClearData clears the value of the "data" field.

func (*InitiativeUpdate) ClearDescription

func (_u *InitiativeUpdate) ClearDescription() *InitiativeUpdate

ClearDescription clears the value of the "description" field.

func (*InitiativeUpdate) ClearEffort

func (_u *InitiativeUpdate) ClearEffort() *InitiativeUpdate

ClearEffort clears the value of the "effort" field.

func (*InitiativeUpdate) ClearEndDate

func (_u *InitiativeUpdate) ClearEndDate() *InitiativeUpdate

ClearEndDate clears the value of the "end_date" field.

func (*InitiativeUpdate) ClearName

func (_u *InitiativeUpdate) ClearName() *InitiativeUpdate

ClearName clears the value of the "name" field.

func (*InitiativeUpdate) ClearProgress

func (_u *InitiativeUpdate) ClearProgress() *InitiativeUpdate

ClearProgress clears the value of the "progress" field.

func (*InitiativeUpdate) ClearReferenceNum

func (_u *InitiativeUpdate) ClearReferenceNum() *InitiativeUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*InitiativeUpdate) ClearStartDate

func (_u *InitiativeUpdate) ClearStartDate() *InitiativeUpdate

ClearStartDate clears the value of the "start_date" field.

func (*InitiativeUpdate) ClearStatus

func (_u *InitiativeUpdate) ClearStatus() *InitiativeUpdate

ClearStatus clears the value of the "status" field.

func (*InitiativeUpdate) ClearURL

func (_u *InitiativeUpdate) ClearURL() *InitiativeUpdate

ClearURL clears the value of the "url" field.

func (*InitiativeUpdate) ClearUpdatedAt

func (_u *InitiativeUpdate) ClearUpdatedAt() *InitiativeUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*InitiativeUpdate) ClearValue

func (_u *InitiativeUpdate) ClearValue() *InitiativeUpdate

ClearValue clears the value of the "value" field.

func (*InitiativeUpdate) Exec

func (_u *InitiativeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*InitiativeUpdate) ExecX

func (_u *InitiativeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeUpdate) Mutation

func (_u *InitiativeUpdate) Mutation() *InitiativeMutation

Mutation returns the InitiativeMutation object of the builder.

func (*InitiativeUpdate) Save

func (_u *InitiativeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*InitiativeUpdate) SaveX

func (_u *InitiativeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*InitiativeUpdate) SetCreatedAt

func (_u *InitiativeUpdate) SetCreatedAt(v time.Time) *InitiativeUpdate

SetCreatedAt sets the "created_at" field.

func (*InitiativeUpdate) SetData

func (_u *InitiativeUpdate) SetData(v map[string]interface{}) *InitiativeUpdate

SetData sets the "data" field.

func (*InitiativeUpdate) SetDescription

func (_u *InitiativeUpdate) SetDescription(v string) *InitiativeUpdate

SetDescription sets the "description" field.

func (*InitiativeUpdate) SetEffort

func (_u *InitiativeUpdate) SetEffort(v float64) *InitiativeUpdate

SetEffort sets the "effort" field.

func (*InitiativeUpdate) SetEndDate

func (_u *InitiativeUpdate) SetEndDate(v string) *InitiativeUpdate

SetEndDate sets the "end_date" field.

func (*InitiativeUpdate) SetName

func (_u *InitiativeUpdate) SetName(v string) *InitiativeUpdate

SetName sets the "name" field.

func (*InitiativeUpdate) SetNillableCreatedAt

func (_u *InitiativeUpdate) SetNillableCreatedAt(v *time.Time) *InitiativeUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableDescription

func (_u *InitiativeUpdate) SetNillableDescription(v *string) *InitiativeUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableEffort

func (_u *InitiativeUpdate) SetNillableEffort(v *float64) *InitiativeUpdate

SetNillableEffort sets the "effort" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableEndDate

func (_u *InitiativeUpdate) SetNillableEndDate(v *string) *InitiativeUpdate

SetNillableEndDate sets the "end_date" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableName

func (_u *InitiativeUpdate) SetNillableName(v *string) *InitiativeUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableProduct

func (_u *InitiativeUpdate) SetNillableProduct(v *string) *InitiativeUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableProgress

func (_u *InitiativeUpdate) SetNillableProgress(v *float64) *InitiativeUpdate

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableReferenceNum

func (_u *InitiativeUpdate) SetNillableReferenceNum(v *string) *InitiativeUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableStartDate

func (_u *InitiativeUpdate) SetNillableStartDate(v *string) *InitiativeUpdate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableStatus

func (_u *InitiativeUpdate) SetNillableStatus(v *string) *InitiativeUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableURL

func (_u *InitiativeUpdate) SetNillableURL(v *string) *InitiativeUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableUpdatedAt

func (_u *InitiativeUpdate) SetNillableUpdatedAt(v *time.Time) *InitiativeUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*InitiativeUpdate) SetNillableValue

func (_u *InitiativeUpdate) SetNillableValue(v *float64) *InitiativeUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*InitiativeUpdate) SetProduct

func (_u *InitiativeUpdate) SetProduct(v string) *InitiativeUpdate

SetProduct sets the "product" field.

func (*InitiativeUpdate) SetProgress

func (_u *InitiativeUpdate) SetProgress(v float64) *InitiativeUpdate

SetProgress sets the "progress" field.

func (*InitiativeUpdate) SetReferenceNum

func (_u *InitiativeUpdate) SetReferenceNum(v string) *InitiativeUpdate

SetReferenceNum sets the "reference_num" field.

func (*InitiativeUpdate) SetStartDate

func (_u *InitiativeUpdate) SetStartDate(v string) *InitiativeUpdate

SetStartDate sets the "start_date" field.

func (*InitiativeUpdate) SetStatus

func (_u *InitiativeUpdate) SetStatus(v string) *InitiativeUpdate

SetStatus sets the "status" field.

func (*InitiativeUpdate) SetURL

func (_u *InitiativeUpdate) SetURL(v string) *InitiativeUpdate

SetURL sets the "url" field.

func (*InitiativeUpdate) SetUpdatedAt

func (_u *InitiativeUpdate) SetUpdatedAt(v time.Time) *InitiativeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*InitiativeUpdate) SetValue

func (_u *InitiativeUpdate) SetValue(v float64) *InitiativeUpdate

SetValue sets the "value" field.

func (*InitiativeUpdate) Where

Where appends a list predicates to the InitiativeUpdate builder.

type InitiativeUpdateOne

type InitiativeUpdateOne struct {
	// contains filtered or unexported fields
}

InitiativeUpdateOne is the builder for updating a single Initiative entity.

func (*InitiativeUpdateOne) AddEffort

AddEffort adds value to the "effort" field.

func (*InitiativeUpdateOne) AddProgress

func (_u *InitiativeUpdateOne) AddProgress(v float64) *InitiativeUpdateOne

AddProgress adds value to the "progress" field.

func (*InitiativeUpdateOne) AddValue

AddValue adds value to the "value" field.

func (*InitiativeUpdateOne) ClearCreatedAt

func (_u *InitiativeUpdateOne) ClearCreatedAt() *InitiativeUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*InitiativeUpdateOne) ClearData

func (_u *InitiativeUpdateOne) ClearData() *InitiativeUpdateOne

ClearData clears the value of the "data" field.

func (*InitiativeUpdateOne) ClearDescription

func (_u *InitiativeUpdateOne) ClearDescription() *InitiativeUpdateOne

ClearDescription clears the value of the "description" field.

func (*InitiativeUpdateOne) ClearEffort

func (_u *InitiativeUpdateOne) ClearEffort() *InitiativeUpdateOne

ClearEffort clears the value of the "effort" field.

func (*InitiativeUpdateOne) ClearEndDate

func (_u *InitiativeUpdateOne) ClearEndDate() *InitiativeUpdateOne

ClearEndDate clears the value of the "end_date" field.

func (*InitiativeUpdateOne) ClearName

func (_u *InitiativeUpdateOne) ClearName() *InitiativeUpdateOne

ClearName clears the value of the "name" field.

func (*InitiativeUpdateOne) ClearProgress

func (_u *InitiativeUpdateOne) ClearProgress() *InitiativeUpdateOne

ClearProgress clears the value of the "progress" field.

func (*InitiativeUpdateOne) ClearReferenceNum

func (_u *InitiativeUpdateOne) ClearReferenceNum() *InitiativeUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*InitiativeUpdateOne) ClearStartDate

func (_u *InitiativeUpdateOne) ClearStartDate() *InitiativeUpdateOne

ClearStartDate clears the value of the "start_date" field.

func (*InitiativeUpdateOne) ClearStatus

func (_u *InitiativeUpdateOne) ClearStatus() *InitiativeUpdateOne

ClearStatus clears the value of the "status" field.

func (*InitiativeUpdateOne) ClearURL

func (_u *InitiativeUpdateOne) ClearURL() *InitiativeUpdateOne

ClearURL clears the value of the "url" field.

func (*InitiativeUpdateOne) ClearUpdatedAt

func (_u *InitiativeUpdateOne) ClearUpdatedAt() *InitiativeUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*InitiativeUpdateOne) ClearValue

func (_u *InitiativeUpdateOne) ClearValue() *InitiativeUpdateOne

ClearValue clears the value of the "value" field.

func (*InitiativeUpdateOne) Exec

func (_u *InitiativeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*InitiativeUpdateOne) ExecX

func (_u *InitiativeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeUpdateOne) Mutation

func (_u *InitiativeUpdateOne) Mutation() *InitiativeMutation

Mutation returns the InitiativeMutation object of the builder.

func (*InitiativeUpdateOne) Save

Save executes the query and returns the updated Initiative entity.

func (*InitiativeUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*InitiativeUpdateOne) Select

func (_u *InitiativeUpdateOne) Select(field string, fields ...string) *InitiativeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*InitiativeUpdateOne) SetCreatedAt

func (_u *InitiativeUpdateOne) SetCreatedAt(v time.Time) *InitiativeUpdateOne

SetCreatedAt sets the "created_at" field.

func (*InitiativeUpdateOne) SetData

func (_u *InitiativeUpdateOne) SetData(v map[string]interface{}) *InitiativeUpdateOne

SetData sets the "data" field.

func (*InitiativeUpdateOne) SetDescription

func (_u *InitiativeUpdateOne) SetDescription(v string) *InitiativeUpdateOne

SetDescription sets the "description" field.

func (*InitiativeUpdateOne) SetEffort

SetEffort sets the "effort" field.

func (*InitiativeUpdateOne) SetEndDate

func (_u *InitiativeUpdateOne) SetEndDate(v string) *InitiativeUpdateOne

SetEndDate sets the "end_date" field.

func (*InitiativeUpdateOne) SetName

SetName sets the "name" field.

func (*InitiativeUpdateOne) SetNillableCreatedAt

func (_u *InitiativeUpdateOne) SetNillableCreatedAt(v *time.Time) *InitiativeUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableDescription

func (_u *InitiativeUpdateOne) SetNillableDescription(v *string) *InitiativeUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableEffort

func (_u *InitiativeUpdateOne) SetNillableEffort(v *float64) *InitiativeUpdateOne

SetNillableEffort sets the "effort" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableEndDate

func (_u *InitiativeUpdateOne) SetNillableEndDate(v *string) *InitiativeUpdateOne

SetNillableEndDate sets the "end_date" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableName

func (_u *InitiativeUpdateOne) SetNillableName(v *string) *InitiativeUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableProduct

func (_u *InitiativeUpdateOne) SetNillableProduct(v *string) *InitiativeUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableProgress

func (_u *InitiativeUpdateOne) SetNillableProgress(v *float64) *InitiativeUpdateOne

SetNillableProgress sets the "progress" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableReferenceNum

func (_u *InitiativeUpdateOne) SetNillableReferenceNum(v *string) *InitiativeUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableStartDate

func (_u *InitiativeUpdateOne) SetNillableStartDate(v *string) *InitiativeUpdateOne

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableStatus

func (_u *InitiativeUpdateOne) SetNillableStatus(v *string) *InitiativeUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableURL

func (_u *InitiativeUpdateOne) SetNillableURL(v *string) *InitiativeUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableUpdatedAt

func (_u *InitiativeUpdateOne) SetNillableUpdatedAt(v *time.Time) *InitiativeUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*InitiativeUpdateOne) SetNillableValue

func (_u *InitiativeUpdateOne) SetNillableValue(v *float64) *InitiativeUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*InitiativeUpdateOne) SetProduct

func (_u *InitiativeUpdateOne) SetProduct(v string) *InitiativeUpdateOne

SetProduct sets the "product" field.

func (*InitiativeUpdateOne) SetProgress

func (_u *InitiativeUpdateOne) SetProgress(v float64) *InitiativeUpdateOne

SetProgress sets the "progress" field.

func (*InitiativeUpdateOne) SetReferenceNum

func (_u *InitiativeUpdateOne) SetReferenceNum(v string) *InitiativeUpdateOne

SetReferenceNum sets the "reference_num" field.

func (*InitiativeUpdateOne) SetStartDate

func (_u *InitiativeUpdateOne) SetStartDate(v string) *InitiativeUpdateOne

SetStartDate sets the "start_date" field.

func (*InitiativeUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*InitiativeUpdateOne) SetURL

SetURL sets the "url" field.

func (*InitiativeUpdateOne) SetUpdatedAt

func (_u *InitiativeUpdateOne) SetUpdatedAt(v time.Time) *InitiativeUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*InitiativeUpdateOne) SetValue

SetValue sets the "value" field.

func (*InitiativeUpdateOne) Where

Where appends a list predicates to the InitiativeUpdate builder.

type InitiativeUpsert

type InitiativeUpsert struct {
	*sql.UpdateSet
}

InitiativeUpsert is the "OnConflict" setter.

func (*InitiativeUpsert) AddEffort

func (u *InitiativeUpsert) AddEffort(v float64) *InitiativeUpsert

AddEffort adds v to the "effort" field.

func (*InitiativeUpsert) AddProgress

func (u *InitiativeUpsert) AddProgress(v float64) *InitiativeUpsert

AddProgress adds v to the "progress" field.

func (*InitiativeUpsert) AddValue

func (u *InitiativeUpsert) AddValue(v float64) *InitiativeUpsert

AddValue adds v to the "value" field.

func (*InitiativeUpsert) ClearCreatedAt

func (u *InitiativeUpsert) ClearCreatedAt() *InitiativeUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*InitiativeUpsert) ClearData

func (u *InitiativeUpsert) ClearData() *InitiativeUpsert

ClearData clears the value of the "data" field.

func (*InitiativeUpsert) ClearDescription

func (u *InitiativeUpsert) ClearDescription() *InitiativeUpsert

ClearDescription clears the value of the "description" field.

func (*InitiativeUpsert) ClearEffort

func (u *InitiativeUpsert) ClearEffort() *InitiativeUpsert

ClearEffort clears the value of the "effort" field.

func (*InitiativeUpsert) ClearEndDate

func (u *InitiativeUpsert) ClearEndDate() *InitiativeUpsert

ClearEndDate clears the value of the "end_date" field.

func (*InitiativeUpsert) ClearName

func (u *InitiativeUpsert) ClearName() *InitiativeUpsert

ClearName clears the value of the "name" field.

func (*InitiativeUpsert) ClearProgress

func (u *InitiativeUpsert) ClearProgress() *InitiativeUpsert

ClearProgress clears the value of the "progress" field.

func (*InitiativeUpsert) ClearReferenceNum

func (u *InitiativeUpsert) ClearReferenceNum() *InitiativeUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*InitiativeUpsert) ClearStartDate

func (u *InitiativeUpsert) ClearStartDate() *InitiativeUpsert

ClearStartDate clears the value of the "start_date" field.

func (*InitiativeUpsert) ClearStatus

func (u *InitiativeUpsert) ClearStatus() *InitiativeUpsert

ClearStatus clears the value of the "status" field.

func (*InitiativeUpsert) ClearURL

func (u *InitiativeUpsert) ClearURL() *InitiativeUpsert

ClearURL clears the value of the "url" field.

func (*InitiativeUpsert) ClearUpdatedAt

func (u *InitiativeUpsert) ClearUpdatedAt() *InitiativeUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*InitiativeUpsert) ClearValue

func (u *InitiativeUpsert) ClearValue() *InitiativeUpsert

ClearValue clears the value of the "value" field.

func (*InitiativeUpsert) SetCreatedAt

func (u *InitiativeUpsert) SetCreatedAt(v time.Time) *InitiativeUpsert

SetCreatedAt sets the "created_at" field.

func (*InitiativeUpsert) SetData

func (u *InitiativeUpsert) SetData(v map[string]interface{}) *InitiativeUpsert

SetData sets the "data" field.

func (*InitiativeUpsert) SetDescription

func (u *InitiativeUpsert) SetDescription(v string) *InitiativeUpsert

SetDescription sets the "description" field.

func (*InitiativeUpsert) SetEffort

func (u *InitiativeUpsert) SetEffort(v float64) *InitiativeUpsert

SetEffort sets the "effort" field.

func (*InitiativeUpsert) SetEndDate

func (u *InitiativeUpsert) SetEndDate(v string) *InitiativeUpsert

SetEndDate sets the "end_date" field.

func (*InitiativeUpsert) SetName

func (u *InitiativeUpsert) SetName(v string) *InitiativeUpsert

SetName sets the "name" field.

func (*InitiativeUpsert) SetProduct

func (u *InitiativeUpsert) SetProduct(v string) *InitiativeUpsert

SetProduct sets the "product" field.

func (*InitiativeUpsert) SetProgress

func (u *InitiativeUpsert) SetProgress(v float64) *InitiativeUpsert

SetProgress sets the "progress" field.

func (*InitiativeUpsert) SetReferenceNum

func (u *InitiativeUpsert) SetReferenceNum(v string) *InitiativeUpsert

SetReferenceNum sets the "reference_num" field.

func (*InitiativeUpsert) SetStartDate

func (u *InitiativeUpsert) SetStartDate(v string) *InitiativeUpsert

SetStartDate sets the "start_date" field.

func (*InitiativeUpsert) SetStatus

func (u *InitiativeUpsert) SetStatus(v string) *InitiativeUpsert

SetStatus sets the "status" field.

func (*InitiativeUpsert) SetURL

SetURL sets the "url" field.

func (*InitiativeUpsert) SetUpdatedAt

func (u *InitiativeUpsert) SetUpdatedAt(v time.Time) *InitiativeUpsert

SetUpdatedAt sets the "updated_at" field.

func (*InitiativeUpsert) SetValue

func (u *InitiativeUpsert) SetValue(v float64) *InitiativeUpsert

SetValue sets the "value" field.

func (*InitiativeUpsert) UpdateCreatedAt

func (u *InitiativeUpsert) UpdateCreatedAt() *InitiativeUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateData

func (u *InitiativeUpsert) UpdateData() *InitiativeUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateDescription

func (u *InitiativeUpsert) UpdateDescription() *InitiativeUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateEffort

func (u *InitiativeUpsert) UpdateEffort() *InitiativeUpsert

UpdateEffort sets the "effort" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateEndDate

func (u *InitiativeUpsert) UpdateEndDate() *InitiativeUpsert

UpdateEndDate sets the "end_date" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateName

func (u *InitiativeUpsert) UpdateName() *InitiativeUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateProduct

func (u *InitiativeUpsert) UpdateProduct() *InitiativeUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateProgress

func (u *InitiativeUpsert) UpdateProgress() *InitiativeUpsert

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateReferenceNum

func (u *InitiativeUpsert) UpdateReferenceNum() *InitiativeUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateStartDate

func (u *InitiativeUpsert) UpdateStartDate() *InitiativeUpsert

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateStatus

func (u *InitiativeUpsert) UpdateStatus() *InitiativeUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateURL

func (u *InitiativeUpsert) UpdateURL() *InitiativeUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateUpdatedAt

func (u *InitiativeUpsert) UpdateUpdatedAt() *InitiativeUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*InitiativeUpsert) UpdateValue

func (u *InitiativeUpsert) UpdateValue() *InitiativeUpsert

UpdateValue sets the "value" field to the value that was provided on create.

type InitiativeUpsertBulk

type InitiativeUpsertBulk struct {
	// contains filtered or unexported fields
}

InitiativeUpsertBulk is the builder for "upsert"-ing a bulk of Initiative nodes.

func (*InitiativeUpsertBulk) AddEffort

AddEffort adds v to the "effort" field.

func (*InitiativeUpsertBulk) AddProgress

AddProgress adds v to the "progress" field.

func (*InitiativeUpsertBulk) AddValue

AddValue adds v to the "value" field.

func (*InitiativeUpsertBulk) ClearCreatedAt

func (u *InitiativeUpsertBulk) ClearCreatedAt() *InitiativeUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*InitiativeUpsertBulk) ClearData

ClearData clears the value of the "data" field.

func (*InitiativeUpsertBulk) ClearDescription

func (u *InitiativeUpsertBulk) ClearDescription() *InitiativeUpsertBulk

ClearDescription clears the value of the "description" field.

func (*InitiativeUpsertBulk) ClearEffort

func (u *InitiativeUpsertBulk) ClearEffort() *InitiativeUpsertBulk

ClearEffort clears the value of the "effort" field.

func (*InitiativeUpsertBulk) ClearEndDate

func (u *InitiativeUpsertBulk) ClearEndDate() *InitiativeUpsertBulk

ClearEndDate clears the value of the "end_date" field.

func (*InitiativeUpsertBulk) ClearName

ClearName clears the value of the "name" field.

func (*InitiativeUpsertBulk) ClearProgress

func (u *InitiativeUpsertBulk) ClearProgress() *InitiativeUpsertBulk

ClearProgress clears the value of the "progress" field.

func (*InitiativeUpsertBulk) ClearReferenceNum

func (u *InitiativeUpsertBulk) ClearReferenceNum() *InitiativeUpsertBulk

ClearReferenceNum clears the value of the "reference_num" field.

func (*InitiativeUpsertBulk) ClearStartDate

func (u *InitiativeUpsertBulk) ClearStartDate() *InitiativeUpsertBulk

ClearStartDate clears the value of the "start_date" field.

func (*InitiativeUpsertBulk) ClearStatus

func (u *InitiativeUpsertBulk) ClearStatus() *InitiativeUpsertBulk

ClearStatus clears the value of the "status" field.

func (*InitiativeUpsertBulk) ClearURL

ClearURL clears the value of the "url" field.

func (*InitiativeUpsertBulk) ClearUpdatedAt

func (u *InitiativeUpsertBulk) ClearUpdatedAt() *InitiativeUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*InitiativeUpsertBulk) ClearValue

func (u *InitiativeUpsertBulk) ClearValue() *InitiativeUpsertBulk

ClearValue clears the value of the "value" field.

func (*InitiativeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*InitiativeUpsertBulk) Exec

Exec executes the query.

func (*InitiativeUpsertBulk) ExecX

func (u *InitiativeUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Initiative.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*InitiativeUpsertBulk) SetCreatedAt

func (u *InitiativeUpsertBulk) SetCreatedAt(v time.Time) *InitiativeUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*InitiativeUpsertBulk) SetData

func (u *InitiativeUpsertBulk) SetData(v map[string]interface{}) *InitiativeUpsertBulk

SetData sets the "data" field.

func (*InitiativeUpsertBulk) SetDescription

func (u *InitiativeUpsertBulk) SetDescription(v string) *InitiativeUpsertBulk

SetDescription sets the "description" field.

func (*InitiativeUpsertBulk) SetEffort

SetEffort sets the "effort" field.

func (*InitiativeUpsertBulk) SetEndDate

SetEndDate sets the "end_date" field.

func (*InitiativeUpsertBulk) SetName

SetName sets the "name" field.

func (*InitiativeUpsertBulk) SetProduct

SetProduct sets the "product" field.

func (*InitiativeUpsertBulk) SetProgress

SetProgress sets the "progress" field.

func (*InitiativeUpsertBulk) SetReferenceNum

func (u *InitiativeUpsertBulk) SetReferenceNum(v string) *InitiativeUpsertBulk

SetReferenceNum sets the "reference_num" field.

func (*InitiativeUpsertBulk) SetStartDate

func (u *InitiativeUpsertBulk) SetStartDate(v string) *InitiativeUpsertBulk

SetStartDate sets the "start_date" field.

func (*InitiativeUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*InitiativeUpsertBulk) SetURL

SetURL sets the "url" field.

func (*InitiativeUpsertBulk) SetUpdatedAt

func (u *InitiativeUpsertBulk) SetUpdatedAt(v time.Time) *InitiativeUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*InitiativeUpsertBulk) SetValue

SetValue sets the "value" field.

func (*InitiativeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the InitiativeCreateBulk.OnConflict documentation for more info.

func (*InitiativeUpsertBulk) UpdateCreatedAt

func (u *InitiativeUpsertBulk) UpdateCreatedAt() *InitiativeUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateData

func (u *InitiativeUpsertBulk) UpdateData() *InitiativeUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateDescription

func (u *InitiativeUpsertBulk) UpdateDescription() *InitiativeUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateEffort

func (u *InitiativeUpsertBulk) UpdateEffort() *InitiativeUpsertBulk

UpdateEffort sets the "effort" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateEndDate

func (u *InitiativeUpsertBulk) UpdateEndDate() *InitiativeUpsertBulk

UpdateEndDate sets the "end_date" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateName

func (u *InitiativeUpsertBulk) UpdateName() *InitiativeUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateNewValues

func (u *InitiativeUpsertBulk) UpdateNewValues() *InitiativeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Initiative.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(initiative.FieldID)
		}),
	).
	Exec(ctx)

func (*InitiativeUpsertBulk) UpdateProduct

func (u *InitiativeUpsertBulk) UpdateProduct() *InitiativeUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateProgress

func (u *InitiativeUpsertBulk) UpdateProgress() *InitiativeUpsertBulk

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateReferenceNum

func (u *InitiativeUpsertBulk) UpdateReferenceNum() *InitiativeUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateStartDate

func (u *InitiativeUpsertBulk) UpdateStartDate() *InitiativeUpsertBulk

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateStatus

func (u *InitiativeUpsertBulk) UpdateStatus() *InitiativeUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateUpdatedAt

func (u *InitiativeUpsertBulk) UpdateUpdatedAt() *InitiativeUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*InitiativeUpsertBulk) UpdateValue

func (u *InitiativeUpsertBulk) UpdateValue() *InitiativeUpsertBulk

UpdateValue sets the "value" field to the value that was provided on create.

type InitiativeUpsertOne

type InitiativeUpsertOne struct {
	// contains filtered or unexported fields
}

InitiativeUpsertOne is the builder for "upsert"-ing

one Initiative node.

func (*InitiativeUpsertOne) AddEffort

AddEffort adds v to the "effort" field.

func (*InitiativeUpsertOne) AddProgress

func (u *InitiativeUpsertOne) AddProgress(v float64) *InitiativeUpsertOne

AddProgress adds v to the "progress" field.

func (*InitiativeUpsertOne) AddValue

AddValue adds v to the "value" field.

func (*InitiativeUpsertOne) ClearCreatedAt

func (u *InitiativeUpsertOne) ClearCreatedAt() *InitiativeUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*InitiativeUpsertOne) ClearData

func (u *InitiativeUpsertOne) ClearData() *InitiativeUpsertOne

ClearData clears the value of the "data" field.

func (*InitiativeUpsertOne) ClearDescription

func (u *InitiativeUpsertOne) ClearDescription() *InitiativeUpsertOne

ClearDescription clears the value of the "description" field.

func (*InitiativeUpsertOne) ClearEffort

func (u *InitiativeUpsertOne) ClearEffort() *InitiativeUpsertOne

ClearEffort clears the value of the "effort" field.

func (*InitiativeUpsertOne) ClearEndDate

func (u *InitiativeUpsertOne) ClearEndDate() *InitiativeUpsertOne

ClearEndDate clears the value of the "end_date" field.

func (*InitiativeUpsertOne) ClearName

func (u *InitiativeUpsertOne) ClearName() *InitiativeUpsertOne

ClearName clears the value of the "name" field.

func (*InitiativeUpsertOne) ClearProgress

func (u *InitiativeUpsertOne) ClearProgress() *InitiativeUpsertOne

ClearProgress clears the value of the "progress" field.

func (*InitiativeUpsertOne) ClearReferenceNum

func (u *InitiativeUpsertOne) ClearReferenceNum() *InitiativeUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*InitiativeUpsertOne) ClearStartDate

func (u *InitiativeUpsertOne) ClearStartDate() *InitiativeUpsertOne

ClearStartDate clears the value of the "start_date" field.

func (*InitiativeUpsertOne) ClearStatus

func (u *InitiativeUpsertOne) ClearStatus() *InitiativeUpsertOne

ClearStatus clears the value of the "status" field.

func (*InitiativeUpsertOne) ClearURL

ClearURL clears the value of the "url" field.

func (*InitiativeUpsertOne) ClearUpdatedAt

func (u *InitiativeUpsertOne) ClearUpdatedAt() *InitiativeUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*InitiativeUpsertOne) ClearValue

func (u *InitiativeUpsertOne) ClearValue() *InitiativeUpsertOne

ClearValue clears the value of the "value" field.

func (*InitiativeUpsertOne) DoNothing

func (u *InitiativeUpsertOne) DoNothing() *InitiativeUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*InitiativeUpsertOne) Exec

Exec executes the query.

func (*InitiativeUpsertOne) ExecX

func (u *InitiativeUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InitiativeUpsertOne) ID

func (u *InitiativeUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*InitiativeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*InitiativeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Initiative.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*InitiativeUpsertOne) SetCreatedAt

func (u *InitiativeUpsertOne) SetCreatedAt(v time.Time) *InitiativeUpsertOne

SetCreatedAt sets the "created_at" field.

func (*InitiativeUpsertOne) SetData

func (u *InitiativeUpsertOne) SetData(v map[string]interface{}) *InitiativeUpsertOne

SetData sets the "data" field.

func (*InitiativeUpsertOne) SetDescription

func (u *InitiativeUpsertOne) SetDescription(v string) *InitiativeUpsertOne

SetDescription sets the "description" field.

func (*InitiativeUpsertOne) SetEffort

SetEffort sets the "effort" field.

func (*InitiativeUpsertOne) SetEndDate

SetEndDate sets the "end_date" field.

func (*InitiativeUpsertOne) SetName

SetName sets the "name" field.

func (*InitiativeUpsertOne) SetProduct

SetProduct sets the "product" field.

func (*InitiativeUpsertOne) SetProgress

func (u *InitiativeUpsertOne) SetProgress(v float64) *InitiativeUpsertOne

SetProgress sets the "progress" field.

func (*InitiativeUpsertOne) SetReferenceNum

func (u *InitiativeUpsertOne) SetReferenceNum(v string) *InitiativeUpsertOne

SetReferenceNum sets the "reference_num" field.

func (*InitiativeUpsertOne) SetStartDate

func (u *InitiativeUpsertOne) SetStartDate(v string) *InitiativeUpsertOne

SetStartDate sets the "start_date" field.

func (*InitiativeUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*InitiativeUpsertOne) SetURL

SetURL sets the "url" field.

func (*InitiativeUpsertOne) SetUpdatedAt

func (u *InitiativeUpsertOne) SetUpdatedAt(v time.Time) *InitiativeUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*InitiativeUpsertOne) SetValue

SetValue sets the "value" field.

func (*InitiativeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the InitiativeCreate.OnConflict documentation for more info.

func (*InitiativeUpsertOne) UpdateCreatedAt

func (u *InitiativeUpsertOne) UpdateCreatedAt() *InitiativeUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateData

func (u *InitiativeUpsertOne) UpdateData() *InitiativeUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateDescription

func (u *InitiativeUpsertOne) UpdateDescription() *InitiativeUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateEffort

func (u *InitiativeUpsertOne) UpdateEffort() *InitiativeUpsertOne

UpdateEffort sets the "effort" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateEndDate

func (u *InitiativeUpsertOne) UpdateEndDate() *InitiativeUpsertOne

UpdateEndDate sets the "end_date" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateName

func (u *InitiativeUpsertOne) UpdateName() *InitiativeUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateNewValues

func (u *InitiativeUpsertOne) UpdateNewValues() *InitiativeUpsertOne

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.Initiative.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(initiative.FieldID)
		}),
	).
	Exec(ctx)

func (*InitiativeUpsertOne) UpdateProduct

func (u *InitiativeUpsertOne) UpdateProduct() *InitiativeUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateProgress

func (u *InitiativeUpsertOne) UpdateProgress() *InitiativeUpsertOne

UpdateProgress sets the "progress" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateReferenceNum

func (u *InitiativeUpsertOne) UpdateReferenceNum() *InitiativeUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateStartDate

func (u *InitiativeUpsertOne) UpdateStartDate() *InitiativeUpsertOne

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateStatus

func (u *InitiativeUpsertOne) UpdateStatus() *InitiativeUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateURL

func (u *InitiativeUpsertOne) UpdateURL() *InitiativeUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateUpdatedAt

func (u *InitiativeUpsertOne) UpdateUpdatedAt() *InitiativeUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*InitiativeUpsertOne) UpdateValue

func (u *InitiativeUpsertOne) UpdateValue() *InitiativeUpsertOne

UpdateValue sets the "value" field to the value that was provided on create.

type Initiatives

type Initiatives []*Initiative

Initiatives is a parsable slice of Initiative.

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 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 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 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 Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Product

type Product struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// ReferencePrefix holds the value of the "reference_prefix" field.
	ReferencePrefix string `json:"reference_prefix,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ProductLine holds the value of the "product_line" field.
	ProductLine bool `json:"product_line,omitempty"`
	// HasIdeas holds the value of the "has_ideas" field.
	HasIdeas bool `json:"has_ideas,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Product is the model entity for the Product schema.

func (*Product) String

func (_m *Product) String() string

String implements the fmt.Stringer.

func (*Product) Unwrap

func (_m *Product) Unwrap() *Product

Unwrap unwraps the Product 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 (*Product) Update

func (_m *Product) Update() *ProductUpdateOne

Update returns a builder for updating this Product. Note that you need to call Product.Unwrap() before calling this method if this Product was returned from a transaction, and the transaction was committed or rolled back.

func (*Product) Value

func (_m *Product) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Product. This includes values selected through modifiers, order, etc.

type ProductClient

type ProductClient struct {
	// contains filtered or unexported fields
}

ProductClient is a client for the Product schema.

func NewProductClient

func NewProductClient(c config) *ProductClient

NewProductClient returns a client for the Product from the given config.

func (*ProductClient) Create

func (c *ProductClient) Create() *ProductCreate

Create returns a builder for creating a Product entity.

func (*ProductClient) CreateBulk

func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk

CreateBulk returns a builder for creating a bulk of Product entities.

func (*ProductClient) Delete

func (c *ProductClient) Delete() *ProductDelete

Delete returns a delete builder for Product.

func (*ProductClient) DeleteOne

func (c *ProductClient) DeleteOne(_m *Product) *ProductDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProductClient) DeleteOneID

func (c *ProductClient) DeleteOneID(id string) *ProductDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProductClient) Get

func (c *ProductClient) Get(ctx context.Context, id string) (*Product, error)

Get returns a Product entity by its id.

func (*ProductClient) GetX

func (c *ProductClient) GetX(ctx context.Context, id string) *Product

GetX is like Get, but panics if an error occurs.

func (*ProductClient) Hooks

func (c *ProductClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProductClient) Intercept

func (c *ProductClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `product.Intercept(f(g(h())))`.

func (*ProductClient) Interceptors

func (c *ProductClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProductClient) MapCreateBulk

func (c *ProductClient) MapCreateBulk(slice any, setFunc func(*ProductCreate, int)) *ProductCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ProductClient) Query

func (c *ProductClient) Query() *ProductQuery

Query returns a query builder for Product.

func (*ProductClient) Update

func (c *ProductClient) Update() *ProductUpdate

Update returns an update builder for Product.

func (*ProductClient) UpdateOne

func (c *ProductClient) UpdateOne(_m *Product) *ProductUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProductClient) UpdateOneID

func (c *ProductClient) UpdateOneID(id string) *ProductUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProductClient) Use

func (c *ProductClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `product.Hooks(f(g(h())))`.

type ProductCreate

type ProductCreate struct {
	// contains filtered or unexported fields
}

ProductCreate is the builder for creating a Product entity.

func (*ProductCreate) Exec

func (_c *ProductCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductCreate) ExecX

func (_c *ProductCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductCreate) Mutation

func (_c *ProductCreate) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductCreate) OnConflict

func (_c *ProductCreate) OnConflict(opts ...sql.ConflictOption) *ProductUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Product.Create().
	SetReferencePrefix(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.ProductUpsert) {
		SetReferencePrefix(v+v).
	}).
	Exec(ctx)

func (*ProductCreate) OnConflictColumns

func (_c *ProductCreate) OnConflictColumns(columns ...string) *ProductUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProductCreate) Save

func (_c *ProductCreate) Save(ctx context.Context) (*Product, error)

Save creates the Product in the database.

func (*ProductCreate) SaveX

func (_c *ProductCreate) SaveX(ctx context.Context) *Product

SaveX calls Save and panics if Save returns an error.

func (*ProductCreate) SetCreatedAt

func (_c *ProductCreate) SetCreatedAt(v time.Time) *ProductCreate

SetCreatedAt sets the "created_at" field.

func (*ProductCreate) SetData

func (_c *ProductCreate) SetData(v map[string]interface{}) *ProductCreate

SetData sets the "data" field.

func (*ProductCreate) SetHasIdeas

func (_c *ProductCreate) SetHasIdeas(v bool) *ProductCreate

SetHasIdeas sets the "has_ideas" field.

func (*ProductCreate) SetID

func (_c *ProductCreate) SetID(v string) *ProductCreate

SetID sets the "id" field.

func (*ProductCreate) SetName

func (_c *ProductCreate) SetName(v string) *ProductCreate

SetName sets the "name" field.

func (*ProductCreate) SetNillableCreatedAt

func (_c *ProductCreate) SetNillableCreatedAt(v *time.Time) *ProductCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProductCreate) SetNillableHasIdeas

func (_c *ProductCreate) SetNillableHasIdeas(v *bool) *ProductCreate

SetNillableHasIdeas sets the "has_ideas" field if the given value is not nil.

func (*ProductCreate) SetNillableName

func (_c *ProductCreate) SetNillableName(v *string) *ProductCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*ProductCreate) SetNillableProductLine

func (_c *ProductCreate) SetNillableProductLine(v *bool) *ProductCreate

SetNillableProductLine sets the "product_line" field if the given value is not nil.

func (*ProductCreate) SetNillableReferencePrefix

func (_c *ProductCreate) SetNillableReferencePrefix(v *string) *ProductCreate

SetNillableReferencePrefix sets the "reference_prefix" field if the given value is not nil.

func (*ProductCreate) SetProductLine

func (_c *ProductCreate) SetProductLine(v bool) *ProductCreate

SetProductLine sets the "product_line" field.

func (*ProductCreate) SetReferencePrefix

func (_c *ProductCreate) SetReferencePrefix(v string) *ProductCreate

SetReferencePrefix sets the "reference_prefix" field.

type ProductCreateBulk

type ProductCreateBulk struct {
	// contains filtered or unexported fields
}

ProductCreateBulk is the builder for creating many Product entities in bulk.

func (*ProductCreateBulk) Exec

func (_c *ProductCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductCreateBulk) ExecX

func (_c *ProductCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductCreateBulk) OnConflict

func (_c *ProductCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProductUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Product.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.ProductUpsert) {
		SetReferencePrefix(v+v).
	}).
	Exec(ctx)

func (*ProductCreateBulk) OnConflictColumns

func (_c *ProductCreateBulk) OnConflictColumns(columns ...string) *ProductUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProductCreateBulk) Save

func (_c *ProductCreateBulk) Save(ctx context.Context) ([]*Product, error)

Save creates the Product entities in the database.

func (*ProductCreateBulk) SaveX

func (_c *ProductCreateBulk) SaveX(ctx context.Context) []*Product

SaveX is like Save, but panics if an error occurs.

type ProductDelete

type ProductDelete struct {
	// contains filtered or unexported fields
}

ProductDelete is the builder for deleting a Product entity.

func (*ProductDelete) Exec

func (_d *ProductDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProductDelete) ExecX

func (_d *ProductDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProductDelete) Where

func (_d *ProductDelete) Where(ps ...predicate.Product) *ProductDelete

Where appends a list predicates to the ProductDelete builder.

type ProductDeleteOne

type ProductDeleteOne struct {
	// contains filtered or unexported fields
}

ProductDeleteOne is the builder for deleting a single Product entity.

func (*ProductDeleteOne) Exec

func (_d *ProductDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProductDeleteOne) ExecX

func (_d *ProductDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductDeleteOne) Where

Where appends a list predicates to the ProductDelete builder.

type ProductGroupBy

type ProductGroupBy struct {
	// contains filtered or unexported fields
}

ProductGroupBy is the group-by builder for Product entities.

func (*ProductGroupBy) Aggregate

func (_g *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProductGroupBy) Bool

func (s *ProductGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) BoolX

func (s *ProductGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProductGroupBy) Bools

func (s *ProductGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) BoolsX

func (s *ProductGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProductGroupBy) Float64

func (s *ProductGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) Float64X

func (s *ProductGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProductGroupBy) Float64s

func (s *ProductGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) Float64sX

func (s *ProductGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProductGroupBy) Int

func (s *ProductGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) IntX

func (s *ProductGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProductGroupBy) Ints

func (s *ProductGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) IntsX

func (s *ProductGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProductGroupBy) Scan

func (_g *ProductGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProductGroupBy) ScanX

func (s *ProductGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProductGroupBy) String

func (s *ProductGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) StringX

func (s *ProductGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProductGroupBy) Strings

func (s *ProductGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) StringsX

func (s *ProductGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProductMutation

type ProductMutation struct {
	// contains filtered or unexported fields
}

ProductMutation represents an operation that mutates the Product nodes in the graph.

func (*ProductMutation) AddField

func (m *ProductMutation) 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 (*ProductMutation) AddedEdges

func (m *ProductMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProductMutation) AddedField

func (m *ProductMutation) 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 (*ProductMutation) AddedFields

func (m *ProductMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProductMutation) AddedIDs

func (m *ProductMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProductMutation) ClearCreatedAt

func (m *ProductMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*ProductMutation) ClearData

func (m *ProductMutation) ClearData()

ClearData clears the value of the "data" field.

func (*ProductMutation) ClearEdge

func (m *ProductMutation) 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 (*ProductMutation) ClearField

func (m *ProductMutation) 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 (*ProductMutation) ClearHasIdeas

func (m *ProductMutation) ClearHasIdeas()

ClearHasIdeas clears the value of the "has_ideas" field.

func (*ProductMutation) ClearName

func (m *ProductMutation) ClearName()

ClearName clears the value of the "name" field.

func (*ProductMutation) ClearProductLine

func (m *ProductMutation) ClearProductLine()

ClearProductLine clears the value of the "product_line" field.

func (*ProductMutation) ClearReferencePrefix

func (m *ProductMutation) ClearReferencePrefix()

ClearReferencePrefix clears the value of the "reference_prefix" field.

func (*ProductMutation) ClearedEdges

func (m *ProductMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProductMutation) ClearedFields

func (m *ProductMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProductMutation) Client

func (m ProductMutation) 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 (*ProductMutation) CreatedAt

func (m *ProductMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ProductMutation) CreatedAtCleared

func (m *ProductMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*ProductMutation) Data

func (m *ProductMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*ProductMutation) DataCleared

func (m *ProductMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*ProductMutation) EdgeCleared

func (m *ProductMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProductMutation) Field

func (m *ProductMutation) 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 (*ProductMutation) FieldCleared

func (m *ProductMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProductMutation) Fields

func (m *ProductMutation) 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 (*ProductMutation) HasIdeas

func (m *ProductMutation) HasIdeas() (r bool, exists bool)

HasIdeas returns the value of the "has_ideas" field in the mutation.

func (*ProductMutation) HasIdeasCleared

func (m *ProductMutation) HasIdeasCleared() bool

HasIdeasCleared returns if the "has_ideas" field was cleared in this mutation.

func (*ProductMutation) ID

func (m *ProductMutation) ID() (id string, 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 (*ProductMutation) IDs

func (m *ProductMutation) IDs(ctx context.Context) ([]string, 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 (*ProductMutation) Name

func (m *ProductMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ProductMutation) NameCleared

func (m *ProductMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*ProductMutation) OldCreatedAt

func (m *ProductMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Product entity. If the Product 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 (*ProductMutation) OldData

func (m *ProductMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Product entity. If the Product 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 (*ProductMutation) OldField

func (m *ProductMutation) 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 (*ProductMutation) OldHasIdeas

func (m *ProductMutation) OldHasIdeas(ctx context.Context) (v bool, err error)

OldHasIdeas returns the old "has_ideas" field's value of the Product entity. If the Product 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 (*ProductMutation) OldName

func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Product entity. If the Product 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 (*ProductMutation) OldProductLine

func (m *ProductMutation) OldProductLine(ctx context.Context) (v bool, err error)

OldProductLine returns the old "product_line" field's value of the Product entity. If the Product 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 (*ProductMutation) OldReferencePrefix

func (m *ProductMutation) OldReferencePrefix(ctx context.Context) (v string, err error)

OldReferencePrefix returns the old "reference_prefix" field's value of the Product entity. If the Product 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 (*ProductMutation) Op

func (m *ProductMutation) Op() Op

Op returns the operation name.

func (*ProductMutation) ProductLine

func (m *ProductMutation) ProductLine() (r bool, exists bool)

ProductLine returns the value of the "product_line" field in the mutation.

func (*ProductMutation) ProductLineCleared

func (m *ProductMutation) ProductLineCleared() bool

ProductLineCleared returns if the "product_line" field was cleared in this mutation.

func (*ProductMutation) ReferencePrefix

func (m *ProductMutation) ReferencePrefix() (r string, exists bool)

ReferencePrefix returns the value of the "reference_prefix" field in the mutation.

func (*ProductMutation) ReferencePrefixCleared

func (m *ProductMutation) ReferencePrefixCleared() bool

ReferencePrefixCleared returns if the "reference_prefix" field was cleared in this mutation.

func (*ProductMutation) RemovedEdges

func (m *ProductMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProductMutation) RemovedIDs

func (m *ProductMutation) 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 (*ProductMutation) ResetCreatedAt

func (m *ProductMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ProductMutation) ResetData

func (m *ProductMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*ProductMutation) ResetEdge

func (m *ProductMutation) 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 (*ProductMutation) ResetField

func (m *ProductMutation) 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 (*ProductMutation) ResetHasIdeas

func (m *ProductMutation) ResetHasIdeas()

ResetHasIdeas resets all changes to the "has_ideas" field.

func (*ProductMutation) ResetName

func (m *ProductMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProductMutation) ResetProductLine

func (m *ProductMutation) ResetProductLine()

ResetProductLine resets all changes to the "product_line" field.

func (*ProductMutation) ResetReferencePrefix

func (m *ProductMutation) ResetReferencePrefix()

ResetReferencePrefix resets all changes to the "reference_prefix" field.

func (*ProductMutation) SetCreatedAt

func (m *ProductMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ProductMutation) SetData

func (m *ProductMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*ProductMutation) SetField

func (m *ProductMutation) 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 (*ProductMutation) SetHasIdeas

func (m *ProductMutation) SetHasIdeas(b bool)

SetHasIdeas sets the "has_ideas" field.

func (*ProductMutation) SetID

func (m *ProductMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Product entities.

func (*ProductMutation) SetName

func (m *ProductMutation) SetName(s string)

SetName sets the "name" field.

func (*ProductMutation) SetOp

func (m *ProductMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProductMutation) SetProductLine

func (m *ProductMutation) SetProductLine(b bool)

SetProductLine sets the "product_line" field.

func (*ProductMutation) SetReferencePrefix

func (m *ProductMutation) SetReferencePrefix(s string)

SetReferencePrefix sets the "reference_prefix" field.

func (ProductMutation) Tx

func (m ProductMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProductMutation) Type

func (m *ProductMutation) Type() string

Type returns the node type of this mutation (Product).

func (*ProductMutation) Where

func (m *ProductMutation) Where(ps ...predicate.Product)

Where appends a list predicates to the ProductMutation builder.

func (*ProductMutation) WhereP

func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProductMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProductQuery

type ProductQuery struct {
	// contains filtered or unexported fields
}

ProductQuery is the builder for querying Product entities.

func (*ProductQuery) Aggregate

func (_q *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect

Aggregate returns a ProductSelect configured with the given aggregations.

func (*ProductQuery) All

func (_q *ProductQuery) All(ctx context.Context) ([]*Product, error)

All executes the query and returns a list of Products.

func (*ProductQuery) AllX

func (_q *ProductQuery) AllX(ctx context.Context) []*Product

AllX is like All, but panics if an error occurs.

func (*ProductQuery) Clone

func (_q *ProductQuery) Clone() *ProductQuery

Clone returns a duplicate of the ProductQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProductQuery) Count

func (_q *ProductQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProductQuery) CountX

func (_q *ProductQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProductQuery) Exist

func (_q *ProductQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProductQuery) ExistX

func (_q *ProductQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProductQuery) First

func (_q *ProductQuery) First(ctx context.Context) (*Product, error)

First returns the first Product entity from the query. Returns a *NotFoundError when no Product was found.

func (*ProductQuery) FirstID

func (_q *ProductQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Product ID from the query. Returns a *NotFoundError when no Product ID was found.

func (*ProductQuery) FirstIDX

func (_q *ProductQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProductQuery) FirstX

func (_q *ProductQuery) FirstX(ctx context.Context) *Product

FirstX is like First, but panics if an error occurs.

func (*ProductQuery) GroupBy

func (_q *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy

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 {
	ReferencePrefix string `json:"reference_prefix,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Product.Query().
	GroupBy(product.FieldReferencePrefix).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProductQuery) IDs

func (_q *ProductQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Product IDs.

func (*ProductQuery) IDsX

func (_q *ProductQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*ProductQuery) Limit

func (_q *ProductQuery) Limit(limit int) *ProductQuery

Limit the number of records to be returned by this query.

func (*ProductQuery) Offset

func (_q *ProductQuery) Offset(offset int) *ProductQuery

Offset to start from.

func (*ProductQuery) Only

func (_q *ProductQuery) Only(ctx context.Context) (*Product, error)

Only returns a single Product entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Product entity is found. Returns a *NotFoundError when no Product entities are found.

func (*ProductQuery) OnlyID

func (_q *ProductQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Product ID in the query. Returns a *NotSingularError when more than one Product ID is found. Returns a *NotFoundError when no entities are found.

func (*ProductQuery) OnlyIDX

func (_q *ProductQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProductQuery) OnlyX

func (_q *ProductQuery) OnlyX(ctx context.Context) *Product

OnlyX is like Only, but panics if an error occurs.

func (*ProductQuery) Order

func (_q *ProductQuery) Order(o ...product.OrderOption) *ProductQuery

Order specifies how the records should be ordered.

func (*ProductQuery) Select

func (_q *ProductQuery) Select(fields ...string) *ProductSelect

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 {
	ReferencePrefix string `json:"reference_prefix,omitempty"`
}

client.Product.Query().
	Select(product.FieldReferencePrefix).
	Scan(ctx, &v)

func (*ProductQuery) Unique

func (_q *ProductQuery) Unique(unique bool) *ProductQuery

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 (*ProductQuery) Where

func (_q *ProductQuery) Where(ps ...predicate.Product) *ProductQuery

Where adds a new predicate for the ProductQuery builder.

type ProductSelect

type ProductSelect struct {
	*ProductQuery
	// contains filtered or unexported fields
}

ProductSelect is the builder for selecting fields of Product entities.

func (*ProductSelect) Aggregate

func (_s *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProductSelect) Bool

func (s *ProductSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProductSelect) BoolX

func (s *ProductSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProductSelect) Bools

func (s *ProductSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProductSelect) BoolsX

func (s *ProductSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProductSelect) Float64

func (s *ProductSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProductSelect) Float64X

func (s *ProductSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProductSelect) Float64s

func (s *ProductSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProductSelect) Float64sX

func (s *ProductSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProductSelect) Int

func (s *ProductSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProductSelect) IntX

func (s *ProductSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProductSelect) Ints

func (s *ProductSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProductSelect) IntsX

func (s *ProductSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProductSelect) Scan

func (_s *ProductSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProductSelect) ScanX

func (s *ProductSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProductSelect) String

func (s *ProductSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProductSelect) StringX

func (s *ProductSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProductSelect) Strings

func (s *ProductSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProductSelect) StringsX

func (s *ProductSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProductUpdate

type ProductUpdate struct {
	// contains filtered or unexported fields
}

ProductUpdate is the builder for updating Product entities.

func (*ProductUpdate) ClearCreatedAt

func (_u *ProductUpdate) ClearCreatedAt() *ProductUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*ProductUpdate) ClearData

func (_u *ProductUpdate) ClearData() *ProductUpdate

ClearData clears the value of the "data" field.

func (*ProductUpdate) ClearHasIdeas

func (_u *ProductUpdate) ClearHasIdeas() *ProductUpdate

ClearHasIdeas clears the value of the "has_ideas" field.

func (*ProductUpdate) ClearName

func (_u *ProductUpdate) ClearName() *ProductUpdate

ClearName clears the value of the "name" field.

func (*ProductUpdate) ClearProductLine

func (_u *ProductUpdate) ClearProductLine() *ProductUpdate

ClearProductLine clears the value of the "product_line" field.

func (*ProductUpdate) ClearReferencePrefix

func (_u *ProductUpdate) ClearReferencePrefix() *ProductUpdate

ClearReferencePrefix clears the value of the "reference_prefix" field.

func (*ProductUpdate) Exec

func (_u *ProductUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductUpdate) ExecX

func (_u *ProductUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpdate) Mutation

func (_u *ProductUpdate) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductUpdate) Save

func (_u *ProductUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProductUpdate) SaveX

func (_u *ProductUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProductUpdate) SetCreatedAt

func (_u *ProductUpdate) SetCreatedAt(v time.Time) *ProductUpdate

SetCreatedAt sets the "created_at" field.

func (*ProductUpdate) SetData

func (_u *ProductUpdate) SetData(v map[string]interface{}) *ProductUpdate

SetData sets the "data" field.

func (*ProductUpdate) SetHasIdeas

func (_u *ProductUpdate) SetHasIdeas(v bool) *ProductUpdate

SetHasIdeas sets the "has_ideas" field.

func (*ProductUpdate) SetName

func (_u *ProductUpdate) SetName(v string) *ProductUpdate

SetName sets the "name" field.

func (*ProductUpdate) SetNillableCreatedAt

func (_u *ProductUpdate) SetNillableCreatedAt(v *time.Time) *ProductUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProductUpdate) SetNillableHasIdeas

func (_u *ProductUpdate) SetNillableHasIdeas(v *bool) *ProductUpdate

SetNillableHasIdeas sets the "has_ideas" field if the given value is not nil.

func (*ProductUpdate) SetNillableName

func (_u *ProductUpdate) SetNillableName(v *string) *ProductUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*ProductUpdate) SetNillableProductLine

func (_u *ProductUpdate) SetNillableProductLine(v *bool) *ProductUpdate

SetNillableProductLine sets the "product_line" field if the given value is not nil.

func (*ProductUpdate) SetNillableReferencePrefix

func (_u *ProductUpdate) SetNillableReferencePrefix(v *string) *ProductUpdate

SetNillableReferencePrefix sets the "reference_prefix" field if the given value is not nil.

func (*ProductUpdate) SetProductLine

func (_u *ProductUpdate) SetProductLine(v bool) *ProductUpdate

SetProductLine sets the "product_line" field.

func (*ProductUpdate) SetReferencePrefix

func (_u *ProductUpdate) SetReferencePrefix(v string) *ProductUpdate

SetReferencePrefix sets the "reference_prefix" field.

func (*ProductUpdate) Where

func (_u *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate

Where appends a list predicates to the ProductUpdate builder.

type ProductUpdateOne

type ProductUpdateOne struct {
	// contains filtered or unexported fields
}

ProductUpdateOne is the builder for updating a single Product entity.

func (*ProductUpdateOne) ClearCreatedAt

func (_u *ProductUpdateOne) ClearCreatedAt() *ProductUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*ProductUpdateOne) ClearData

func (_u *ProductUpdateOne) ClearData() *ProductUpdateOne

ClearData clears the value of the "data" field.

func (*ProductUpdateOne) ClearHasIdeas

func (_u *ProductUpdateOne) ClearHasIdeas() *ProductUpdateOne

ClearHasIdeas clears the value of the "has_ideas" field.

func (*ProductUpdateOne) ClearName

func (_u *ProductUpdateOne) ClearName() *ProductUpdateOne

ClearName clears the value of the "name" field.

func (*ProductUpdateOne) ClearProductLine

func (_u *ProductUpdateOne) ClearProductLine() *ProductUpdateOne

ClearProductLine clears the value of the "product_line" field.

func (*ProductUpdateOne) ClearReferencePrefix

func (_u *ProductUpdateOne) ClearReferencePrefix() *ProductUpdateOne

ClearReferencePrefix clears the value of the "reference_prefix" field.

func (*ProductUpdateOne) Exec

func (_u *ProductUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProductUpdateOne) ExecX

func (_u *ProductUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpdateOne) Mutation

func (_u *ProductUpdateOne) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductUpdateOne) Save

func (_u *ProductUpdateOne) Save(ctx context.Context) (*Product, error)

Save executes the query and returns the updated Product entity.

func (*ProductUpdateOne) SaveX

func (_u *ProductUpdateOne) SaveX(ctx context.Context) *Product

SaveX is like Save, but panics if an error occurs.

func (*ProductUpdateOne) Select

func (_u *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProductUpdateOne) SetCreatedAt

func (_u *ProductUpdateOne) SetCreatedAt(v time.Time) *ProductUpdateOne

SetCreatedAt sets the "created_at" field.

func (*ProductUpdateOne) SetData

func (_u *ProductUpdateOne) SetData(v map[string]interface{}) *ProductUpdateOne

SetData sets the "data" field.

func (*ProductUpdateOne) SetHasIdeas

func (_u *ProductUpdateOne) SetHasIdeas(v bool) *ProductUpdateOne

SetHasIdeas sets the "has_ideas" field.

func (*ProductUpdateOne) SetName

func (_u *ProductUpdateOne) SetName(v string) *ProductUpdateOne

SetName sets the "name" field.

func (*ProductUpdateOne) SetNillableCreatedAt

func (_u *ProductUpdateOne) SetNillableCreatedAt(v *time.Time) *ProductUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProductUpdateOne) SetNillableHasIdeas

func (_u *ProductUpdateOne) SetNillableHasIdeas(v *bool) *ProductUpdateOne

SetNillableHasIdeas sets the "has_ideas" field if the given value is not nil.

func (*ProductUpdateOne) SetNillableName

func (_u *ProductUpdateOne) SetNillableName(v *string) *ProductUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*ProductUpdateOne) SetNillableProductLine

func (_u *ProductUpdateOne) SetNillableProductLine(v *bool) *ProductUpdateOne

SetNillableProductLine sets the "product_line" field if the given value is not nil.

func (*ProductUpdateOne) SetNillableReferencePrefix

func (_u *ProductUpdateOne) SetNillableReferencePrefix(v *string) *ProductUpdateOne

SetNillableReferencePrefix sets the "reference_prefix" field if the given value is not nil.

func (*ProductUpdateOne) SetProductLine

func (_u *ProductUpdateOne) SetProductLine(v bool) *ProductUpdateOne

SetProductLine sets the "product_line" field.

func (*ProductUpdateOne) SetReferencePrefix

func (_u *ProductUpdateOne) SetReferencePrefix(v string) *ProductUpdateOne

SetReferencePrefix sets the "reference_prefix" field.

func (*ProductUpdateOne) Where

Where appends a list predicates to the ProductUpdate builder.

type ProductUpsert

type ProductUpsert struct {
	*sql.UpdateSet
}

ProductUpsert is the "OnConflict" setter.

func (*ProductUpsert) ClearCreatedAt

func (u *ProductUpsert) ClearCreatedAt() *ProductUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*ProductUpsert) ClearData

func (u *ProductUpsert) ClearData() *ProductUpsert

ClearData clears the value of the "data" field.

func (*ProductUpsert) ClearHasIdeas

func (u *ProductUpsert) ClearHasIdeas() *ProductUpsert

ClearHasIdeas clears the value of the "has_ideas" field.

func (*ProductUpsert) ClearName

func (u *ProductUpsert) ClearName() *ProductUpsert

ClearName clears the value of the "name" field.

func (*ProductUpsert) ClearProductLine

func (u *ProductUpsert) ClearProductLine() *ProductUpsert

ClearProductLine clears the value of the "product_line" field.

func (*ProductUpsert) ClearReferencePrefix

func (u *ProductUpsert) ClearReferencePrefix() *ProductUpsert

ClearReferencePrefix clears the value of the "reference_prefix" field.

func (*ProductUpsert) SetCreatedAt

func (u *ProductUpsert) SetCreatedAt(v time.Time) *ProductUpsert

SetCreatedAt sets the "created_at" field.

func (*ProductUpsert) SetData

func (u *ProductUpsert) SetData(v map[string]interface{}) *ProductUpsert

SetData sets the "data" field.

func (*ProductUpsert) SetHasIdeas

func (u *ProductUpsert) SetHasIdeas(v bool) *ProductUpsert

SetHasIdeas sets the "has_ideas" field.

func (*ProductUpsert) SetName

func (u *ProductUpsert) SetName(v string) *ProductUpsert

SetName sets the "name" field.

func (*ProductUpsert) SetProductLine

func (u *ProductUpsert) SetProductLine(v bool) *ProductUpsert

SetProductLine sets the "product_line" field.

func (*ProductUpsert) SetReferencePrefix

func (u *ProductUpsert) SetReferencePrefix(v string) *ProductUpsert

SetReferencePrefix sets the "reference_prefix" field.

func (*ProductUpsert) UpdateCreatedAt

func (u *ProductUpsert) UpdateCreatedAt() *ProductUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*ProductUpsert) UpdateData

func (u *ProductUpsert) UpdateData() *ProductUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*ProductUpsert) UpdateHasIdeas

func (u *ProductUpsert) UpdateHasIdeas() *ProductUpsert

UpdateHasIdeas sets the "has_ideas" field to the value that was provided on create.

func (*ProductUpsert) UpdateName

func (u *ProductUpsert) UpdateName() *ProductUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*ProductUpsert) UpdateProductLine

func (u *ProductUpsert) UpdateProductLine() *ProductUpsert

UpdateProductLine sets the "product_line" field to the value that was provided on create.

func (*ProductUpsert) UpdateReferencePrefix

func (u *ProductUpsert) UpdateReferencePrefix() *ProductUpsert

UpdateReferencePrefix sets the "reference_prefix" field to the value that was provided on create.

type ProductUpsertBulk

type ProductUpsertBulk struct {
	// contains filtered or unexported fields
}

ProductUpsertBulk is the builder for "upsert"-ing a bulk of Product nodes.

func (*ProductUpsertBulk) ClearCreatedAt

func (u *ProductUpsertBulk) ClearCreatedAt() *ProductUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*ProductUpsertBulk) ClearData

func (u *ProductUpsertBulk) ClearData() *ProductUpsertBulk

ClearData clears the value of the "data" field.

func (*ProductUpsertBulk) ClearHasIdeas

func (u *ProductUpsertBulk) ClearHasIdeas() *ProductUpsertBulk

ClearHasIdeas clears the value of the "has_ideas" field.

func (*ProductUpsertBulk) ClearName

func (u *ProductUpsertBulk) ClearName() *ProductUpsertBulk

ClearName clears the value of the "name" field.

func (*ProductUpsertBulk) ClearProductLine

func (u *ProductUpsertBulk) ClearProductLine() *ProductUpsertBulk

ClearProductLine clears the value of the "product_line" field.

func (*ProductUpsertBulk) ClearReferencePrefix

func (u *ProductUpsertBulk) ClearReferencePrefix() *ProductUpsertBulk

ClearReferencePrefix clears the value of the "reference_prefix" field.

func (*ProductUpsertBulk) DoNothing

func (u *ProductUpsertBulk) DoNothing() *ProductUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProductUpsertBulk) Exec

func (u *ProductUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductUpsertBulk) ExecX

func (u *ProductUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpsertBulk) Ignore

func (u *ProductUpsertBulk) Ignore() *ProductUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ProductUpsertBulk) SetCreatedAt

func (u *ProductUpsertBulk) SetCreatedAt(v time.Time) *ProductUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*ProductUpsertBulk) SetData

func (u *ProductUpsertBulk) SetData(v map[string]interface{}) *ProductUpsertBulk

SetData sets the "data" field.

func (*ProductUpsertBulk) SetHasIdeas

func (u *ProductUpsertBulk) SetHasIdeas(v bool) *ProductUpsertBulk

SetHasIdeas sets the "has_ideas" field.

func (*ProductUpsertBulk) SetName

SetName sets the "name" field.

func (*ProductUpsertBulk) SetProductLine

func (u *ProductUpsertBulk) SetProductLine(v bool) *ProductUpsertBulk

SetProductLine sets the "product_line" field.

func (*ProductUpsertBulk) SetReferencePrefix

func (u *ProductUpsertBulk) SetReferencePrefix(v string) *ProductUpsertBulk

SetReferencePrefix sets the "reference_prefix" field.

func (*ProductUpsertBulk) Update

func (u *ProductUpsertBulk) Update(set func(*ProductUpsert)) *ProductUpsertBulk

Update allows overriding fields `UPDATE` values. See the ProductCreateBulk.OnConflict documentation for more info.

func (*ProductUpsertBulk) UpdateCreatedAt

func (u *ProductUpsertBulk) UpdateCreatedAt() *ProductUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateData

func (u *ProductUpsertBulk) UpdateData() *ProductUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateHasIdeas

func (u *ProductUpsertBulk) UpdateHasIdeas() *ProductUpsertBulk

UpdateHasIdeas sets the "has_ideas" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateName

func (u *ProductUpsertBulk) UpdateName() *ProductUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateNewValues

func (u *ProductUpsertBulk) UpdateNewValues() *ProductUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(product.FieldID)
		}),
	).
	Exec(ctx)

func (*ProductUpsertBulk) UpdateProductLine

func (u *ProductUpsertBulk) UpdateProductLine() *ProductUpsertBulk

UpdateProductLine sets the "product_line" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateReferencePrefix

func (u *ProductUpsertBulk) UpdateReferencePrefix() *ProductUpsertBulk

UpdateReferencePrefix sets the "reference_prefix" field to the value that was provided on create.

type ProductUpsertOne

type ProductUpsertOne struct {
	// contains filtered or unexported fields
}

ProductUpsertOne is the builder for "upsert"-ing

one Product node.

func (*ProductUpsertOne) ClearCreatedAt

func (u *ProductUpsertOne) ClearCreatedAt() *ProductUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*ProductUpsertOne) ClearData

func (u *ProductUpsertOne) ClearData() *ProductUpsertOne

ClearData clears the value of the "data" field.

func (*ProductUpsertOne) ClearHasIdeas

func (u *ProductUpsertOne) ClearHasIdeas() *ProductUpsertOne

ClearHasIdeas clears the value of the "has_ideas" field.

func (*ProductUpsertOne) ClearName

func (u *ProductUpsertOne) ClearName() *ProductUpsertOne

ClearName clears the value of the "name" field.

func (*ProductUpsertOne) ClearProductLine

func (u *ProductUpsertOne) ClearProductLine() *ProductUpsertOne

ClearProductLine clears the value of the "product_line" field.

func (*ProductUpsertOne) ClearReferencePrefix

func (u *ProductUpsertOne) ClearReferencePrefix() *ProductUpsertOne

ClearReferencePrefix clears the value of the "reference_prefix" field.

func (*ProductUpsertOne) DoNothing

func (u *ProductUpsertOne) DoNothing() *ProductUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProductUpsertOne) Exec

func (u *ProductUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductUpsertOne) ExecX

func (u *ProductUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpsertOne) ID

func (u *ProductUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ProductUpsertOne) IDX

func (u *ProductUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*ProductUpsertOne) Ignore

func (u *ProductUpsertOne) Ignore() *ProductUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Product.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ProductUpsertOne) SetCreatedAt

func (u *ProductUpsertOne) SetCreatedAt(v time.Time) *ProductUpsertOne

SetCreatedAt sets the "created_at" field.

func (*ProductUpsertOne) SetData

func (u *ProductUpsertOne) SetData(v map[string]interface{}) *ProductUpsertOne

SetData sets the "data" field.

func (*ProductUpsertOne) SetHasIdeas

func (u *ProductUpsertOne) SetHasIdeas(v bool) *ProductUpsertOne

SetHasIdeas sets the "has_ideas" field.

func (*ProductUpsertOne) SetName

func (u *ProductUpsertOne) SetName(v string) *ProductUpsertOne

SetName sets the "name" field.

func (*ProductUpsertOne) SetProductLine

func (u *ProductUpsertOne) SetProductLine(v bool) *ProductUpsertOne

SetProductLine sets the "product_line" field.

func (*ProductUpsertOne) SetReferencePrefix

func (u *ProductUpsertOne) SetReferencePrefix(v string) *ProductUpsertOne

SetReferencePrefix sets the "reference_prefix" field.

func (*ProductUpsertOne) Update

func (u *ProductUpsertOne) Update(set func(*ProductUpsert)) *ProductUpsertOne

Update allows overriding fields `UPDATE` values. See the ProductCreate.OnConflict documentation for more info.

func (*ProductUpsertOne) UpdateCreatedAt

func (u *ProductUpsertOne) UpdateCreatedAt() *ProductUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateData

func (u *ProductUpsertOne) UpdateData() *ProductUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateHasIdeas

func (u *ProductUpsertOne) UpdateHasIdeas() *ProductUpsertOne

UpdateHasIdeas sets the "has_ideas" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateName

func (u *ProductUpsertOne) UpdateName() *ProductUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateNewValues

func (u *ProductUpsertOne) UpdateNewValues() *ProductUpsertOne

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.Product.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(product.FieldID)
		}),
	).
	Exec(ctx)

func (*ProductUpsertOne) UpdateProductLine

func (u *ProductUpsertOne) UpdateProductLine() *ProductUpsertOne

UpdateProductLine sets the "product_line" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateReferencePrefix

func (u *ProductUpsertOne) UpdateReferencePrefix() *ProductUpsertOne

UpdateReferencePrefix sets the "reference_prefix" field to the value that was provided on create.

type Products

type Products []*Product

Products is a parsable slice of Product.

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 Relationship

type Relationship struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// FromType holds the value of the "from_type" field.
	FromType string `json:"from_type,omitempty"`
	// FromID holds the value of the "from_id" field.
	FromID string `json:"from_id,omitempty"`
	// RelType holds the value of the "rel_type" field.
	RelType string `json:"rel_type,omitempty"`
	// ToType holds the value of the "to_type" field.
	ToType string `json:"to_type,omitempty"`
	// ToID holds the value of the "to_id" field.
	ToID string `json:"to_id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Relationship is the model entity for the Relationship schema.

func (*Relationship) String

func (_m *Relationship) String() string

String implements the fmt.Stringer.

func (*Relationship) Unwrap

func (_m *Relationship) Unwrap() *Relationship

Unwrap unwraps the Relationship 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 (*Relationship) Update

func (_m *Relationship) Update() *RelationshipUpdateOne

Update returns a builder for updating this Relationship. Note that you need to call Relationship.Unwrap() before calling this method if this Relationship was returned from a transaction, and the transaction was committed or rolled back.

func (*Relationship) Value

func (_m *Relationship) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Relationship. This includes values selected through modifiers, order, etc.

type RelationshipClient

type RelationshipClient struct {
	// contains filtered or unexported fields
}

RelationshipClient is a client for the Relationship schema.

func NewRelationshipClient

func NewRelationshipClient(c config) *RelationshipClient

NewRelationshipClient returns a client for the Relationship from the given config.

func (*RelationshipClient) Create

Create returns a builder for creating a Relationship entity.

func (*RelationshipClient) CreateBulk

func (c *RelationshipClient) CreateBulk(builders ...*RelationshipCreate) *RelationshipCreateBulk

CreateBulk returns a builder for creating a bulk of Relationship entities.

func (*RelationshipClient) Delete

Delete returns a delete builder for Relationship.

func (*RelationshipClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RelationshipClient) DeleteOneID

func (c *RelationshipClient) DeleteOneID(id int) *RelationshipDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RelationshipClient) Get

Get returns a Relationship entity by its id.

func (*RelationshipClient) GetX

GetX is like Get, but panics if an error occurs.

func (*RelationshipClient) Hooks

func (c *RelationshipClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RelationshipClient) Intercept

func (c *RelationshipClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `relationship.Intercept(f(g(h())))`.

func (*RelationshipClient) Interceptors

func (c *RelationshipClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RelationshipClient) MapCreateBulk

func (c *RelationshipClient) MapCreateBulk(slice any, setFunc func(*RelationshipCreate, int)) *RelationshipCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RelationshipClient) Query

Query returns a query builder for Relationship.

func (*RelationshipClient) Update

Update returns an update builder for Relationship.

func (*RelationshipClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RelationshipClient) UpdateOneID

func (c *RelationshipClient) UpdateOneID(id int) *RelationshipUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RelationshipClient) Use

func (c *RelationshipClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `relationship.Hooks(f(g(h())))`.

type RelationshipCreate

type RelationshipCreate struct {
	// contains filtered or unexported fields
}

RelationshipCreate is the builder for creating a Relationship entity.

func (*RelationshipCreate) Exec

func (_c *RelationshipCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RelationshipCreate) ExecX

func (_c *RelationshipCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipCreate) Mutation

func (_c *RelationshipCreate) Mutation() *RelationshipMutation

Mutation returns the RelationshipMutation object of the builder.

func (*RelationshipCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Relationship.Create().
	SetFromType(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.RelationshipUpsert) {
		SetFromType(v+v).
	}).
	Exec(ctx)

func (*RelationshipCreate) OnConflictColumns

func (_c *RelationshipCreate) OnConflictColumns(columns ...string) *RelationshipUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Relationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RelationshipCreate) Save

Save creates the Relationship in the database.

func (*RelationshipCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RelationshipCreate) SetCreatedAt

func (_c *RelationshipCreate) SetCreatedAt(v time.Time) *RelationshipCreate

SetCreatedAt sets the "created_at" field.

func (*RelationshipCreate) SetFromID

func (_c *RelationshipCreate) SetFromID(v string) *RelationshipCreate

SetFromID sets the "from_id" field.

func (*RelationshipCreate) SetFromType

func (_c *RelationshipCreate) SetFromType(v string) *RelationshipCreate

SetFromType sets the "from_type" field.

func (*RelationshipCreate) SetNillableCreatedAt

func (_c *RelationshipCreate) SetNillableCreatedAt(v *time.Time) *RelationshipCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RelationshipCreate) SetNillableProduct

func (_c *RelationshipCreate) SetNillableProduct(v *string) *RelationshipCreate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*RelationshipCreate) SetProduct

func (_c *RelationshipCreate) SetProduct(v string) *RelationshipCreate

SetProduct sets the "product" field.

func (*RelationshipCreate) SetRelType

func (_c *RelationshipCreate) SetRelType(v string) *RelationshipCreate

SetRelType sets the "rel_type" field.

func (*RelationshipCreate) SetToID

SetToID sets the "to_id" field.

func (*RelationshipCreate) SetToType

func (_c *RelationshipCreate) SetToType(v string) *RelationshipCreate

SetToType sets the "to_type" field.

type RelationshipCreateBulk

type RelationshipCreateBulk struct {
	// contains filtered or unexported fields
}

RelationshipCreateBulk is the builder for creating many Relationship entities in bulk.

func (*RelationshipCreateBulk) Exec

Exec executes the query.

func (*RelationshipCreateBulk) ExecX

func (_c *RelationshipCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Relationship.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.RelationshipUpsert) {
		SetFromType(v+v).
	}).
	Exec(ctx)

func (*RelationshipCreateBulk) OnConflictColumns

func (_c *RelationshipCreateBulk) OnConflictColumns(columns ...string) *RelationshipUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Relationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RelationshipCreateBulk) Save

Save creates the Relationship entities in the database.

func (*RelationshipCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type RelationshipDelete

type RelationshipDelete struct {
	// contains filtered or unexported fields
}

RelationshipDelete is the builder for deleting a Relationship entity.

func (*RelationshipDelete) Exec

func (_d *RelationshipDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RelationshipDelete) ExecX

func (_d *RelationshipDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipDelete) Where

Where appends a list predicates to the RelationshipDelete builder.

type RelationshipDeleteOne

type RelationshipDeleteOne struct {
	// contains filtered or unexported fields
}

RelationshipDeleteOne is the builder for deleting a single Relationship entity.

func (*RelationshipDeleteOne) Exec

Exec executes the deletion query.

func (*RelationshipDeleteOne) ExecX

func (_d *RelationshipDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipDeleteOne) Where

Where appends a list predicates to the RelationshipDelete builder.

type RelationshipGroupBy

type RelationshipGroupBy struct {
	// contains filtered or unexported fields
}

RelationshipGroupBy is the group-by builder for Relationship entities.

func (*RelationshipGroupBy) Aggregate

func (_g *RelationshipGroupBy) Aggregate(fns ...AggregateFunc) *RelationshipGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RelationshipGroupBy) Bool

func (s *RelationshipGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) BoolX

func (s *RelationshipGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RelationshipGroupBy) Bools

func (s *RelationshipGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) BoolsX

func (s *RelationshipGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RelationshipGroupBy) Float64

func (s *RelationshipGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) Float64X

func (s *RelationshipGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RelationshipGroupBy) Float64s

func (s *RelationshipGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) Float64sX

func (s *RelationshipGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RelationshipGroupBy) Int

func (s *RelationshipGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) IntX

func (s *RelationshipGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RelationshipGroupBy) Ints

func (s *RelationshipGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) IntsX

func (s *RelationshipGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RelationshipGroupBy) Scan

func (_g *RelationshipGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RelationshipGroupBy) ScanX

func (s *RelationshipGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RelationshipGroupBy) String

func (s *RelationshipGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) StringX

func (s *RelationshipGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RelationshipGroupBy) Strings

func (s *RelationshipGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RelationshipGroupBy) StringsX

func (s *RelationshipGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RelationshipMutation

type RelationshipMutation struct {
	// contains filtered or unexported fields
}

RelationshipMutation represents an operation that mutates the Relationship nodes in the graph.

func (*RelationshipMutation) AddField

func (m *RelationshipMutation) 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 (*RelationshipMutation) AddedEdges

func (m *RelationshipMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RelationshipMutation) AddedField

func (m *RelationshipMutation) 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 (*RelationshipMutation) AddedFields

func (m *RelationshipMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RelationshipMutation) AddedIDs

func (m *RelationshipMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RelationshipMutation) ClearEdge

func (m *RelationshipMutation) 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 (*RelationshipMutation) ClearField

func (m *RelationshipMutation) 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 (*RelationshipMutation) ClearProduct

func (m *RelationshipMutation) ClearProduct()

ClearProduct clears the value of the "product" field.

func (*RelationshipMutation) ClearedEdges

func (m *RelationshipMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RelationshipMutation) ClearedFields

func (m *RelationshipMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RelationshipMutation) Client

func (m RelationshipMutation) 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 (*RelationshipMutation) CreatedAt

func (m *RelationshipMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RelationshipMutation) EdgeCleared

func (m *RelationshipMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RelationshipMutation) Field

func (m *RelationshipMutation) 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 (*RelationshipMutation) FieldCleared

func (m *RelationshipMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RelationshipMutation) Fields

func (m *RelationshipMutation) 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 (*RelationshipMutation) FromID

func (m *RelationshipMutation) FromID() (r string, exists bool)

FromID returns the value of the "from_id" field in the mutation.

func (*RelationshipMutation) FromType

func (m *RelationshipMutation) FromType() (r string, exists bool)

FromType returns the value of the "from_type" field in the mutation.

func (*RelationshipMutation) ID

func (m *RelationshipMutation) 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 (*RelationshipMutation) IDs

func (m *RelationshipMutation) 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 (*RelationshipMutation) OldCreatedAt

func (m *RelationshipMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Relationship entity. If the Relationship 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 (*RelationshipMutation) OldField

func (m *RelationshipMutation) 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 (*RelationshipMutation) OldFromID

func (m *RelationshipMutation) OldFromID(ctx context.Context) (v string, err error)

OldFromID returns the old "from_id" field's value of the Relationship entity. If the Relationship 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 (*RelationshipMutation) OldFromType

func (m *RelationshipMutation) OldFromType(ctx context.Context) (v string, err error)

OldFromType returns the old "from_type" field's value of the Relationship entity. If the Relationship 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 (*RelationshipMutation) OldProduct

func (m *RelationshipMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Relationship entity. If the Relationship 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 (*RelationshipMutation) OldRelType

func (m *RelationshipMutation) OldRelType(ctx context.Context) (v string, err error)

OldRelType returns the old "rel_type" field's value of the Relationship entity. If the Relationship 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 (*RelationshipMutation) OldToID

func (m *RelationshipMutation) OldToID(ctx context.Context) (v string, err error)

OldToID returns the old "to_id" field's value of the Relationship entity. If the Relationship 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 (*RelationshipMutation) OldToType

func (m *RelationshipMutation) OldToType(ctx context.Context) (v string, err error)

OldToType returns the old "to_type" field's value of the Relationship entity. If the Relationship 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 (*RelationshipMutation) Op

func (m *RelationshipMutation) Op() Op

Op returns the operation name.

func (*RelationshipMutation) Product

func (m *RelationshipMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*RelationshipMutation) ProductCleared

func (m *RelationshipMutation) ProductCleared() bool

ProductCleared returns if the "product" field was cleared in this mutation.

func (*RelationshipMutation) RelType

func (m *RelationshipMutation) RelType() (r string, exists bool)

RelType returns the value of the "rel_type" field in the mutation.

func (*RelationshipMutation) RemovedEdges

func (m *RelationshipMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RelationshipMutation) RemovedIDs

func (m *RelationshipMutation) 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 (*RelationshipMutation) ResetCreatedAt

func (m *RelationshipMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RelationshipMutation) ResetEdge

func (m *RelationshipMutation) 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 (*RelationshipMutation) ResetField

func (m *RelationshipMutation) 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 (*RelationshipMutation) ResetFromID

func (m *RelationshipMutation) ResetFromID()

ResetFromID resets all changes to the "from_id" field.

func (*RelationshipMutation) ResetFromType

func (m *RelationshipMutation) ResetFromType()

ResetFromType resets all changes to the "from_type" field.

func (*RelationshipMutation) ResetProduct

func (m *RelationshipMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*RelationshipMutation) ResetRelType

func (m *RelationshipMutation) ResetRelType()

ResetRelType resets all changes to the "rel_type" field.

func (*RelationshipMutation) ResetToID

func (m *RelationshipMutation) ResetToID()

ResetToID resets all changes to the "to_id" field.

func (*RelationshipMutation) ResetToType

func (m *RelationshipMutation) ResetToType()

ResetToType resets all changes to the "to_type" field.

func (*RelationshipMutation) SetCreatedAt

func (m *RelationshipMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RelationshipMutation) SetField

func (m *RelationshipMutation) 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 (*RelationshipMutation) SetFromID

func (m *RelationshipMutation) SetFromID(s string)

SetFromID sets the "from_id" field.

func (*RelationshipMutation) SetFromType

func (m *RelationshipMutation) SetFromType(s string)

SetFromType sets the "from_type" field.

func (*RelationshipMutation) SetOp

func (m *RelationshipMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RelationshipMutation) SetProduct

func (m *RelationshipMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*RelationshipMutation) SetRelType

func (m *RelationshipMutation) SetRelType(s string)

SetRelType sets the "rel_type" field.

func (*RelationshipMutation) SetToID

func (m *RelationshipMutation) SetToID(s string)

SetToID sets the "to_id" field.

func (*RelationshipMutation) SetToType

func (m *RelationshipMutation) SetToType(s string)

SetToType sets the "to_type" field.

func (*RelationshipMutation) ToID

func (m *RelationshipMutation) ToID() (r string, exists bool)

ToID returns the value of the "to_id" field in the mutation.

func (*RelationshipMutation) ToType

func (m *RelationshipMutation) ToType() (r string, exists bool)

ToType returns the value of the "to_type" field in the mutation.

func (RelationshipMutation) Tx

func (m RelationshipMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RelationshipMutation) Type

func (m *RelationshipMutation) Type() string

Type returns the node type of this mutation (Relationship).

func (*RelationshipMutation) Where

Where appends a list predicates to the RelationshipMutation builder.

func (*RelationshipMutation) WhereP

func (m *RelationshipMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RelationshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RelationshipQuery

type RelationshipQuery struct {
	// contains filtered or unexported fields
}

RelationshipQuery is the builder for querying Relationship entities.

func (*RelationshipQuery) Aggregate

func (_q *RelationshipQuery) Aggregate(fns ...AggregateFunc) *RelationshipSelect

Aggregate returns a RelationshipSelect configured with the given aggregations.

func (*RelationshipQuery) All

func (_q *RelationshipQuery) All(ctx context.Context) ([]*Relationship, error)

All executes the query and returns a list of Relationships.

func (*RelationshipQuery) AllX

func (_q *RelationshipQuery) AllX(ctx context.Context) []*Relationship

AllX is like All, but panics if an error occurs.

func (*RelationshipQuery) Clone

func (_q *RelationshipQuery) Clone() *RelationshipQuery

Clone returns a duplicate of the RelationshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RelationshipQuery) Count

func (_q *RelationshipQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RelationshipQuery) CountX

func (_q *RelationshipQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RelationshipQuery) Exist

func (_q *RelationshipQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RelationshipQuery) ExistX

func (_q *RelationshipQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RelationshipQuery) First

func (_q *RelationshipQuery) First(ctx context.Context) (*Relationship, error)

First returns the first Relationship entity from the query. Returns a *NotFoundError when no Relationship was found.

func (*RelationshipQuery) FirstID

func (_q *RelationshipQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Relationship ID from the query. Returns a *NotFoundError when no Relationship ID was found.

func (*RelationshipQuery) FirstIDX

func (_q *RelationshipQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RelationshipQuery) FirstX

func (_q *RelationshipQuery) FirstX(ctx context.Context) *Relationship

FirstX is like First, but panics if an error occurs.

func (*RelationshipQuery) GroupBy

func (_q *RelationshipQuery) GroupBy(field string, fields ...string) *RelationshipGroupBy

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 {
	FromType string `json:"from_type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Relationship.Query().
	GroupBy(relationship.FieldFromType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RelationshipQuery) IDs

func (_q *RelationshipQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Relationship IDs.

func (*RelationshipQuery) IDsX

func (_q *RelationshipQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RelationshipQuery) Limit

func (_q *RelationshipQuery) Limit(limit int) *RelationshipQuery

Limit the number of records to be returned by this query.

func (*RelationshipQuery) Offset

func (_q *RelationshipQuery) Offset(offset int) *RelationshipQuery

Offset to start from.

func (*RelationshipQuery) Only

Only returns a single Relationship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Relationship entity is found. Returns a *NotFoundError when no Relationship entities are found.

func (*RelationshipQuery) OnlyID

func (_q *RelationshipQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Relationship ID in the query. Returns a *NotSingularError when more than one Relationship ID is found. Returns a *NotFoundError when no entities are found.

func (*RelationshipQuery) OnlyIDX

func (_q *RelationshipQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RelationshipQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*RelationshipQuery) Order

Order specifies how the records should be ordered.

func (*RelationshipQuery) Select

func (_q *RelationshipQuery) Select(fields ...string) *RelationshipSelect

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 {
	FromType string `json:"from_type,omitempty"`
}

client.Relationship.Query().
	Select(relationship.FieldFromType).
	Scan(ctx, &v)

func (*RelationshipQuery) Unique

func (_q *RelationshipQuery) Unique(unique bool) *RelationshipQuery

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 (*RelationshipQuery) Where

Where adds a new predicate for the RelationshipQuery builder.

type RelationshipSelect

type RelationshipSelect struct {
	*RelationshipQuery
	// contains filtered or unexported fields
}

RelationshipSelect is the builder for selecting fields of Relationship entities.

func (*RelationshipSelect) Aggregate

func (_s *RelationshipSelect) Aggregate(fns ...AggregateFunc) *RelationshipSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RelationshipSelect) Bool

func (s *RelationshipSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) BoolX

func (s *RelationshipSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RelationshipSelect) Bools

func (s *RelationshipSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) BoolsX

func (s *RelationshipSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RelationshipSelect) Float64

func (s *RelationshipSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) Float64X

func (s *RelationshipSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RelationshipSelect) Float64s

func (s *RelationshipSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) Float64sX

func (s *RelationshipSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RelationshipSelect) Int

func (s *RelationshipSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) IntX

func (s *RelationshipSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RelationshipSelect) Ints

func (s *RelationshipSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) IntsX

func (s *RelationshipSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RelationshipSelect) Scan

func (_s *RelationshipSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RelationshipSelect) ScanX

func (s *RelationshipSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RelationshipSelect) String

func (s *RelationshipSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) StringX

func (s *RelationshipSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RelationshipSelect) Strings

func (s *RelationshipSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RelationshipSelect) StringsX

func (s *RelationshipSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RelationshipUpdate

type RelationshipUpdate struct {
	// contains filtered or unexported fields
}

RelationshipUpdate is the builder for updating Relationship entities.

func (*RelationshipUpdate) ClearProduct

func (_u *RelationshipUpdate) ClearProduct() *RelationshipUpdate

ClearProduct clears the value of the "product" field.

func (*RelationshipUpdate) Exec

func (_u *RelationshipUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RelationshipUpdate) ExecX

func (_u *RelationshipUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipUpdate) Mutation

func (_u *RelationshipUpdate) Mutation() *RelationshipMutation

Mutation returns the RelationshipMutation object of the builder.

func (*RelationshipUpdate) Save

func (_u *RelationshipUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RelationshipUpdate) SaveX

func (_u *RelationshipUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RelationshipUpdate) SetCreatedAt

func (_u *RelationshipUpdate) SetCreatedAt(v time.Time) *RelationshipUpdate

SetCreatedAt sets the "created_at" field.

func (*RelationshipUpdate) SetFromID

func (_u *RelationshipUpdate) SetFromID(v string) *RelationshipUpdate

SetFromID sets the "from_id" field.

func (*RelationshipUpdate) SetFromType

func (_u *RelationshipUpdate) SetFromType(v string) *RelationshipUpdate

SetFromType sets the "from_type" field.

func (*RelationshipUpdate) SetNillableCreatedAt

func (_u *RelationshipUpdate) SetNillableCreatedAt(v *time.Time) *RelationshipUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RelationshipUpdate) SetNillableFromID

func (_u *RelationshipUpdate) SetNillableFromID(v *string) *RelationshipUpdate

SetNillableFromID sets the "from_id" field if the given value is not nil.

func (*RelationshipUpdate) SetNillableFromType

func (_u *RelationshipUpdate) SetNillableFromType(v *string) *RelationshipUpdate

SetNillableFromType sets the "from_type" field if the given value is not nil.

func (*RelationshipUpdate) SetNillableProduct

func (_u *RelationshipUpdate) SetNillableProduct(v *string) *RelationshipUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*RelationshipUpdate) SetNillableRelType

func (_u *RelationshipUpdate) SetNillableRelType(v *string) *RelationshipUpdate

SetNillableRelType sets the "rel_type" field if the given value is not nil.

func (*RelationshipUpdate) SetNillableToID

func (_u *RelationshipUpdate) SetNillableToID(v *string) *RelationshipUpdate

SetNillableToID sets the "to_id" field if the given value is not nil.

func (*RelationshipUpdate) SetNillableToType

func (_u *RelationshipUpdate) SetNillableToType(v *string) *RelationshipUpdate

SetNillableToType sets the "to_type" field if the given value is not nil.

func (*RelationshipUpdate) SetProduct

func (_u *RelationshipUpdate) SetProduct(v string) *RelationshipUpdate

SetProduct sets the "product" field.

func (*RelationshipUpdate) SetRelType

func (_u *RelationshipUpdate) SetRelType(v string) *RelationshipUpdate

SetRelType sets the "rel_type" field.

func (*RelationshipUpdate) SetToID

SetToID sets the "to_id" field.

func (*RelationshipUpdate) SetToType

func (_u *RelationshipUpdate) SetToType(v string) *RelationshipUpdate

SetToType sets the "to_type" field.

func (*RelationshipUpdate) Where

Where appends a list predicates to the RelationshipUpdate builder.

type RelationshipUpdateOne

type RelationshipUpdateOne struct {
	// contains filtered or unexported fields
}

RelationshipUpdateOne is the builder for updating a single Relationship entity.

func (*RelationshipUpdateOne) ClearProduct

func (_u *RelationshipUpdateOne) ClearProduct() *RelationshipUpdateOne

ClearProduct clears the value of the "product" field.

func (*RelationshipUpdateOne) Exec

Exec executes the query on the entity.

func (*RelationshipUpdateOne) ExecX

func (_u *RelationshipUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipUpdateOne) Mutation

Mutation returns the RelationshipMutation object of the builder.

func (*RelationshipUpdateOne) Save

Save executes the query and returns the updated Relationship entity.

func (*RelationshipUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RelationshipUpdateOne) Select

func (_u *RelationshipUpdateOne) Select(field string, fields ...string) *RelationshipUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RelationshipUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*RelationshipUpdateOne) SetFromID

SetFromID sets the "from_id" field.

func (*RelationshipUpdateOne) SetFromType

SetFromType sets the "from_type" field.

func (*RelationshipUpdateOne) SetNillableCreatedAt

func (_u *RelationshipUpdateOne) SetNillableCreatedAt(v *time.Time) *RelationshipUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RelationshipUpdateOne) SetNillableFromID

func (_u *RelationshipUpdateOne) SetNillableFromID(v *string) *RelationshipUpdateOne

SetNillableFromID sets the "from_id" field if the given value is not nil.

func (*RelationshipUpdateOne) SetNillableFromType

func (_u *RelationshipUpdateOne) SetNillableFromType(v *string) *RelationshipUpdateOne

SetNillableFromType sets the "from_type" field if the given value is not nil.

func (*RelationshipUpdateOne) SetNillableProduct

func (_u *RelationshipUpdateOne) SetNillableProduct(v *string) *RelationshipUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*RelationshipUpdateOne) SetNillableRelType

func (_u *RelationshipUpdateOne) SetNillableRelType(v *string) *RelationshipUpdateOne

SetNillableRelType sets the "rel_type" field if the given value is not nil.

func (*RelationshipUpdateOne) SetNillableToID

func (_u *RelationshipUpdateOne) SetNillableToID(v *string) *RelationshipUpdateOne

SetNillableToID sets the "to_id" field if the given value is not nil.

func (*RelationshipUpdateOne) SetNillableToType

func (_u *RelationshipUpdateOne) SetNillableToType(v *string) *RelationshipUpdateOne

SetNillableToType sets the "to_type" field if the given value is not nil.

func (*RelationshipUpdateOne) SetProduct

SetProduct sets the "product" field.

func (*RelationshipUpdateOne) SetRelType

SetRelType sets the "rel_type" field.

func (*RelationshipUpdateOne) SetToID

SetToID sets the "to_id" field.

func (*RelationshipUpdateOne) SetToType

SetToType sets the "to_type" field.

func (*RelationshipUpdateOne) Where

Where appends a list predicates to the RelationshipUpdate builder.

type RelationshipUpsert

type RelationshipUpsert struct {
	*sql.UpdateSet
}

RelationshipUpsert is the "OnConflict" setter.

func (*RelationshipUpsert) ClearProduct

func (u *RelationshipUpsert) ClearProduct() *RelationshipUpsert

ClearProduct clears the value of the "product" field.

func (*RelationshipUpsert) SetCreatedAt

func (u *RelationshipUpsert) SetCreatedAt(v time.Time) *RelationshipUpsert

SetCreatedAt sets the "created_at" field.

func (*RelationshipUpsert) SetFromID

func (u *RelationshipUpsert) SetFromID(v string) *RelationshipUpsert

SetFromID sets the "from_id" field.

func (*RelationshipUpsert) SetFromType

func (u *RelationshipUpsert) SetFromType(v string) *RelationshipUpsert

SetFromType sets the "from_type" field.

func (*RelationshipUpsert) SetProduct

func (u *RelationshipUpsert) SetProduct(v string) *RelationshipUpsert

SetProduct sets the "product" field.

func (*RelationshipUpsert) SetRelType

func (u *RelationshipUpsert) SetRelType(v string) *RelationshipUpsert

SetRelType sets the "rel_type" field.

func (*RelationshipUpsert) SetToID

SetToID sets the "to_id" field.

func (*RelationshipUpsert) SetToType

func (u *RelationshipUpsert) SetToType(v string) *RelationshipUpsert

SetToType sets the "to_type" field.

func (*RelationshipUpsert) UpdateCreatedAt

func (u *RelationshipUpsert) UpdateCreatedAt() *RelationshipUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*RelationshipUpsert) UpdateFromID

func (u *RelationshipUpsert) UpdateFromID() *RelationshipUpsert

UpdateFromID sets the "from_id" field to the value that was provided on create.

func (*RelationshipUpsert) UpdateFromType

func (u *RelationshipUpsert) UpdateFromType() *RelationshipUpsert

UpdateFromType sets the "from_type" field to the value that was provided on create.

func (*RelationshipUpsert) UpdateProduct

func (u *RelationshipUpsert) UpdateProduct() *RelationshipUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*RelationshipUpsert) UpdateRelType

func (u *RelationshipUpsert) UpdateRelType() *RelationshipUpsert

UpdateRelType sets the "rel_type" field to the value that was provided on create.

func (*RelationshipUpsert) UpdateToID

func (u *RelationshipUpsert) UpdateToID() *RelationshipUpsert

UpdateToID sets the "to_id" field to the value that was provided on create.

func (*RelationshipUpsert) UpdateToType

func (u *RelationshipUpsert) UpdateToType() *RelationshipUpsert

UpdateToType sets the "to_type" field to the value that was provided on create.

type RelationshipUpsertBulk

type RelationshipUpsertBulk struct {
	// contains filtered or unexported fields
}

RelationshipUpsertBulk is the builder for "upsert"-ing a bulk of Relationship nodes.

func (*RelationshipUpsertBulk) ClearProduct

ClearProduct clears the value of the "product" field.

func (*RelationshipUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RelationshipUpsertBulk) Exec

Exec executes the query.

func (*RelationshipUpsertBulk) ExecX

func (u *RelationshipUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Relationship.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RelationshipUpsertBulk) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*RelationshipUpsertBulk) SetFromID

SetFromID sets the "from_id" field.

func (*RelationshipUpsertBulk) SetFromType

SetFromType sets the "from_type" field.

func (*RelationshipUpsertBulk) SetProduct

SetProduct sets the "product" field.

func (*RelationshipUpsertBulk) SetRelType

SetRelType sets the "rel_type" field.

func (*RelationshipUpsertBulk) SetToID

SetToID sets the "to_id" field.

func (*RelationshipUpsertBulk) SetToType

SetToType sets the "to_type" field.

func (*RelationshipUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the RelationshipCreateBulk.OnConflict documentation for more info.

func (*RelationshipUpsertBulk) UpdateCreatedAt

func (u *RelationshipUpsertBulk) UpdateCreatedAt() *RelationshipUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*RelationshipUpsertBulk) UpdateFromID

UpdateFromID sets the "from_id" field to the value that was provided on create.

func (*RelationshipUpsertBulk) UpdateFromType

func (u *RelationshipUpsertBulk) UpdateFromType() *RelationshipUpsertBulk

UpdateFromType sets the "from_type" field to the value that was provided on create.

func (*RelationshipUpsertBulk) UpdateNewValues

func (u *RelationshipUpsertBulk) UpdateNewValues() *RelationshipUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Relationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*RelationshipUpsertBulk) UpdateProduct

func (u *RelationshipUpsertBulk) UpdateProduct() *RelationshipUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*RelationshipUpsertBulk) UpdateRelType

func (u *RelationshipUpsertBulk) UpdateRelType() *RelationshipUpsertBulk

UpdateRelType sets the "rel_type" field to the value that was provided on create.

func (*RelationshipUpsertBulk) UpdateToID

UpdateToID sets the "to_id" field to the value that was provided on create.

func (*RelationshipUpsertBulk) UpdateToType

UpdateToType sets the "to_type" field to the value that was provided on create.

type RelationshipUpsertOne

type RelationshipUpsertOne struct {
	// contains filtered or unexported fields
}

RelationshipUpsertOne is the builder for "upsert"-ing

one Relationship node.

func (*RelationshipUpsertOne) ClearProduct

func (u *RelationshipUpsertOne) ClearProduct() *RelationshipUpsertOne

ClearProduct clears the value of the "product" field.

func (*RelationshipUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RelationshipUpsertOne) Exec

Exec executes the query.

func (*RelationshipUpsertOne) ExecX

func (u *RelationshipUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RelationshipUpsertOne) ID

func (u *RelationshipUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RelationshipUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*RelationshipUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Relationship.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RelationshipUpsertOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*RelationshipUpsertOne) SetFromID

SetFromID sets the "from_id" field.

func (*RelationshipUpsertOne) SetFromType

SetFromType sets the "from_type" field.

func (*RelationshipUpsertOne) SetProduct

SetProduct sets the "product" field.

func (*RelationshipUpsertOne) SetRelType

SetRelType sets the "rel_type" field.

func (*RelationshipUpsertOne) SetToID

SetToID sets the "to_id" field.

func (*RelationshipUpsertOne) SetToType

SetToType sets the "to_type" field.

func (*RelationshipUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the RelationshipCreate.OnConflict documentation for more info.

func (*RelationshipUpsertOne) UpdateCreatedAt

func (u *RelationshipUpsertOne) UpdateCreatedAt() *RelationshipUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*RelationshipUpsertOne) UpdateFromID

func (u *RelationshipUpsertOne) UpdateFromID() *RelationshipUpsertOne

UpdateFromID sets the "from_id" field to the value that was provided on create.

func (*RelationshipUpsertOne) UpdateFromType

func (u *RelationshipUpsertOne) UpdateFromType() *RelationshipUpsertOne

UpdateFromType sets the "from_type" field to the value that was provided on create.

func (*RelationshipUpsertOne) UpdateNewValues

func (u *RelationshipUpsertOne) UpdateNewValues() *RelationshipUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Relationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*RelationshipUpsertOne) UpdateProduct

func (u *RelationshipUpsertOne) UpdateProduct() *RelationshipUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*RelationshipUpsertOne) UpdateRelType

func (u *RelationshipUpsertOne) UpdateRelType() *RelationshipUpsertOne

UpdateRelType sets the "rel_type" field to the value that was provided on create.

func (*RelationshipUpsertOne) UpdateToID

UpdateToID sets the "to_id" field to the value that was provided on create.

func (*RelationshipUpsertOne) UpdateToType

func (u *RelationshipUpsertOne) UpdateToType() *RelationshipUpsertOne

UpdateToType sets the "to_type" field to the value that was provided on create.

type Relationships

type Relationships []*Relationship

Relationships is a parsable slice of Relationship.

type Release

type Release struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// StartDate holds the value of the "start_date" field.
	StartDate string `json:"start_date,omitempty"`
	// ReleaseDate holds the value of the "release_date" field.
	ReleaseDate string `json:"release_date,omitempty"`
	// Released holds the value of the "released" field.
	Released bool `json:"released,omitempty"`
	// ParkingLot holds the value of the "parking_lot" field.
	ParkingLot bool `json:"parking_lot,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Release is the model entity for the Release schema.

func (*Release) String

func (_m *Release) String() string

String implements the fmt.Stringer.

func (*Release) Unwrap

func (_m *Release) Unwrap() *Release

Unwrap unwraps the Release 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 (*Release) Update

func (_m *Release) Update() *ReleaseUpdateOne

Update returns a builder for updating this Release. Note that you need to call Release.Unwrap() before calling this method if this Release was returned from a transaction, and the transaction was committed or rolled back.

func (*Release) Value

func (_m *Release) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Release. This includes values selected through modifiers, order, etc.

type ReleaseClient

type ReleaseClient struct {
	// contains filtered or unexported fields
}

ReleaseClient is a client for the Release schema.

func NewReleaseClient

func NewReleaseClient(c config) *ReleaseClient

NewReleaseClient returns a client for the Release from the given config.

func (*ReleaseClient) Create

func (c *ReleaseClient) Create() *ReleaseCreate

Create returns a builder for creating a Release entity.

func (*ReleaseClient) CreateBulk

func (c *ReleaseClient) CreateBulk(builders ...*ReleaseCreate) *ReleaseCreateBulk

CreateBulk returns a builder for creating a bulk of Release entities.

func (*ReleaseClient) Delete

func (c *ReleaseClient) Delete() *ReleaseDelete

Delete returns a delete builder for Release.

func (*ReleaseClient) DeleteOne

func (c *ReleaseClient) DeleteOne(_m *Release) *ReleaseDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ReleaseClient) DeleteOneID

func (c *ReleaseClient) DeleteOneID(id string) *ReleaseDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ReleaseClient) Get

func (c *ReleaseClient) Get(ctx context.Context, id string) (*Release, error)

Get returns a Release entity by its id.

func (*ReleaseClient) GetX

func (c *ReleaseClient) GetX(ctx context.Context, id string) *Release

GetX is like Get, but panics if an error occurs.

func (*ReleaseClient) Hooks

func (c *ReleaseClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ReleaseClient) Intercept

func (c *ReleaseClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `release.Intercept(f(g(h())))`.

func (*ReleaseClient) Interceptors

func (c *ReleaseClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ReleaseClient) MapCreateBulk

func (c *ReleaseClient) MapCreateBulk(slice any, setFunc func(*ReleaseCreate, int)) *ReleaseCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ReleaseClient) Query

func (c *ReleaseClient) Query() *ReleaseQuery

Query returns a query builder for Release.

func (*ReleaseClient) Update

func (c *ReleaseClient) Update() *ReleaseUpdate

Update returns an update builder for Release.

func (*ReleaseClient) UpdateOne

func (c *ReleaseClient) UpdateOne(_m *Release) *ReleaseUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ReleaseClient) UpdateOneID

func (c *ReleaseClient) UpdateOneID(id string) *ReleaseUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ReleaseClient) Use

func (c *ReleaseClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `release.Hooks(f(g(h())))`.

type ReleaseCreate

type ReleaseCreate struct {
	// contains filtered or unexported fields
}

ReleaseCreate is the builder for creating a Release entity.

func (*ReleaseCreate) Exec

func (_c *ReleaseCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReleaseCreate) ExecX

func (_c *ReleaseCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseCreate) Mutation

func (_c *ReleaseCreate) Mutation() *ReleaseMutation

Mutation returns the ReleaseMutation object of the builder.

func (*ReleaseCreate) OnConflict

func (_c *ReleaseCreate) OnConflict(opts ...sql.ConflictOption) *ReleaseUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Release.Create().
	SetProduct(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.ReleaseUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*ReleaseCreate) OnConflictColumns

func (_c *ReleaseCreate) OnConflictColumns(columns ...string) *ReleaseUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Release.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ReleaseCreate) Save

func (_c *ReleaseCreate) Save(ctx context.Context) (*Release, error)

Save creates the Release in the database.

func (*ReleaseCreate) SaveX

func (_c *ReleaseCreate) SaveX(ctx context.Context) *Release

SaveX calls Save and panics if Save returns an error.

func (*ReleaseCreate) SetCreatedAt

func (_c *ReleaseCreate) SetCreatedAt(v time.Time) *ReleaseCreate

SetCreatedAt sets the "created_at" field.

func (*ReleaseCreate) SetData

func (_c *ReleaseCreate) SetData(v map[string]interface{}) *ReleaseCreate

SetData sets the "data" field.

func (*ReleaseCreate) SetID

func (_c *ReleaseCreate) SetID(v string) *ReleaseCreate

SetID sets the "id" field.

func (*ReleaseCreate) SetName

func (_c *ReleaseCreate) SetName(v string) *ReleaseCreate

SetName sets the "name" field.

func (*ReleaseCreate) SetNillableCreatedAt

func (_c *ReleaseCreate) SetNillableCreatedAt(v *time.Time) *ReleaseCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ReleaseCreate) SetNillableName

func (_c *ReleaseCreate) SetNillableName(v *string) *ReleaseCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*ReleaseCreate) SetNillableParkingLot

func (_c *ReleaseCreate) SetNillableParkingLot(v *bool) *ReleaseCreate

SetNillableParkingLot sets the "parking_lot" field if the given value is not nil.

func (*ReleaseCreate) SetNillableReferenceNum

func (_c *ReleaseCreate) SetNillableReferenceNum(v *string) *ReleaseCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*ReleaseCreate) SetNillableReleaseDate

func (_c *ReleaseCreate) SetNillableReleaseDate(v *string) *ReleaseCreate

SetNillableReleaseDate sets the "release_date" field if the given value is not nil.

func (*ReleaseCreate) SetNillableReleased

func (_c *ReleaseCreate) SetNillableReleased(v *bool) *ReleaseCreate

SetNillableReleased sets the "released" field if the given value is not nil.

func (*ReleaseCreate) SetNillableStartDate

func (_c *ReleaseCreate) SetNillableStartDate(v *string) *ReleaseCreate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*ReleaseCreate) SetNillableURL

func (_c *ReleaseCreate) SetNillableURL(v *string) *ReleaseCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*ReleaseCreate) SetParkingLot

func (_c *ReleaseCreate) SetParkingLot(v bool) *ReleaseCreate

SetParkingLot sets the "parking_lot" field.

func (*ReleaseCreate) SetProduct

func (_c *ReleaseCreate) SetProduct(v string) *ReleaseCreate

SetProduct sets the "product" field.

func (*ReleaseCreate) SetReferenceNum

func (_c *ReleaseCreate) SetReferenceNum(v string) *ReleaseCreate

SetReferenceNum sets the "reference_num" field.

func (*ReleaseCreate) SetReleaseDate

func (_c *ReleaseCreate) SetReleaseDate(v string) *ReleaseCreate

SetReleaseDate sets the "release_date" field.

func (*ReleaseCreate) SetReleased

func (_c *ReleaseCreate) SetReleased(v bool) *ReleaseCreate

SetReleased sets the "released" field.

func (*ReleaseCreate) SetStartDate

func (_c *ReleaseCreate) SetStartDate(v string) *ReleaseCreate

SetStartDate sets the "start_date" field.

func (*ReleaseCreate) SetURL

func (_c *ReleaseCreate) SetURL(v string) *ReleaseCreate

SetURL sets the "url" field.

type ReleaseCreateBulk

type ReleaseCreateBulk struct {
	// contains filtered or unexported fields
}

ReleaseCreateBulk is the builder for creating many Release entities in bulk.

func (*ReleaseCreateBulk) Exec

func (_c *ReleaseCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ReleaseCreateBulk) ExecX

func (_c *ReleaseCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseCreateBulk) OnConflict

func (_c *ReleaseCreateBulk) OnConflict(opts ...sql.ConflictOption) *ReleaseUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Release.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.ReleaseUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*ReleaseCreateBulk) OnConflictColumns

func (_c *ReleaseCreateBulk) OnConflictColumns(columns ...string) *ReleaseUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Release.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ReleaseCreateBulk) Save

func (_c *ReleaseCreateBulk) Save(ctx context.Context) ([]*Release, error)

Save creates the Release entities in the database.

func (*ReleaseCreateBulk) SaveX

func (_c *ReleaseCreateBulk) SaveX(ctx context.Context) []*Release

SaveX is like Save, but panics if an error occurs.

type ReleaseDelete

type ReleaseDelete struct {
	// contains filtered or unexported fields
}

ReleaseDelete is the builder for deleting a Release entity.

func (*ReleaseDelete) Exec

func (_d *ReleaseDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ReleaseDelete) ExecX

func (_d *ReleaseDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseDelete) Where

func (_d *ReleaseDelete) Where(ps ...predicate.Release) *ReleaseDelete

Where appends a list predicates to the ReleaseDelete builder.

type ReleaseDeleteOne

type ReleaseDeleteOne struct {
	// contains filtered or unexported fields
}

ReleaseDeleteOne is the builder for deleting a single Release entity.

func (*ReleaseDeleteOne) Exec

func (_d *ReleaseDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ReleaseDeleteOne) ExecX

func (_d *ReleaseDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseDeleteOne) Where

Where appends a list predicates to the ReleaseDelete builder.

type ReleaseGroupBy

type ReleaseGroupBy struct {
	// contains filtered or unexported fields
}

ReleaseGroupBy is the group-by builder for Release entities.

func (*ReleaseGroupBy) Aggregate

func (_g *ReleaseGroupBy) Aggregate(fns ...AggregateFunc) *ReleaseGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ReleaseGroupBy) Bool

func (s *ReleaseGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) BoolX

func (s *ReleaseGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReleaseGroupBy) Bools

func (s *ReleaseGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) BoolsX

func (s *ReleaseGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReleaseGroupBy) Float64

func (s *ReleaseGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) Float64X

func (s *ReleaseGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReleaseGroupBy) Float64s

func (s *ReleaseGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) Float64sX

func (s *ReleaseGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReleaseGroupBy) Int

func (s *ReleaseGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) IntX

func (s *ReleaseGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReleaseGroupBy) Ints

func (s *ReleaseGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) IntsX

func (s *ReleaseGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ReleaseGroupBy) Scan

func (_g *ReleaseGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ReleaseGroupBy) ScanX

func (s *ReleaseGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ReleaseGroupBy) String

func (s *ReleaseGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) StringX

func (s *ReleaseGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReleaseGroupBy) Strings

func (s *ReleaseGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ReleaseGroupBy) StringsX

func (s *ReleaseGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ReleaseMutation

type ReleaseMutation struct {
	// contains filtered or unexported fields
}

ReleaseMutation represents an operation that mutates the Release nodes in the graph.

func (*ReleaseMutation) AddField

func (m *ReleaseMutation) 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 (*ReleaseMutation) AddedEdges

func (m *ReleaseMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ReleaseMutation) AddedField

func (m *ReleaseMutation) 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 (*ReleaseMutation) AddedFields

func (m *ReleaseMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ReleaseMutation) AddedIDs

func (m *ReleaseMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ReleaseMutation) ClearCreatedAt

func (m *ReleaseMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*ReleaseMutation) ClearData

func (m *ReleaseMutation) ClearData()

ClearData clears the value of the "data" field.

func (*ReleaseMutation) ClearEdge

func (m *ReleaseMutation) 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 (*ReleaseMutation) ClearField

func (m *ReleaseMutation) 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 (*ReleaseMutation) ClearName

func (m *ReleaseMutation) ClearName()

ClearName clears the value of the "name" field.

func (*ReleaseMutation) ClearParkingLot

func (m *ReleaseMutation) ClearParkingLot()

ClearParkingLot clears the value of the "parking_lot" field.

func (*ReleaseMutation) ClearReferenceNum

func (m *ReleaseMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*ReleaseMutation) ClearReleaseDate

func (m *ReleaseMutation) ClearReleaseDate()

ClearReleaseDate clears the value of the "release_date" field.

func (*ReleaseMutation) ClearReleased

func (m *ReleaseMutation) ClearReleased()

ClearReleased clears the value of the "released" field.

func (*ReleaseMutation) ClearStartDate

func (m *ReleaseMutation) ClearStartDate()

ClearStartDate clears the value of the "start_date" field.

func (*ReleaseMutation) ClearURL

func (m *ReleaseMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*ReleaseMutation) ClearedEdges

func (m *ReleaseMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ReleaseMutation) ClearedFields

func (m *ReleaseMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ReleaseMutation) Client

func (m ReleaseMutation) 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 (*ReleaseMutation) CreatedAt

func (m *ReleaseMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ReleaseMutation) CreatedAtCleared

func (m *ReleaseMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*ReleaseMutation) Data

func (m *ReleaseMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*ReleaseMutation) DataCleared

func (m *ReleaseMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*ReleaseMutation) EdgeCleared

func (m *ReleaseMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ReleaseMutation) Field

func (m *ReleaseMutation) 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 (*ReleaseMutation) FieldCleared

func (m *ReleaseMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ReleaseMutation) Fields

func (m *ReleaseMutation) 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 (*ReleaseMutation) ID

func (m *ReleaseMutation) ID() (id string, 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 (*ReleaseMutation) IDs

func (m *ReleaseMutation) IDs(ctx context.Context) ([]string, 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 (*ReleaseMutation) Name

func (m *ReleaseMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ReleaseMutation) NameCleared

func (m *ReleaseMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*ReleaseMutation) OldCreatedAt

func (m *ReleaseMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldData

func (m *ReleaseMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldField

func (m *ReleaseMutation) 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 (*ReleaseMutation) OldName

func (m *ReleaseMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldParkingLot

func (m *ReleaseMutation) OldParkingLot(ctx context.Context) (v bool, err error)

OldParkingLot returns the old "parking_lot" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldProduct

func (m *ReleaseMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldReferenceNum

func (m *ReleaseMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldReleaseDate

func (m *ReleaseMutation) OldReleaseDate(ctx context.Context) (v string, err error)

OldReleaseDate returns the old "release_date" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldReleased

func (m *ReleaseMutation) OldReleased(ctx context.Context) (v bool, err error)

OldReleased returns the old "released" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldStartDate

func (m *ReleaseMutation) OldStartDate(ctx context.Context) (v string, err error)

OldStartDate returns the old "start_date" field's value of the Release entity. If the Release 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 (*ReleaseMutation) OldURL

func (m *ReleaseMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Release entity. If the Release 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 (*ReleaseMutation) Op

func (m *ReleaseMutation) Op() Op

Op returns the operation name.

func (*ReleaseMutation) ParkingLot

func (m *ReleaseMutation) ParkingLot() (r bool, exists bool)

ParkingLot returns the value of the "parking_lot" field in the mutation.

func (*ReleaseMutation) ParkingLotCleared

func (m *ReleaseMutation) ParkingLotCleared() bool

ParkingLotCleared returns if the "parking_lot" field was cleared in this mutation.

func (*ReleaseMutation) Product

func (m *ReleaseMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*ReleaseMutation) ReferenceNum

func (m *ReleaseMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*ReleaseMutation) ReferenceNumCleared

func (m *ReleaseMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*ReleaseMutation) ReleaseDate

func (m *ReleaseMutation) ReleaseDate() (r string, exists bool)

ReleaseDate returns the value of the "release_date" field in the mutation.

func (*ReleaseMutation) ReleaseDateCleared

func (m *ReleaseMutation) ReleaseDateCleared() bool

ReleaseDateCleared returns if the "release_date" field was cleared in this mutation.

func (*ReleaseMutation) Released

func (m *ReleaseMutation) Released() (r bool, exists bool)

Released returns the value of the "released" field in the mutation.

func (*ReleaseMutation) ReleasedCleared

func (m *ReleaseMutation) ReleasedCleared() bool

ReleasedCleared returns if the "released" field was cleared in this mutation.

func (*ReleaseMutation) RemovedEdges

func (m *ReleaseMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ReleaseMutation) RemovedIDs

func (m *ReleaseMutation) 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 (*ReleaseMutation) ResetCreatedAt

func (m *ReleaseMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ReleaseMutation) ResetData

func (m *ReleaseMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*ReleaseMutation) ResetEdge

func (m *ReleaseMutation) 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 (*ReleaseMutation) ResetField

func (m *ReleaseMutation) 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 (*ReleaseMutation) ResetName

func (m *ReleaseMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ReleaseMutation) ResetParkingLot

func (m *ReleaseMutation) ResetParkingLot()

ResetParkingLot resets all changes to the "parking_lot" field.

func (*ReleaseMutation) ResetProduct

func (m *ReleaseMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*ReleaseMutation) ResetReferenceNum

func (m *ReleaseMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*ReleaseMutation) ResetReleaseDate

func (m *ReleaseMutation) ResetReleaseDate()

ResetReleaseDate resets all changes to the "release_date" field.

func (*ReleaseMutation) ResetReleased

func (m *ReleaseMutation) ResetReleased()

ResetReleased resets all changes to the "released" field.

func (*ReleaseMutation) ResetStartDate

func (m *ReleaseMutation) ResetStartDate()

ResetStartDate resets all changes to the "start_date" field.

func (*ReleaseMutation) ResetURL

func (m *ReleaseMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*ReleaseMutation) SetCreatedAt

func (m *ReleaseMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ReleaseMutation) SetData

func (m *ReleaseMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*ReleaseMutation) SetField

func (m *ReleaseMutation) 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 (*ReleaseMutation) SetID

func (m *ReleaseMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Release entities.

func (*ReleaseMutation) SetName

func (m *ReleaseMutation) SetName(s string)

SetName sets the "name" field.

func (*ReleaseMutation) SetOp

func (m *ReleaseMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ReleaseMutation) SetParkingLot

func (m *ReleaseMutation) SetParkingLot(b bool)

SetParkingLot sets the "parking_lot" field.

func (*ReleaseMutation) SetProduct

func (m *ReleaseMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*ReleaseMutation) SetReferenceNum

func (m *ReleaseMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*ReleaseMutation) SetReleaseDate

func (m *ReleaseMutation) SetReleaseDate(s string)

SetReleaseDate sets the "release_date" field.

func (*ReleaseMutation) SetReleased

func (m *ReleaseMutation) SetReleased(b bool)

SetReleased sets the "released" field.

func (*ReleaseMutation) SetStartDate

func (m *ReleaseMutation) SetStartDate(s string)

SetStartDate sets the "start_date" field.

func (*ReleaseMutation) SetURL

func (m *ReleaseMutation) SetURL(s string)

SetURL sets the "url" field.

func (*ReleaseMutation) StartDate

func (m *ReleaseMutation) StartDate() (r string, exists bool)

StartDate returns the value of the "start_date" field in the mutation.

func (*ReleaseMutation) StartDateCleared

func (m *ReleaseMutation) StartDateCleared() bool

StartDateCleared returns if the "start_date" field was cleared in this mutation.

func (ReleaseMutation) Tx

func (m ReleaseMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ReleaseMutation) Type

func (m *ReleaseMutation) Type() string

Type returns the node type of this mutation (Release).

func (*ReleaseMutation) URL

func (m *ReleaseMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*ReleaseMutation) URLCleared

func (m *ReleaseMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*ReleaseMutation) Where

func (m *ReleaseMutation) Where(ps ...predicate.Release)

Where appends a list predicates to the ReleaseMutation builder.

func (*ReleaseMutation) WhereP

func (m *ReleaseMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ReleaseMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ReleaseQuery

type ReleaseQuery struct {
	// contains filtered or unexported fields
}

ReleaseQuery is the builder for querying Release entities.

func (*ReleaseQuery) Aggregate

func (_q *ReleaseQuery) Aggregate(fns ...AggregateFunc) *ReleaseSelect

Aggregate returns a ReleaseSelect configured with the given aggregations.

func (*ReleaseQuery) All

func (_q *ReleaseQuery) All(ctx context.Context) ([]*Release, error)

All executes the query and returns a list of Releases.

func (*ReleaseQuery) AllX

func (_q *ReleaseQuery) AllX(ctx context.Context) []*Release

AllX is like All, but panics if an error occurs.

func (*ReleaseQuery) Clone

func (_q *ReleaseQuery) Clone() *ReleaseQuery

Clone returns a duplicate of the ReleaseQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ReleaseQuery) Count

func (_q *ReleaseQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ReleaseQuery) CountX

func (_q *ReleaseQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ReleaseQuery) Exist

func (_q *ReleaseQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ReleaseQuery) ExistX

func (_q *ReleaseQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ReleaseQuery) First

func (_q *ReleaseQuery) First(ctx context.Context) (*Release, error)

First returns the first Release entity from the query. Returns a *NotFoundError when no Release was found.

func (*ReleaseQuery) FirstID

func (_q *ReleaseQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Release ID from the query. Returns a *NotFoundError when no Release ID was found.

func (*ReleaseQuery) FirstIDX

func (_q *ReleaseQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*ReleaseQuery) FirstX

func (_q *ReleaseQuery) FirstX(ctx context.Context) *Release

FirstX is like First, but panics if an error occurs.

func (*ReleaseQuery) GroupBy

func (_q *ReleaseQuery) GroupBy(field string, fields ...string) *ReleaseGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Release.Query().
	GroupBy(release.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ReleaseQuery) IDs

func (_q *ReleaseQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Release IDs.

func (*ReleaseQuery) IDsX

func (_q *ReleaseQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*ReleaseQuery) Limit

func (_q *ReleaseQuery) Limit(limit int) *ReleaseQuery

Limit the number of records to be returned by this query.

func (*ReleaseQuery) Offset

func (_q *ReleaseQuery) Offset(offset int) *ReleaseQuery

Offset to start from.

func (*ReleaseQuery) Only

func (_q *ReleaseQuery) Only(ctx context.Context) (*Release, error)

Only returns a single Release entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Release entity is found. Returns a *NotFoundError when no Release entities are found.

func (*ReleaseQuery) OnlyID

func (_q *ReleaseQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Release ID in the query. Returns a *NotSingularError when more than one Release ID is found. Returns a *NotFoundError when no entities are found.

func (*ReleaseQuery) OnlyIDX

func (_q *ReleaseQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ReleaseQuery) OnlyX

func (_q *ReleaseQuery) OnlyX(ctx context.Context) *Release

OnlyX is like Only, but panics if an error occurs.

func (*ReleaseQuery) Order

func (_q *ReleaseQuery) Order(o ...release.OrderOption) *ReleaseQuery

Order specifies how the records should be ordered.

func (*ReleaseQuery) Select

func (_q *ReleaseQuery) Select(fields ...string) *ReleaseSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Release.Query().
	Select(release.FieldProduct).
	Scan(ctx, &v)

func (*ReleaseQuery) Unique

func (_q *ReleaseQuery) Unique(unique bool) *ReleaseQuery

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 (*ReleaseQuery) Where

func (_q *ReleaseQuery) Where(ps ...predicate.Release) *ReleaseQuery

Where adds a new predicate for the ReleaseQuery builder.

type ReleaseSelect

type ReleaseSelect struct {
	*ReleaseQuery
	// contains filtered or unexported fields
}

ReleaseSelect is the builder for selecting fields of Release entities.

func (*ReleaseSelect) Aggregate

func (_s *ReleaseSelect) Aggregate(fns ...AggregateFunc) *ReleaseSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ReleaseSelect) Bool

func (s *ReleaseSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) BoolX

func (s *ReleaseSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReleaseSelect) Bools

func (s *ReleaseSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) BoolsX

func (s *ReleaseSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReleaseSelect) Float64

func (s *ReleaseSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) Float64X

func (s *ReleaseSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReleaseSelect) Float64s

func (s *ReleaseSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) Float64sX

func (s *ReleaseSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReleaseSelect) Int

func (s *ReleaseSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) IntX

func (s *ReleaseSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReleaseSelect) Ints

func (s *ReleaseSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) IntsX

func (s *ReleaseSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ReleaseSelect) Scan

func (_s *ReleaseSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ReleaseSelect) ScanX

func (s *ReleaseSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ReleaseSelect) String

func (s *ReleaseSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) StringX

func (s *ReleaseSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReleaseSelect) Strings

func (s *ReleaseSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ReleaseSelect) StringsX

func (s *ReleaseSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ReleaseUpdate

type ReleaseUpdate struct {
	// contains filtered or unexported fields
}

ReleaseUpdate is the builder for updating Release entities.

func (*ReleaseUpdate) ClearCreatedAt

func (_u *ReleaseUpdate) ClearCreatedAt() *ReleaseUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*ReleaseUpdate) ClearData

func (_u *ReleaseUpdate) ClearData() *ReleaseUpdate

ClearData clears the value of the "data" field.

func (*ReleaseUpdate) ClearName

func (_u *ReleaseUpdate) ClearName() *ReleaseUpdate

ClearName clears the value of the "name" field.

func (*ReleaseUpdate) ClearParkingLot

func (_u *ReleaseUpdate) ClearParkingLot() *ReleaseUpdate

ClearParkingLot clears the value of the "parking_lot" field.

func (*ReleaseUpdate) ClearReferenceNum

func (_u *ReleaseUpdate) ClearReferenceNum() *ReleaseUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*ReleaseUpdate) ClearReleaseDate

func (_u *ReleaseUpdate) ClearReleaseDate() *ReleaseUpdate

ClearReleaseDate clears the value of the "release_date" field.

func (*ReleaseUpdate) ClearReleased

func (_u *ReleaseUpdate) ClearReleased() *ReleaseUpdate

ClearReleased clears the value of the "released" field.

func (*ReleaseUpdate) ClearStartDate

func (_u *ReleaseUpdate) ClearStartDate() *ReleaseUpdate

ClearStartDate clears the value of the "start_date" field.

func (*ReleaseUpdate) ClearURL

func (_u *ReleaseUpdate) ClearURL() *ReleaseUpdate

ClearURL clears the value of the "url" field.

func (*ReleaseUpdate) Exec

func (_u *ReleaseUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReleaseUpdate) ExecX

func (_u *ReleaseUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseUpdate) Mutation

func (_u *ReleaseUpdate) Mutation() *ReleaseMutation

Mutation returns the ReleaseMutation object of the builder.

func (*ReleaseUpdate) Save

func (_u *ReleaseUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ReleaseUpdate) SaveX

func (_u *ReleaseUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ReleaseUpdate) SetCreatedAt

func (_u *ReleaseUpdate) SetCreatedAt(v time.Time) *ReleaseUpdate

SetCreatedAt sets the "created_at" field.

func (*ReleaseUpdate) SetData

func (_u *ReleaseUpdate) SetData(v map[string]interface{}) *ReleaseUpdate

SetData sets the "data" field.

func (*ReleaseUpdate) SetName

func (_u *ReleaseUpdate) SetName(v string) *ReleaseUpdate

SetName sets the "name" field.

func (*ReleaseUpdate) SetNillableCreatedAt

func (_u *ReleaseUpdate) SetNillableCreatedAt(v *time.Time) *ReleaseUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableName

func (_u *ReleaseUpdate) SetNillableName(v *string) *ReleaseUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableParkingLot

func (_u *ReleaseUpdate) SetNillableParkingLot(v *bool) *ReleaseUpdate

SetNillableParkingLot sets the "parking_lot" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableProduct

func (_u *ReleaseUpdate) SetNillableProduct(v *string) *ReleaseUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableReferenceNum

func (_u *ReleaseUpdate) SetNillableReferenceNum(v *string) *ReleaseUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableReleaseDate

func (_u *ReleaseUpdate) SetNillableReleaseDate(v *string) *ReleaseUpdate

SetNillableReleaseDate sets the "release_date" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableReleased

func (_u *ReleaseUpdate) SetNillableReleased(v *bool) *ReleaseUpdate

SetNillableReleased sets the "released" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableStartDate

func (_u *ReleaseUpdate) SetNillableStartDate(v *string) *ReleaseUpdate

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*ReleaseUpdate) SetNillableURL

func (_u *ReleaseUpdate) SetNillableURL(v *string) *ReleaseUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*ReleaseUpdate) SetParkingLot

func (_u *ReleaseUpdate) SetParkingLot(v bool) *ReleaseUpdate

SetParkingLot sets the "parking_lot" field.

func (*ReleaseUpdate) SetProduct

func (_u *ReleaseUpdate) SetProduct(v string) *ReleaseUpdate

SetProduct sets the "product" field.

func (*ReleaseUpdate) SetReferenceNum

func (_u *ReleaseUpdate) SetReferenceNum(v string) *ReleaseUpdate

SetReferenceNum sets the "reference_num" field.

func (*ReleaseUpdate) SetReleaseDate

func (_u *ReleaseUpdate) SetReleaseDate(v string) *ReleaseUpdate

SetReleaseDate sets the "release_date" field.

func (*ReleaseUpdate) SetReleased

func (_u *ReleaseUpdate) SetReleased(v bool) *ReleaseUpdate

SetReleased sets the "released" field.

func (*ReleaseUpdate) SetStartDate

func (_u *ReleaseUpdate) SetStartDate(v string) *ReleaseUpdate

SetStartDate sets the "start_date" field.

func (*ReleaseUpdate) SetURL

func (_u *ReleaseUpdate) SetURL(v string) *ReleaseUpdate

SetURL sets the "url" field.

func (*ReleaseUpdate) Where

func (_u *ReleaseUpdate) Where(ps ...predicate.Release) *ReleaseUpdate

Where appends a list predicates to the ReleaseUpdate builder.

type ReleaseUpdateOne

type ReleaseUpdateOne struct {
	// contains filtered or unexported fields
}

ReleaseUpdateOne is the builder for updating a single Release entity.

func (*ReleaseUpdateOne) ClearCreatedAt

func (_u *ReleaseUpdateOne) ClearCreatedAt() *ReleaseUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*ReleaseUpdateOne) ClearData

func (_u *ReleaseUpdateOne) ClearData() *ReleaseUpdateOne

ClearData clears the value of the "data" field.

func (*ReleaseUpdateOne) ClearName

func (_u *ReleaseUpdateOne) ClearName() *ReleaseUpdateOne

ClearName clears the value of the "name" field.

func (*ReleaseUpdateOne) ClearParkingLot

func (_u *ReleaseUpdateOne) ClearParkingLot() *ReleaseUpdateOne

ClearParkingLot clears the value of the "parking_lot" field.

func (*ReleaseUpdateOne) ClearReferenceNum

func (_u *ReleaseUpdateOne) ClearReferenceNum() *ReleaseUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*ReleaseUpdateOne) ClearReleaseDate

func (_u *ReleaseUpdateOne) ClearReleaseDate() *ReleaseUpdateOne

ClearReleaseDate clears the value of the "release_date" field.

func (*ReleaseUpdateOne) ClearReleased

func (_u *ReleaseUpdateOne) ClearReleased() *ReleaseUpdateOne

ClearReleased clears the value of the "released" field.

func (*ReleaseUpdateOne) ClearStartDate

func (_u *ReleaseUpdateOne) ClearStartDate() *ReleaseUpdateOne

ClearStartDate clears the value of the "start_date" field.

func (*ReleaseUpdateOne) ClearURL

func (_u *ReleaseUpdateOne) ClearURL() *ReleaseUpdateOne

ClearURL clears the value of the "url" field.

func (*ReleaseUpdateOne) Exec

func (_u *ReleaseUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ReleaseUpdateOne) ExecX

func (_u *ReleaseUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseUpdateOne) Mutation

func (_u *ReleaseUpdateOne) Mutation() *ReleaseMutation

Mutation returns the ReleaseMutation object of the builder.

func (*ReleaseUpdateOne) Save

func (_u *ReleaseUpdateOne) Save(ctx context.Context) (*Release, error)

Save executes the query and returns the updated Release entity.

func (*ReleaseUpdateOne) SaveX

func (_u *ReleaseUpdateOne) SaveX(ctx context.Context) *Release

SaveX is like Save, but panics if an error occurs.

func (*ReleaseUpdateOne) Select

func (_u *ReleaseUpdateOne) Select(field string, fields ...string) *ReleaseUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ReleaseUpdateOne) SetCreatedAt

func (_u *ReleaseUpdateOne) SetCreatedAt(v time.Time) *ReleaseUpdateOne

SetCreatedAt sets the "created_at" field.

func (*ReleaseUpdateOne) SetData

func (_u *ReleaseUpdateOne) SetData(v map[string]interface{}) *ReleaseUpdateOne

SetData sets the "data" field.

func (*ReleaseUpdateOne) SetName

func (_u *ReleaseUpdateOne) SetName(v string) *ReleaseUpdateOne

SetName sets the "name" field.

func (*ReleaseUpdateOne) SetNillableCreatedAt

func (_u *ReleaseUpdateOne) SetNillableCreatedAt(v *time.Time) *ReleaseUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableName

func (_u *ReleaseUpdateOne) SetNillableName(v *string) *ReleaseUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableParkingLot

func (_u *ReleaseUpdateOne) SetNillableParkingLot(v *bool) *ReleaseUpdateOne

SetNillableParkingLot sets the "parking_lot" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableProduct

func (_u *ReleaseUpdateOne) SetNillableProduct(v *string) *ReleaseUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableReferenceNum

func (_u *ReleaseUpdateOne) SetNillableReferenceNum(v *string) *ReleaseUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableReleaseDate

func (_u *ReleaseUpdateOne) SetNillableReleaseDate(v *string) *ReleaseUpdateOne

SetNillableReleaseDate sets the "release_date" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableReleased

func (_u *ReleaseUpdateOne) SetNillableReleased(v *bool) *ReleaseUpdateOne

SetNillableReleased sets the "released" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableStartDate

func (_u *ReleaseUpdateOne) SetNillableStartDate(v *string) *ReleaseUpdateOne

SetNillableStartDate sets the "start_date" field if the given value is not nil.

func (*ReleaseUpdateOne) SetNillableURL

func (_u *ReleaseUpdateOne) SetNillableURL(v *string) *ReleaseUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*ReleaseUpdateOne) SetParkingLot

func (_u *ReleaseUpdateOne) SetParkingLot(v bool) *ReleaseUpdateOne

SetParkingLot sets the "parking_lot" field.

func (*ReleaseUpdateOne) SetProduct

func (_u *ReleaseUpdateOne) SetProduct(v string) *ReleaseUpdateOne

SetProduct sets the "product" field.

func (*ReleaseUpdateOne) SetReferenceNum

func (_u *ReleaseUpdateOne) SetReferenceNum(v string) *ReleaseUpdateOne

SetReferenceNum sets the "reference_num" field.

func (*ReleaseUpdateOne) SetReleaseDate

func (_u *ReleaseUpdateOne) SetReleaseDate(v string) *ReleaseUpdateOne

SetReleaseDate sets the "release_date" field.

func (*ReleaseUpdateOne) SetReleased

func (_u *ReleaseUpdateOne) SetReleased(v bool) *ReleaseUpdateOne

SetReleased sets the "released" field.

func (*ReleaseUpdateOne) SetStartDate

func (_u *ReleaseUpdateOne) SetStartDate(v string) *ReleaseUpdateOne

SetStartDate sets the "start_date" field.

func (*ReleaseUpdateOne) SetURL

func (_u *ReleaseUpdateOne) SetURL(v string) *ReleaseUpdateOne

SetURL sets the "url" field.

func (*ReleaseUpdateOne) Where

Where appends a list predicates to the ReleaseUpdate builder.

type ReleaseUpsert

type ReleaseUpsert struct {
	*sql.UpdateSet
}

ReleaseUpsert is the "OnConflict" setter.

func (*ReleaseUpsert) ClearCreatedAt

func (u *ReleaseUpsert) ClearCreatedAt() *ReleaseUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*ReleaseUpsert) ClearData

func (u *ReleaseUpsert) ClearData() *ReleaseUpsert

ClearData clears the value of the "data" field.

func (*ReleaseUpsert) ClearName

func (u *ReleaseUpsert) ClearName() *ReleaseUpsert

ClearName clears the value of the "name" field.

func (*ReleaseUpsert) ClearParkingLot

func (u *ReleaseUpsert) ClearParkingLot() *ReleaseUpsert

ClearParkingLot clears the value of the "parking_lot" field.

func (*ReleaseUpsert) ClearReferenceNum

func (u *ReleaseUpsert) ClearReferenceNum() *ReleaseUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*ReleaseUpsert) ClearReleaseDate

func (u *ReleaseUpsert) ClearReleaseDate() *ReleaseUpsert

ClearReleaseDate clears the value of the "release_date" field.

func (*ReleaseUpsert) ClearReleased

func (u *ReleaseUpsert) ClearReleased() *ReleaseUpsert

ClearReleased clears the value of the "released" field.

func (*ReleaseUpsert) ClearStartDate

func (u *ReleaseUpsert) ClearStartDate() *ReleaseUpsert

ClearStartDate clears the value of the "start_date" field.

func (*ReleaseUpsert) ClearURL

func (u *ReleaseUpsert) ClearURL() *ReleaseUpsert

ClearURL clears the value of the "url" field.

func (*ReleaseUpsert) SetCreatedAt

func (u *ReleaseUpsert) SetCreatedAt(v time.Time) *ReleaseUpsert

SetCreatedAt sets the "created_at" field.

func (*ReleaseUpsert) SetData

func (u *ReleaseUpsert) SetData(v map[string]interface{}) *ReleaseUpsert

SetData sets the "data" field.

func (*ReleaseUpsert) SetName

func (u *ReleaseUpsert) SetName(v string) *ReleaseUpsert

SetName sets the "name" field.

func (*ReleaseUpsert) SetParkingLot

func (u *ReleaseUpsert) SetParkingLot(v bool) *ReleaseUpsert

SetParkingLot sets the "parking_lot" field.

func (*ReleaseUpsert) SetProduct

func (u *ReleaseUpsert) SetProduct(v string) *ReleaseUpsert

SetProduct sets the "product" field.

func (*ReleaseUpsert) SetReferenceNum

func (u *ReleaseUpsert) SetReferenceNum(v string) *ReleaseUpsert

SetReferenceNum sets the "reference_num" field.

func (*ReleaseUpsert) SetReleaseDate

func (u *ReleaseUpsert) SetReleaseDate(v string) *ReleaseUpsert

SetReleaseDate sets the "release_date" field.

func (*ReleaseUpsert) SetReleased

func (u *ReleaseUpsert) SetReleased(v bool) *ReleaseUpsert

SetReleased sets the "released" field.

func (*ReleaseUpsert) SetStartDate

func (u *ReleaseUpsert) SetStartDate(v string) *ReleaseUpsert

SetStartDate sets the "start_date" field.

func (*ReleaseUpsert) SetURL

func (u *ReleaseUpsert) SetURL(v string) *ReleaseUpsert

SetURL sets the "url" field.

func (*ReleaseUpsert) UpdateCreatedAt

func (u *ReleaseUpsert) UpdateCreatedAt() *ReleaseUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateData

func (u *ReleaseUpsert) UpdateData() *ReleaseUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateName

func (u *ReleaseUpsert) UpdateName() *ReleaseUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateParkingLot

func (u *ReleaseUpsert) UpdateParkingLot() *ReleaseUpsert

UpdateParkingLot sets the "parking_lot" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateProduct

func (u *ReleaseUpsert) UpdateProduct() *ReleaseUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateReferenceNum

func (u *ReleaseUpsert) UpdateReferenceNum() *ReleaseUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateReleaseDate

func (u *ReleaseUpsert) UpdateReleaseDate() *ReleaseUpsert

UpdateReleaseDate sets the "release_date" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateReleased

func (u *ReleaseUpsert) UpdateReleased() *ReleaseUpsert

UpdateReleased sets the "released" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateStartDate

func (u *ReleaseUpsert) UpdateStartDate() *ReleaseUpsert

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*ReleaseUpsert) UpdateURL

func (u *ReleaseUpsert) UpdateURL() *ReleaseUpsert

UpdateURL sets the "url" field to the value that was provided on create.

type ReleaseUpsertBulk

type ReleaseUpsertBulk struct {
	// contains filtered or unexported fields
}

ReleaseUpsertBulk is the builder for "upsert"-ing a bulk of Release nodes.

func (*ReleaseUpsertBulk) ClearCreatedAt

func (u *ReleaseUpsertBulk) ClearCreatedAt() *ReleaseUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*ReleaseUpsertBulk) ClearData

func (u *ReleaseUpsertBulk) ClearData() *ReleaseUpsertBulk

ClearData clears the value of the "data" field.

func (*ReleaseUpsertBulk) ClearName

func (u *ReleaseUpsertBulk) ClearName() *ReleaseUpsertBulk

ClearName clears the value of the "name" field.

func (*ReleaseUpsertBulk) ClearParkingLot

func (u *ReleaseUpsertBulk) ClearParkingLot() *ReleaseUpsertBulk

ClearParkingLot clears the value of the "parking_lot" field.

func (*ReleaseUpsertBulk) ClearReferenceNum

func (u *ReleaseUpsertBulk) ClearReferenceNum() *ReleaseUpsertBulk

ClearReferenceNum clears the value of the "reference_num" field.

func (*ReleaseUpsertBulk) ClearReleaseDate

func (u *ReleaseUpsertBulk) ClearReleaseDate() *ReleaseUpsertBulk

ClearReleaseDate clears the value of the "release_date" field.

func (*ReleaseUpsertBulk) ClearReleased

func (u *ReleaseUpsertBulk) ClearReleased() *ReleaseUpsertBulk

ClearReleased clears the value of the "released" field.

func (*ReleaseUpsertBulk) ClearStartDate

func (u *ReleaseUpsertBulk) ClearStartDate() *ReleaseUpsertBulk

ClearStartDate clears the value of the "start_date" field.

func (*ReleaseUpsertBulk) ClearURL

func (u *ReleaseUpsertBulk) ClearURL() *ReleaseUpsertBulk

ClearURL clears the value of the "url" field.

func (*ReleaseUpsertBulk) DoNothing

func (u *ReleaseUpsertBulk) DoNothing() *ReleaseUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ReleaseUpsertBulk) Exec

func (u *ReleaseUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ReleaseUpsertBulk) ExecX

func (u *ReleaseUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseUpsertBulk) Ignore

func (u *ReleaseUpsertBulk) Ignore() *ReleaseUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Release.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ReleaseUpsertBulk) SetCreatedAt

func (u *ReleaseUpsertBulk) SetCreatedAt(v time.Time) *ReleaseUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*ReleaseUpsertBulk) SetData

func (u *ReleaseUpsertBulk) SetData(v map[string]interface{}) *ReleaseUpsertBulk

SetData sets the "data" field.

func (*ReleaseUpsertBulk) SetName

SetName sets the "name" field.

func (*ReleaseUpsertBulk) SetParkingLot

func (u *ReleaseUpsertBulk) SetParkingLot(v bool) *ReleaseUpsertBulk

SetParkingLot sets the "parking_lot" field.

func (*ReleaseUpsertBulk) SetProduct

func (u *ReleaseUpsertBulk) SetProduct(v string) *ReleaseUpsertBulk

SetProduct sets the "product" field.

func (*ReleaseUpsertBulk) SetReferenceNum

func (u *ReleaseUpsertBulk) SetReferenceNum(v string) *ReleaseUpsertBulk

SetReferenceNum sets the "reference_num" field.

func (*ReleaseUpsertBulk) SetReleaseDate

func (u *ReleaseUpsertBulk) SetReleaseDate(v string) *ReleaseUpsertBulk

SetReleaseDate sets the "release_date" field.

func (*ReleaseUpsertBulk) SetReleased

func (u *ReleaseUpsertBulk) SetReleased(v bool) *ReleaseUpsertBulk

SetReleased sets the "released" field.

func (*ReleaseUpsertBulk) SetStartDate

func (u *ReleaseUpsertBulk) SetStartDate(v string) *ReleaseUpsertBulk

SetStartDate sets the "start_date" field.

func (*ReleaseUpsertBulk) SetURL

SetURL sets the "url" field.

func (*ReleaseUpsertBulk) Update

func (u *ReleaseUpsertBulk) Update(set func(*ReleaseUpsert)) *ReleaseUpsertBulk

Update allows overriding fields `UPDATE` values. See the ReleaseCreateBulk.OnConflict documentation for more info.

func (*ReleaseUpsertBulk) UpdateCreatedAt

func (u *ReleaseUpsertBulk) UpdateCreatedAt() *ReleaseUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateData

func (u *ReleaseUpsertBulk) UpdateData() *ReleaseUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateName

func (u *ReleaseUpsertBulk) UpdateName() *ReleaseUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateNewValues

func (u *ReleaseUpsertBulk) UpdateNewValues() *ReleaseUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Release.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(release.FieldID)
		}),
	).
	Exec(ctx)

func (*ReleaseUpsertBulk) UpdateParkingLot

func (u *ReleaseUpsertBulk) UpdateParkingLot() *ReleaseUpsertBulk

UpdateParkingLot sets the "parking_lot" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateProduct

func (u *ReleaseUpsertBulk) UpdateProduct() *ReleaseUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateReferenceNum

func (u *ReleaseUpsertBulk) UpdateReferenceNum() *ReleaseUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateReleaseDate

func (u *ReleaseUpsertBulk) UpdateReleaseDate() *ReleaseUpsertBulk

UpdateReleaseDate sets the "release_date" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateReleased

func (u *ReleaseUpsertBulk) UpdateReleased() *ReleaseUpsertBulk

UpdateReleased sets the "released" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateStartDate

func (u *ReleaseUpsertBulk) UpdateStartDate() *ReleaseUpsertBulk

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*ReleaseUpsertBulk) UpdateURL

func (u *ReleaseUpsertBulk) UpdateURL() *ReleaseUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

type ReleaseUpsertOne

type ReleaseUpsertOne struct {
	// contains filtered or unexported fields
}

ReleaseUpsertOne is the builder for "upsert"-ing

one Release node.

func (*ReleaseUpsertOne) ClearCreatedAt

func (u *ReleaseUpsertOne) ClearCreatedAt() *ReleaseUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*ReleaseUpsertOne) ClearData

func (u *ReleaseUpsertOne) ClearData() *ReleaseUpsertOne

ClearData clears the value of the "data" field.

func (*ReleaseUpsertOne) ClearName

func (u *ReleaseUpsertOne) ClearName() *ReleaseUpsertOne

ClearName clears the value of the "name" field.

func (*ReleaseUpsertOne) ClearParkingLot

func (u *ReleaseUpsertOne) ClearParkingLot() *ReleaseUpsertOne

ClearParkingLot clears the value of the "parking_lot" field.

func (*ReleaseUpsertOne) ClearReferenceNum

func (u *ReleaseUpsertOne) ClearReferenceNum() *ReleaseUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*ReleaseUpsertOne) ClearReleaseDate

func (u *ReleaseUpsertOne) ClearReleaseDate() *ReleaseUpsertOne

ClearReleaseDate clears the value of the "release_date" field.

func (*ReleaseUpsertOne) ClearReleased

func (u *ReleaseUpsertOne) ClearReleased() *ReleaseUpsertOne

ClearReleased clears the value of the "released" field.

func (*ReleaseUpsertOne) ClearStartDate

func (u *ReleaseUpsertOne) ClearStartDate() *ReleaseUpsertOne

ClearStartDate clears the value of the "start_date" field.

func (*ReleaseUpsertOne) ClearURL

func (u *ReleaseUpsertOne) ClearURL() *ReleaseUpsertOne

ClearURL clears the value of the "url" field.

func (*ReleaseUpsertOne) DoNothing

func (u *ReleaseUpsertOne) DoNothing() *ReleaseUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ReleaseUpsertOne) Exec

func (u *ReleaseUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ReleaseUpsertOne) ExecX

func (u *ReleaseUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReleaseUpsertOne) ID

func (u *ReleaseUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ReleaseUpsertOne) IDX

func (u *ReleaseUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*ReleaseUpsertOne) Ignore

func (u *ReleaseUpsertOne) Ignore() *ReleaseUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Release.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ReleaseUpsertOne) SetCreatedAt

func (u *ReleaseUpsertOne) SetCreatedAt(v time.Time) *ReleaseUpsertOne

SetCreatedAt sets the "created_at" field.

func (*ReleaseUpsertOne) SetData

func (u *ReleaseUpsertOne) SetData(v map[string]interface{}) *ReleaseUpsertOne

SetData sets the "data" field.

func (*ReleaseUpsertOne) SetName

func (u *ReleaseUpsertOne) SetName(v string) *ReleaseUpsertOne

SetName sets the "name" field.

func (*ReleaseUpsertOne) SetParkingLot

func (u *ReleaseUpsertOne) SetParkingLot(v bool) *ReleaseUpsertOne

SetParkingLot sets the "parking_lot" field.

func (*ReleaseUpsertOne) SetProduct

func (u *ReleaseUpsertOne) SetProduct(v string) *ReleaseUpsertOne

SetProduct sets the "product" field.

func (*ReleaseUpsertOne) SetReferenceNum

func (u *ReleaseUpsertOne) SetReferenceNum(v string) *ReleaseUpsertOne

SetReferenceNum sets the "reference_num" field.

func (*ReleaseUpsertOne) SetReleaseDate

func (u *ReleaseUpsertOne) SetReleaseDate(v string) *ReleaseUpsertOne

SetReleaseDate sets the "release_date" field.

func (*ReleaseUpsertOne) SetReleased

func (u *ReleaseUpsertOne) SetReleased(v bool) *ReleaseUpsertOne

SetReleased sets the "released" field.

func (*ReleaseUpsertOne) SetStartDate

func (u *ReleaseUpsertOne) SetStartDate(v string) *ReleaseUpsertOne

SetStartDate sets the "start_date" field.

func (*ReleaseUpsertOne) SetURL

SetURL sets the "url" field.

func (*ReleaseUpsertOne) Update

func (u *ReleaseUpsertOne) Update(set func(*ReleaseUpsert)) *ReleaseUpsertOne

Update allows overriding fields `UPDATE` values. See the ReleaseCreate.OnConflict documentation for more info.

func (*ReleaseUpsertOne) UpdateCreatedAt

func (u *ReleaseUpsertOne) UpdateCreatedAt() *ReleaseUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateData

func (u *ReleaseUpsertOne) UpdateData() *ReleaseUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateName

func (u *ReleaseUpsertOne) UpdateName() *ReleaseUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateNewValues

func (u *ReleaseUpsertOne) UpdateNewValues() *ReleaseUpsertOne

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.Release.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(release.FieldID)
		}),
	).
	Exec(ctx)

func (*ReleaseUpsertOne) UpdateParkingLot

func (u *ReleaseUpsertOne) UpdateParkingLot() *ReleaseUpsertOne

UpdateParkingLot sets the "parking_lot" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateProduct

func (u *ReleaseUpsertOne) UpdateProduct() *ReleaseUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateReferenceNum

func (u *ReleaseUpsertOne) UpdateReferenceNum() *ReleaseUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateReleaseDate

func (u *ReleaseUpsertOne) UpdateReleaseDate() *ReleaseUpsertOne

UpdateReleaseDate sets the "release_date" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateReleased

func (u *ReleaseUpsertOne) UpdateReleased() *ReleaseUpsertOne

UpdateReleased sets the "released" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateStartDate

func (u *ReleaseUpsertOne) UpdateStartDate() *ReleaseUpsertOne

UpdateStartDate sets the "start_date" field to the value that was provided on create.

func (*ReleaseUpsertOne) UpdateURL

func (u *ReleaseUpsertOne) UpdateURL() *ReleaseUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

type Releases

type Releases []*Release

Releases is a parsable slice of Release.

type Requirement

type Requirement struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// FeatureID holds the value of the "feature_id" field.
	FeatureID string `json:"feature_id,omitempty"`
	// ReferenceNum holds the value of the "reference_num" field.
	ReferenceNum string `json:"reference_num,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// AssignedTo holds the value of the "assigned_to" field.
	AssignedTo string `json:"assigned_to,omitempty"`
	// Position holds the value of the "position" field.
	Position *int `json:"position,omitempty"`
	// OriginalEstimate holds the value of the "original_estimate" field.
	OriginalEstimate *float64 `json:"original_estimate,omitempty"`
	// RemainingEstimate holds the value of the "remaining_estimate" field.
	RemainingEstimate *float64 `json:"remaining_estimate,omitempty"`
	// WorkDone holds the value of the "work_done" field.
	WorkDone *float64 `json:"work_done,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

Requirement is the model entity for the Requirement schema.

func (*Requirement) String

func (_m *Requirement) String() string

String implements the fmt.Stringer.

func (*Requirement) Unwrap

func (_m *Requirement) Unwrap() *Requirement

Unwrap unwraps the Requirement 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 (*Requirement) Update

func (_m *Requirement) Update() *RequirementUpdateOne

Update returns a builder for updating this Requirement. Note that you need to call Requirement.Unwrap() before calling this method if this Requirement was returned from a transaction, and the transaction was committed or rolled back.

func (*Requirement) Value

func (_m *Requirement) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Requirement. This includes values selected through modifiers, order, etc.

type RequirementClient

type RequirementClient struct {
	// contains filtered or unexported fields
}

RequirementClient is a client for the Requirement schema.

func NewRequirementClient

func NewRequirementClient(c config) *RequirementClient

NewRequirementClient returns a client for the Requirement from the given config.

func (*RequirementClient) Create

func (c *RequirementClient) Create() *RequirementCreate

Create returns a builder for creating a Requirement entity.

func (*RequirementClient) CreateBulk

func (c *RequirementClient) CreateBulk(builders ...*RequirementCreate) *RequirementCreateBulk

CreateBulk returns a builder for creating a bulk of Requirement entities.

func (*RequirementClient) Delete

func (c *RequirementClient) Delete() *RequirementDelete

Delete returns a delete builder for Requirement.

func (*RequirementClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RequirementClient) DeleteOneID

func (c *RequirementClient) DeleteOneID(id string) *RequirementDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RequirementClient) Get

Get returns a Requirement entity by its id.

func (*RequirementClient) GetX

GetX is like Get, but panics if an error occurs.

func (*RequirementClient) Hooks

func (c *RequirementClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RequirementClient) Intercept

func (c *RequirementClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `requirement.Intercept(f(g(h())))`.

func (*RequirementClient) Interceptors

func (c *RequirementClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RequirementClient) MapCreateBulk

func (c *RequirementClient) MapCreateBulk(slice any, setFunc func(*RequirementCreate, int)) *RequirementCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RequirementClient) Query

func (c *RequirementClient) Query() *RequirementQuery

Query returns a query builder for Requirement.

func (*RequirementClient) Update

func (c *RequirementClient) Update() *RequirementUpdate

Update returns an update builder for Requirement.

func (*RequirementClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RequirementClient) UpdateOneID

func (c *RequirementClient) UpdateOneID(id string) *RequirementUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RequirementClient) Use

func (c *RequirementClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `requirement.Hooks(f(g(h())))`.

type RequirementCreate

type RequirementCreate struct {
	// contains filtered or unexported fields
}

RequirementCreate is the builder for creating a Requirement entity.

func (*RequirementCreate) Exec

func (_c *RequirementCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RequirementCreate) ExecX

func (_c *RequirementCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequirementCreate) Mutation

func (_c *RequirementCreate) Mutation() *RequirementMutation

Mutation returns the RequirementMutation object of the builder.

func (*RequirementCreate) OnConflict

func (_c *RequirementCreate) OnConflict(opts ...sql.ConflictOption) *RequirementUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Requirement.Create().
	SetProduct(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.RequirementUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*RequirementCreate) OnConflictColumns

func (_c *RequirementCreate) OnConflictColumns(columns ...string) *RequirementUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Requirement.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RequirementCreate) Save

Save creates the Requirement in the database.

func (*RequirementCreate) SaveX

func (_c *RequirementCreate) SaveX(ctx context.Context) *Requirement

SaveX calls Save and panics if Save returns an error.

func (*RequirementCreate) SetAssignedTo

func (_c *RequirementCreate) SetAssignedTo(v string) *RequirementCreate

SetAssignedTo sets the "assigned_to" field.

func (*RequirementCreate) SetCreatedAt

func (_c *RequirementCreate) SetCreatedAt(v time.Time) *RequirementCreate

SetCreatedAt sets the "created_at" field.

func (*RequirementCreate) SetData

func (_c *RequirementCreate) SetData(v map[string]interface{}) *RequirementCreate

SetData sets the "data" field.

func (*RequirementCreate) SetDescription

func (_c *RequirementCreate) SetDescription(v string) *RequirementCreate

SetDescription sets the "description" field.

func (*RequirementCreate) SetFeatureID

func (_c *RequirementCreate) SetFeatureID(v string) *RequirementCreate

SetFeatureID sets the "feature_id" field.

func (*RequirementCreate) SetID

SetID sets the "id" field.

func (*RequirementCreate) SetName

func (_c *RequirementCreate) SetName(v string) *RequirementCreate

SetName sets the "name" field.

func (*RequirementCreate) SetNillableAssignedTo

func (_c *RequirementCreate) SetNillableAssignedTo(v *string) *RequirementCreate

SetNillableAssignedTo sets the "assigned_to" field if the given value is not nil.

func (*RequirementCreate) SetNillableCreatedAt

func (_c *RequirementCreate) SetNillableCreatedAt(v *time.Time) *RequirementCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RequirementCreate) SetNillableDescription

func (_c *RequirementCreate) SetNillableDescription(v *string) *RequirementCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RequirementCreate) SetNillableFeatureID

func (_c *RequirementCreate) SetNillableFeatureID(v *string) *RequirementCreate

SetNillableFeatureID sets the "feature_id" field if the given value is not nil.

func (*RequirementCreate) SetNillableName

func (_c *RequirementCreate) SetNillableName(v *string) *RequirementCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*RequirementCreate) SetNillableOriginalEstimate

func (_c *RequirementCreate) SetNillableOriginalEstimate(v *float64) *RequirementCreate

SetNillableOriginalEstimate sets the "original_estimate" field if the given value is not nil.

func (*RequirementCreate) SetNillablePosition

func (_c *RequirementCreate) SetNillablePosition(v *int) *RequirementCreate

SetNillablePosition sets the "position" field if the given value is not nil.

func (*RequirementCreate) SetNillableReferenceNum

func (_c *RequirementCreate) SetNillableReferenceNum(v *string) *RequirementCreate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*RequirementCreate) SetNillableRemainingEstimate

func (_c *RequirementCreate) SetNillableRemainingEstimate(v *float64) *RequirementCreate

SetNillableRemainingEstimate sets the "remaining_estimate" field if the given value is not nil.

func (*RequirementCreate) SetNillableStatus

func (_c *RequirementCreate) SetNillableStatus(v *string) *RequirementCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RequirementCreate) SetNillableURL

func (_c *RequirementCreate) SetNillableURL(v *string) *RequirementCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*RequirementCreate) SetNillableUpdatedAt

func (_c *RequirementCreate) SetNillableUpdatedAt(v *time.Time) *RequirementCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RequirementCreate) SetNillableWorkDone

func (_c *RequirementCreate) SetNillableWorkDone(v *float64) *RequirementCreate

SetNillableWorkDone sets the "work_done" field if the given value is not nil.

func (*RequirementCreate) SetOriginalEstimate

func (_c *RequirementCreate) SetOriginalEstimate(v float64) *RequirementCreate

SetOriginalEstimate sets the "original_estimate" field.

func (*RequirementCreate) SetPosition

func (_c *RequirementCreate) SetPosition(v int) *RequirementCreate

SetPosition sets the "position" field.

func (*RequirementCreate) SetProduct

func (_c *RequirementCreate) SetProduct(v string) *RequirementCreate

SetProduct sets the "product" field.

func (*RequirementCreate) SetReferenceNum

func (_c *RequirementCreate) SetReferenceNum(v string) *RequirementCreate

SetReferenceNum sets the "reference_num" field.

func (*RequirementCreate) SetRemainingEstimate

func (_c *RequirementCreate) SetRemainingEstimate(v float64) *RequirementCreate

SetRemainingEstimate sets the "remaining_estimate" field.

func (*RequirementCreate) SetStatus

func (_c *RequirementCreate) SetStatus(v string) *RequirementCreate

SetStatus sets the "status" field.

func (*RequirementCreate) SetURL

SetURL sets the "url" field.

func (*RequirementCreate) SetUpdatedAt

func (_c *RequirementCreate) SetUpdatedAt(v time.Time) *RequirementCreate

SetUpdatedAt sets the "updated_at" field.

func (*RequirementCreate) SetWorkDone

func (_c *RequirementCreate) SetWorkDone(v float64) *RequirementCreate

SetWorkDone sets the "work_done" field.

type RequirementCreateBulk

type RequirementCreateBulk struct {
	// contains filtered or unexported fields
}

RequirementCreateBulk is the builder for creating many Requirement entities in bulk.

func (*RequirementCreateBulk) Exec

Exec executes the query.

func (*RequirementCreateBulk) ExecX

func (_c *RequirementCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequirementCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Requirement.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.RequirementUpsert) {
		SetProduct(v+v).
	}).
	Exec(ctx)

func (*RequirementCreateBulk) OnConflictColumns

func (_c *RequirementCreateBulk) OnConflictColumns(columns ...string) *RequirementUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Requirement.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RequirementCreateBulk) Save

Save creates the Requirement entities in the database.

func (*RequirementCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type RequirementDelete

type RequirementDelete struct {
	// contains filtered or unexported fields
}

RequirementDelete is the builder for deleting a Requirement entity.

func (*RequirementDelete) Exec

func (_d *RequirementDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RequirementDelete) ExecX

func (_d *RequirementDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RequirementDelete) Where

Where appends a list predicates to the RequirementDelete builder.

type RequirementDeleteOne

type RequirementDeleteOne struct {
	// contains filtered or unexported fields
}

RequirementDeleteOne is the builder for deleting a single Requirement entity.

func (*RequirementDeleteOne) Exec

func (_d *RequirementDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RequirementDeleteOne) ExecX

func (_d *RequirementDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequirementDeleteOne) Where

Where appends a list predicates to the RequirementDelete builder.

type RequirementGroupBy

type RequirementGroupBy struct {
	// contains filtered or unexported fields
}

RequirementGroupBy is the group-by builder for Requirement entities.

func (*RequirementGroupBy) Aggregate

func (_g *RequirementGroupBy) Aggregate(fns ...AggregateFunc) *RequirementGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RequirementGroupBy) Bool

func (s *RequirementGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) BoolX

func (s *RequirementGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RequirementGroupBy) Bools

func (s *RequirementGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) BoolsX

func (s *RequirementGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RequirementGroupBy) Float64

func (s *RequirementGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) Float64X

func (s *RequirementGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RequirementGroupBy) Float64s

func (s *RequirementGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) Float64sX

func (s *RequirementGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RequirementGroupBy) Int

func (s *RequirementGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) IntX

func (s *RequirementGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RequirementGroupBy) Ints

func (s *RequirementGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) IntsX

func (s *RequirementGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RequirementGroupBy) Scan

func (_g *RequirementGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RequirementGroupBy) ScanX

func (s *RequirementGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RequirementGroupBy) String

func (s *RequirementGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) StringX

func (s *RequirementGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RequirementGroupBy) Strings

func (s *RequirementGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RequirementGroupBy) StringsX

func (s *RequirementGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RequirementMutation

type RequirementMutation struct {
	// contains filtered or unexported fields
}

RequirementMutation represents an operation that mutates the Requirement nodes in the graph.

func (*RequirementMutation) AddField

func (m *RequirementMutation) 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 (*RequirementMutation) AddOriginalEstimate

func (m *RequirementMutation) AddOriginalEstimate(f float64)

AddOriginalEstimate adds f to the "original_estimate" field.

func (*RequirementMutation) AddPosition

func (m *RequirementMutation) AddPosition(i int)

AddPosition adds i to the "position" field.

func (*RequirementMutation) AddRemainingEstimate

func (m *RequirementMutation) AddRemainingEstimate(f float64)

AddRemainingEstimate adds f to the "remaining_estimate" field.

func (*RequirementMutation) AddWorkDone

func (m *RequirementMutation) AddWorkDone(f float64)

AddWorkDone adds f to the "work_done" field.

func (*RequirementMutation) AddedEdges

func (m *RequirementMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RequirementMutation) AddedField

func (m *RequirementMutation) 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 (*RequirementMutation) AddedFields

func (m *RequirementMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RequirementMutation) AddedIDs

func (m *RequirementMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RequirementMutation) AddedOriginalEstimate

func (m *RequirementMutation) AddedOriginalEstimate() (r float64, exists bool)

AddedOriginalEstimate returns the value that was added to the "original_estimate" field in this mutation.

func (*RequirementMutation) AddedPosition

func (m *RequirementMutation) AddedPosition() (r int, exists bool)

AddedPosition returns the value that was added to the "position" field in this mutation.

func (*RequirementMutation) AddedRemainingEstimate

func (m *RequirementMutation) AddedRemainingEstimate() (r float64, exists bool)

AddedRemainingEstimate returns the value that was added to the "remaining_estimate" field in this mutation.

func (*RequirementMutation) AddedWorkDone

func (m *RequirementMutation) AddedWorkDone() (r float64, exists bool)

AddedWorkDone returns the value that was added to the "work_done" field in this mutation.

func (*RequirementMutation) AssignedTo

func (m *RequirementMutation) AssignedTo() (r string, exists bool)

AssignedTo returns the value of the "assigned_to" field in the mutation.

func (*RequirementMutation) AssignedToCleared

func (m *RequirementMutation) AssignedToCleared() bool

AssignedToCleared returns if the "assigned_to" field was cleared in this mutation.

func (*RequirementMutation) ClearAssignedTo

func (m *RequirementMutation) ClearAssignedTo()

ClearAssignedTo clears the value of the "assigned_to" field.

func (*RequirementMutation) ClearCreatedAt

func (m *RequirementMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*RequirementMutation) ClearData

func (m *RequirementMutation) ClearData()

ClearData clears the value of the "data" field.

func (*RequirementMutation) ClearDescription

func (m *RequirementMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*RequirementMutation) ClearEdge

func (m *RequirementMutation) 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 (*RequirementMutation) ClearFeatureID

func (m *RequirementMutation) ClearFeatureID()

ClearFeatureID clears the value of the "feature_id" field.

func (*RequirementMutation) ClearField

func (m *RequirementMutation) 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 (*RequirementMutation) ClearName

func (m *RequirementMutation) ClearName()

ClearName clears the value of the "name" field.

func (*RequirementMutation) ClearOriginalEstimate

func (m *RequirementMutation) ClearOriginalEstimate()

ClearOriginalEstimate clears the value of the "original_estimate" field.

func (*RequirementMutation) ClearPosition

func (m *RequirementMutation) ClearPosition()

ClearPosition clears the value of the "position" field.

func (*RequirementMutation) ClearReferenceNum

func (m *RequirementMutation) ClearReferenceNum()

ClearReferenceNum clears the value of the "reference_num" field.

func (*RequirementMutation) ClearRemainingEstimate

func (m *RequirementMutation) ClearRemainingEstimate()

ClearRemainingEstimate clears the value of the "remaining_estimate" field.

func (*RequirementMutation) ClearStatus

func (m *RequirementMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*RequirementMutation) ClearURL

func (m *RequirementMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*RequirementMutation) ClearUpdatedAt

func (m *RequirementMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RequirementMutation) ClearWorkDone

func (m *RequirementMutation) ClearWorkDone()

ClearWorkDone clears the value of the "work_done" field.

func (*RequirementMutation) ClearedEdges

func (m *RequirementMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RequirementMutation) ClearedFields

func (m *RequirementMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RequirementMutation) Client

func (m RequirementMutation) 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 (*RequirementMutation) CreatedAt

func (m *RequirementMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RequirementMutation) CreatedAtCleared

func (m *RequirementMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*RequirementMutation) Data

func (m *RequirementMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*RequirementMutation) DataCleared

func (m *RequirementMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*RequirementMutation) Description

func (m *RequirementMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RequirementMutation) DescriptionCleared

func (m *RequirementMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*RequirementMutation) EdgeCleared

func (m *RequirementMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RequirementMutation) FeatureID

func (m *RequirementMutation) FeatureID() (r string, exists bool)

FeatureID returns the value of the "feature_id" field in the mutation.

func (*RequirementMutation) FeatureIDCleared

func (m *RequirementMutation) FeatureIDCleared() bool

FeatureIDCleared returns if the "feature_id" field was cleared in this mutation.

func (*RequirementMutation) Field

func (m *RequirementMutation) 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 (*RequirementMutation) FieldCleared

func (m *RequirementMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RequirementMutation) Fields

func (m *RequirementMutation) 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 (*RequirementMutation) ID

func (m *RequirementMutation) ID() (id string, 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 (*RequirementMutation) IDs

func (m *RequirementMutation) IDs(ctx context.Context) ([]string, 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 (*RequirementMutation) Name

func (m *RequirementMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RequirementMutation) NameCleared

func (m *RequirementMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*RequirementMutation) OldAssignedTo

func (m *RequirementMutation) OldAssignedTo(ctx context.Context) (v string, err error)

OldAssignedTo returns the old "assigned_to" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldCreatedAt

func (m *RequirementMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldData

func (m *RequirementMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldDescription

func (m *RequirementMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldFeatureID

func (m *RequirementMutation) OldFeatureID(ctx context.Context) (v string, err error)

OldFeatureID returns the old "feature_id" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldField

func (m *RequirementMutation) 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 (*RequirementMutation) OldName

func (m *RequirementMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldOriginalEstimate

func (m *RequirementMutation) OldOriginalEstimate(ctx context.Context) (v *float64, err error)

OldOriginalEstimate returns the old "original_estimate" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldPosition

func (m *RequirementMutation) OldPosition(ctx context.Context) (v *int, err error)

OldPosition returns the old "position" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldProduct

func (m *RequirementMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldReferenceNum

func (m *RequirementMutation) OldReferenceNum(ctx context.Context) (v string, err error)

OldReferenceNum returns the old "reference_num" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldRemainingEstimate

func (m *RequirementMutation) OldRemainingEstimate(ctx context.Context) (v *float64, err error)

OldRemainingEstimate returns the old "remaining_estimate" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldStatus

func (m *RequirementMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldURL

func (m *RequirementMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldUpdatedAt

func (m *RequirementMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) OldWorkDone

func (m *RequirementMutation) OldWorkDone(ctx context.Context) (v *float64, err error)

OldWorkDone returns the old "work_done" field's value of the Requirement entity. If the Requirement 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 (*RequirementMutation) Op

func (m *RequirementMutation) Op() Op

Op returns the operation name.

func (*RequirementMutation) OriginalEstimate

func (m *RequirementMutation) OriginalEstimate() (r float64, exists bool)

OriginalEstimate returns the value of the "original_estimate" field in the mutation.

func (*RequirementMutation) OriginalEstimateCleared

func (m *RequirementMutation) OriginalEstimateCleared() bool

OriginalEstimateCleared returns if the "original_estimate" field was cleared in this mutation.

func (*RequirementMutation) Position

func (m *RequirementMutation) Position() (r int, exists bool)

Position returns the value of the "position" field in the mutation.

func (*RequirementMutation) PositionCleared

func (m *RequirementMutation) PositionCleared() bool

PositionCleared returns if the "position" field was cleared in this mutation.

func (*RequirementMutation) Product

func (m *RequirementMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*RequirementMutation) ReferenceNum

func (m *RequirementMutation) ReferenceNum() (r string, exists bool)

ReferenceNum returns the value of the "reference_num" field in the mutation.

func (*RequirementMutation) ReferenceNumCleared

func (m *RequirementMutation) ReferenceNumCleared() bool

ReferenceNumCleared returns if the "reference_num" field was cleared in this mutation.

func (*RequirementMutation) RemainingEstimate

func (m *RequirementMutation) RemainingEstimate() (r float64, exists bool)

RemainingEstimate returns the value of the "remaining_estimate" field in the mutation.

func (*RequirementMutation) RemainingEstimateCleared

func (m *RequirementMutation) RemainingEstimateCleared() bool

RemainingEstimateCleared returns if the "remaining_estimate" field was cleared in this mutation.

func (*RequirementMutation) RemovedEdges

func (m *RequirementMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RequirementMutation) RemovedIDs

func (m *RequirementMutation) 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 (*RequirementMutation) ResetAssignedTo

func (m *RequirementMutation) ResetAssignedTo()

ResetAssignedTo resets all changes to the "assigned_to" field.

func (*RequirementMutation) ResetCreatedAt

func (m *RequirementMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RequirementMutation) ResetData

func (m *RequirementMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*RequirementMutation) ResetDescription

func (m *RequirementMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RequirementMutation) ResetEdge

func (m *RequirementMutation) 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 (*RequirementMutation) ResetFeatureID

func (m *RequirementMutation) ResetFeatureID()

ResetFeatureID resets all changes to the "feature_id" field.

func (*RequirementMutation) ResetField

func (m *RequirementMutation) 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 (*RequirementMutation) ResetName

func (m *RequirementMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RequirementMutation) ResetOriginalEstimate

func (m *RequirementMutation) ResetOriginalEstimate()

ResetOriginalEstimate resets all changes to the "original_estimate" field.

func (*RequirementMutation) ResetPosition

func (m *RequirementMutation) ResetPosition()

ResetPosition resets all changes to the "position" field.

func (*RequirementMutation) ResetProduct

func (m *RequirementMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*RequirementMutation) ResetReferenceNum

func (m *RequirementMutation) ResetReferenceNum()

ResetReferenceNum resets all changes to the "reference_num" field.

func (*RequirementMutation) ResetRemainingEstimate

func (m *RequirementMutation) ResetRemainingEstimate()

ResetRemainingEstimate resets all changes to the "remaining_estimate" field.

func (*RequirementMutation) ResetStatus

func (m *RequirementMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*RequirementMutation) ResetURL

func (m *RequirementMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*RequirementMutation) ResetUpdatedAt

func (m *RequirementMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RequirementMutation) ResetWorkDone

func (m *RequirementMutation) ResetWorkDone()

ResetWorkDone resets all changes to the "work_done" field.

func (*RequirementMutation) SetAssignedTo

func (m *RequirementMutation) SetAssignedTo(s string)

SetAssignedTo sets the "assigned_to" field.

func (*RequirementMutation) SetCreatedAt

func (m *RequirementMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RequirementMutation) SetData

func (m *RequirementMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*RequirementMutation) SetDescription

func (m *RequirementMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RequirementMutation) SetFeatureID

func (m *RequirementMutation) SetFeatureID(s string)

SetFeatureID sets the "feature_id" field.

func (*RequirementMutation) SetField

func (m *RequirementMutation) 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 (*RequirementMutation) SetID

func (m *RequirementMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Requirement entities.

func (*RequirementMutation) SetName

func (m *RequirementMutation) SetName(s string)

SetName sets the "name" field.

func (*RequirementMutation) SetOp

func (m *RequirementMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RequirementMutation) SetOriginalEstimate

func (m *RequirementMutation) SetOriginalEstimate(f float64)

SetOriginalEstimate sets the "original_estimate" field.

func (*RequirementMutation) SetPosition

func (m *RequirementMutation) SetPosition(i int)

SetPosition sets the "position" field.

func (*RequirementMutation) SetProduct

func (m *RequirementMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*RequirementMutation) SetReferenceNum

func (m *RequirementMutation) SetReferenceNum(s string)

SetReferenceNum sets the "reference_num" field.

func (*RequirementMutation) SetRemainingEstimate

func (m *RequirementMutation) SetRemainingEstimate(f float64)

SetRemainingEstimate sets the "remaining_estimate" field.

func (*RequirementMutation) SetStatus

func (m *RequirementMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*RequirementMutation) SetURL

func (m *RequirementMutation) SetURL(s string)

SetURL sets the "url" field.

func (*RequirementMutation) SetUpdatedAt

func (m *RequirementMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*RequirementMutation) SetWorkDone

func (m *RequirementMutation) SetWorkDone(f float64)

SetWorkDone sets the "work_done" field.

func (*RequirementMutation) Status

func (m *RequirementMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*RequirementMutation) StatusCleared

func (m *RequirementMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (RequirementMutation) Tx

func (m RequirementMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RequirementMutation) Type

func (m *RequirementMutation) Type() string

Type returns the node type of this mutation (Requirement).

func (*RequirementMutation) URL

func (m *RequirementMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*RequirementMutation) URLCleared

func (m *RequirementMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*RequirementMutation) UpdatedAt

func (m *RequirementMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RequirementMutation) UpdatedAtCleared

func (m *RequirementMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*RequirementMutation) Where

func (m *RequirementMutation) Where(ps ...predicate.Requirement)

Where appends a list predicates to the RequirementMutation builder.

func (*RequirementMutation) WhereP

func (m *RequirementMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RequirementMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*RequirementMutation) WorkDone

func (m *RequirementMutation) WorkDone() (r float64, exists bool)

WorkDone returns the value of the "work_done" field in the mutation.

func (*RequirementMutation) WorkDoneCleared

func (m *RequirementMutation) WorkDoneCleared() bool

WorkDoneCleared returns if the "work_done" field was cleared in this mutation.

type RequirementQuery

type RequirementQuery struct {
	// contains filtered or unexported fields
}

RequirementQuery is the builder for querying Requirement entities.

func (*RequirementQuery) Aggregate

func (_q *RequirementQuery) Aggregate(fns ...AggregateFunc) *RequirementSelect

Aggregate returns a RequirementSelect configured with the given aggregations.

func (*RequirementQuery) All

func (_q *RequirementQuery) All(ctx context.Context) ([]*Requirement, error)

All executes the query and returns a list of Requirements.

func (*RequirementQuery) AllX

func (_q *RequirementQuery) AllX(ctx context.Context) []*Requirement

AllX is like All, but panics if an error occurs.

func (*RequirementQuery) Clone

func (_q *RequirementQuery) Clone() *RequirementQuery

Clone returns a duplicate of the RequirementQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RequirementQuery) Count

func (_q *RequirementQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RequirementQuery) CountX

func (_q *RequirementQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RequirementQuery) Exist

func (_q *RequirementQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RequirementQuery) ExistX

func (_q *RequirementQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RequirementQuery) First

func (_q *RequirementQuery) First(ctx context.Context) (*Requirement, error)

First returns the first Requirement entity from the query. Returns a *NotFoundError when no Requirement was found.

func (*RequirementQuery) FirstID

func (_q *RequirementQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Requirement ID from the query. Returns a *NotFoundError when no Requirement ID was found.

func (*RequirementQuery) FirstIDX

func (_q *RequirementQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*RequirementQuery) FirstX

func (_q *RequirementQuery) FirstX(ctx context.Context) *Requirement

FirstX is like First, but panics if an error occurs.

func (*RequirementQuery) GroupBy

func (_q *RequirementQuery) GroupBy(field string, fields ...string) *RequirementGroupBy

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 {
	Product string `json:"product,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Requirement.Query().
	GroupBy(requirement.FieldProduct).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RequirementQuery) IDs

func (_q *RequirementQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Requirement IDs.

func (*RequirementQuery) IDsX

func (_q *RequirementQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*RequirementQuery) Limit

func (_q *RequirementQuery) Limit(limit int) *RequirementQuery

Limit the number of records to be returned by this query.

func (*RequirementQuery) Offset

func (_q *RequirementQuery) Offset(offset int) *RequirementQuery

Offset to start from.

func (*RequirementQuery) Only

func (_q *RequirementQuery) Only(ctx context.Context) (*Requirement, error)

Only returns a single Requirement entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Requirement entity is found. Returns a *NotFoundError when no Requirement entities are found.

func (*RequirementQuery) OnlyID

func (_q *RequirementQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Requirement ID in the query. Returns a *NotSingularError when more than one Requirement ID is found. Returns a *NotFoundError when no entities are found.

func (*RequirementQuery) OnlyIDX

func (_q *RequirementQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RequirementQuery) OnlyX

func (_q *RequirementQuery) OnlyX(ctx context.Context) *Requirement

OnlyX is like Only, but panics if an error occurs.

func (*RequirementQuery) Order

Order specifies how the records should be ordered.

func (*RequirementQuery) Select

func (_q *RequirementQuery) Select(fields ...string) *RequirementSelect

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 {
	Product string `json:"product,omitempty"`
}

client.Requirement.Query().
	Select(requirement.FieldProduct).
	Scan(ctx, &v)

func (*RequirementQuery) Unique

func (_q *RequirementQuery) Unique(unique bool) *RequirementQuery

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 (*RequirementQuery) Where

Where adds a new predicate for the RequirementQuery builder.

type RequirementSelect

type RequirementSelect struct {
	*RequirementQuery
	// contains filtered or unexported fields
}

RequirementSelect is the builder for selecting fields of Requirement entities.

func (*RequirementSelect) Aggregate

func (_s *RequirementSelect) Aggregate(fns ...AggregateFunc) *RequirementSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RequirementSelect) Bool

func (s *RequirementSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) BoolX

func (s *RequirementSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RequirementSelect) Bools

func (s *RequirementSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) BoolsX

func (s *RequirementSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RequirementSelect) Float64

func (s *RequirementSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) Float64X

func (s *RequirementSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RequirementSelect) Float64s

func (s *RequirementSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) Float64sX

func (s *RequirementSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RequirementSelect) Int

func (s *RequirementSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) IntX

func (s *RequirementSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RequirementSelect) Ints

func (s *RequirementSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) IntsX

func (s *RequirementSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RequirementSelect) Scan

func (_s *RequirementSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RequirementSelect) ScanX

func (s *RequirementSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RequirementSelect) String

func (s *RequirementSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) StringX

func (s *RequirementSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RequirementSelect) Strings

func (s *RequirementSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RequirementSelect) StringsX

func (s *RequirementSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RequirementUpdate

type RequirementUpdate struct {
	// contains filtered or unexported fields
}

RequirementUpdate is the builder for updating Requirement entities.

func (*RequirementUpdate) AddOriginalEstimate

func (_u *RequirementUpdate) AddOriginalEstimate(v float64) *RequirementUpdate

AddOriginalEstimate adds value to the "original_estimate" field.

func (*RequirementUpdate) AddPosition

func (_u *RequirementUpdate) AddPosition(v int) *RequirementUpdate

AddPosition adds value to the "position" field.

func (*RequirementUpdate) AddRemainingEstimate

func (_u *RequirementUpdate) AddRemainingEstimate(v float64) *RequirementUpdate

AddRemainingEstimate adds value to the "remaining_estimate" field.

func (*RequirementUpdate) AddWorkDone

func (_u *RequirementUpdate) AddWorkDone(v float64) *RequirementUpdate

AddWorkDone adds value to the "work_done" field.

func (*RequirementUpdate) ClearAssignedTo

func (_u *RequirementUpdate) ClearAssignedTo() *RequirementUpdate

ClearAssignedTo clears the value of the "assigned_to" field.

func (*RequirementUpdate) ClearCreatedAt

func (_u *RequirementUpdate) ClearCreatedAt() *RequirementUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*RequirementUpdate) ClearData

func (_u *RequirementUpdate) ClearData() *RequirementUpdate

ClearData clears the value of the "data" field.

func (*RequirementUpdate) ClearDescription

func (_u *RequirementUpdate) ClearDescription() *RequirementUpdate

ClearDescription clears the value of the "description" field.

func (*RequirementUpdate) ClearFeatureID

func (_u *RequirementUpdate) ClearFeatureID() *RequirementUpdate

ClearFeatureID clears the value of the "feature_id" field.

func (*RequirementUpdate) ClearName

func (_u *RequirementUpdate) ClearName() *RequirementUpdate

ClearName clears the value of the "name" field.

func (*RequirementUpdate) ClearOriginalEstimate

func (_u *RequirementUpdate) ClearOriginalEstimate() *RequirementUpdate

ClearOriginalEstimate clears the value of the "original_estimate" field.

func (*RequirementUpdate) ClearPosition

func (_u *RequirementUpdate) ClearPosition() *RequirementUpdate

ClearPosition clears the value of the "position" field.

func (*RequirementUpdate) ClearReferenceNum

func (_u *RequirementUpdate) ClearReferenceNum() *RequirementUpdate

ClearReferenceNum clears the value of the "reference_num" field.

func (*RequirementUpdate) ClearRemainingEstimate

func (_u *RequirementUpdate) ClearRemainingEstimate() *RequirementUpdate

ClearRemainingEstimate clears the value of the "remaining_estimate" field.

func (*RequirementUpdate) ClearStatus

func (_u *RequirementUpdate) ClearStatus() *RequirementUpdate

ClearStatus clears the value of the "status" field.

func (*RequirementUpdate) ClearURL

func (_u *RequirementUpdate) ClearURL() *RequirementUpdate

ClearURL clears the value of the "url" field.

func (*RequirementUpdate) ClearUpdatedAt

func (_u *RequirementUpdate) ClearUpdatedAt() *RequirementUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RequirementUpdate) ClearWorkDone

func (_u *RequirementUpdate) ClearWorkDone() *RequirementUpdate

ClearWorkDone clears the value of the "work_done" field.

func (*RequirementUpdate) Exec

func (_u *RequirementUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RequirementUpdate) ExecX

func (_u *RequirementUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequirementUpdate) Mutation

func (_u *RequirementUpdate) Mutation() *RequirementMutation

Mutation returns the RequirementMutation object of the builder.

func (*RequirementUpdate) Save

func (_u *RequirementUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RequirementUpdate) SaveX

func (_u *RequirementUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RequirementUpdate) SetAssignedTo

func (_u *RequirementUpdate) SetAssignedTo(v string) *RequirementUpdate

SetAssignedTo sets the "assigned_to" field.

func (*RequirementUpdate) SetCreatedAt

func (_u *RequirementUpdate) SetCreatedAt(v time.Time) *RequirementUpdate

SetCreatedAt sets the "created_at" field.

func (*RequirementUpdate) SetData

func (_u *RequirementUpdate) SetData(v map[string]interface{}) *RequirementUpdate

SetData sets the "data" field.

func (*RequirementUpdate) SetDescription

func (_u *RequirementUpdate) SetDescription(v string) *RequirementUpdate

SetDescription sets the "description" field.

func (*RequirementUpdate) SetFeatureID

func (_u *RequirementUpdate) SetFeatureID(v string) *RequirementUpdate

SetFeatureID sets the "feature_id" field.

func (*RequirementUpdate) SetName

func (_u *RequirementUpdate) SetName(v string) *RequirementUpdate

SetName sets the "name" field.

func (*RequirementUpdate) SetNillableAssignedTo

func (_u *RequirementUpdate) SetNillableAssignedTo(v *string) *RequirementUpdate

SetNillableAssignedTo sets the "assigned_to" field if the given value is not nil.

func (*RequirementUpdate) SetNillableCreatedAt

func (_u *RequirementUpdate) SetNillableCreatedAt(v *time.Time) *RequirementUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RequirementUpdate) SetNillableDescription

func (_u *RequirementUpdate) SetNillableDescription(v *string) *RequirementUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RequirementUpdate) SetNillableFeatureID

func (_u *RequirementUpdate) SetNillableFeatureID(v *string) *RequirementUpdate

SetNillableFeatureID sets the "feature_id" field if the given value is not nil.

func (*RequirementUpdate) SetNillableName

func (_u *RequirementUpdate) SetNillableName(v *string) *RequirementUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*RequirementUpdate) SetNillableOriginalEstimate

func (_u *RequirementUpdate) SetNillableOriginalEstimate(v *float64) *RequirementUpdate

SetNillableOriginalEstimate sets the "original_estimate" field if the given value is not nil.

func (*RequirementUpdate) SetNillablePosition

func (_u *RequirementUpdate) SetNillablePosition(v *int) *RequirementUpdate

SetNillablePosition sets the "position" field if the given value is not nil.

func (*RequirementUpdate) SetNillableProduct

func (_u *RequirementUpdate) SetNillableProduct(v *string) *RequirementUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*RequirementUpdate) SetNillableReferenceNum

func (_u *RequirementUpdate) SetNillableReferenceNum(v *string) *RequirementUpdate

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*RequirementUpdate) SetNillableRemainingEstimate

func (_u *RequirementUpdate) SetNillableRemainingEstimate(v *float64) *RequirementUpdate

SetNillableRemainingEstimate sets the "remaining_estimate" field if the given value is not nil.

func (*RequirementUpdate) SetNillableStatus

func (_u *RequirementUpdate) SetNillableStatus(v *string) *RequirementUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RequirementUpdate) SetNillableURL

func (_u *RequirementUpdate) SetNillableURL(v *string) *RequirementUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*RequirementUpdate) SetNillableUpdatedAt

func (_u *RequirementUpdate) SetNillableUpdatedAt(v *time.Time) *RequirementUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RequirementUpdate) SetNillableWorkDone

func (_u *RequirementUpdate) SetNillableWorkDone(v *float64) *RequirementUpdate

SetNillableWorkDone sets the "work_done" field if the given value is not nil.

func (*RequirementUpdate) SetOriginalEstimate

func (_u *RequirementUpdate) SetOriginalEstimate(v float64) *RequirementUpdate

SetOriginalEstimate sets the "original_estimate" field.

func (*RequirementUpdate) SetPosition

func (_u *RequirementUpdate) SetPosition(v int) *RequirementUpdate

SetPosition sets the "position" field.

func (*RequirementUpdate) SetProduct

func (_u *RequirementUpdate) SetProduct(v string) *RequirementUpdate

SetProduct sets the "product" field.

func (*RequirementUpdate) SetReferenceNum

func (_u *RequirementUpdate) SetReferenceNum(v string) *RequirementUpdate

SetReferenceNum sets the "reference_num" field.

func (*RequirementUpdate) SetRemainingEstimate

func (_u *RequirementUpdate) SetRemainingEstimate(v float64) *RequirementUpdate

SetRemainingEstimate sets the "remaining_estimate" field.

func (*RequirementUpdate) SetStatus

func (_u *RequirementUpdate) SetStatus(v string) *RequirementUpdate

SetStatus sets the "status" field.

func (*RequirementUpdate) SetURL

SetURL sets the "url" field.

func (*RequirementUpdate) SetUpdatedAt

func (_u *RequirementUpdate) SetUpdatedAt(v time.Time) *RequirementUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RequirementUpdate) SetWorkDone

func (_u *RequirementUpdate) SetWorkDone(v float64) *RequirementUpdate

SetWorkDone sets the "work_done" field.

func (*RequirementUpdate) Where

Where appends a list predicates to the RequirementUpdate builder.

type RequirementUpdateOne

type RequirementUpdateOne struct {
	// contains filtered or unexported fields
}

RequirementUpdateOne is the builder for updating a single Requirement entity.

func (*RequirementUpdateOne) AddOriginalEstimate

func (_u *RequirementUpdateOne) AddOriginalEstimate(v float64) *RequirementUpdateOne

AddOriginalEstimate adds value to the "original_estimate" field.

func (*RequirementUpdateOne) AddPosition

func (_u *RequirementUpdateOne) AddPosition(v int) *RequirementUpdateOne

AddPosition adds value to the "position" field.

func (*RequirementUpdateOne) AddRemainingEstimate

func (_u *RequirementUpdateOne) AddRemainingEstimate(v float64) *RequirementUpdateOne

AddRemainingEstimate adds value to the "remaining_estimate" field.

func (*RequirementUpdateOne) AddWorkDone

AddWorkDone adds value to the "work_done" field.

func (*RequirementUpdateOne) ClearAssignedTo

func (_u *RequirementUpdateOne) ClearAssignedTo() *RequirementUpdateOne

ClearAssignedTo clears the value of the "assigned_to" field.

func (*RequirementUpdateOne) ClearCreatedAt

func (_u *RequirementUpdateOne) ClearCreatedAt() *RequirementUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*RequirementUpdateOne) ClearData

func (_u *RequirementUpdateOne) ClearData() *RequirementUpdateOne

ClearData clears the value of the "data" field.

func (*RequirementUpdateOne) ClearDescription

func (_u *RequirementUpdateOne) ClearDescription() *RequirementUpdateOne

ClearDescription clears the value of the "description" field.

func (*RequirementUpdateOne) ClearFeatureID

func (_u *RequirementUpdateOne) ClearFeatureID() *RequirementUpdateOne

ClearFeatureID clears the value of the "feature_id" field.

func (*RequirementUpdateOne) ClearName

func (_u *RequirementUpdateOne) ClearName() *RequirementUpdateOne

ClearName clears the value of the "name" field.

func (*RequirementUpdateOne) ClearOriginalEstimate

func (_u *RequirementUpdateOne) ClearOriginalEstimate() *RequirementUpdateOne

ClearOriginalEstimate clears the value of the "original_estimate" field.

func (*RequirementUpdateOne) ClearPosition

func (_u *RequirementUpdateOne) ClearPosition() *RequirementUpdateOne

ClearPosition clears the value of the "position" field.

func (*RequirementUpdateOne) ClearReferenceNum

func (_u *RequirementUpdateOne) ClearReferenceNum() *RequirementUpdateOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*RequirementUpdateOne) ClearRemainingEstimate

func (_u *RequirementUpdateOne) ClearRemainingEstimate() *RequirementUpdateOne

ClearRemainingEstimate clears the value of the "remaining_estimate" field.

func (*RequirementUpdateOne) ClearStatus

func (_u *RequirementUpdateOne) ClearStatus() *RequirementUpdateOne

ClearStatus clears the value of the "status" field.

func (*RequirementUpdateOne) ClearURL

ClearURL clears the value of the "url" field.

func (*RequirementUpdateOne) ClearUpdatedAt

func (_u *RequirementUpdateOne) ClearUpdatedAt() *RequirementUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RequirementUpdateOne) ClearWorkDone

func (_u *RequirementUpdateOne) ClearWorkDone() *RequirementUpdateOne

ClearWorkDone clears the value of the "work_done" field.

func (*RequirementUpdateOne) Exec

func (_u *RequirementUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RequirementUpdateOne) ExecX

func (_u *RequirementUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequirementUpdateOne) Mutation

func (_u *RequirementUpdateOne) Mutation() *RequirementMutation

Mutation returns the RequirementMutation object of the builder.

func (*RequirementUpdateOne) Save

Save executes the query and returns the updated Requirement entity.

func (*RequirementUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RequirementUpdateOne) Select

func (_u *RequirementUpdateOne) Select(field string, fields ...string) *RequirementUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RequirementUpdateOne) SetAssignedTo

func (_u *RequirementUpdateOne) SetAssignedTo(v string) *RequirementUpdateOne

SetAssignedTo sets the "assigned_to" field.

func (*RequirementUpdateOne) SetCreatedAt

func (_u *RequirementUpdateOne) SetCreatedAt(v time.Time) *RequirementUpdateOne

SetCreatedAt sets the "created_at" field.

func (*RequirementUpdateOne) SetData

func (_u *RequirementUpdateOne) SetData(v map[string]interface{}) *RequirementUpdateOne

SetData sets the "data" field.

func (*RequirementUpdateOne) SetDescription

func (_u *RequirementUpdateOne) SetDescription(v string) *RequirementUpdateOne

SetDescription sets the "description" field.

func (*RequirementUpdateOne) SetFeatureID

func (_u *RequirementUpdateOne) SetFeatureID(v string) *RequirementUpdateOne

SetFeatureID sets the "feature_id" field.

func (*RequirementUpdateOne) SetName

SetName sets the "name" field.

func (*RequirementUpdateOne) SetNillableAssignedTo

func (_u *RequirementUpdateOne) SetNillableAssignedTo(v *string) *RequirementUpdateOne

SetNillableAssignedTo sets the "assigned_to" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableCreatedAt

func (_u *RequirementUpdateOne) SetNillableCreatedAt(v *time.Time) *RequirementUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableDescription

func (_u *RequirementUpdateOne) SetNillableDescription(v *string) *RequirementUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableFeatureID

func (_u *RequirementUpdateOne) SetNillableFeatureID(v *string) *RequirementUpdateOne

SetNillableFeatureID sets the "feature_id" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableName

func (_u *RequirementUpdateOne) SetNillableName(v *string) *RequirementUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableOriginalEstimate

func (_u *RequirementUpdateOne) SetNillableOriginalEstimate(v *float64) *RequirementUpdateOne

SetNillableOriginalEstimate sets the "original_estimate" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillablePosition

func (_u *RequirementUpdateOne) SetNillablePosition(v *int) *RequirementUpdateOne

SetNillablePosition sets the "position" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableProduct

func (_u *RequirementUpdateOne) SetNillableProduct(v *string) *RequirementUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableReferenceNum

func (_u *RequirementUpdateOne) SetNillableReferenceNum(v *string) *RequirementUpdateOne

SetNillableReferenceNum sets the "reference_num" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableRemainingEstimate

func (_u *RequirementUpdateOne) SetNillableRemainingEstimate(v *float64) *RequirementUpdateOne

SetNillableRemainingEstimate sets the "remaining_estimate" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableStatus

func (_u *RequirementUpdateOne) SetNillableStatus(v *string) *RequirementUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableURL

func (_u *RequirementUpdateOne) SetNillableURL(v *string) *RequirementUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableUpdatedAt

func (_u *RequirementUpdateOne) SetNillableUpdatedAt(v *time.Time) *RequirementUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RequirementUpdateOne) SetNillableWorkDone

func (_u *RequirementUpdateOne) SetNillableWorkDone(v *float64) *RequirementUpdateOne

SetNillableWorkDone sets the "work_done" field if the given value is not nil.

func (*RequirementUpdateOne) SetOriginalEstimate

func (_u *RequirementUpdateOne) SetOriginalEstimate(v float64) *RequirementUpdateOne

SetOriginalEstimate sets the "original_estimate" field.

func (*RequirementUpdateOne) SetPosition

func (_u *RequirementUpdateOne) SetPosition(v int) *RequirementUpdateOne

SetPosition sets the "position" field.

func (*RequirementUpdateOne) SetProduct

SetProduct sets the "product" field.

func (*RequirementUpdateOne) SetReferenceNum

func (_u *RequirementUpdateOne) SetReferenceNum(v string) *RequirementUpdateOne

SetReferenceNum sets the "reference_num" field.

func (*RequirementUpdateOne) SetRemainingEstimate

func (_u *RequirementUpdateOne) SetRemainingEstimate(v float64) *RequirementUpdateOne

SetRemainingEstimate sets the "remaining_estimate" field.

func (*RequirementUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*RequirementUpdateOne) SetURL

SetURL sets the "url" field.

func (*RequirementUpdateOne) SetUpdatedAt

func (_u *RequirementUpdateOne) SetUpdatedAt(v time.Time) *RequirementUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*RequirementUpdateOne) SetWorkDone

SetWorkDone sets the "work_done" field.

func (*RequirementUpdateOne) Where

Where appends a list predicates to the RequirementUpdate builder.

type RequirementUpsert

type RequirementUpsert struct {
	*sql.UpdateSet
}

RequirementUpsert is the "OnConflict" setter.

func (*RequirementUpsert) AddOriginalEstimate

func (u *RequirementUpsert) AddOriginalEstimate(v float64) *RequirementUpsert

AddOriginalEstimate adds v to the "original_estimate" field.

func (*RequirementUpsert) AddPosition

func (u *RequirementUpsert) AddPosition(v int) *RequirementUpsert

AddPosition adds v to the "position" field.

func (*RequirementUpsert) AddRemainingEstimate

func (u *RequirementUpsert) AddRemainingEstimate(v float64) *RequirementUpsert

AddRemainingEstimate adds v to the "remaining_estimate" field.

func (*RequirementUpsert) AddWorkDone

func (u *RequirementUpsert) AddWorkDone(v float64) *RequirementUpsert

AddWorkDone adds v to the "work_done" field.

func (*RequirementUpsert) ClearAssignedTo

func (u *RequirementUpsert) ClearAssignedTo() *RequirementUpsert

ClearAssignedTo clears the value of the "assigned_to" field.

func (*RequirementUpsert) ClearCreatedAt

func (u *RequirementUpsert) ClearCreatedAt() *RequirementUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*RequirementUpsert) ClearData

func (u *RequirementUpsert) ClearData() *RequirementUpsert

ClearData clears the value of the "data" field.

func (*RequirementUpsert) ClearDescription

func (u *RequirementUpsert) ClearDescription() *RequirementUpsert

ClearDescription clears the value of the "description" field.

func (*RequirementUpsert) ClearFeatureID

func (u *RequirementUpsert) ClearFeatureID() *RequirementUpsert

ClearFeatureID clears the value of the "feature_id" field.

func (*RequirementUpsert) ClearName

func (u *RequirementUpsert) ClearName() *RequirementUpsert

ClearName clears the value of the "name" field.

func (*RequirementUpsert) ClearOriginalEstimate

func (u *RequirementUpsert) ClearOriginalEstimate() *RequirementUpsert

ClearOriginalEstimate clears the value of the "original_estimate" field.

func (*RequirementUpsert) ClearPosition

func (u *RequirementUpsert) ClearPosition() *RequirementUpsert

ClearPosition clears the value of the "position" field.

func (*RequirementUpsert) ClearReferenceNum

func (u *RequirementUpsert) ClearReferenceNum() *RequirementUpsert

ClearReferenceNum clears the value of the "reference_num" field.

func (*RequirementUpsert) ClearRemainingEstimate

func (u *RequirementUpsert) ClearRemainingEstimate() *RequirementUpsert

ClearRemainingEstimate clears the value of the "remaining_estimate" field.

func (*RequirementUpsert) ClearStatus

func (u *RequirementUpsert) ClearStatus() *RequirementUpsert

ClearStatus clears the value of the "status" field.

func (*RequirementUpsert) ClearURL

func (u *RequirementUpsert) ClearURL() *RequirementUpsert

ClearURL clears the value of the "url" field.

func (*RequirementUpsert) ClearUpdatedAt

func (u *RequirementUpsert) ClearUpdatedAt() *RequirementUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RequirementUpsert) ClearWorkDone

func (u *RequirementUpsert) ClearWorkDone() *RequirementUpsert

ClearWorkDone clears the value of the "work_done" field.

func (*RequirementUpsert) SetAssignedTo

func (u *RequirementUpsert) SetAssignedTo(v string) *RequirementUpsert

SetAssignedTo sets the "assigned_to" field.

func (*RequirementUpsert) SetCreatedAt

func (u *RequirementUpsert) SetCreatedAt(v time.Time) *RequirementUpsert

SetCreatedAt sets the "created_at" field.

func (*RequirementUpsert) SetData

func (u *RequirementUpsert) SetData(v map[string]interface{}) *RequirementUpsert

SetData sets the "data" field.

func (*RequirementUpsert) SetDescription

func (u *RequirementUpsert) SetDescription(v string) *RequirementUpsert

SetDescription sets the "description" field.

func (*RequirementUpsert) SetFeatureID

func (u *RequirementUpsert) SetFeatureID(v string) *RequirementUpsert

SetFeatureID sets the "feature_id" field.

func (*RequirementUpsert) SetName

SetName sets the "name" field.

func (*RequirementUpsert) SetOriginalEstimate

func (u *RequirementUpsert) SetOriginalEstimate(v float64) *RequirementUpsert

SetOriginalEstimate sets the "original_estimate" field.

func (*RequirementUpsert) SetPosition

func (u *RequirementUpsert) SetPosition(v int) *RequirementUpsert

SetPosition sets the "position" field.

func (*RequirementUpsert) SetProduct

func (u *RequirementUpsert) SetProduct(v string) *RequirementUpsert

SetProduct sets the "product" field.

func (*RequirementUpsert) SetReferenceNum

func (u *RequirementUpsert) SetReferenceNum(v string) *RequirementUpsert

SetReferenceNum sets the "reference_num" field.

func (*RequirementUpsert) SetRemainingEstimate

func (u *RequirementUpsert) SetRemainingEstimate(v float64) *RequirementUpsert

SetRemainingEstimate sets the "remaining_estimate" field.

func (*RequirementUpsert) SetStatus

func (u *RequirementUpsert) SetStatus(v string) *RequirementUpsert

SetStatus sets the "status" field.

func (*RequirementUpsert) SetURL

SetURL sets the "url" field.

func (*RequirementUpsert) SetUpdatedAt

func (u *RequirementUpsert) SetUpdatedAt(v time.Time) *RequirementUpsert

SetUpdatedAt sets the "updated_at" field.

func (*RequirementUpsert) SetWorkDone

func (u *RequirementUpsert) SetWorkDone(v float64) *RequirementUpsert

SetWorkDone sets the "work_done" field.

func (*RequirementUpsert) UpdateAssignedTo

func (u *RequirementUpsert) UpdateAssignedTo() *RequirementUpsert

UpdateAssignedTo sets the "assigned_to" field to the value that was provided on create.

func (*RequirementUpsert) UpdateCreatedAt

func (u *RequirementUpsert) UpdateCreatedAt() *RequirementUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*RequirementUpsert) UpdateData

func (u *RequirementUpsert) UpdateData() *RequirementUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*RequirementUpsert) UpdateDescription

func (u *RequirementUpsert) UpdateDescription() *RequirementUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RequirementUpsert) UpdateFeatureID

func (u *RequirementUpsert) UpdateFeatureID() *RequirementUpsert

UpdateFeatureID sets the "feature_id" field to the value that was provided on create.

func (*RequirementUpsert) UpdateName

func (u *RequirementUpsert) UpdateName() *RequirementUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*RequirementUpsert) UpdateOriginalEstimate

func (u *RequirementUpsert) UpdateOriginalEstimate() *RequirementUpsert

UpdateOriginalEstimate sets the "original_estimate" field to the value that was provided on create.

func (*RequirementUpsert) UpdatePosition

func (u *RequirementUpsert) UpdatePosition() *RequirementUpsert

UpdatePosition sets the "position" field to the value that was provided on create.

func (*RequirementUpsert) UpdateProduct

func (u *RequirementUpsert) UpdateProduct() *RequirementUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*RequirementUpsert) UpdateReferenceNum

func (u *RequirementUpsert) UpdateReferenceNum() *RequirementUpsert

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*RequirementUpsert) UpdateRemainingEstimate

func (u *RequirementUpsert) UpdateRemainingEstimate() *RequirementUpsert

UpdateRemainingEstimate sets the "remaining_estimate" field to the value that was provided on create.

func (*RequirementUpsert) UpdateStatus

func (u *RequirementUpsert) UpdateStatus() *RequirementUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RequirementUpsert) UpdateURL

func (u *RequirementUpsert) UpdateURL() *RequirementUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*RequirementUpsert) UpdateUpdatedAt

func (u *RequirementUpsert) UpdateUpdatedAt() *RequirementUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RequirementUpsert) UpdateWorkDone

func (u *RequirementUpsert) UpdateWorkDone() *RequirementUpsert

UpdateWorkDone sets the "work_done" field to the value that was provided on create.

type RequirementUpsertBulk

type RequirementUpsertBulk struct {
	// contains filtered or unexported fields
}

RequirementUpsertBulk is the builder for "upsert"-ing a bulk of Requirement nodes.

func (*RequirementUpsertBulk) AddOriginalEstimate

func (u *RequirementUpsertBulk) AddOriginalEstimate(v float64) *RequirementUpsertBulk

AddOriginalEstimate adds v to the "original_estimate" field.

func (*RequirementUpsertBulk) AddPosition

func (u *RequirementUpsertBulk) AddPosition(v int) *RequirementUpsertBulk

AddPosition adds v to the "position" field.

func (*RequirementUpsertBulk) AddRemainingEstimate

func (u *RequirementUpsertBulk) AddRemainingEstimate(v float64) *RequirementUpsertBulk

AddRemainingEstimate adds v to the "remaining_estimate" field.

func (*RequirementUpsertBulk) AddWorkDone

AddWorkDone adds v to the "work_done" field.

func (*RequirementUpsertBulk) ClearAssignedTo

func (u *RequirementUpsertBulk) ClearAssignedTo() *RequirementUpsertBulk

ClearAssignedTo clears the value of the "assigned_to" field.

func (*RequirementUpsertBulk) ClearCreatedAt

func (u *RequirementUpsertBulk) ClearCreatedAt() *RequirementUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*RequirementUpsertBulk) ClearData

ClearData clears the value of the "data" field.

func (*RequirementUpsertBulk) ClearDescription

func (u *RequirementUpsertBulk) ClearDescription() *RequirementUpsertBulk

ClearDescription clears the value of the "description" field.

func (*RequirementUpsertBulk) ClearFeatureID

func (u *RequirementUpsertBulk) ClearFeatureID() *RequirementUpsertBulk

ClearFeatureID clears the value of the "feature_id" field.

func (*RequirementUpsertBulk) ClearName

ClearName clears the value of the "name" field.

func (*RequirementUpsertBulk) ClearOriginalEstimate

func (u *RequirementUpsertBulk) ClearOriginalEstimate() *RequirementUpsertBulk

ClearOriginalEstimate clears the value of the "original_estimate" field.

func (*RequirementUpsertBulk) ClearPosition

func (u *RequirementUpsertBulk) ClearPosition() *RequirementUpsertBulk

ClearPosition clears the value of the "position" field.

func (*RequirementUpsertBulk) ClearReferenceNum

func (u *RequirementUpsertBulk) ClearReferenceNum() *RequirementUpsertBulk

ClearReferenceNum clears the value of the "reference_num" field.

func (*RequirementUpsertBulk) ClearRemainingEstimate

func (u *RequirementUpsertBulk) ClearRemainingEstimate() *RequirementUpsertBulk

ClearRemainingEstimate clears the value of the "remaining_estimate" field.

func (*RequirementUpsertBulk) ClearStatus

func (u *RequirementUpsertBulk) ClearStatus() *RequirementUpsertBulk

ClearStatus clears the value of the "status" field.

func (*RequirementUpsertBulk) ClearURL

ClearURL clears the value of the "url" field.

func (*RequirementUpsertBulk) ClearUpdatedAt

func (u *RequirementUpsertBulk) ClearUpdatedAt() *RequirementUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RequirementUpsertBulk) ClearWorkDone

func (u *RequirementUpsertBulk) ClearWorkDone() *RequirementUpsertBulk

ClearWorkDone clears the value of the "work_done" field.

func (*RequirementUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RequirementUpsertBulk) Exec

Exec executes the query.

func (*RequirementUpsertBulk) ExecX

func (u *RequirementUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequirementUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Requirement.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RequirementUpsertBulk) SetAssignedTo

func (u *RequirementUpsertBulk) SetAssignedTo(v string) *RequirementUpsertBulk

SetAssignedTo sets the "assigned_to" field.

func (*RequirementUpsertBulk) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*RequirementUpsertBulk) SetData

func (u *RequirementUpsertBulk) SetData(v map[string]interface{}) *RequirementUpsertBulk

SetData sets the "data" field.

func (*RequirementUpsertBulk) SetDescription

func (u *RequirementUpsertBulk) SetDescription(v string) *RequirementUpsertBulk

SetDescription sets the "description" field.

func (*RequirementUpsertBulk) SetFeatureID

SetFeatureID sets the "feature_id" field.

func (*RequirementUpsertBulk) SetName

SetName sets the "name" field.

func (*RequirementUpsertBulk) SetOriginalEstimate

func (u *RequirementUpsertBulk) SetOriginalEstimate(v float64) *RequirementUpsertBulk

SetOriginalEstimate sets the "original_estimate" field.

func (*RequirementUpsertBulk) SetPosition

func (u *RequirementUpsertBulk) SetPosition(v int) *RequirementUpsertBulk

SetPosition sets the "position" field.

func (*RequirementUpsertBulk) SetProduct

SetProduct sets the "product" field.

func (*RequirementUpsertBulk) SetReferenceNum

func (u *RequirementUpsertBulk) SetReferenceNum(v string) *RequirementUpsertBulk

SetReferenceNum sets the "reference_num" field.

func (*RequirementUpsertBulk) SetRemainingEstimate

func (u *RequirementUpsertBulk) SetRemainingEstimate(v float64) *RequirementUpsertBulk

SetRemainingEstimate sets the "remaining_estimate" field.

func (*RequirementUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*RequirementUpsertBulk) SetURL

SetURL sets the "url" field.

func (*RequirementUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*RequirementUpsertBulk) SetWorkDone

SetWorkDone sets the "work_done" field.

func (*RequirementUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the RequirementCreateBulk.OnConflict documentation for more info.

func (*RequirementUpsertBulk) UpdateAssignedTo

func (u *RequirementUpsertBulk) UpdateAssignedTo() *RequirementUpsertBulk

UpdateAssignedTo sets the "assigned_to" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateCreatedAt

func (u *RequirementUpsertBulk) UpdateCreatedAt() *RequirementUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateData

UpdateData sets the "data" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateDescription

func (u *RequirementUpsertBulk) UpdateDescription() *RequirementUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateFeatureID

func (u *RequirementUpsertBulk) UpdateFeatureID() *RequirementUpsertBulk

UpdateFeatureID sets the "feature_id" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateNewValues

func (u *RequirementUpsertBulk) UpdateNewValues() *RequirementUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Requirement.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(requirement.FieldID)
		}),
	).
	Exec(ctx)

func (*RequirementUpsertBulk) UpdateOriginalEstimate

func (u *RequirementUpsertBulk) UpdateOriginalEstimate() *RequirementUpsertBulk

UpdateOriginalEstimate sets the "original_estimate" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdatePosition

func (u *RequirementUpsertBulk) UpdatePosition() *RequirementUpsertBulk

UpdatePosition sets the "position" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateProduct

func (u *RequirementUpsertBulk) UpdateProduct() *RequirementUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateReferenceNum

func (u *RequirementUpsertBulk) UpdateReferenceNum() *RequirementUpsertBulk

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateRemainingEstimate

func (u *RequirementUpsertBulk) UpdateRemainingEstimate() *RequirementUpsertBulk

UpdateRemainingEstimate sets the "remaining_estimate" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateStatus

func (u *RequirementUpsertBulk) UpdateStatus() *RequirementUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateUpdatedAt

func (u *RequirementUpsertBulk) UpdateUpdatedAt() *RequirementUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RequirementUpsertBulk) UpdateWorkDone

func (u *RequirementUpsertBulk) UpdateWorkDone() *RequirementUpsertBulk

UpdateWorkDone sets the "work_done" field to the value that was provided on create.

type RequirementUpsertOne

type RequirementUpsertOne struct {
	// contains filtered or unexported fields
}

RequirementUpsertOne is the builder for "upsert"-ing

one Requirement node.

func (*RequirementUpsertOne) AddOriginalEstimate

func (u *RequirementUpsertOne) AddOriginalEstimate(v float64) *RequirementUpsertOne

AddOriginalEstimate adds v to the "original_estimate" field.

func (*RequirementUpsertOne) AddPosition

func (u *RequirementUpsertOne) AddPosition(v int) *RequirementUpsertOne

AddPosition adds v to the "position" field.

func (*RequirementUpsertOne) AddRemainingEstimate

func (u *RequirementUpsertOne) AddRemainingEstimate(v float64) *RequirementUpsertOne

AddRemainingEstimate adds v to the "remaining_estimate" field.

func (*RequirementUpsertOne) AddWorkDone

AddWorkDone adds v to the "work_done" field.

func (*RequirementUpsertOne) ClearAssignedTo

func (u *RequirementUpsertOne) ClearAssignedTo() *RequirementUpsertOne

ClearAssignedTo clears the value of the "assigned_to" field.

func (*RequirementUpsertOne) ClearCreatedAt

func (u *RequirementUpsertOne) ClearCreatedAt() *RequirementUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*RequirementUpsertOne) ClearData

ClearData clears the value of the "data" field.

func (*RequirementUpsertOne) ClearDescription

func (u *RequirementUpsertOne) ClearDescription() *RequirementUpsertOne

ClearDescription clears the value of the "description" field.

func (*RequirementUpsertOne) ClearFeatureID

func (u *RequirementUpsertOne) ClearFeatureID() *RequirementUpsertOne

ClearFeatureID clears the value of the "feature_id" field.

func (*RequirementUpsertOne) ClearName

ClearName clears the value of the "name" field.

func (*RequirementUpsertOne) ClearOriginalEstimate

func (u *RequirementUpsertOne) ClearOriginalEstimate() *RequirementUpsertOne

ClearOriginalEstimate clears the value of the "original_estimate" field.

func (*RequirementUpsertOne) ClearPosition

func (u *RequirementUpsertOne) ClearPosition() *RequirementUpsertOne

ClearPosition clears the value of the "position" field.

func (*RequirementUpsertOne) ClearReferenceNum

func (u *RequirementUpsertOne) ClearReferenceNum() *RequirementUpsertOne

ClearReferenceNum clears the value of the "reference_num" field.

func (*RequirementUpsertOne) ClearRemainingEstimate

func (u *RequirementUpsertOne) ClearRemainingEstimate() *RequirementUpsertOne

ClearRemainingEstimate clears the value of the "remaining_estimate" field.

func (*RequirementUpsertOne) ClearStatus

func (u *RequirementUpsertOne) ClearStatus() *RequirementUpsertOne

ClearStatus clears the value of the "status" field.

func (*RequirementUpsertOne) ClearURL

ClearURL clears the value of the "url" field.

func (*RequirementUpsertOne) ClearUpdatedAt

func (u *RequirementUpsertOne) ClearUpdatedAt() *RequirementUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RequirementUpsertOne) ClearWorkDone

func (u *RequirementUpsertOne) ClearWorkDone() *RequirementUpsertOne

ClearWorkDone clears the value of the "work_done" field.

func (*RequirementUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RequirementUpsertOne) Exec

Exec executes the query.

func (*RequirementUpsertOne) ExecX

func (u *RequirementUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequirementUpsertOne) ID

func (u *RequirementUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RequirementUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*RequirementUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Requirement.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RequirementUpsertOne) SetAssignedTo

func (u *RequirementUpsertOne) SetAssignedTo(v string) *RequirementUpsertOne

SetAssignedTo sets the "assigned_to" field.

func (*RequirementUpsertOne) SetCreatedAt

func (u *RequirementUpsertOne) SetCreatedAt(v time.Time) *RequirementUpsertOne

SetCreatedAt sets the "created_at" field.

func (*RequirementUpsertOne) SetData

func (u *RequirementUpsertOne) SetData(v map[string]interface{}) *RequirementUpsertOne

SetData sets the "data" field.

func (*RequirementUpsertOne) SetDescription

func (u *RequirementUpsertOne) SetDescription(v string) *RequirementUpsertOne

SetDescription sets the "description" field.

func (*RequirementUpsertOne) SetFeatureID

func (u *RequirementUpsertOne) SetFeatureID(v string) *RequirementUpsertOne

SetFeatureID sets the "feature_id" field.

func (*RequirementUpsertOne) SetName

SetName sets the "name" field.

func (*RequirementUpsertOne) SetOriginalEstimate

func (u *RequirementUpsertOne) SetOriginalEstimate(v float64) *RequirementUpsertOne

SetOriginalEstimate sets the "original_estimate" field.

func (*RequirementUpsertOne) SetPosition

func (u *RequirementUpsertOne) SetPosition(v int) *RequirementUpsertOne

SetPosition sets the "position" field.

func (*RequirementUpsertOne) SetProduct

SetProduct sets the "product" field.

func (*RequirementUpsertOne) SetReferenceNum

func (u *RequirementUpsertOne) SetReferenceNum(v string) *RequirementUpsertOne

SetReferenceNum sets the "reference_num" field.

func (*RequirementUpsertOne) SetRemainingEstimate

func (u *RequirementUpsertOne) SetRemainingEstimate(v float64) *RequirementUpsertOne

SetRemainingEstimate sets the "remaining_estimate" field.

func (*RequirementUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*RequirementUpsertOne) SetURL

SetURL sets the "url" field.

func (*RequirementUpsertOne) SetUpdatedAt

func (u *RequirementUpsertOne) SetUpdatedAt(v time.Time) *RequirementUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*RequirementUpsertOne) SetWorkDone

SetWorkDone sets the "work_done" field.

func (*RequirementUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the RequirementCreate.OnConflict documentation for more info.

func (*RequirementUpsertOne) UpdateAssignedTo

func (u *RequirementUpsertOne) UpdateAssignedTo() *RequirementUpsertOne

UpdateAssignedTo sets the "assigned_to" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateCreatedAt

func (u *RequirementUpsertOne) UpdateCreatedAt() *RequirementUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateData

func (u *RequirementUpsertOne) UpdateData() *RequirementUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateDescription

func (u *RequirementUpsertOne) UpdateDescription() *RequirementUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateFeatureID

func (u *RequirementUpsertOne) UpdateFeatureID() *RequirementUpsertOne

UpdateFeatureID sets the "feature_id" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateName

func (u *RequirementUpsertOne) UpdateName() *RequirementUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateNewValues

func (u *RequirementUpsertOne) UpdateNewValues() *RequirementUpsertOne

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.Requirement.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(requirement.FieldID)
		}),
	).
	Exec(ctx)

func (*RequirementUpsertOne) UpdateOriginalEstimate

func (u *RequirementUpsertOne) UpdateOriginalEstimate() *RequirementUpsertOne

UpdateOriginalEstimate sets the "original_estimate" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdatePosition

func (u *RequirementUpsertOne) UpdatePosition() *RequirementUpsertOne

UpdatePosition sets the "position" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateProduct

func (u *RequirementUpsertOne) UpdateProduct() *RequirementUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateReferenceNum

func (u *RequirementUpsertOne) UpdateReferenceNum() *RequirementUpsertOne

UpdateReferenceNum sets the "reference_num" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateRemainingEstimate

func (u *RequirementUpsertOne) UpdateRemainingEstimate() *RequirementUpsertOne

UpdateRemainingEstimate sets the "remaining_estimate" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateStatus

func (u *RequirementUpsertOne) UpdateStatus() *RequirementUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateUpdatedAt

func (u *RequirementUpsertOne) UpdateUpdatedAt() *RequirementUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RequirementUpsertOne) UpdateWorkDone

func (u *RequirementUpsertOne) UpdateWorkDone() *RequirementUpsertOne

UpdateWorkDone sets the "work_done" field to the value that was provided on create.

type Requirements

type Requirements []*Requirement

Requirements is a parsable slice of Requirement.

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 SavedFilter

type SavedFilter struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Aql holds the value of the "aql" field.
	Aql string `json:"aql,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// IsFavorite holds the value of the "is_favorite" field.
	IsFavorite bool `json:"is_favorite,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

SavedFilter is the model entity for the SavedFilter schema.

func (*SavedFilter) String

func (_m *SavedFilter) String() string

String implements the fmt.Stringer.

func (*SavedFilter) Unwrap

func (_m *SavedFilter) Unwrap() *SavedFilter

Unwrap unwraps the SavedFilter 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 (*SavedFilter) Update

func (_m *SavedFilter) Update() *SavedFilterUpdateOne

Update returns a builder for updating this SavedFilter. Note that you need to call SavedFilter.Unwrap() before calling this method if this SavedFilter was returned from a transaction, and the transaction was committed or rolled back.

func (*SavedFilter) Value

func (_m *SavedFilter) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SavedFilter. This includes values selected through modifiers, order, etc.

type SavedFilterClient

type SavedFilterClient struct {
	// contains filtered or unexported fields
}

SavedFilterClient is a client for the SavedFilter schema.

func NewSavedFilterClient

func NewSavedFilterClient(c config) *SavedFilterClient

NewSavedFilterClient returns a client for the SavedFilter from the given config.

func (*SavedFilterClient) Create

func (c *SavedFilterClient) Create() *SavedFilterCreate

Create returns a builder for creating a SavedFilter entity.

func (*SavedFilterClient) CreateBulk

func (c *SavedFilterClient) CreateBulk(builders ...*SavedFilterCreate) *SavedFilterCreateBulk

CreateBulk returns a builder for creating a bulk of SavedFilter entities.

func (*SavedFilterClient) Delete

func (c *SavedFilterClient) Delete() *SavedFilterDelete

Delete returns a delete builder for SavedFilter.

func (*SavedFilterClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SavedFilterClient) DeleteOneID

func (c *SavedFilterClient) DeleteOneID(id string) *SavedFilterDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SavedFilterClient) Get

Get returns a SavedFilter entity by its id.

func (*SavedFilterClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SavedFilterClient) Hooks

func (c *SavedFilterClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SavedFilterClient) Intercept

func (c *SavedFilterClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `savedfilter.Intercept(f(g(h())))`.

func (*SavedFilterClient) Interceptors

func (c *SavedFilterClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SavedFilterClient) MapCreateBulk

func (c *SavedFilterClient) MapCreateBulk(slice any, setFunc func(*SavedFilterCreate, int)) *SavedFilterCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SavedFilterClient) Query

func (c *SavedFilterClient) Query() *SavedFilterQuery

Query returns a query builder for SavedFilter.

func (*SavedFilterClient) Update

func (c *SavedFilterClient) Update() *SavedFilterUpdate

Update returns an update builder for SavedFilter.

func (*SavedFilterClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SavedFilterClient) UpdateOneID

func (c *SavedFilterClient) UpdateOneID(id string) *SavedFilterUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SavedFilterClient) Use

func (c *SavedFilterClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `savedfilter.Hooks(f(g(h())))`.

type SavedFilterCreate

type SavedFilterCreate struct {
	// contains filtered or unexported fields
}

SavedFilterCreate is the builder for creating a SavedFilter entity.

func (*SavedFilterCreate) Exec

func (_c *SavedFilterCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SavedFilterCreate) ExecX

func (_c *SavedFilterCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterCreate) Mutation

func (_c *SavedFilterCreate) Mutation() *SavedFilterMutation

Mutation returns the SavedFilterMutation object of the builder.

func (*SavedFilterCreate) OnConflict

func (_c *SavedFilterCreate) OnConflict(opts ...sql.ConflictOption) *SavedFilterUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SavedFilter.Create().
	SetName(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.SavedFilterUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*SavedFilterCreate) OnConflictColumns

func (_c *SavedFilterCreate) OnConflictColumns(columns ...string) *SavedFilterUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SavedFilter.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SavedFilterCreate) Save

Save creates the SavedFilter in the database.

func (*SavedFilterCreate) SaveX

func (_c *SavedFilterCreate) SaveX(ctx context.Context) *SavedFilter

SaveX calls Save and panics if Save returns an error.

func (*SavedFilterCreate) SetAql

SetAql sets the "aql" field.

func (*SavedFilterCreate) SetCreatedAt

func (_c *SavedFilterCreate) SetCreatedAt(v time.Time) *SavedFilterCreate

SetCreatedAt sets the "created_at" field.

func (*SavedFilterCreate) SetDescription

func (_c *SavedFilterCreate) SetDescription(v string) *SavedFilterCreate

SetDescription sets the "description" field.

func (*SavedFilterCreate) SetID

SetID sets the "id" field.

func (*SavedFilterCreate) SetIsFavorite

func (_c *SavedFilterCreate) SetIsFavorite(v bool) *SavedFilterCreate

SetIsFavorite sets the "is_favorite" field.

func (*SavedFilterCreate) SetName

func (_c *SavedFilterCreate) SetName(v string) *SavedFilterCreate

SetName sets the "name" field.

func (*SavedFilterCreate) SetNillableCreatedAt

func (_c *SavedFilterCreate) SetNillableCreatedAt(v *time.Time) *SavedFilterCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SavedFilterCreate) SetNillableDescription

func (_c *SavedFilterCreate) SetNillableDescription(v *string) *SavedFilterCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SavedFilterCreate) SetNillableIsFavorite

func (_c *SavedFilterCreate) SetNillableIsFavorite(v *bool) *SavedFilterCreate

SetNillableIsFavorite sets the "is_favorite" field if the given value is not nil.

func (*SavedFilterCreate) SetNillableProduct

func (_c *SavedFilterCreate) SetNillableProduct(v *string) *SavedFilterCreate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*SavedFilterCreate) SetNillableUpdatedAt

func (_c *SavedFilterCreate) SetNillableUpdatedAt(v *time.Time) *SavedFilterCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SavedFilterCreate) SetProduct

func (_c *SavedFilterCreate) SetProduct(v string) *SavedFilterCreate

SetProduct sets the "product" field.

func (*SavedFilterCreate) SetUpdatedAt

func (_c *SavedFilterCreate) SetUpdatedAt(v time.Time) *SavedFilterCreate

SetUpdatedAt sets the "updated_at" field.

type SavedFilterCreateBulk

type SavedFilterCreateBulk struct {
	// contains filtered or unexported fields
}

SavedFilterCreateBulk is the builder for creating many SavedFilter entities in bulk.

func (*SavedFilterCreateBulk) Exec

Exec executes the query.

func (*SavedFilterCreateBulk) ExecX

func (_c *SavedFilterCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SavedFilter.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.SavedFilterUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*SavedFilterCreateBulk) OnConflictColumns

func (_c *SavedFilterCreateBulk) OnConflictColumns(columns ...string) *SavedFilterUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SavedFilter.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SavedFilterCreateBulk) Save

Save creates the SavedFilter entities in the database.

func (*SavedFilterCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type SavedFilterDelete

type SavedFilterDelete struct {
	// contains filtered or unexported fields
}

SavedFilterDelete is the builder for deleting a SavedFilter entity.

func (*SavedFilterDelete) Exec

func (_d *SavedFilterDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SavedFilterDelete) ExecX

func (_d *SavedFilterDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterDelete) Where

Where appends a list predicates to the SavedFilterDelete builder.

type SavedFilterDeleteOne

type SavedFilterDeleteOne struct {
	// contains filtered or unexported fields
}

SavedFilterDeleteOne is the builder for deleting a single SavedFilter entity.

func (*SavedFilterDeleteOne) Exec

func (_d *SavedFilterDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SavedFilterDeleteOne) ExecX

func (_d *SavedFilterDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterDeleteOne) Where

Where appends a list predicates to the SavedFilterDelete builder.

type SavedFilterGroupBy

type SavedFilterGroupBy struct {
	// contains filtered or unexported fields
}

SavedFilterGroupBy is the group-by builder for SavedFilter entities.

func (*SavedFilterGroupBy) Aggregate

func (_g *SavedFilterGroupBy) Aggregate(fns ...AggregateFunc) *SavedFilterGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SavedFilterGroupBy) Bool

func (s *SavedFilterGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) BoolX

func (s *SavedFilterGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SavedFilterGroupBy) Bools

func (s *SavedFilterGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) BoolsX

func (s *SavedFilterGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SavedFilterGroupBy) Float64

func (s *SavedFilterGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) Float64X

func (s *SavedFilterGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SavedFilterGroupBy) Float64s

func (s *SavedFilterGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) Float64sX

func (s *SavedFilterGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SavedFilterGroupBy) Int

func (s *SavedFilterGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) IntX

func (s *SavedFilterGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SavedFilterGroupBy) Ints

func (s *SavedFilterGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) IntsX

func (s *SavedFilterGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SavedFilterGroupBy) Scan

func (_g *SavedFilterGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SavedFilterGroupBy) ScanX

func (s *SavedFilterGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SavedFilterGroupBy) String

func (s *SavedFilterGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) StringX

func (s *SavedFilterGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SavedFilterGroupBy) Strings

func (s *SavedFilterGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SavedFilterGroupBy) StringsX

func (s *SavedFilterGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SavedFilterMutation

type SavedFilterMutation struct {
	// contains filtered or unexported fields
}

SavedFilterMutation represents an operation that mutates the SavedFilter nodes in the graph.

func (*SavedFilterMutation) AddField

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) AddedEdges

func (m *SavedFilterMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SavedFilterMutation) AddedField

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) AddedFields

func (m *SavedFilterMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SavedFilterMutation) AddedIDs

func (m *SavedFilterMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SavedFilterMutation) Aql

func (m *SavedFilterMutation) Aql() (r string, exists bool)

Aql returns the value of the "aql" field in the mutation.

func (*SavedFilterMutation) ClearDescription

func (m *SavedFilterMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*SavedFilterMutation) ClearEdge

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) ClearField

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) ClearIsFavorite

func (m *SavedFilterMutation) ClearIsFavorite()

ClearIsFavorite clears the value of the "is_favorite" field.

func (*SavedFilterMutation) ClearProduct

func (m *SavedFilterMutation) ClearProduct()

ClearProduct clears the value of the "product" field.

func (*SavedFilterMutation) ClearedEdges

func (m *SavedFilterMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SavedFilterMutation) ClearedFields

func (m *SavedFilterMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SavedFilterMutation) Client

func (m SavedFilterMutation) 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 (*SavedFilterMutation) CreatedAt

func (m *SavedFilterMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SavedFilterMutation) Description

func (m *SavedFilterMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*SavedFilterMutation) DescriptionCleared

func (m *SavedFilterMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*SavedFilterMutation) EdgeCleared

func (m *SavedFilterMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SavedFilterMutation) Field

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) FieldCleared

func (m *SavedFilterMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SavedFilterMutation) Fields

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) ID

func (m *SavedFilterMutation) ID() (id string, 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 (*SavedFilterMutation) IDs

func (m *SavedFilterMutation) IDs(ctx context.Context) ([]string, 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 (*SavedFilterMutation) IsFavorite

func (m *SavedFilterMutation) IsFavorite() (r bool, exists bool)

IsFavorite returns the value of the "is_favorite" field in the mutation.

func (*SavedFilterMutation) IsFavoriteCleared

func (m *SavedFilterMutation) IsFavoriteCleared() bool

IsFavoriteCleared returns if the "is_favorite" field was cleared in this mutation.

func (*SavedFilterMutation) Name

func (m *SavedFilterMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SavedFilterMutation) OldAql

func (m *SavedFilterMutation) OldAql(ctx context.Context) (v string, err error)

OldAql returns the old "aql" field's value of the SavedFilter entity. If the SavedFilter 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 (*SavedFilterMutation) OldCreatedAt

func (m *SavedFilterMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the SavedFilter entity. If the SavedFilter 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 (*SavedFilterMutation) OldDescription

func (m *SavedFilterMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the SavedFilter entity. If the SavedFilter 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 (*SavedFilterMutation) OldField

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) OldIsFavorite

func (m *SavedFilterMutation) OldIsFavorite(ctx context.Context) (v bool, err error)

OldIsFavorite returns the old "is_favorite" field's value of the SavedFilter entity. If the SavedFilter 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 (*SavedFilterMutation) OldName

func (m *SavedFilterMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the SavedFilter entity. If the SavedFilter 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 (*SavedFilterMutation) OldProduct

func (m *SavedFilterMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the SavedFilter entity. If the SavedFilter 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 (*SavedFilterMutation) OldUpdatedAt

func (m *SavedFilterMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the SavedFilter entity. If the SavedFilter 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 (*SavedFilterMutation) Op

func (m *SavedFilterMutation) Op() Op

Op returns the operation name.

func (*SavedFilterMutation) Product

func (m *SavedFilterMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*SavedFilterMutation) ProductCleared

func (m *SavedFilterMutation) ProductCleared() bool

ProductCleared returns if the "product" field was cleared in this mutation.

func (*SavedFilterMutation) RemovedEdges

func (m *SavedFilterMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SavedFilterMutation) RemovedIDs

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) ResetAql

func (m *SavedFilterMutation) ResetAql()

ResetAql resets all changes to the "aql" field.

func (*SavedFilterMutation) ResetCreatedAt

func (m *SavedFilterMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SavedFilterMutation) ResetDescription

func (m *SavedFilterMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*SavedFilterMutation) ResetEdge

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) ResetField

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) ResetIsFavorite

func (m *SavedFilterMutation) ResetIsFavorite()

ResetIsFavorite resets all changes to the "is_favorite" field.

func (*SavedFilterMutation) ResetName

func (m *SavedFilterMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SavedFilterMutation) ResetProduct

func (m *SavedFilterMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*SavedFilterMutation) ResetUpdatedAt

func (m *SavedFilterMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SavedFilterMutation) SetAql

func (m *SavedFilterMutation) SetAql(s string)

SetAql sets the "aql" field.

func (*SavedFilterMutation) SetCreatedAt

func (m *SavedFilterMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SavedFilterMutation) SetDescription

func (m *SavedFilterMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*SavedFilterMutation) SetField

func (m *SavedFilterMutation) 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 (*SavedFilterMutation) SetID

func (m *SavedFilterMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SavedFilter entities.

func (*SavedFilterMutation) SetIsFavorite

func (m *SavedFilterMutation) SetIsFavorite(b bool)

SetIsFavorite sets the "is_favorite" field.

func (*SavedFilterMutation) SetName

func (m *SavedFilterMutation) SetName(s string)

SetName sets the "name" field.

func (*SavedFilterMutation) SetOp

func (m *SavedFilterMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SavedFilterMutation) SetProduct

func (m *SavedFilterMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*SavedFilterMutation) SetUpdatedAt

func (m *SavedFilterMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (SavedFilterMutation) Tx

func (m SavedFilterMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SavedFilterMutation) Type

func (m *SavedFilterMutation) Type() string

Type returns the node type of this mutation (SavedFilter).

func (*SavedFilterMutation) UpdatedAt

func (m *SavedFilterMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SavedFilterMutation) Where

func (m *SavedFilterMutation) Where(ps ...predicate.SavedFilter)

Where appends a list predicates to the SavedFilterMutation builder.

func (*SavedFilterMutation) WhereP

func (m *SavedFilterMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SavedFilterMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SavedFilterQuery

type SavedFilterQuery struct {
	// contains filtered or unexported fields
}

SavedFilterQuery is the builder for querying SavedFilter entities.

func (*SavedFilterQuery) Aggregate

func (_q *SavedFilterQuery) Aggregate(fns ...AggregateFunc) *SavedFilterSelect

Aggregate returns a SavedFilterSelect configured with the given aggregations.

func (*SavedFilterQuery) All

func (_q *SavedFilterQuery) All(ctx context.Context) ([]*SavedFilter, error)

All executes the query and returns a list of SavedFilters.

func (*SavedFilterQuery) AllX

func (_q *SavedFilterQuery) AllX(ctx context.Context) []*SavedFilter

AllX is like All, but panics if an error occurs.

func (*SavedFilterQuery) Clone

func (_q *SavedFilterQuery) Clone() *SavedFilterQuery

Clone returns a duplicate of the SavedFilterQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SavedFilterQuery) Count

func (_q *SavedFilterQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SavedFilterQuery) CountX

func (_q *SavedFilterQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SavedFilterQuery) Exist

func (_q *SavedFilterQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SavedFilterQuery) ExistX

func (_q *SavedFilterQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SavedFilterQuery) First

func (_q *SavedFilterQuery) First(ctx context.Context) (*SavedFilter, error)

First returns the first SavedFilter entity from the query. Returns a *NotFoundError when no SavedFilter was found.

func (*SavedFilterQuery) FirstID

func (_q *SavedFilterQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first SavedFilter ID from the query. Returns a *NotFoundError when no SavedFilter ID was found.

func (*SavedFilterQuery) FirstIDX

func (_q *SavedFilterQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SavedFilterQuery) FirstX

func (_q *SavedFilterQuery) FirstX(ctx context.Context) *SavedFilter

FirstX is like First, but panics if an error occurs.

func (*SavedFilterQuery) GroupBy

func (_q *SavedFilterQuery) GroupBy(field string, fields ...string) *SavedFilterGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SavedFilter.Query().
	GroupBy(savedfilter.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SavedFilterQuery) IDs

func (_q *SavedFilterQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of SavedFilter IDs.

func (*SavedFilterQuery) IDsX

func (_q *SavedFilterQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SavedFilterQuery) Limit

func (_q *SavedFilterQuery) Limit(limit int) *SavedFilterQuery

Limit the number of records to be returned by this query.

func (*SavedFilterQuery) Offset

func (_q *SavedFilterQuery) Offset(offset int) *SavedFilterQuery

Offset to start from.

func (*SavedFilterQuery) Only

func (_q *SavedFilterQuery) Only(ctx context.Context) (*SavedFilter, error)

Only returns a single SavedFilter entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SavedFilter entity is found. Returns a *NotFoundError when no SavedFilter entities are found.

func (*SavedFilterQuery) OnlyID

func (_q *SavedFilterQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only SavedFilter ID in the query. Returns a *NotSingularError when more than one SavedFilter ID is found. Returns a *NotFoundError when no entities are found.

func (*SavedFilterQuery) OnlyIDX

func (_q *SavedFilterQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SavedFilterQuery) OnlyX

func (_q *SavedFilterQuery) OnlyX(ctx context.Context) *SavedFilter

OnlyX is like Only, but panics if an error occurs.

func (*SavedFilterQuery) Order

Order specifies how the records should be ordered.

func (*SavedFilterQuery) Select

func (_q *SavedFilterQuery) Select(fields ...string) *SavedFilterSelect

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 {
	Name string `json:"name,omitempty"`
}

client.SavedFilter.Query().
	Select(savedfilter.FieldName).
	Scan(ctx, &v)

func (*SavedFilterQuery) Unique

func (_q *SavedFilterQuery) Unique(unique bool) *SavedFilterQuery

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 (*SavedFilterQuery) Where

Where adds a new predicate for the SavedFilterQuery builder.

type SavedFilterSelect

type SavedFilterSelect struct {
	*SavedFilterQuery
	// contains filtered or unexported fields
}

SavedFilterSelect is the builder for selecting fields of SavedFilter entities.

func (*SavedFilterSelect) Aggregate

func (_s *SavedFilterSelect) Aggregate(fns ...AggregateFunc) *SavedFilterSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SavedFilterSelect) Bool

func (s *SavedFilterSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) BoolX

func (s *SavedFilterSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SavedFilterSelect) Bools

func (s *SavedFilterSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) BoolsX

func (s *SavedFilterSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SavedFilterSelect) Float64

func (s *SavedFilterSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) Float64X

func (s *SavedFilterSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SavedFilterSelect) Float64s

func (s *SavedFilterSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) Float64sX

func (s *SavedFilterSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SavedFilterSelect) Int

func (s *SavedFilterSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) IntX

func (s *SavedFilterSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SavedFilterSelect) Ints

func (s *SavedFilterSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) IntsX

func (s *SavedFilterSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SavedFilterSelect) Scan

func (_s *SavedFilterSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SavedFilterSelect) ScanX

func (s *SavedFilterSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SavedFilterSelect) String

func (s *SavedFilterSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) StringX

func (s *SavedFilterSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SavedFilterSelect) Strings

func (s *SavedFilterSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SavedFilterSelect) StringsX

func (s *SavedFilterSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SavedFilterUpdate

type SavedFilterUpdate struct {
	// contains filtered or unexported fields
}

SavedFilterUpdate is the builder for updating SavedFilter entities.

func (*SavedFilterUpdate) ClearDescription

func (_u *SavedFilterUpdate) ClearDescription() *SavedFilterUpdate

ClearDescription clears the value of the "description" field.

func (*SavedFilterUpdate) ClearIsFavorite

func (_u *SavedFilterUpdate) ClearIsFavorite() *SavedFilterUpdate

ClearIsFavorite clears the value of the "is_favorite" field.

func (*SavedFilterUpdate) ClearProduct

func (_u *SavedFilterUpdate) ClearProduct() *SavedFilterUpdate

ClearProduct clears the value of the "product" field.

func (*SavedFilterUpdate) Exec

func (_u *SavedFilterUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SavedFilterUpdate) ExecX

func (_u *SavedFilterUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterUpdate) Mutation

func (_u *SavedFilterUpdate) Mutation() *SavedFilterMutation

Mutation returns the SavedFilterMutation object of the builder.

func (*SavedFilterUpdate) Save

func (_u *SavedFilterUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SavedFilterUpdate) SaveX

func (_u *SavedFilterUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SavedFilterUpdate) SetAql

SetAql sets the "aql" field.

func (*SavedFilterUpdate) SetCreatedAt

func (_u *SavedFilterUpdate) SetCreatedAt(v time.Time) *SavedFilterUpdate

SetCreatedAt sets the "created_at" field.

func (*SavedFilterUpdate) SetDescription

func (_u *SavedFilterUpdate) SetDescription(v string) *SavedFilterUpdate

SetDescription sets the "description" field.

func (*SavedFilterUpdate) SetIsFavorite

func (_u *SavedFilterUpdate) SetIsFavorite(v bool) *SavedFilterUpdate

SetIsFavorite sets the "is_favorite" field.

func (*SavedFilterUpdate) SetName

func (_u *SavedFilterUpdate) SetName(v string) *SavedFilterUpdate

SetName sets the "name" field.

func (*SavedFilterUpdate) SetNillableAql

func (_u *SavedFilterUpdate) SetNillableAql(v *string) *SavedFilterUpdate

SetNillableAql sets the "aql" field if the given value is not nil.

func (*SavedFilterUpdate) SetNillableCreatedAt

func (_u *SavedFilterUpdate) SetNillableCreatedAt(v *time.Time) *SavedFilterUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SavedFilterUpdate) SetNillableDescription

func (_u *SavedFilterUpdate) SetNillableDescription(v *string) *SavedFilterUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SavedFilterUpdate) SetNillableIsFavorite

func (_u *SavedFilterUpdate) SetNillableIsFavorite(v *bool) *SavedFilterUpdate

SetNillableIsFavorite sets the "is_favorite" field if the given value is not nil.

func (*SavedFilterUpdate) SetNillableName

func (_u *SavedFilterUpdate) SetNillableName(v *string) *SavedFilterUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*SavedFilterUpdate) SetNillableProduct

func (_u *SavedFilterUpdate) SetNillableProduct(v *string) *SavedFilterUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*SavedFilterUpdate) SetNillableUpdatedAt

func (_u *SavedFilterUpdate) SetNillableUpdatedAt(v *time.Time) *SavedFilterUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SavedFilterUpdate) SetProduct

func (_u *SavedFilterUpdate) SetProduct(v string) *SavedFilterUpdate

SetProduct sets the "product" field.

func (*SavedFilterUpdate) SetUpdatedAt

func (_u *SavedFilterUpdate) SetUpdatedAt(v time.Time) *SavedFilterUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SavedFilterUpdate) Where

Where appends a list predicates to the SavedFilterUpdate builder.

type SavedFilterUpdateOne

type SavedFilterUpdateOne struct {
	// contains filtered or unexported fields
}

SavedFilterUpdateOne is the builder for updating a single SavedFilter entity.

func (*SavedFilterUpdateOne) ClearDescription

func (_u *SavedFilterUpdateOne) ClearDescription() *SavedFilterUpdateOne

ClearDescription clears the value of the "description" field.

func (*SavedFilterUpdateOne) ClearIsFavorite

func (_u *SavedFilterUpdateOne) ClearIsFavorite() *SavedFilterUpdateOne

ClearIsFavorite clears the value of the "is_favorite" field.

func (*SavedFilterUpdateOne) ClearProduct

func (_u *SavedFilterUpdateOne) ClearProduct() *SavedFilterUpdateOne

ClearProduct clears the value of the "product" field.

func (*SavedFilterUpdateOne) Exec

func (_u *SavedFilterUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SavedFilterUpdateOne) ExecX

func (_u *SavedFilterUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterUpdateOne) Mutation

func (_u *SavedFilterUpdateOne) Mutation() *SavedFilterMutation

Mutation returns the SavedFilterMutation object of the builder.

func (*SavedFilterUpdateOne) Save

Save executes the query and returns the updated SavedFilter entity.

func (*SavedFilterUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SavedFilterUpdateOne) Select

func (_u *SavedFilterUpdateOne) Select(field string, fields ...string) *SavedFilterUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SavedFilterUpdateOne) SetAql

SetAql sets the "aql" field.

func (*SavedFilterUpdateOne) SetCreatedAt

func (_u *SavedFilterUpdateOne) SetCreatedAt(v time.Time) *SavedFilterUpdateOne

SetCreatedAt sets the "created_at" field.

func (*SavedFilterUpdateOne) SetDescription

func (_u *SavedFilterUpdateOne) SetDescription(v string) *SavedFilterUpdateOne

SetDescription sets the "description" field.

func (*SavedFilterUpdateOne) SetIsFavorite

func (_u *SavedFilterUpdateOne) SetIsFavorite(v bool) *SavedFilterUpdateOne

SetIsFavorite sets the "is_favorite" field.

func (*SavedFilterUpdateOne) SetName

SetName sets the "name" field.

func (*SavedFilterUpdateOne) SetNillableAql

func (_u *SavedFilterUpdateOne) SetNillableAql(v *string) *SavedFilterUpdateOne

SetNillableAql sets the "aql" field if the given value is not nil.

func (*SavedFilterUpdateOne) SetNillableCreatedAt

func (_u *SavedFilterUpdateOne) SetNillableCreatedAt(v *time.Time) *SavedFilterUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SavedFilterUpdateOne) SetNillableDescription

func (_u *SavedFilterUpdateOne) SetNillableDescription(v *string) *SavedFilterUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SavedFilterUpdateOne) SetNillableIsFavorite

func (_u *SavedFilterUpdateOne) SetNillableIsFavorite(v *bool) *SavedFilterUpdateOne

SetNillableIsFavorite sets the "is_favorite" field if the given value is not nil.

func (*SavedFilterUpdateOne) SetNillableName

func (_u *SavedFilterUpdateOne) SetNillableName(v *string) *SavedFilterUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*SavedFilterUpdateOne) SetNillableProduct

func (_u *SavedFilterUpdateOne) SetNillableProduct(v *string) *SavedFilterUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*SavedFilterUpdateOne) SetNillableUpdatedAt

func (_u *SavedFilterUpdateOne) SetNillableUpdatedAt(v *time.Time) *SavedFilterUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SavedFilterUpdateOne) SetProduct

SetProduct sets the "product" field.

func (*SavedFilterUpdateOne) SetUpdatedAt

func (_u *SavedFilterUpdateOne) SetUpdatedAt(v time.Time) *SavedFilterUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SavedFilterUpdateOne) Where

Where appends a list predicates to the SavedFilterUpdate builder.

type SavedFilterUpsert

type SavedFilterUpsert struct {
	*sql.UpdateSet
}

SavedFilterUpsert is the "OnConflict" setter.

func (*SavedFilterUpsert) ClearDescription

func (u *SavedFilterUpsert) ClearDescription() *SavedFilterUpsert

ClearDescription clears the value of the "description" field.

func (*SavedFilterUpsert) ClearIsFavorite

func (u *SavedFilterUpsert) ClearIsFavorite() *SavedFilterUpsert

ClearIsFavorite clears the value of the "is_favorite" field.

func (*SavedFilterUpsert) ClearProduct

func (u *SavedFilterUpsert) ClearProduct() *SavedFilterUpsert

ClearProduct clears the value of the "product" field.

func (*SavedFilterUpsert) SetAql

SetAql sets the "aql" field.

func (*SavedFilterUpsert) SetCreatedAt

func (u *SavedFilterUpsert) SetCreatedAt(v time.Time) *SavedFilterUpsert

SetCreatedAt sets the "created_at" field.

func (*SavedFilterUpsert) SetDescription

func (u *SavedFilterUpsert) SetDescription(v string) *SavedFilterUpsert

SetDescription sets the "description" field.

func (*SavedFilterUpsert) SetIsFavorite

func (u *SavedFilterUpsert) SetIsFavorite(v bool) *SavedFilterUpsert

SetIsFavorite sets the "is_favorite" field.

func (*SavedFilterUpsert) SetName

SetName sets the "name" field.

func (*SavedFilterUpsert) SetProduct

func (u *SavedFilterUpsert) SetProduct(v string) *SavedFilterUpsert

SetProduct sets the "product" field.

func (*SavedFilterUpsert) SetUpdatedAt

func (u *SavedFilterUpsert) SetUpdatedAt(v time.Time) *SavedFilterUpsert

SetUpdatedAt sets the "updated_at" field.

func (*SavedFilterUpsert) UpdateAql

func (u *SavedFilterUpsert) UpdateAql() *SavedFilterUpsert

UpdateAql sets the "aql" field to the value that was provided on create.

func (*SavedFilterUpsert) UpdateCreatedAt

func (u *SavedFilterUpsert) UpdateCreatedAt() *SavedFilterUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*SavedFilterUpsert) UpdateDescription

func (u *SavedFilterUpsert) UpdateDescription() *SavedFilterUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SavedFilterUpsert) UpdateIsFavorite

func (u *SavedFilterUpsert) UpdateIsFavorite() *SavedFilterUpsert

UpdateIsFavorite sets the "is_favorite" field to the value that was provided on create.

func (*SavedFilterUpsert) UpdateName

func (u *SavedFilterUpsert) UpdateName() *SavedFilterUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*SavedFilterUpsert) UpdateProduct

func (u *SavedFilterUpsert) UpdateProduct() *SavedFilterUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*SavedFilterUpsert) UpdateUpdatedAt

func (u *SavedFilterUpsert) UpdateUpdatedAt() *SavedFilterUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type SavedFilterUpsertBulk

type SavedFilterUpsertBulk struct {
	// contains filtered or unexported fields
}

SavedFilterUpsertBulk is the builder for "upsert"-ing a bulk of SavedFilter nodes.

func (*SavedFilterUpsertBulk) ClearDescription

func (u *SavedFilterUpsertBulk) ClearDescription() *SavedFilterUpsertBulk

ClearDescription clears the value of the "description" field.

func (*SavedFilterUpsertBulk) ClearIsFavorite

func (u *SavedFilterUpsertBulk) ClearIsFavorite() *SavedFilterUpsertBulk

ClearIsFavorite clears the value of the "is_favorite" field.

func (*SavedFilterUpsertBulk) ClearProduct

func (u *SavedFilterUpsertBulk) ClearProduct() *SavedFilterUpsertBulk

ClearProduct clears the value of the "product" field.

func (*SavedFilterUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SavedFilterUpsertBulk) Exec

Exec executes the query.

func (*SavedFilterUpsertBulk) ExecX

func (u *SavedFilterUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SavedFilter.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SavedFilterUpsertBulk) SetAql

SetAql sets the "aql" field.

func (*SavedFilterUpsertBulk) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*SavedFilterUpsertBulk) SetDescription

func (u *SavedFilterUpsertBulk) SetDescription(v string) *SavedFilterUpsertBulk

SetDescription sets the "description" field.

func (*SavedFilterUpsertBulk) SetIsFavorite

func (u *SavedFilterUpsertBulk) SetIsFavorite(v bool) *SavedFilterUpsertBulk

SetIsFavorite sets the "is_favorite" field.

func (*SavedFilterUpsertBulk) SetName

SetName sets the "name" field.

func (*SavedFilterUpsertBulk) SetProduct

SetProduct sets the "product" field.

func (*SavedFilterUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*SavedFilterUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SavedFilterCreateBulk.OnConflict documentation for more info.

func (*SavedFilterUpsertBulk) UpdateAql

UpdateAql sets the "aql" field to the value that was provided on create.

func (*SavedFilterUpsertBulk) UpdateCreatedAt

func (u *SavedFilterUpsertBulk) UpdateCreatedAt() *SavedFilterUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*SavedFilterUpsertBulk) UpdateDescription

func (u *SavedFilterUpsertBulk) UpdateDescription() *SavedFilterUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SavedFilterUpsertBulk) UpdateIsFavorite

func (u *SavedFilterUpsertBulk) UpdateIsFavorite() *SavedFilterUpsertBulk

UpdateIsFavorite sets the "is_favorite" field to the value that was provided on create.

func (*SavedFilterUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*SavedFilterUpsertBulk) UpdateNewValues

func (u *SavedFilterUpsertBulk) UpdateNewValues() *SavedFilterUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SavedFilter.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(savedfilter.FieldID)
		}),
	).
	Exec(ctx)

func (*SavedFilterUpsertBulk) UpdateProduct

func (u *SavedFilterUpsertBulk) UpdateProduct() *SavedFilterUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*SavedFilterUpsertBulk) UpdateUpdatedAt

func (u *SavedFilterUpsertBulk) UpdateUpdatedAt() *SavedFilterUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type SavedFilterUpsertOne

type SavedFilterUpsertOne struct {
	// contains filtered or unexported fields
}

SavedFilterUpsertOne is the builder for "upsert"-ing

one SavedFilter node.

func (*SavedFilterUpsertOne) ClearDescription

func (u *SavedFilterUpsertOne) ClearDescription() *SavedFilterUpsertOne

ClearDescription clears the value of the "description" field.

func (*SavedFilterUpsertOne) ClearIsFavorite

func (u *SavedFilterUpsertOne) ClearIsFavorite() *SavedFilterUpsertOne

ClearIsFavorite clears the value of the "is_favorite" field.

func (*SavedFilterUpsertOne) ClearProduct

func (u *SavedFilterUpsertOne) ClearProduct() *SavedFilterUpsertOne

ClearProduct clears the value of the "product" field.

func (*SavedFilterUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SavedFilterUpsertOne) Exec

Exec executes the query.

func (*SavedFilterUpsertOne) ExecX

func (u *SavedFilterUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SavedFilterUpsertOne) ID

func (u *SavedFilterUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SavedFilterUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SavedFilterUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SavedFilter.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SavedFilterUpsertOne) SetAql

SetAql sets the "aql" field.

func (*SavedFilterUpsertOne) SetCreatedAt

func (u *SavedFilterUpsertOne) SetCreatedAt(v time.Time) *SavedFilterUpsertOne

SetCreatedAt sets the "created_at" field.

func (*SavedFilterUpsertOne) SetDescription

func (u *SavedFilterUpsertOne) SetDescription(v string) *SavedFilterUpsertOne

SetDescription sets the "description" field.

func (*SavedFilterUpsertOne) SetIsFavorite

func (u *SavedFilterUpsertOne) SetIsFavorite(v bool) *SavedFilterUpsertOne

SetIsFavorite sets the "is_favorite" field.

func (*SavedFilterUpsertOne) SetName

SetName sets the "name" field.

func (*SavedFilterUpsertOne) SetProduct

SetProduct sets the "product" field.

func (*SavedFilterUpsertOne) SetUpdatedAt

func (u *SavedFilterUpsertOne) SetUpdatedAt(v time.Time) *SavedFilterUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*SavedFilterUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the SavedFilterCreate.OnConflict documentation for more info.

func (*SavedFilterUpsertOne) UpdateAql

UpdateAql sets the "aql" field to the value that was provided on create.

func (*SavedFilterUpsertOne) UpdateCreatedAt

func (u *SavedFilterUpsertOne) UpdateCreatedAt() *SavedFilterUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*SavedFilterUpsertOne) UpdateDescription

func (u *SavedFilterUpsertOne) UpdateDescription() *SavedFilterUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SavedFilterUpsertOne) UpdateIsFavorite

func (u *SavedFilterUpsertOne) UpdateIsFavorite() *SavedFilterUpsertOne

UpdateIsFavorite sets the "is_favorite" field to the value that was provided on create.

func (*SavedFilterUpsertOne) UpdateName

func (u *SavedFilterUpsertOne) UpdateName() *SavedFilterUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*SavedFilterUpsertOne) UpdateNewValues

func (u *SavedFilterUpsertOne) UpdateNewValues() *SavedFilterUpsertOne

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.SavedFilter.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(savedfilter.FieldID)
		}),
	).
	Exec(ctx)

func (*SavedFilterUpsertOne) UpdateProduct

func (u *SavedFilterUpsertOne) UpdateProduct() *SavedFilterUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*SavedFilterUpsertOne) UpdateUpdatedAt

func (u *SavedFilterUpsertOne) UpdateUpdatedAt() *SavedFilterUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type SavedFilters

type SavedFilters []*SavedFilter

SavedFilters is a parsable slice of SavedFilter.

type SyncMeta

type SyncMeta struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Entity holds the value of the "entity" field.
	Entity string `json:"entity,omitempty"`
	// Product holds the value of the "product" field.
	Product string `json:"product,omitempty"`
	// LastSync holds the value of the "last_sync" field.
	LastSync time.Time `json:"last_sync,omitempty"`
	// RecordCount holds the value of the "record_count" field.
	RecordCount int `json:"record_count,omitempty"`
	// contains filtered or unexported fields
}

SyncMeta is the model entity for the SyncMeta schema.

func (*SyncMeta) String

func (_m *SyncMeta) String() string

String implements the fmt.Stringer.

func (*SyncMeta) Unwrap

func (_m *SyncMeta) Unwrap() *SyncMeta

Unwrap unwraps the SyncMeta 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 (*SyncMeta) Update

func (_m *SyncMeta) Update() *SyncMetaUpdateOne

Update returns a builder for updating this SyncMeta. Note that you need to call SyncMeta.Unwrap() before calling this method if this SyncMeta was returned from a transaction, and the transaction was committed or rolled back.

func (*SyncMeta) Value

func (_m *SyncMeta) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SyncMeta. This includes values selected through modifiers, order, etc.

type SyncMetaClient

type SyncMetaClient struct {
	// contains filtered or unexported fields
}

SyncMetaClient is a client for the SyncMeta schema.

func NewSyncMetaClient

func NewSyncMetaClient(c config) *SyncMetaClient

NewSyncMetaClient returns a client for the SyncMeta from the given config.

func (*SyncMetaClient) Create

func (c *SyncMetaClient) Create() *SyncMetaCreate

Create returns a builder for creating a SyncMeta entity.

func (*SyncMetaClient) CreateBulk

func (c *SyncMetaClient) CreateBulk(builders ...*SyncMetaCreate) *SyncMetaCreateBulk

CreateBulk returns a builder for creating a bulk of SyncMeta entities.

func (*SyncMetaClient) Delete

func (c *SyncMetaClient) Delete() *SyncMetaDelete

Delete returns a delete builder for SyncMeta.

func (*SyncMetaClient) DeleteOne

func (c *SyncMetaClient) DeleteOne(_m *SyncMeta) *SyncMetaDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SyncMetaClient) DeleteOneID

func (c *SyncMetaClient) DeleteOneID(id int) *SyncMetaDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SyncMetaClient) Get

func (c *SyncMetaClient) Get(ctx context.Context, id int) (*SyncMeta, error)

Get returns a SyncMeta entity by its id.

func (*SyncMetaClient) GetX

func (c *SyncMetaClient) GetX(ctx context.Context, id int) *SyncMeta

GetX is like Get, but panics if an error occurs.

func (*SyncMetaClient) Hooks

func (c *SyncMetaClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SyncMetaClient) Intercept

func (c *SyncMetaClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `syncmeta.Intercept(f(g(h())))`.

func (*SyncMetaClient) Interceptors

func (c *SyncMetaClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SyncMetaClient) MapCreateBulk

func (c *SyncMetaClient) MapCreateBulk(slice any, setFunc func(*SyncMetaCreate, int)) *SyncMetaCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SyncMetaClient) Query

func (c *SyncMetaClient) Query() *SyncMetaQuery

Query returns a query builder for SyncMeta.

func (*SyncMetaClient) Update

func (c *SyncMetaClient) Update() *SyncMetaUpdate

Update returns an update builder for SyncMeta.

func (*SyncMetaClient) UpdateOne

func (c *SyncMetaClient) UpdateOne(_m *SyncMeta) *SyncMetaUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SyncMetaClient) UpdateOneID

func (c *SyncMetaClient) UpdateOneID(id int) *SyncMetaUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SyncMetaClient) Use

func (c *SyncMetaClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `syncmeta.Hooks(f(g(h())))`.

type SyncMetaCreate

type SyncMetaCreate struct {
	// contains filtered or unexported fields
}

SyncMetaCreate is the builder for creating a SyncMeta entity.

func (*SyncMetaCreate) Exec

func (_c *SyncMetaCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncMetaCreate) ExecX

func (_c *SyncMetaCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaCreate) Mutation

func (_c *SyncMetaCreate) Mutation() *SyncMetaMutation

Mutation returns the SyncMetaMutation object of the builder.

func (*SyncMetaCreate) OnConflict

func (_c *SyncMetaCreate) OnConflict(opts ...sql.ConflictOption) *SyncMetaUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SyncMeta.Create().
	SetEntity(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.SyncMetaUpsert) {
		SetEntity(v+v).
	}).
	Exec(ctx)

func (*SyncMetaCreate) OnConflictColumns

func (_c *SyncMetaCreate) OnConflictColumns(columns ...string) *SyncMetaUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SyncMeta.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SyncMetaCreate) Save

func (_c *SyncMetaCreate) Save(ctx context.Context) (*SyncMeta, error)

Save creates the SyncMeta in the database.

func (*SyncMetaCreate) SaveX

func (_c *SyncMetaCreate) SaveX(ctx context.Context) *SyncMeta

SaveX calls Save and panics if Save returns an error.

func (*SyncMetaCreate) SetEntity

func (_c *SyncMetaCreate) SetEntity(v string) *SyncMetaCreate

SetEntity sets the "entity" field.

func (*SyncMetaCreate) SetLastSync

func (_c *SyncMetaCreate) SetLastSync(v time.Time) *SyncMetaCreate

SetLastSync sets the "last_sync" field.

func (*SyncMetaCreate) SetNillableRecordCount

func (_c *SyncMetaCreate) SetNillableRecordCount(v *int) *SyncMetaCreate

SetNillableRecordCount sets the "record_count" field if the given value is not nil.

func (*SyncMetaCreate) SetProduct

func (_c *SyncMetaCreate) SetProduct(v string) *SyncMetaCreate

SetProduct sets the "product" field.

func (*SyncMetaCreate) SetRecordCount

func (_c *SyncMetaCreate) SetRecordCount(v int) *SyncMetaCreate

SetRecordCount sets the "record_count" field.

type SyncMetaCreateBulk

type SyncMetaCreateBulk struct {
	// contains filtered or unexported fields
}

SyncMetaCreateBulk is the builder for creating many SyncMeta entities in bulk.

func (*SyncMetaCreateBulk) Exec

func (_c *SyncMetaCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncMetaCreateBulk) ExecX

func (_c *SyncMetaCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaCreateBulk) OnConflict

func (_c *SyncMetaCreateBulk) OnConflict(opts ...sql.ConflictOption) *SyncMetaUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SyncMeta.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.SyncMetaUpsert) {
		SetEntity(v+v).
	}).
	Exec(ctx)

func (*SyncMetaCreateBulk) OnConflictColumns

func (_c *SyncMetaCreateBulk) OnConflictColumns(columns ...string) *SyncMetaUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SyncMeta.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SyncMetaCreateBulk) Save

func (_c *SyncMetaCreateBulk) Save(ctx context.Context) ([]*SyncMeta, error)

Save creates the SyncMeta entities in the database.

func (*SyncMetaCreateBulk) SaveX

func (_c *SyncMetaCreateBulk) SaveX(ctx context.Context) []*SyncMeta

SaveX is like Save, but panics if an error occurs.

type SyncMetaDelete

type SyncMetaDelete struct {
	// contains filtered or unexported fields
}

SyncMetaDelete is the builder for deleting a SyncMeta entity.

func (*SyncMetaDelete) Exec

func (_d *SyncMetaDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SyncMetaDelete) ExecX

func (_d *SyncMetaDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaDelete) Where

func (_d *SyncMetaDelete) Where(ps ...predicate.SyncMeta) *SyncMetaDelete

Where appends a list predicates to the SyncMetaDelete builder.

type SyncMetaDeleteOne

type SyncMetaDeleteOne struct {
	// contains filtered or unexported fields
}

SyncMetaDeleteOne is the builder for deleting a single SyncMeta entity.

func (*SyncMetaDeleteOne) Exec

func (_d *SyncMetaDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SyncMetaDeleteOne) ExecX

func (_d *SyncMetaDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaDeleteOne) Where

Where appends a list predicates to the SyncMetaDelete builder.

type SyncMetaGroupBy

type SyncMetaGroupBy struct {
	// contains filtered or unexported fields
}

SyncMetaGroupBy is the group-by builder for SyncMeta entities.

func (*SyncMetaGroupBy) Aggregate

func (_g *SyncMetaGroupBy) Aggregate(fns ...AggregateFunc) *SyncMetaGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SyncMetaGroupBy) Bool

func (s *SyncMetaGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) BoolX

func (s *SyncMetaGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SyncMetaGroupBy) Bools

func (s *SyncMetaGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) BoolsX

func (s *SyncMetaGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SyncMetaGroupBy) Float64

func (s *SyncMetaGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) Float64X

func (s *SyncMetaGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SyncMetaGroupBy) Float64s

func (s *SyncMetaGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) Float64sX

func (s *SyncMetaGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SyncMetaGroupBy) Int

func (s *SyncMetaGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) IntX

func (s *SyncMetaGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SyncMetaGroupBy) Ints

func (s *SyncMetaGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) IntsX

func (s *SyncMetaGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SyncMetaGroupBy) Scan

func (_g *SyncMetaGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SyncMetaGroupBy) ScanX

func (s *SyncMetaGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SyncMetaGroupBy) String

func (s *SyncMetaGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) StringX

func (s *SyncMetaGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SyncMetaGroupBy) Strings

func (s *SyncMetaGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SyncMetaGroupBy) StringsX

func (s *SyncMetaGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SyncMetaMutation

type SyncMetaMutation struct {
	// contains filtered or unexported fields
}

SyncMetaMutation represents an operation that mutates the SyncMeta nodes in the graph.

func (*SyncMetaMutation) AddField

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) AddRecordCount

func (m *SyncMetaMutation) AddRecordCount(i int)

AddRecordCount adds i to the "record_count" field.

func (*SyncMetaMutation) AddedEdges

func (m *SyncMetaMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SyncMetaMutation) AddedField

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) AddedFields

func (m *SyncMetaMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SyncMetaMutation) AddedIDs

func (m *SyncMetaMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SyncMetaMutation) AddedRecordCount

func (m *SyncMetaMutation) AddedRecordCount() (r int, exists bool)

AddedRecordCount returns the value that was added to the "record_count" field in this mutation.

func (*SyncMetaMutation) ClearEdge

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) ClearField

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) ClearRecordCount

func (m *SyncMetaMutation) ClearRecordCount()

ClearRecordCount clears the value of the "record_count" field.

func (*SyncMetaMutation) ClearedEdges

func (m *SyncMetaMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SyncMetaMutation) ClearedFields

func (m *SyncMetaMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SyncMetaMutation) Client

func (m SyncMetaMutation) 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 (*SyncMetaMutation) EdgeCleared

func (m *SyncMetaMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SyncMetaMutation) Entity

func (m *SyncMetaMutation) Entity() (r string, exists bool)

Entity returns the value of the "entity" field in the mutation.

func (*SyncMetaMutation) Field

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) FieldCleared

func (m *SyncMetaMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SyncMetaMutation) Fields

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) ID

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) IDs

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) LastSync

func (m *SyncMetaMutation) LastSync() (r time.Time, exists bool)

LastSync returns the value of the "last_sync" field in the mutation.

func (*SyncMetaMutation) OldEntity

func (m *SyncMetaMutation) OldEntity(ctx context.Context) (v string, err error)

OldEntity returns the old "entity" field's value of the SyncMeta entity. If the SyncMeta 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 (*SyncMetaMutation) OldField

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) OldLastSync

func (m *SyncMetaMutation) OldLastSync(ctx context.Context) (v time.Time, err error)

OldLastSync returns the old "last_sync" field's value of the SyncMeta entity. If the SyncMeta 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 (*SyncMetaMutation) OldProduct

func (m *SyncMetaMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the SyncMeta entity. If the SyncMeta 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 (*SyncMetaMutation) OldRecordCount

func (m *SyncMetaMutation) OldRecordCount(ctx context.Context) (v int, err error)

OldRecordCount returns the old "record_count" field's value of the SyncMeta entity. If the SyncMeta 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 (*SyncMetaMutation) Op

func (m *SyncMetaMutation) Op() Op

Op returns the operation name.

func (*SyncMetaMutation) Product

func (m *SyncMetaMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*SyncMetaMutation) RecordCount

func (m *SyncMetaMutation) RecordCount() (r int, exists bool)

RecordCount returns the value of the "record_count" field in the mutation.

func (*SyncMetaMutation) RecordCountCleared

func (m *SyncMetaMutation) RecordCountCleared() bool

RecordCountCleared returns if the "record_count" field was cleared in this mutation.

func (*SyncMetaMutation) RemovedEdges

func (m *SyncMetaMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SyncMetaMutation) RemovedIDs

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) ResetEdge

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) ResetEntity

func (m *SyncMetaMutation) ResetEntity()

ResetEntity resets all changes to the "entity" field.

func (*SyncMetaMutation) ResetField

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) ResetLastSync

func (m *SyncMetaMutation) ResetLastSync()

ResetLastSync resets all changes to the "last_sync" field.

func (*SyncMetaMutation) ResetProduct

func (m *SyncMetaMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*SyncMetaMutation) ResetRecordCount

func (m *SyncMetaMutation) ResetRecordCount()

ResetRecordCount resets all changes to the "record_count" field.

func (*SyncMetaMutation) SetEntity

func (m *SyncMetaMutation) SetEntity(s string)

SetEntity sets the "entity" field.

func (*SyncMetaMutation) SetField

func (m *SyncMetaMutation) 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 (*SyncMetaMutation) SetLastSync

func (m *SyncMetaMutation) SetLastSync(t time.Time)

SetLastSync sets the "last_sync" field.

func (*SyncMetaMutation) SetOp

func (m *SyncMetaMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SyncMetaMutation) SetProduct

func (m *SyncMetaMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*SyncMetaMutation) SetRecordCount

func (m *SyncMetaMutation) SetRecordCount(i int)

SetRecordCount sets the "record_count" field.

func (SyncMetaMutation) Tx

func (m SyncMetaMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SyncMetaMutation) Type

func (m *SyncMetaMutation) Type() string

Type returns the node type of this mutation (SyncMeta).

func (*SyncMetaMutation) Where

func (m *SyncMetaMutation) Where(ps ...predicate.SyncMeta)

Where appends a list predicates to the SyncMetaMutation builder.

func (*SyncMetaMutation) WhereP

func (m *SyncMetaMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SyncMetaMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SyncMetaQuery

type SyncMetaQuery struct {
	// contains filtered or unexported fields
}

SyncMetaQuery is the builder for querying SyncMeta entities.

func (*SyncMetaQuery) Aggregate

func (_q *SyncMetaQuery) Aggregate(fns ...AggregateFunc) *SyncMetaSelect

Aggregate returns a SyncMetaSelect configured with the given aggregations.

func (*SyncMetaQuery) All

func (_q *SyncMetaQuery) All(ctx context.Context) ([]*SyncMeta, error)

All executes the query and returns a list of SyncMetaSlice.

func (*SyncMetaQuery) AllX

func (_q *SyncMetaQuery) AllX(ctx context.Context) []*SyncMeta

AllX is like All, but panics if an error occurs.

func (*SyncMetaQuery) Clone

func (_q *SyncMetaQuery) Clone() *SyncMetaQuery

Clone returns a duplicate of the SyncMetaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SyncMetaQuery) Count

func (_q *SyncMetaQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SyncMetaQuery) CountX

func (_q *SyncMetaQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SyncMetaQuery) Exist

func (_q *SyncMetaQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SyncMetaQuery) ExistX

func (_q *SyncMetaQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SyncMetaQuery) First

func (_q *SyncMetaQuery) First(ctx context.Context) (*SyncMeta, error)

First returns the first SyncMeta entity from the query. Returns a *NotFoundError when no SyncMeta was found.

func (*SyncMetaQuery) FirstID

func (_q *SyncMetaQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first SyncMeta ID from the query. Returns a *NotFoundError when no SyncMeta ID was found.

func (*SyncMetaQuery) FirstIDX

func (_q *SyncMetaQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SyncMetaQuery) FirstX

func (_q *SyncMetaQuery) FirstX(ctx context.Context) *SyncMeta

FirstX is like First, but panics if an error occurs.

func (*SyncMetaQuery) GroupBy

func (_q *SyncMetaQuery) GroupBy(field string, fields ...string) *SyncMetaGroupBy

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 {
	Entity string `json:"entity,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SyncMeta.Query().
	GroupBy(syncmeta.FieldEntity).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SyncMetaQuery) IDs

func (_q *SyncMetaQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of SyncMeta IDs.

func (*SyncMetaQuery) IDsX

func (_q *SyncMetaQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SyncMetaQuery) Limit

func (_q *SyncMetaQuery) Limit(limit int) *SyncMetaQuery

Limit the number of records to be returned by this query.

func (*SyncMetaQuery) Offset

func (_q *SyncMetaQuery) Offset(offset int) *SyncMetaQuery

Offset to start from.

func (*SyncMetaQuery) Only

func (_q *SyncMetaQuery) Only(ctx context.Context) (*SyncMeta, error)

Only returns a single SyncMeta entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SyncMeta entity is found. Returns a *NotFoundError when no SyncMeta entities are found.

func (*SyncMetaQuery) OnlyID

func (_q *SyncMetaQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only SyncMeta ID in the query. Returns a *NotSingularError when more than one SyncMeta ID is found. Returns a *NotFoundError when no entities are found.

func (*SyncMetaQuery) OnlyIDX

func (_q *SyncMetaQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SyncMetaQuery) OnlyX

func (_q *SyncMetaQuery) OnlyX(ctx context.Context) *SyncMeta

OnlyX is like Only, but panics if an error occurs.

func (*SyncMetaQuery) Order

Order specifies how the records should be ordered.

func (*SyncMetaQuery) Select

func (_q *SyncMetaQuery) Select(fields ...string) *SyncMetaSelect

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 {
	Entity string `json:"entity,omitempty"`
}

client.SyncMeta.Query().
	Select(syncmeta.FieldEntity).
	Scan(ctx, &v)

func (*SyncMetaQuery) Unique

func (_q *SyncMetaQuery) Unique(unique bool) *SyncMetaQuery

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 (*SyncMetaQuery) Where

func (_q *SyncMetaQuery) Where(ps ...predicate.SyncMeta) *SyncMetaQuery

Where adds a new predicate for the SyncMetaQuery builder.

type SyncMetaSelect

type SyncMetaSelect struct {
	*SyncMetaQuery
	// contains filtered or unexported fields
}

SyncMetaSelect is the builder for selecting fields of SyncMeta entities.

func (*SyncMetaSelect) Aggregate

func (_s *SyncMetaSelect) Aggregate(fns ...AggregateFunc) *SyncMetaSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SyncMetaSelect) Bool

func (s *SyncMetaSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) BoolX

func (s *SyncMetaSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SyncMetaSelect) Bools

func (s *SyncMetaSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) BoolsX

func (s *SyncMetaSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SyncMetaSelect) Float64

func (s *SyncMetaSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) Float64X

func (s *SyncMetaSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SyncMetaSelect) Float64s

func (s *SyncMetaSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) Float64sX

func (s *SyncMetaSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SyncMetaSelect) Int

func (s *SyncMetaSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) IntX

func (s *SyncMetaSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SyncMetaSelect) Ints

func (s *SyncMetaSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) IntsX

func (s *SyncMetaSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SyncMetaSelect) Scan

func (_s *SyncMetaSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SyncMetaSelect) ScanX

func (s *SyncMetaSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SyncMetaSelect) String

func (s *SyncMetaSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) StringX

func (s *SyncMetaSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SyncMetaSelect) Strings

func (s *SyncMetaSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SyncMetaSelect) StringsX

func (s *SyncMetaSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SyncMetaSlice

type SyncMetaSlice []*SyncMeta

SyncMetaSlice is a parsable slice of SyncMeta.

type SyncMetaUpdate

type SyncMetaUpdate struct {
	// contains filtered or unexported fields
}

SyncMetaUpdate is the builder for updating SyncMeta entities.

func (*SyncMetaUpdate) AddRecordCount

func (_u *SyncMetaUpdate) AddRecordCount(v int) *SyncMetaUpdate

AddRecordCount adds value to the "record_count" field.

func (*SyncMetaUpdate) ClearRecordCount

func (_u *SyncMetaUpdate) ClearRecordCount() *SyncMetaUpdate

ClearRecordCount clears the value of the "record_count" field.

func (*SyncMetaUpdate) Exec

func (_u *SyncMetaUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncMetaUpdate) ExecX

func (_u *SyncMetaUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaUpdate) Mutation

func (_u *SyncMetaUpdate) Mutation() *SyncMetaMutation

Mutation returns the SyncMetaMutation object of the builder.

func (*SyncMetaUpdate) Save

func (_u *SyncMetaUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SyncMetaUpdate) SaveX

func (_u *SyncMetaUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SyncMetaUpdate) SetEntity

func (_u *SyncMetaUpdate) SetEntity(v string) *SyncMetaUpdate

SetEntity sets the "entity" field.

func (*SyncMetaUpdate) SetLastSync

func (_u *SyncMetaUpdate) SetLastSync(v time.Time) *SyncMetaUpdate

SetLastSync sets the "last_sync" field.

func (*SyncMetaUpdate) SetNillableEntity

func (_u *SyncMetaUpdate) SetNillableEntity(v *string) *SyncMetaUpdate

SetNillableEntity sets the "entity" field if the given value is not nil.

func (*SyncMetaUpdate) SetNillableLastSync

func (_u *SyncMetaUpdate) SetNillableLastSync(v *time.Time) *SyncMetaUpdate

SetNillableLastSync sets the "last_sync" field if the given value is not nil.

func (*SyncMetaUpdate) SetNillableProduct

func (_u *SyncMetaUpdate) SetNillableProduct(v *string) *SyncMetaUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*SyncMetaUpdate) SetNillableRecordCount

func (_u *SyncMetaUpdate) SetNillableRecordCount(v *int) *SyncMetaUpdate

SetNillableRecordCount sets the "record_count" field if the given value is not nil.

func (*SyncMetaUpdate) SetProduct

func (_u *SyncMetaUpdate) SetProduct(v string) *SyncMetaUpdate

SetProduct sets the "product" field.

func (*SyncMetaUpdate) SetRecordCount

func (_u *SyncMetaUpdate) SetRecordCount(v int) *SyncMetaUpdate

SetRecordCount sets the "record_count" field.

func (*SyncMetaUpdate) Where

func (_u *SyncMetaUpdate) Where(ps ...predicate.SyncMeta) *SyncMetaUpdate

Where appends a list predicates to the SyncMetaUpdate builder.

type SyncMetaUpdateOne

type SyncMetaUpdateOne struct {
	// contains filtered or unexported fields
}

SyncMetaUpdateOne is the builder for updating a single SyncMeta entity.

func (*SyncMetaUpdateOne) AddRecordCount

func (_u *SyncMetaUpdateOne) AddRecordCount(v int) *SyncMetaUpdateOne

AddRecordCount adds value to the "record_count" field.

func (*SyncMetaUpdateOne) ClearRecordCount

func (_u *SyncMetaUpdateOne) ClearRecordCount() *SyncMetaUpdateOne

ClearRecordCount clears the value of the "record_count" field.

func (*SyncMetaUpdateOne) Exec

func (_u *SyncMetaUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SyncMetaUpdateOne) ExecX

func (_u *SyncMetaUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaUpdateOne) Mutation

func (_u *SyncMetaUpdateOne) Mutation() *SyncMetaMutation

Mutation returns the SyncMetaMutation object of the builder.

func (*SyncMetaUpdateOne) Save

func (_u *SyncMetaUpdateOne) Save(ctx context.Context) (*SyncMeta, error)

Save executes the query and returns the updated SyncMeta entity.

func (*SyncMetaUpdateOne) SaveX

func (_u *SyncMetaUpdateOne) SaveX(ctx context.Context) *SyncMeta

SaveX is like Save, but panics if an error occurs.

func (*SyncMetaUpdateOne) Select

func (_u *SyncMetaUpdateOne) Select(field string, fields ...string) *SyncMetaUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SyncMetaUpdateOne) SetEntity

func (_u *SyncMetaUpdateOne) SetEntity(v string) *SyncMetaUpdateOne

SetEntity sets the "entity" field.

func (*SyncMetaUpdateOne) SetLastSync

func (_u *SyncMetaUpdateOne) SetLastSync(v time.Time) *SyncMetaUpdateOne

SetLastSync sets the "last_sync" field.

func (*SyncMetaUpdateOne) SetNillableEntity

func (_u *SyncMetaUpdateOne) SetNillableEntity(v *string) *SyncMetaUpdateOne

SetNillableEntity sets the "entity" field if the given value is not nil.

func (*SyncMetaUpdateOne) SetNillableLastSync

func (_u *SyncMetaUpdateOne) SetNillableLastSync(v *time.Time) *SyncMetaUpdateOne

SetNillableLastSync sets the "last_sync" field if the given value is not nil.

func (*SyncMetaUpdateOne) SetNillableProduct

func (_u *SyncMetaUpdateOne) SetNillableProduct(v *string) *SyncMetaUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*SyncMetaUpdateOne) SetNillableRecordCount

func (_u *SyncMetaUpdateOne) SetNillableRecordCount(v *int) *SyncMetaUpdateOne

SetNillableRecordCount sets the "record_count" field if the given value is not nil.

func (*SyncMetaUpdateOne) SetProduct

func (_u *SyncMetaUpdateOne) SetProduct(v string) *SyncMetaUpdateOne

SetProduct sets the "product" field.

func (*SyncMetaUpdateOne) SetRecordCount

func (_u *SyncMetaUpdateOne) SetRecordCount(v int) *SyncMetaUpdateOne

SetRecordCount sets the "record_count" field.

func (*SyncMetaUpdateOne) Where

Where appends a list predicates to the SyncMetaUpdate builder.

type SyncMetaUpsert

type SyncMetaUpsert struct {
	*sql.UpdateSet
}

SyncMetaUpsert is the "OnConflict" setter.

func (*SyncMetaUpsert) AddRecordCount

func (u *SyncMetaUpsert) AddRecordCount(v int) *SyncMetaUpsert

AddRecordCount adds v to the "record_count" field.

func (*SyncMetaUpsert) ClearRecordCount

func (u *SyncMetaUpsert) ClearRecordCount() *SyncMetaUpsert

ClearRecordCount clears the value of the "record_count" field.

func (*SyncMetaUpsert) SetEntity

func (u *SyncMetaUpsert) SetEntity(v string) *SyncMetaUpsert

SetEntity sets the "entity" field.

func (*SyncMetaUpsert) SetLastSync

func (u *SyncMetaUpsert) SetLastSync(v time.Time) *SyncMetaUpsert

SetLastSync sets the "last_sync" field.

func (*SyncMetaUpsert) SetProduct

func (u *SyncMetaUpsert) SetProduct(v string) *SyncMetaUpsert

SetProduct sets the "product" field.

func (*SyncMetaUpsert) SetRecordCount

func (u *SyncMetaUpsert) SetRecordCount(v int) *SyncMetaUpsert

SetRecordCount sets the "record_count" field.

func (*SyncMetaUpsert) UpdateEntity

func (u *SyncMetaUpsert) UpdateEntity() *SyncMetaUpsert

UpdateEntity sets the "entity" field to the value that was provided on create.

func (*SyncMetaUpsert) UpdateLastSync

func (u *SyncMetaUpsert) UpdateLastSync() *SyncMetaUpsert

UpdateLastSync sets the "last_sync" field to the value that was provided on create.

func (*SyncMetaUpsert) UpdateProduct

func (u *SyncMetaUpsert) UpdateProduct() *SyncMetaUpsert

UpdateProduct sets the "product" field to the value that was provided on create.

func (*SyncMetaUpsert) UpdateRecordCount

func (u *SyncMetaUpsert) UpdateRecordCount() *SyncMetaUpsert

UpdateRecordCount sets the "record_count" field to the value that was provided on create.

type SyncMetaUpsertBulk

type SyncMetaUpsertBulk struct {
	// contains filtered or unexported fields
}

SyncMetaUpsertBulk is the builder for "upsert"-ing a bulk of SyncMeta nodes.

func (*SyncMetaUpsertBulk) AddRecordCount

func (u *SyncMetaUpsertBulk) AddRecordCount(v int) *SyncMetaUpsertBulk

AddRecordCount adds v to the "record_count" field.

func (*SyncMetaUpsertBulk) ClearRecordCount

func (u *SyncMetaUpsertBulk) ClearRecordCount() *SyncMetaUpsertBulk

ClearRecordCount clears the value of the "record_count" field.

func (*SyncMetaUpsertBulk) DoNothing

func (u *SyncMetaUpsertBulk) DoNothing() *SyncMetaUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SyncMetaUpsertBulk) Exec

func (u *SyncMetaUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncMetaUpsertBulk) ExecX

func (u *SyncMetaUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SyncMeta.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SyncMetaUpsertBulk) SetEntity

func (u *SyncMetaUpsertBulk) SetEntity(v string) *SyncMetaUpsertBulk

SetEntity sets the "entity" field.

func (*SyncMetaUpsertBulk) SetLastSync

func (u *SyncMetaUpsertBulk) SetLastSync(v time.Time) *SyncMetaUpsertBulk

SetLastSync sets the "last_sync" field.

func (*SyncMetaUpsertBulk) SetProduct

func (u *SyncMetaUpsertBulk) SetProduct(v string) *SyncMetaUpsertBulk

SetProduct sets the "product" field.

func (*SyncMetaUpsertBulk) SetRecordCount

func (u *SyncMetaUpsertBulk) SetRecordCount(v int) *SyncMetaUpsertBulk

SetRecordCount sets the "record_count" field.

func (*SyncMetaUpsertBulk) Update

func (u *SyncMetaUpsertBulk) Update(set func(*SyncMetaUpsert)) *SyncMetaUpsertBulk

Update allows overriding fields `UPDATE` values. See the SyncMetaCreateBulk.OnConflict documentation for more info.

func (*SyncMetaUpsertBulk) UpdateEntity

func (u *SyncMetaUpsertBulk) UpdateEntity() *SyncMetaUpsertBulk

UpdateEntity sets the "entity" field to the value that was provided on create.

func (*SyncMetaUpsertBulk) UpdateLastSync

func (u *SyncMetaUpsertBulk) UpdateLastSync() *SyncMetaUpsertBulk

UpdateLastSync sets the "last_sync" field to the value that was provided on create.

func (*SyncMetaUpsertBulk) UpdateNewValues

func (u *SyncMetaUpsertBulk) UpdateNewValues() *SyncMetaUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SyncMeta.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SyncMetaUpsertBulk) UpdateProduct

func (u *SyncMetaUpsertBulk) UpdateProduct() *SyncMetaUpsertBulk

UpdateProduct sets the "product" field to the value that was provided on create.

func (*SyncMetaUpsertBulk) UpdateRecordCount

func (u *SyncMetaUpsertBulk) UpdateRecordCount() *SyncMetaUpsertBulk

UpdateRecordCount sets the "record_count" field to the value that was provided on create.

type SyncMetaUpsertOne

type SyncMetaUpsertOne struct {
	// contains filtered or unexported fields
}

SyncMetaUpsertOne is the builder for "upsert"-ing

one SyncMeta node.

func (*SyncMetaUpsertOne) AddRecordCount

func (u *SyncMetaUpsertOne) AddRecordCount(v int) *SyncMetaUpsertOne

AddRecordCount adds v to the "record_count" field.

func (*SyncMetaUpsertOne) ClearRecordCount

func (u *SyncMetaUpsertOne) ClearRecordCount() *SyncMetaUpsertOne

ClearRecordCount clears the value of the "record_count" field.

func (*SyncMetaUpsertOne) DoNothing

func (u *SyncMetaUpsertOne) DoNothing() *SyncMetaUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SyncMetaUpsertOne) Exec

func (u *SyncMetaUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncMetaUpsertOne) ExecX

func (u *SyncMetaUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncMetaUpsertOne) ID

func (u *SyncMetaUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SyncMetaUpsertOne) IDX

func (u *SyncMetaUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SyncMetaUpsertOne) Ignore

func (u *SyncMetaUpsertOne) Ignore() *SyncMetaUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SyncMeta.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SyncMetaUpsertOne) SetEntity

func (u *SyncMetaUpsertOne) SetEntity(v string) *SyncMetaUpsertOne

SetEntity sets the "entity" field.

func (*SyncMetaUpsertOne) SetLastSync

func (u *SyncMetaUpsertOne) SetLastSync(v time.Time) *SyncMetaUpsertOne

SetLastSync sets the "last_sync" field.

func (*SyncMetaUpsertOne) SetProduct

func (u *SyncMetaUpsertOne) SetProduct(v string) *SyncMetaUpsertOne

SetProduct sets the "product" field.

func (*SyncMetaUpsertOne) SetRecordCount

func (u *SyncMetaUpsertOne) SetRecordCount(v int) *SyncMetaUpsertOne

SetRecordCount sets the "record_count" field.

func (*SyncMetaUpsertOne) Update

func (u *SyncMetaUpsertOne) Update(set func(*SyncMetaUpsert)) *SyncMetaUpsertOne

Update allows overriding fields `UPDATE` values. See the SyncMetaCreate.OnConflict documentation for more info.

func (*SyncMetaUpsertOne) UpdateEntity

func (u *SyncMetaUpsertOne) UpdateEntity() *SyncMetaUpsertOne

UpdateEntity sets the "entity" field to the value that was provided on create.

func (*SyncMetaUpsertOne) UpdateLastSync

func (u *SyncMetaUpsertOne) UpdateLastSync() *SyncMetaUpsertOne

UpdateLastSync sets the "last_sync" field to the value that was provided on create.

func (*SyncMetaUpsertOne) UpdateNewValues

func (u *SyncMetaUpsertOne) UpdateNewValues() *SyncMetaUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SyncMeta.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SyncMetaUpsertOne) UpdateProduct

func (u *SyncMetaUpsertOne) UpdateProduct() *SyncMetaUpsertOne

UpdateProduct sets the "product" field to the value that was provided on create.

func (*SyncMetaUpsertOne) UpdateRecordCount

func (u *SyncMetaUpsertOne) UpdateRecordCount() *SyncMetaUpsertOne

UpdateRecordCount sets the "record_count" field to the value that was provided on create.

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 {

	// Comment is the client for interacting with the Comment builders.
	Comment *CommentClient
	// Epic is the client for interacting with the Epic builders.
	Epic *EpicClient
	// Feature is the client for interacting with the Feature builders.
	Feature *FeatureClient
	// Goal is the client for interacting with the Goal builders.
	Goal *GoalClient
	// Idea is the client for interacting with the Idea builders.
	Idea *IdeaClient
	// IdeaEndorsement is the client for interacting with the IdeaEndorsement builders.
	IdeaEndorsement *IdeaEndorsementClient
	// IdeaOrganization is the client for interacting with the IdeaOrganization builders.
	IdeaOrganization *IdeaOrganizationClient
	// IdeaUser is the client for interacting with the IdeaUser builders.
	IdeaUser *IdeaUserClient
	// Initiative is the client for interacting with the Initiative builders.
	Initiative *InitiativeClient
	// Product is the client for interacting with the Product builders.
	Product *ProductClient
	// Relationship is the client for interacting with the Relationship builders.
	Relationship *RelationshipClient
	// Release is the client for interacting with the Release builders.
	Release *ReleaseClient
	// Requirement is the client for interacting with the Requirement builders.
	Requirement *RequirementClient
	// SavedFilter is the client for interacting with the SavedFilter builders.
	SavedFilter *SavedFilterClient
	// SyncMeta is the client for interacting with the SyncMeta builders.
	SyncMeta *SyncMetaClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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 User

type User struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// FirstName holds the value of the "first_name" field.
	FirstName string `json:"first_name,omitempty"`
	// LastName holds the value of the "last_name" field.
	LastName string `json:"last_name,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Role holds the value of the "role" field.
	Role string `json:"role,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Data holds the value of the "data" field.
	Data map[string]interface{} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) String

func (_m *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (_m *User) Unwrap() *User

Unwrap unwraps the User 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 (*User) Update

func (_m *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value

func (_m *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(_m *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id string) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id string) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id string) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(_m *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id string) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) Exec

func (_c *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (_c *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (_c *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (_c *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetFirstName(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.UserUpsert) {
		SetFirstName(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (_c *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (_c *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (_c *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetCreatedAt

func (_c *UserCreate) SetCreatedAt(v time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetData

func (_c *UserCreate) SetData(v map[string]interface{}) *UserCreate

SetData sets the "data" field.

func (*UserCreate) SetEmail

func (_c *UserCreate) SetEmail(v string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetFirstName

func (_c *UserCreate) SetFirstName(v string) *UserCreate

SetFirstName sets the "first_name" field.

func (*UserCreate) SetID

func (_c *UserCreate) SetID(v string) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetLastName

func (_c *UserCreate) SetLastName(v string) *UserCreate

SetLastName sets the "last_name" field.

func (*UserCreate) SetNillableCreatedAt

func (_c *UserCreate) SetNillableCreatedAt(v *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableEmail

func (_c *UserCreate) SetNillableEmail(v *string) *UserCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserCreate) SetNillableFirstName

func (_c *UserCreate) SetNillableFirstName(v *string) *UserCreate

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserCreate) SetNillableLastName

func (_c *UserCreate) SetNillableLastName(v *string) *UserCreate

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*UserCreate) SetNillableRole

func (_c *UserCreate) SetNillableRole(v *string) *UserCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserCreate) SetRole

func (_c *UserCreate) SetRole(v string) *UserCreate

SetRole sets the "role" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (_c *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (_c *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (_c *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.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.UserUpsert) {
		SetFirstName(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (_c *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (_c *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (_c *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (_d *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (_d *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (_d *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (_d *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (_d *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (_d *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (_g *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (_g *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) 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 (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) 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 (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) ClearCreatedAt

func (m *UserMutation) ClearCreatedAt()

ClearCreatedAt clears the value of the "created_at" field.

func (*UserMutation) ClearData

func (m *UserMutation) ClearData()

ClearData clears the value of the "data" field.

func (*UserMutation) ClearEdge

func (m *UserMutation) 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 (*UserMutation) ClearEmail

func (m *UserMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*UserMutation) ClearField

func (m *UserMutation) 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 (*UserMutation) ClearFirstName

func (m *UserMutation) ClearFirstName()

ClearFirstName clears the value of the "first_name" field.

func (*UserMutation) ClearLastName

func (m *UserMutation) ClearLastName()

ClearLastName clears the value of the "last_name" field.

func (*UserMutation) ClearRole

func (m *UserMutation) ClearRole()

ClearRole clears the value of the "role" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) 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 (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) CreatedAtCleared

func (m *UserMutation) CreatedAtCleared() bool

CreatedAtCleared returns if the "created_at" field was cleared in this mutation.

func (*UserMutation) Data

func (m *UserMutation) Data() (r map[string]interface{}, exists bool)

Data returns the value of the "data" field in the mutation.

func (*UserMutation) DataCleared

func (m *UserMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) EmailCleared

func (m *UserMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) 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 (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) 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 (*UserMutation) FirstName

func (m *UserMutation) FirstName() (r string, exists bool)

FirstName returns the value of the "first_name" field in the mutation.

func (*UserMutation) FirstNameCleared

func (m *UserMutation) FirstNameCleared() bool

FirstNameCleared returns if the "first_name" field was cleared in this mutation.

func (*UserMutation) ID

func (m *UserMutation) ID() (id string, 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 (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]string, 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 (*UserMutation) LastName

func (m *UserMutation) LastName() (r string, exists bool)

LastName returns the value of the "last_name" field in the mutation.

func (*UserMutation) LastNameCleared

func (m *UserMutation) LastNameCleared() bool

LastNameCleared returns if the "last_name" field was cleared in this mutation.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) OldData

func (m *UserMutation) OldData(ctx context.Context) (v map[string]interface{}, err error)

OldData returns the old "data" field's value of the User entity. If the User 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 (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User 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 (*UserMutation) OldField

func (m *UserMutation) 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 (*UserMutation) OldFirstName

func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)

OldFirstName returns the old "first_name" field's value of the User entity. If the User 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 (*UserMutation) OldLastName

func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)

OldLastName returns the old "last_name" field's value of the User entity. If the User 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 (*UserMutation) OldRole

func (m *UserMutation) OldRole(ctx context.Context) (v string, err error)

OldRole returns the old "role" field's value of the User entity. If the User 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 (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) 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 (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetData

func (m *UserMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) 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 (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) 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 (*UserMutation) ResetFirstName

func (m *UserMutation) ResetFirstName()

ResetFirstName resets all changes to the "first_name" field.

func (*UserMutation) ResetLastName

func (m *UserMutation) ResetLastName()

ResetLastName resets all changes to the "last_name" field.

func (*UserMutation) ResetRole

func (m *UserMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*UserMutation) Role

func (m *UserMutation) Role() (r string, exists bool)

Role returns the value of the "role" field in the mutation.

func (*UserMutation) RoleCleared

func (m *UserMutation) RoleCleared() bool

RoleCleared returns if the "role" field was cleared in this mutation.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetData

func (m *UserMutation) SetData(value map[string]interface{})

SetData sets the "data" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) 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 (*UserMutation) SetFirstName

func (m *UserMutation) SetFirstName(s string)

SetFirstName sets the "first_name" field.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLastName

func (m *UserMutation) SetLastName(s string)

SetLastName sets the "last_name" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetRole

func (m *UserMutation) SetRole(s string)

SetRole sets the "role" field.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (_q *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (_q *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (_q *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (_q *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (_q *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (_q *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (_q *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (_q *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (_q *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (_q *UserQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (_q *UserQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (_q *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (_q *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

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 {
	FirstName string `json:"first_name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldFirstName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (_q *UserQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (_q *UserQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (_q *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (_q *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (_q *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (_q *UserQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (_q *UserQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (_q *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (_q *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Select

func (_q *UserQuery) Select(fields ...string) *UserSelect

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 {
	FirstName string `json:"first_name,omitempty"`
}

client.User.Query().
	Select(user.FieldFirstName).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (_q *UserQuery) Unique(unique bool) *UserQuery

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 (*UserQuery) Where

func (_q *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (_s *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (_s *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) ClearCreatedAt

func (_u *UserUpdate) ClearCreatedAt() *UserUpdate

ClearCreatedAt clears the value of the "created_at" field.

func (*UserUpdate) ClearData

func (_u *UserUpdate) ClearData() *UserUpdate

ClearData clears the value of the "data" field.

func (*UserUpdate) ClearEmail

func (_u *UserUpdate) ClearEmail() *UserUpdate

ClearEmail clears the value of the "email" field.

func (*UserUpdate) ClearFirstName

func (_u *UserUpdate) ClearFirstName() *UserUpdate

ClearFirstName clears the value of the "first_name" field.

func (*UserUpdate) ClearLastName

func (_u *UserUpdate) ClearLastName() *UserUpdate

ClearLastName clears the value of the "last_name" field.

func (*UserUpdate) ClearRole

func (_u *UserUpdate) ClearRole() *UserUpdate

ClearRole clears the value of the "role" field.

func (*UserUpdate) Exec

func (_u *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (_u *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (_u *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) Save

func (_u *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (_u *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetCreatedAt

func (_u *UserUpdate) SetCreatedAt(v time.Time) *UserUpdate

SetCreatedAt sets the "created_at" field.

func (*UserUpdate) SetData

func (_u *UserUpdate) SetData(v map[string]interface{}) *UserUpdate

SetData sets the "data" field.

func (*UserUpdate) SetEmail

func (_u *UserUpdate) SetEmail(v string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetFirstName

func (_u *UserUpdate) SetFirstName(v string) *UserUpdate

SetFirstName sets the "first_name" field.

func (*UserUpdate) SetLastName

func (_u *UserUpdate) SetLastName(v string) *UserUpdate

SetLastName sets the "last_name" field.

func (*UserUpdate) SetNillableCreatedAt

func (_u *UserUpdate) SetNillableCreatedAt(v *time.Time) *UserUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserUpdate) SetNillableEmail

func (_u *UserUpdate) SetNillableEmail(v *string) *UserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdate) SetNillableFirstName

func (_u *UserUpdate) SetNillableFirstName(v *string) *UserUpdate

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserUpdate) SetNillableLastName

func (_u *UserUpdate) SetNillableLastName(v *string) *UserUpdate

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*UserUpdate) SetNillableRole

func (_u *UserUpdate) SetNillableRole(v *string) *UserUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdate) SetRole

func (_u *UserUpdate) SetRole(v string) *UserUpdate

SetRole sets the "role" field.

func (*UserUpdate) Where

func (_u *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) ClearCreatedAt

func (_u *UserUpdateOne) ClearCreatedAt() *UserUpdateOne

ClearCreatedAt clears the value of the "created_at" field.

func (*UserUpdateOne) ClearData

func (_u *UserUpdateOne) ClearData() *UserUpdateOne

ClearData clears the value of the "data" field.

func (*UserUpdateOne) ClearEmail

func (_u *UserUpdateOne) ClearEmail() *UserUpdateOne

ClearEmail clears the value of the "email" field.

func (*UserUpdateOne) ClearFirstName

func (_u *UserUpdateOne) ClearFirstName() *UserUpdateOne

ClearFirstName clears the value of the "first_name" field.

func (*UserUpdateOne) ClearLastName

func (_u *UserUpdateOne) ClearLastName() *UserUpdateOne

ClearLastName clears the value of the "last_name" field.

func (*UserUpdateOne) ClearRole

func (_u *UserUpdateOne) ClearRole() *UserUpdateOne

ClearRole clears the value of the "role" field.

func (*UserUpdateOne) Exec

func (_u *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (_u *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (_u *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) Save

func (_u *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (_u *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (_u *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetCreatedAt

func (_u *UserUpdateOne) SetCreatedAt(v time.Time) *UserUpdateOne

SetCreatedAt sets the "created_at" field.

func (*UserUpdateOne) SetData

func (_u *UserUpdateOne) SetData(v map[string]interface{}) *UserUpdateOne

SetData sets the "data" field.

func (*UserUpdateOne) SetEmail

func (_u *UserUpdateOne) SetEmail(v string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetFirstName

func (_u *UserUpdateOne) SetFirstName(v string) *UserUpdateOne

SetFirstName sets the "first_name" field.

func (*UserUpdateOne) SetLastName

func (_u *UserUpdateOne) SetLastName(v string) *UserUpdateOne

SetLastName sets the "last_name" field.

func (*UserUpdateOne) SetNillableCreatedAt

func (_u *UserUpdateOne) SetNillableCreatedAt(v *time.Time) *UserUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableEmail

func (_u *UserUpdateOne) SetNillableEmail(v *string) *UserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdateOne) SetNillableFirstName

func (_u *UserUpdateOne) SetNillableFirstName(v *string) *UserUpdateOne

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLastName

func (_u *UserUpdateOne) SetNillableLastName(v *string) *UserUpdateOne

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableRole

func (_u *UserUpdateOne) SetNillableRole(v *string) *UserUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdateOne) SetRole

func (_u *UserUpdateOne) SetRole(v string) *UserUpdateOne

SetRole sets the "role" field.

func (*UserUpdateOne) Where

func (_u *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) ClearCreatedAt

func (u *UserUpsert) ClearCreatedAt() *UserUpsert

ClearCreatedAt clears the value of the "created_at" field.

func (*UserUpsert) ClearData

func (u *UserUpsert) ClearData() *UserUpsert

ClearData clears the value of the "data" field.

func (*UserUpsert) ClearEmail

func (u *UserUpsert) ClearEmail() *UserUpsert

ClearEmail clears the value of the "email" field.

func (*UserUpsert) ClearFirstName

func (u *UserUpsert) ClearFirstName() *UserUpsert

ClearFirstName clears the value of the "first_name" field.

func (*UserUpsert) ClearLastName

func (u *UserUpsert) ClearLastName() *UserUpsert

ClearLastName clears the value of the "last_name" field.

func (*UserUpsert) ClearRole

func (u *UserUpsert) ClearRole() *UserUpsert

ClearRole clears the value of the "role" field.

func (*UserUpsert) SetCreatedAt

func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert

SetCreatedAt sets the "created_at" field.

func (*UserUpsert) SetData

func (u *UserUpsert) SetData(v map[string]interface{}) *UserUpsert

SetData sets the "data" field.

func (*UserUpsert) SetEmail

func (u *UserUpsert) SetEmail(v string) *UserUpsert

SetEmail sets the "email" field.

func (*UserUpsert) SetFirstName

func (u *UserUpsert) SetFirstName(v string) *UserUpsert

SetFirstName sets the "first_name" field.

func (*UserUpsert) SetLastName

func (u *UserUpsert) SetLastName(v string) *UserUpsert

SetLastName sets the "last_name" field.

func (*UserUpsert) SetRole

func (u *UserUpsert) SetRole(v string) *UserUpsert

SetRole sets the "role" field.

func (*UserUpsert) UpdateCreatedAt

func (u *UserUpsert) UpdateCreatedAt() *UserUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*UserUpsert) UpdateData

func (u *UserUpsert) UpdateData() *UserUpsert

UpdateData sets the "data" field to the value that was provided on create.

func (*UserUpsert) UpdateEmail

func (u *UserUpsert) UpdateEmail() *UserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsert) UpdateFirstName

func (u *UserUpsert) UpdateFirstName() *UserUpsert

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsert) UpdateLastName

func (u *UserUpsert) UpdateLastName() *UserUpsert

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsert) UpdateRole

func (u *UserUpsert) UpdateRole() *UserUpsert

UpdateRole sets the "role" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) ClearCreatedAt

func (u *UserUpsertBulk) ClearCreatedAt() *UserUpsertBulk

ClearCreatedAt clears the value of the "created_at" field.

func (*UserUpsertBulk) ClearData

func (u *UserUpsertBulk) ClearData() *UserUpsertBulk

ClearData clears the value of the "data" field.

func (*UserUpsertBulk) ClearEmail

func (u *UserUpsertBulk) ClearEmail() *UserUpsertBulk

ClearEmail clears the value of the "email" field.

func (*UserUpsertBulk) ClearFirstName

func (u *UserUpsertBulk) ClearFirstName() *UserUpsertBulk

ClearFirstName clears the value of the "first_name" field.

func (*UserUpsertBulk) ClearLastName

func (u *UserUpsertBulk) ClearLastName() *UserUpsertBulk

ClearLastName clears the value of the "last_name" field.

func (*UserUpsertBulk) ClearRole

func (u *UserUpsertBulk) ClearRole() *UserUpsertBulk

ClearRole clears the value of the "role" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetCreatedAt

func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*UserUpsertBulk) SetData

func (u *UserUpsertBulk) SetData(v map[string]interface{}) *UserUpsertBulk

SetData sets the "data" field.

func (*UserUpsertBulk) SetEmail

func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk

SetEmail sets the "email" field.

func (*UserUpsertBulk) SetFirstName

func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk

SetFirstName sets the "first_name" field.

func (*UserUpsertBulk) SetLastName

func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk

SetLastName sets the "last_name" field.

func (*UserUpsertBulk) SetRole

func (u *UserUpsertBulk) SetRole(v string) *UserUpsertBulk

SetRole sets the "role" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateCreatedAt

func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateData

func (u *UserUpsertBulk) UpdateData() *UserUpsertBulk

UpdateData sets the "data" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateEmail

func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateFirstName

func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLastName

func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdateRole

func (u *UserUpsertBulk) UpdateRole() *UserUpsertBulk

UpdateRole sets the "role" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) ClearCreatedAt

func (u *UserUpsertOne) ClearCreatedAt() *UserUpsertOne

ClearCreatedAt clears the value of the "created_at" field.

func (*UserUpsertOne) ClearData

func (u *UserUpsertOne) ClearData() *UserUpsertOne

ClearData clears the value of the "data" field.

func (*UserUpsertOne) ClearEmail

func (u *UserUpsertOne) ClearEmail() *UserUpsertOne

ClearEmail clears the value of the "email" field.

func (*UserUpsertOne) ClearFirstName

func (u *UserUpsertOne) ClearFirstName() *UserUpsertOne

ClearFirstName clears the value of the "first_name" field.

func (*UserUpsertOne) ClearLastName

func (u *UserUpsertOne) ClearLastName() *UserUpsertOne

ClearLastName clears the value of the "last_name" field.

func (*UserUpsertOne) ClearRole

func (u *UserUpsertOne) ClearRole() *UserUpsertOne

ClearRole clears the value of the "role" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetCreatedAt

func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne

SetCreatedAt sets the "created_at" field.

func (*UserUpsertOne) SetData

func (u *UserUpsertOne) SetData(v map[string]interface{}) *UserUpsertOne

SetData sets the "data" field.

func (*UserUpsertOne) SetEmail

func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne

SetEmail sets the "email" field.

func (*UserUpsertOne) SetFirstName

func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne

SetFirstName sets the "first_name" field.

func (*UserUpsertOne) SetLastName

func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne

SetLastName sets the "last_name" field.

func (*UserUpsertOne) SetRole

func (u *UserUpsertOne) SetRole(v string) *UserUpsertOne

SetRole sets the "role" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateCreatedAt

func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateData

func (u *UserUpsertOne) UpdateData() *UserUpsertOne

UpdateData sets the "data" field to the value that was provided on create.

func (*UserUpsertOne) UpdateEmail

func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertOne) UpdateFirstName

func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLastName

func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

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.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdateRole

func (u *UserUpsertOne) UpdateRole() *UserUpsertOne

UpdateRole sets the "role" field to the value that was provided on create.

type Users

type Users []*User

Users is a parsable slice of User.

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