ent

package
v0.0.0-...-aa3ac78 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 34 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"
	TypeProject = "Project"
	TypeUser    = "User"
)

Variables

View Source
var DefaultCommentOrder = &CommentOrder{
	Direction: OrderDirectionAsc,
	Field: &CommentOrderField{
		field: comment.FieldID,
		toCursor: func(c *Comment) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCommentOrder is the default ordering of Comment.

View Source
var DefaultEpicOrder = &EpicOrder{
	Direction: OrderDirectionAsc,
	Field: &EpicOrderField{
		field: epic.FieldID,
		toCursor: func(e *Epic) Cursor {
			return Cursor{ID: e.ID}
		},
	},
}

DefaultEpicOrder is the default ordering of Epic.

View Source
var DefaultProjectOrder = &ProjectOrder{
	Direction: OrderDirectionAsc,
	Field: &ProjectOrderField{
		field: project.FieldID,
		toCursor: func(pr *Project) Cursor {
			return Cursor{ID: pr.ID}
		},
	},
}

DefaultProjectOrder is the default ordering of Project.

View Source
var DefaultUserOrder = &UserOrder{
	Direction: OrderDirectionAsc,
	Field: &UserOrderField{
		field: user.FieldID,
		toCursor: func(u *User) Cursor {
			return Cursor{ID: u.ID}
		},
	},
}

DefaultUserOrder is the default ordering of User.

View Source
var ErrEmptyCommentWhereInput = errors.New("ent: empty predicate CommentWhereInput")

ErrEmptyCommentWhereInput is returned in case the CommentWhereInput is empty.

View Source
var ErrEmptyEpicWhereInput = errors.New("ent: empty predicate EpicWhereInput")

ErrEmptyEpicWhereInput is returned in case the EpicWhereInput is empty.

View Source
var ErrEmptyProjectWhereInput = errors.New("ent: empty predicate ProjectWhereInput")

ErrEmptyProjectWhereInput is returned in case the ProjectWhereInput is empty.

View Source
var ErrEmptyUserWhereInput = errors.New("ent: empty predicate UserWhereInput")

ErrEmptyUserWhereInput is returned in case the UserWhereInput is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

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

OpenTxFromContext open transactions from client stored in context.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Comment is the client for interacting with the Comment builders.
	Comment *CommentClient
	// Epic is the client for interacting with the Epic builders.
	Epic *EpicClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// 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) Node

func (c *Client) Node(ctx context.Context, id int) (*Node, error)

func (*Client) Noder

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

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

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

func (*Client) Noders

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

func (*Client) OpenTx

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

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

func (*Client) Tx

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

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

func (*Client) Use

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

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

type Comment

type Comment struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Text holds the value of the "text" field.
	Text string `json:"text,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CommentQuery when eager-loading is set.
	Edges CommentEdges `json:"edges"`
	// contains filtered or unexported fields
}

Comment is the model entity for the Comment schema.

func (*Comment) Epics

func (c *Comment) Epics(ctx context.Context) (result []*Epic, err error)

func (*Comment) NamedEpics

func (c *Comment) NamedEpics(name string) ([]*Epic, error)

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

func (*Comment) NamedProjects

func (c *Comment) NamedProjects(name string) ([]*Project, error)

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

func (*Comment) NamedUsers

func (c *Comment) NamedUsers(name string) ([]*User, error)

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

func (*Comment) Node

func (c *Comment) Node(ctx context.Context) (node *Node, err error)

func (*Comment) Projects

func (c *Comment) Projects(ctx context.Context) (result []*Project, err error)

func (*Comment) QueryEpics

func (c *Comment) QueryEpics() *EpicQuery

QueryEpics queries the "epics" edge of the Comment entity.

func (*Comment) QueryProjects

func (c *Comment) QueryProjects() *ProjectQuery

QueryProjects queries the "projects" edge of the Comment entity.

func (*Comment) QueryUsers

func (c *Comment) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the Comment entity.

func (*Comment) String

func (c *Comment) String() string

String implements the fmt.Stringer.

func (*Comment) ToEdge

func (c *Comment) ToEdge(order *CommentOrder) *CommentEdge

ToEdge converts Comment into CommentEdge.

func (*Comment) Unwrap

func (c *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 (c *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) Users

func (c *Comment) Users(ctx context.Context) (result []*User, err error)

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(co *Comment) *CommentDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CommentClient) DeleteOneID

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

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

func (*CommentClient) Get

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

Get returns a Comment entity by its id.

func (*CommentClient) GetX

func (c *CommentClient) GetX(ctx context.Context, id int) *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)

Use 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) Query

func (c *CommentClient) Query() *CommentQuery

Query returns a query builder for Comment.

func (*CommentClient) QueryEpics

func (c *CommentClient) QueryEpics(co *Comment) *EpicQuery

QueryEpics queries the epics edge of a Comment.

func (*CommentClient) QueryProjects

func (c *CommentClient) QueryProjects(co *Comment) *ProjectQuery

QueryProjects queries the projects edge of a Comment.

func (*CommentClient) QueryUsers

func (c *CommentClient) QueryUsers(co *Comment) *UserQuery

QueryUsers queries the users edge of a Comment.

func (*CommentClient) Update

func (c *CommentClient) Update() *CommentUpdate

Update returns an update builder for Comment.

func (*CommentClient) UpdateOne

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

UpdateOne returns an update builder for the given entity.

func (*CommentClient) UpdateOneID

func (c *CommentClient) UpdateOneID(id int) *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 CommentConnection

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

CommentConnection is the connection containing edges to Comment.

type CommentCreate

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

CommentCreate is the builder for creating a Comment entity.

func (*CommentCreate) AddEpicIDs

func (cc *CommentCreate) AddEpicIDs(ids ...int) *CommentCreate

AddEpicIDs adds the "epics" edge to the Epic entity by IDs.

func (*CommentCreate) AddEpics

func (cc *CommentCreate) AddEpics(e ...*Epic) *CommentCreate

AddEpics adds the "epics" edges to the Epic entity.

func (*CommentCreate) AddProjectIDs

func (cc *CommentCreate) AddProjectIDs(ids ...int) *CommentCreate

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*CommentCreate) AddProjects

func (cc *CommentCreate) AddProjects(p ...*Project) *CommentCreate

AddProjects adds the "projects" edges to the Project entity.

func (*CommentCreate) AddUserIDs

func (cc *CommentCreate) AddUserIDs(ids ...int) *CommentCreate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*CommentCreate) AddUsers

func (cc *CommentCreate) AddUsers(u ...*User) *CommentCreate

AddUsers adds the "users" edges to the User entity.

func (*CommentCreate) Exec

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

Exec executes the query.

func (*CommentCreate) ExecX

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

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

func (*CommentCreate) Mutation

func (cc *CommentCreate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentCreate) Save

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

Save creates the Comment in the database.

func (*CommentCreate) SaveX

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

SaveX calls Save and panics if Save returns an error.

func (*CommentCreate) SetInput

SetInput applies the change-set in the CreateCommentInput on the CommentCreate builder.

func (*CommentCreate) SetText

func (cc *CommentCreate) SetText(s string) *CommentCreate

SetText sets the "text" 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 (ccb *CommentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentCreateBulk) ExecX

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

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

func (*CommentCreateBulk) Save

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

Save creates the Comment entities in the database.

func (*CommentCreateBulk) SaveX

func (ccb *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 (cd *CommentDelete) Exec(ctx context.Context) (int, error)

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

func (*CommentDelete) ExecX

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

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

func (*CommentDelete) Where

func (cd *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 (cdo *CommentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CommentDeleteOne) ExecX

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

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

type CommentEdge

type CommentEdge struct {
	Node   *Comment `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

CommentEdge is the edge representation of Comment.

type CommentEdges

type CommentEdges struct {
	// Epics holds the value of the epics edge.
	Epics []*Epic `json:"epics,omitempty"`
	// Projects holds the value of the projects edge.
	Projects []*Project `json:"projects,omitempty"`
	// Users holds the value of the users edge.
	Users []*User `json:"users,omitempty"`
	// contains filtered or unexported fields
}

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

func (CommentEdges) EpicsOrErr

func (e CommentEdges) EpicsOrErr() ([]*Epic, error)

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

func (CommentEdges) ProjectsOrErr

func (e CommentEdges) ProjectsOrErr() ([]*Project, error)

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

func (CommentEdges) UsersOrErr

func (e CommentEdges) UsersOrErr() ([]*User, error)

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

type CommentGroupBy

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

CommentGroupBy is the group-by builder for Comment entities.

func (*CommentGroupBy) Aggregate

func (cgb *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 (cgb *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) AddEpicIDs

func (m *CommentMutation) AddEpicIDs(ids ...int)

AddEpicIDs adds the "epics" edge to the Epic entity by ids.

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) AddProjectIDs

func (m *CommentMutation) AddProjectIDs(ids ...int)

AddProjectIDs adds the "projects" edge to the Project entity by ids.

func (*CommentMutation) AddUserIDs

func (m *CommentMutation) AddUserIDs(ids ...int)

AddUserIDs adds the "users" edge to the User entity by ids.

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) 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) ClearEpics

func (m *CommentMutation) ClearEpics()

ClearEpics clears the "epics" edge to the Epic entity.

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) ClearProjects

func (m *CommentMutation) ClearProjects()

ClearProjects clears the "projects" edge to the Project entity.

func (*CommentMutation) ClearUsers

func (m *CommentMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

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) 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) EpicsCleared

func (m *CommentMutation) EpicsCleared() bool

EpicsCleared reports if the "epics" edge to the Epic entity was cleared.

func (*CommentMutation) EpicsIDs

func (m *CommentMutation) EpicsIDs() (ids []int)

EpicsIDs returns the "epics" edge IDs in the 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 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 (*CommentMutation) IDs

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

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

OldText returns the old "text" 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) ProjectsCleared

func (m *CommentMutation) ProjectsCleared() bool

ProjectsCleared reports if the "projects" edge to the Project entity was cleared.

func (*CommentMutation) ProjectsIDs

func (m *CommentMutation) ProjectsIDs() (ids []int)

ProjectsIDs returns the "projects" edge IDs in the mutation.

func (*CommentMutation) RemoveEpicIDs

func (m *CommentMutation) RemoveEpicIDs(ids ...int)

RemoveEpicIDs removes the "epics" edge to the Epic entity by IDs.

func (*CommentMutation) RemoveProjectIDs

func (m *CommentMutation) RemoveProjectIDs(ids ...int)

RemoveProjectIDs removes the "projects" edge to the Project entity by IDs.

func (*CommentMutation) RemoveUserIDs

func (m *CommentMutation) RemoveUserIDs(ids ...int)

RemoveUserIDs removes the "users" edge to the User entity by IDs.

func (*CommentMutation) RemovedEdges

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

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

func (*CommentMutation) RemovedEpicsIDs

func (m *CommentMutation) RemovedEpicsIDs() (ids []int)

RemovedEpics returns the removed IDs of the "epics" edge to the Epic entity.

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) RemovedProjectsIDs

func (m *CommentMutation) RemovedProjectsIDs() (ids []int)

RemovedProjects returns the removed IDs of the "projects" edge to the Project entity.

func (*CommentMutation) RemovedUsersIDs

func (m *CommentMutation) RemovedUsersIDs() (ids []int)

RemovedUsers returns the removed IDs of the "users" edge to the User entity.

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) ResetEpics

func (m *CommentMutation) ResetEpics()

ResetEpics resets all changes to the "epics" edge.

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) ResetProjects

func (m *CommentMutation) ResetProjects()

ResetProjects resets all changes to the "projects" edge.

func (*CommentMutation) ResetText

func (m *CommentMutation) ResetText()

ResetText resets all changes to the "text" field.

func (*CommentMutation) ResetUsers

func (m *CommentMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

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) SetOp

func (m *CommentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CommentMutation) SetText

func (m *CommentMutation) SetText(s string)

SetText sets the "text" field.

func (*CommentMutation) Text

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

Text returns the value of the "text" field in the mutation.

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) UsersCleared

func (m *CommentMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*CommentMutation) UsersIDs

func (m *CommentMutation) UsersIDs() (ids []int)

UsersIDs returns the "users" edge IDs in the 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 CommentOrder

type CommentOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *CommentOrderField `json:"field"`
}

CommentOrder defines the ordering of Comment.

type CommentOrderField

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

CommentOrderField defines the ordering field of Comment.

type CommentPaginateOption

type CommentPaginateOption func(*commentPager) error

CommentPaginateOption enables pagination customization.

func WithCommentFilter

func WithCommentFilter(filter func(*CommentQuery) (*CommentQuery, error)) CommentPaginateOption

WithCommentFilter configures pagination filter.

func WithCommentOrder

func WithCommentOrder(order *CommentOrder) CommentPaginateOption

WithCommentOrder configures pagination ordering.

type CommentQuery

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

CommentQuery is the builder for querying Comment entities.

func (*CommentQuery) Aggregate

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

Aggregate returns a CommentSelect configured with the given aggregations.

func (*CommentQuery) All

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

All executes the query and returns a list of Comments.

func (*CommentQuery) AllX

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

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

func (*CommentQuery) Clone

func (cq *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) CollectFields

func (c *CommentQuery) CollectFields(ctx context.Context, satisfies ...string) (*CommentQuery, error)

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

func (*CommentQuery) Count

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

Count returns the count of the given query.

func (*CommentQuery) CountX

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

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

func (*CommentQuery) Exist

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

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

func (*CommentQuery) ExistX

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

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

func (*CommentQuery) First

func (cq *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 (cq *CommentQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CommentQuery) FirstIDX

func (cq *CommentQuery) FirstIDX(ctx context.Context) int

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

func (*CommentQuery) FirstX

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

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

func (*CommentQuery) GroupBy

func (cq *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 {
	Text string `json:"text,omitempty"`
	Count int `json:"count,omitempty"`
}

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

func (*CommentQuery) IDs

func (cq *CommentQuery) IDs(ctx context.Context) ([]int, error)

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

func (*CommentQuery) IDsX

func (cq *CommentQuery) IDsX(ctx context.Context) []int

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

func (*CommentQuery) Limit

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

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

func (*CommentQuery) Offset

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

Offset to start from.

func (*CommentQuery) Only

func (cq *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 (cq *CommentQuery) OnlyID(ctx context.Context) (id int, 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 (cq *CommentQuery) OnlyIDX(ctx context.Context) int

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

func (*CommentQuery) OnlyX

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

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

func (*CommentQuery) Order

func (cq *CommentQuery) Order(o ...OrderFunc) *CommentQuery

Order specifies how the records should be ordered.

func (*CommentQuery) Paginate

func (c *CommentQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CommentPaginateOption,
) (*CommentConnection, error)

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

func (*CommentQuery) QueryEpics

func (cq *CommentQuery) QueryEpics() *EpicQuery

QueryEpics chains the current query on the "epics" edge.

func (*CommentQuery) QueryProjects

func (cq *CommentQuery) QueryProjects() *ProjectQuery

QueryProjects chains the current query on the "projects" edge.

func (*CommentQuery) QueryUsers

func (cq *CommentQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*CommentQuery) Select

func (cq *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 {
	Text string `json:"text,omitempty"`
}

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

func (*CommentQuery) Unique

func (cq *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 (cq *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery

Where adds a new predicate for the CommentQuery builder.

func (*CommentQuery) WithEpics

func (cq *CommentQuery) WithEpics(opts ...func(*EpicQuery)) *CommentQuery

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

func (*CommentQuery) WithNamedEpics

func (cq *CommentQuery) WithNamedEpics(name string, opts ...func(*EpicQuery)) *CommentQuery

WithNamedEpics tells the query-builder to eager-load the nodes that are connected to the "epics" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CommentQuery) WithNamedProjects

func (cq *CommentQuery) WithNamedProjects(name string, opts ...func(*ProjectQuery)) *CommentQuery

WithNamedProjects tells the query-builder to eager-load the nodes that are connected to the "projects" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CommentQuery) WithNamedUsers

func (cq *CommentQuery) WithNamedUsers(name string, opts ...func(*UserQuery)) *CommentQuery

WithNamedUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CommentQuery) WithProjects

func (cq *CommentQuery) WithProjects(opts ...func(*ProjectQuery)) *CommentQuery

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

func (*CommentQuery) WithUsers

func (cq *CommentQuery) WithUsers(opts ...func(*UserQuery)) *CommentQuery

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

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 (cs *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 (cs *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) AddEpicIDs

func (cu *CommentUpdate) AddEpicIDs(ids ...int) *CommentUpdate

AddEpicIDs adds the "epics" edge to the Epic entity by IDs.

func (*CommentUpdate) AddEpics

func (cu *CommentUpdate) AddEpics(e ...*Epic) *CommentUpdate

AddEpics adds the "epics" edges to the Epic entity.

func (*CommentUpdate) AddProjectIDs

func (cu *CommentUpdate) AddProjectIDs(ids ...int) *CommentUpdate

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*CommentUpdate) AddProjects

func (cu *CommentUpdate) AddProjects(p ...*Project) *CommentUpdate

AddProjects adds the "projects" edges to the Project entity.

func (*CommentUpdate) AddUserIDs

func (cu *CommentUpdate) AddUserIDs(ids ...int) *CommentUpdate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*CommentUpdate) AddUsers

func (cu *CommentUpdate) AddUsers(u ...*User) *CommentUpdate

AddUsers adds the "users" edges to the User entity.

func (*CommentUpdate) ClearEpics

func (cu *CommentUpdate) ClearEpics() *CommentUpdate

ClearEpics clears all "epics" edges to the Epic entity.

func (*CommentUpdate) ClearProjects

func (cu *CommentUpdate) ClearProjects() *CommentUpdate

ClearProjects clears all "projects" edges to the Project entity.

func (*CommentUpdate) ClearUsers

func (cu *CommentUpdate) ClearUsers() *CommentUpdate

ClearUsers clears all "users" edges to the User entity.

func (*CommentUpdate) Exec

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

Exec executes the query.

func (*CommentUpdate) ExecX

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

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

func (*CommentUpdate) Mutation

func (cu *CommentUpdate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdate) RemoveEpicIDs

func (cu *CommentUpdate) RemoveEpicIDs(ids ...int) *CommentUpdate

RemoveEpicIDs removes the "epics" edge to Epic entities by IDs.

func (*CommentUpdate) RemoveEpics

func (cu *CommentUpdate) RemoveEpics(e ...*Epic) *CommentUpdate

RemoveEpics removes "epics" edges to Epic entities.

func (*CommentUpdate) RemoveProjectIDs

func (cu *CommentUpdate) RemoveProjectIDs(ids ...int) *CommentUpdate

RemoveProjectIDs removes the "projects" edge to Project entities by IDs.

func (*CommentUpdate) RemoveProjects

func (cu *CommentUpdate) RemoveProjects(p ...*Project) *CommentUpdate

RemoveProjects removes "projects" edges to Project entities.

func (*CommentUpdate) RemoveUserIDs

func (cu *CommentUpdate) RemoveUserIDs(ids ...int) *CommentUpdate

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*CommentUpdate) RemoveUsers

func (cu *CommentUpdate) RemoveUsers(u ...*User) *CommentUpdate

RemoveUsers removes "users" edges to User entities.

func (*CommentUpdate) Save

func (cu *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 (cu *CommentUpdate) SaveX(ctx context.Context) int

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

func (*CommentUpdate) SetInput

SetInput applies the change-set in the UpdateCommentInput on the CommentUpdate builder.

func (*CommentUpdate) SetText

func (cu *CommentUpdate) SetText(s string) *CommentUpdate

SetText sets the "text" field.

func (*CommentUpdate) Where

func (cu *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) AddEpicIDs

func (cuo *CommentUpdateOne) AddEpicIDs(ids ...int) *CommentUpdateOne

AddEpicIDs adds the "epics" edge to the Epic entity by IDs.

func (*CommentUpdateOne) AddEpics

func (cuo *CommentUpdateOne) AddEpics(e ...*Epic) *CommentUpdateOne

AddEpics adds the "epics" edges to the Epic entity.

func (*CommentUpdateOne) AddProjectIDs

func (cuo *CommentUpdateOne) AddProjectIDs(ids ...int) *CommentUpdateOne

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*CommentUpdateOne) AddProjects

func (cuo *CommentUpdateOne) AddProjects(p ...*Project) *CommentUpdateOne

AddProjects adds the "projects" edges to the Project entity.

func (*CommentUpdateOne) AddUserIDs

func (cuo *CommentUpdateOne) AddUserIDs(ids ...int) *CommentUpdateOne

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*CommentUpdateOne) AddUsers

func (cuo *CommentUpdateOne) AddUsers(u ...*User) *CommentUpdateOne

AddUsers adds the "users" edges to the User entity.

func (*CommentUpdateOne) ClearEpics

func (cuo *CommentUpdateOne) ClearEpics() *CommentUpdateOne

ClearEpics clears all "epics" edges to the Epic entity.

func (*CommentUpdateOne) ClearProjects

func (cuo *CommentUpdateOne) ClearProjects() *CommentUpdateOne

ClearProjects clears all "projects" edges to the Project entity.

func (*CommentUpdateOne) ClearUsers

func (cuo *CommentUpdateOne) ClearUsers() *CommentUpdateOne

ClearUsers clears all "users" edges to the User entity.

func (*CommentUpdateOne) Exec

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

Exec executes the query on the entity.

func (*CommentUpdateOne) ExecX

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

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

func (*CommentUpdateOne) Mutation

func (cuo *CommentUpdateOne) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdateOne) RemoveEpicIDs

func (cuo *CommentUpdateOne) RemoveEpicIDs(ids ...int) *CommentUpdateOne

RemoveEpicIDs removes the "epics" edge to Epic entities by IDs.

func (*CommentUpdateOne) RemoveEpics

func (cuo *CommentUpdateOne) RemoveEpics(e ...*Epic) *CommentUpdateOne

RemoveEpics removes "epics" edges to Epic entities.

func (*CommentUpdateOne) RemoveProjectIDs

func (cuo *CommentUpdateOne) RemoveProjectIDs(ids ...int) *CommentUpdateOne

RemoveProjectIDs removes the "projects" edge to Project entities by IDs.

func (*CommentUpdateOne) RemoveProjects

func (cuo *CommentUpdateOne) RemoveProjects(p ...*Project) *CommentUpdateOne

RemoveProjects removes "projects" edges to Project entities.

func (*CommentUpdateOne) RemoveUserIDs

func (cuo *CommentUpdateOne) RemoveUserIDs(ids ...int) *CommentUpdateOne

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*CommentUpdateOne) RemoveUsers

func (cuo *CommentUpdateOne) RemoveUsers(u ...*User) *CommentUpdateOne

RemoveUsers removes "users" edges to User entities.

func (*CommentUpdateOne) Save

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

Save executes the query and returns the updated Comment entity.

func (*CommentUpdateOne) SaveX

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

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

func (*CommentUpdateOne) Select

func (cuo *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) SetInput

SetInput applies the change-set in the UpdateCommentInput on the CommentUpdateOne builder.

func (*CommentUpdateOne) SetText

func (cuo *CommentUpdateOne) SetText(s string) *CommentUpdateOne

SetText sets the "text" field.

type CommentWhereInput

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

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

	// "text" field predicates.
	Text             *string  `json:"text,omitempty"`
	TextNEQ          *string  `json:"textNEQ,omitempty"`
	TextIn           []string `json:"textIn,omitempty"`
	TextNotIn        []string `json:"textNotIn,omitempty"`
	TextGT           *string  `json:"textGT,omitempty"`
	TextGTE          *string  `json:"textGTE,omitempty"`
	TextLT           *string  `json:"textLT,omitempty"`
	TextLTE          *string  `json:"textLTE,omitempty"`
	TextContains     *string  `json:"textContains,omitempty"`
	TextHasPrefix    *string  `json:"textHasPrefix,omitempty"`
	TextHasSuffix    *string  `json:"textHasSuffix,omitempty"`
	TextEqualFold    *string  `json:"textEqualFold,omitempty"`
	TextContainsFold *string  `json:"textContainsFold,omitempty"`

	// "epics" edge predicates.
	HasEpics     *bool             `json:"hasEpics,omitempty"`
	HasEpicsWith []*EpicWhereInput `json:"hasEpicsWith,omitempty"`

	// "projects" edge predicates.
	HasProjects     *bool                `json:"hasProjects,omitempty"`
	HasProjectsWith []*ProjectWhereInput `json:"hasProjectsWith,omitempty"`

	// "users" edge predicates.
	HasUsers     *bool             `json:"hasUsers,omitempty"`
	HasUsersWith []*UserWhereInput `json:"hasUsersWith,omitempty"`
}

CommentWhereInput represents a where input for filtering Comment queries.

func (*CommentWhereInput) AddPredicates

func (i *CommentWhereInput) AddPredicates(predicates ...predicate.Comment)

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

func (*CommentWhereInput) Filter

Filter applies the CommentWhereInput filter on the CommentQuery builder.

func (*CommentWhereInput) P

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

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 CreateCommentInput

type CreateCommentInput struct {
	Text       string
	EpicIDs    []int
	ProjectIDs []int
	UserIDs    []int
}

CreateCommentInput represents a mutation input for creating comments.

func (*CreateCommentInput) Mutate

func (i *CreateCommentInput) Mutate(m *CommentMutation)

Mutate applies the CreateCommentInput on the CommentMutation builder.

type CreateEpicInput

type CreateEpicInput struct {
	Name        string
	Description string
	ProjectID   *int
	ReporterID  *int
	AssigneeID  *int
	CommentIDs  []int
}

CreateEpicInput represents a mutation input for creating epics.

func (*CreateEpicInput) Mutate

func (i *CreateEpicInput) Mutate(m *EpicMutation)

Mutate applies the CreateEpicInput on the EpicMutation builder.

type CreateProjectInput

type CreateProjectInput struct {
	Name        string
	Description *string
	EpicIDs     []int
	OwnerID     *int
	CommentIDs  []int
}

CreateProjectInput represents a mutation input for creating projects.

func (*CreateProjectInput) Mutate

func (i *CreateProjectInput) Mutate(m *ProjectMutation)

Mutate applies the CreateProjectInput on the ProjectMutation builder.

type CreateUserInput

type CreateUserInput struct {
	Name        string
	Surname     string
	Username    string
	Email       string
	OwnIDs      []int
	ReporterIDs []int
	AssigneeIDs []int
	CommentIDs  []int
}

CreateUserInput represents a mutation input for creating users.

func (*CreateUserInput) Mutate

func (i *CreateUserInput) Mutate(m *UserMutation)

Mutate applies the CreateUserInput on the UserMutation builder.

type Cursor

type Cursor struct {
	ID    int   `msgpack:"i"`
	Value Value `msgpack:"v,omitempty"`
}

Cursor of an edge type.

func (Cursor) MarshalGQL

func (c Cursor) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (*Cursor) UnmarshalGQL

func (c *Cursor) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type Edge

type Edge struct {
	Type string `json:"type,omitempty"` // edge type.
	Name string `json:"name,omitempty"` // edge name.
	IDs  []int  `json:"ids,omitempty"`  // node ids (where this edge point to).
}

Edges between two nodes.

type Epic

type Epic struct {

	// ID of the ent.
	ID int `json:"id,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EpicQuery when eager-loading is set.
	Edges EpicEdges `json:"edges"`
	// contains filtered or unexported fields
}

Epic is the model entity for the Epic schema.

func (*Epic) Assignee

func (e *Epic) Assignee(ctx context.Context) (*User, error)

func (*Epic) Comments

func (e *Epic) Comments(ctx context.Context) (result []*Comment, err error)

func (*Epic) NamedComments

func (e *Epic) NamedComments(name string) ([]*Comment, error)

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

func (*Epic) Node

func (e *Epic) Node(ctx context.Context) (node *Node, err error)

func (*Epic) Project

func (e *Epic) Project(ctx context.Context) (*Project, error)

func (*Epic) QueryAssignee

func (e *Epic) QueryAssignee() *UserQuery

QueryAssignee queries the "assignee" edge of the Epic entity.

func (*Epic) QueryComments

func (e *Epic) QueryComments() *CommentQuery

QueryComments queries the "comments" edge of the Epic entity.

func (*Epic) QueryProject

func (e *Epic) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Epic entity.

func (*Epic) QueryReporter

func (e *Epic) QueryReporter() *UserQuery

QueryReporter queries the "reporter" edge of the Epic entity.

func (*Epic) Reporter

func (e *Epic) Reporter(ctx context.Context) (*User, error)

func (*Epic) String

func (e *Epic) String() string

String implements the fmt.Stringer.

func (*Epic) ToEdge

func (e *Epic) ToEdge(order *EpicOrder) *EpicEdge

ToEdge converts Epic into EpicEdge.

func (*Epic) Unwrap

func (e *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 (e *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.

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(e *Epic) *EpicDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EpicClient) DeleteOneID

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

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

func (*EpicClient) Get

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

Get returns a Epic entity by its id.

func (*EpicClient) GetX

func (c *EpicClient) GetX(ctx context.Context, id int) *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)

Use 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) Query

func (c *EpicClient) Query() *EpicQuery

Query returns a query builder for Epic.

func (*EpicClient) QueryAssignee

func (c *EpicClient) QueryAssignee(e *Epic) *UserQuery

QueryAssignee queries the assignee edge of a Epic.

func (*EpicClient) QueryComments

func (c *EpicClient) QueryComments(e *Epic) *CommentQuery

QueryComments queries the comments edge of a Epic.

func (*EpicClient) QueryProject

func (c *EpicClient) QueryProject(e *Epic) *ProjectQuery

QueryProject queries the project edge of a Epic.

func (*EpicClient) QueryReporter

func (c *EpicClient) QueryReporter(e *Epic) *UserQuery

QueryReporter queries the reporter edge of a Epic.

func (*EpicClient) Update

func (c *EpicClient) Update() *EpicUpdate

Update returns an update builder for Epic.

func (*EpicClient) UpdateOne

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

UpdateOne returns an update builder for the given entity.

func (*EpicClient) UpdateOneID

func (c *EpicClient) UpdateOneID(id int) *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 EpicConnection

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

EpicConnection is the connection containing edges to Epic.

type EpicCreate

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

EpicCreate is the builder for creating a Epic entity.

func (*EpicCreate) AddCommentIDs

func (ec *EpicCreate) AddCommentIDs(ids ...int) *EpicCreate

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*EpicCreate) AddComments

func (ec *EpicCreate) AddComments(c ...*Comment) *EpicCreate

AddComments adds the "comments" edges to the Comment entity.

func (*EpicCreate) Exec

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

Exec executes the query.

func (*EpicCreate) ExecX

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

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

func (*EpicCreate) Mutation

func (ec *EpicCreate) Mutation() *EpicMutation

Mutation returns the EpicMutation object of the builder.

func (*EpicCreate) Save

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

Save creates the Epic in the database.

func (*EpicCreate) SaveX

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

SaveX calls Save and panics if Save returns an error.

func (*EpicCreate) SetAssignee

func (ec *EpicCreate) SetAssignee(u *User) *EpicCreate

SetAssignee sets the "assignee" edge to the User entity.

func (*EpicCreate) SetAssigneeID

func (ec *EpicCreate) SetAssigneeID(id int) *EpicCreate

SetAssigneeID sets the "assignee" edge to the User entity by ID.

func (*EpicCreate) SetDescription

func (ec *EpicCreate) SetDescription(s string) *EpicCreate

SetDescription sets the "description" field.

func (*EpicCreate) SetInput

func (c *EpicCreate) SetInput(i CreateEpicInput) *EpicCreate

SetInput applies the change-set in the CreateEpicInput on the EpicCreate builder.

func (*EpicCreate) SetName

func (ec *EpicCreate) SetName(s string) *EpicCreate

SetName sets the "name" field.

func (*EpicCreate) SetNillableAssigneeID

func (ec *EpicCreate) SetNillableAssigneeID(id *int) *EpicCreate

SetNillableAssigneeID sets the "assignee" edge to the User entity by ID if the given value is not nil.

func (*EpicCreate) SetNillableProjectID

func (ec *EpicCreate) SetNillableProjectID(id *int) *EpicCreate

SetNillableProjectID sets the "project" edge to the Project entity by ID if the given value is not nil.

func (*EpicCreate) SetNillableReporterID

func (ec *EpicCreate) SetNillableReporterID(id *int) *EpicCreate

SetNillableReporterID sets the "reporter" edge to the User entity by ID if the given value is not nil.

func (*EpicCreate) SetProject

func (ec *EpicCreate) SetProject(p *Project) *EpicCreate

SetProject sets the "project" edge to the Project entity.

func (*EpicCreate) SetProjectID

func (ec *EpicCreate) SetProjectID(id int) *EpicCreate

SetProjectID sets the "project" edge to the Project entity by ID.

func (*EpicCreate) SetReporter

func (ec *EpicCreate) SetReporter(u *User) *EpicCreate

SetReporter sets the "reporter" edge to the User entity.

func (*EpicCreate) SetReporterID

func (ec *EpicCreate) SetReporterID(id int) *EpicCreate

SetReporterID sets the "reporter" edge to the User entity by ID.

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 (ecb *EpicCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EpicCreateBulk) ExecX

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

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

func (*EpicCreateBulk) Save

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

Save creates the Epic entities in the database.

func (*EpicCreateBulk) SaveX

func (ecb *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 (ed *EpicDelete) Exec(ctx context.Context) (int, error)

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

func (*EpicDelete) ExecX

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

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

func (*EpicDelete) Where

func (ed *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 (edo *EpicDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EpicDeleteOne) ExecX

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

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

type EpicEdge

type EpicEdge struct {
	Node   *Epic  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

EpicEdge is the edge representation of Epic.

type EpicEdges

type EpicEdges struct {
	// Project holds the value of the project edge.
	Project *Project `json:"project,omitempty"`
	// Reporter holds the value of the reporter edge.
	Reporter *User `json:"reporter,omitempty"`
	// Assignee holds the value of the assignee edge.
	Assignee *User `json:"assignee,omitempty"`
	// Comments holds the value of the comments edge.
	Comments []*Comment `json:"comments,omitempty"`
	// contains filtered or unexported fields
}

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

func (EpicEdges) AssigneeOrErr

func (e EpicEdges) AssigneeOrErr() (*User, error)

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

func (EpicEdges) CommentsOrErr

func (e EpicEdges) CommentsOrErr() ([]*Comment, error)

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

func (EpicEdges) ProjectOrErr

func (e EpicEdges) ProjectOrErr() (*Project, error)

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

func (EpicEdges) ReporterOrErr

func (e EpicEdges) ReporterOrErr() (*User, error)

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

type EpicGroupBy

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

EpicGroupBy is the group-by builder for Epic entities.

func (*EpicGroupBy) Aggregate

func (egb *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 (egb *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) AddCommentIDs

func (m *EpicMutation) AddCommentIDs(ids ...int)

AddCommentIDs adds the "comments" edge to the Comment entity by ids.

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) 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) AssigneeCleared

func (m *EpicMutation) AssigneeCleared() bool

AssigneeCleared reports if the "assignee" edge to the User entity was cleared.

func (*EpicMutation) AssigneeID

func (m *EpicMutation) AssigneeID() (id int, exists bool)

AssigneeID returns the "assignee" edge ID in the mutation.

func (*EpicMutation) AssigneeIDs

func (m *EpicMutation) AssigneeIDs() (ids []int)

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

func (*EpicMutation) ClearAssignee

func (m *EpicMutation) ClearAssignee()

ClearAssignee clears the "assignee" edge to the User entity.

func (*EpicMutation) ClearComments

func (m *EpicMutation) ClearComments()

ClearComments clears the "comments" edge to the Comment entity.

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) ClearProject

func (m *EpicMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*EpicMutation) ClearReporter

func (m *EpicMutation) ClearReporter()

ClearReporter clears the "reporter" edge to the User entity.

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) CommentsCleared

func (m *EpicMutation) CommentsCleared() bool

CommentsCleared reports if the "comments" edge to the Comment entity was cleared.

func (*EpicMutation) CommentsIDs

func (m *EpicMutation) CommentsIDs() (ids []int)

CommentsIDs returns the "comments" edge IDs in the 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) 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 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 (*EpicMutation) IDs

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

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

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

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) 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) Op

func (m *EpicMutation) Op() Op

Op returns the operation name.

func (*EpicMutation) ProjectCleared

func (m *EpicMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*EpicMutation) ProjectID

func (m *EpicMutation) ProjectID() (id int, exists bool)

ProjectID returns the "project" edge ID in the mutation.

func (*EpicMutation) ProjectIDs

func (m *EpicMutation) ProjectIDs() (ids []int)

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

func (*EpicMutation) RemoveCommentIDs

func (m *EpicMutation) RemoveCommentIDs(ids ...int)

RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.

func (*EpicMutation) RemovedCommentsIDs

func (m *EpicMutation) RemovedCommentsIDs() (ids []int)

RemovedComments returns the removed IDs of the "comments" edge to the Comment entity.

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) ReporterCleared

func (m *EpicMutation) ReporterCleared() bool

ReporterCleared reports if the "reporter" edge to the User entity was cleared.

func (*EpicMutation) ReporterID

func (m *EpicMutation) ReporterID() (id int, exists bool)

ReporterID returns the "reporter" edge ID in the mutation.

func (*EpicMutation) ReporterIDs

func (m *EpicMutation) ReporterIDs() (ids []int)

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

func (*EpicMutation) ResetAssignee

func (m *EpicMutation) ResetAssignee()

ResetAssignee resets all changes to the "assignee" edge.

func (*EpicMutation) ResetComments

func (m *EpicMutation) ResetComments()

ResetComments resets all changes to the "comments" edge.

func (*EpicMutation) ResetDescription

func (m *EpicMutation) ResetDescription()

ResetDescription resets all changes to the "description" 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) ResetProject

func (m *EpicMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*EpicMutation) ResetReporter

func (m *EpicMutation) ResetReporter()

ResetReporter resets all changes to the "reporter" edge.

func (*EpicMutation) SetAssigneeID

func (m *EpicMutation) SetAssigneeID(id int)

SetAssigneeID sets the "assignee" edge to the User entity by id.

func (*EpicMutation) SetDescription

func (m *EpicMutation) SetDescription(s string)

SetDescription sets the "description" 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) 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) SetProjectID

func (m *EpicMutation) SetProjectID(id int)

SetProjectID sets the "project" edge to the Project entity by id.

func (*EpicMutation) SetReporterID

func (m *EpicMutation) SetReporterID(id int)

SetReporterID sets the "reporter" edge to the User entity by id.

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) 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 EpicOrder

type EpicOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *EpicOrderField `json:"field"`
}

EpicOrder defines the ordering of Epic.

type EpicOrderField

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

EpicOrderField defines the ordering field of Epic.

type EpicPaginateOption

type EpicPaginateOption func(*epicPager) error

EpicPaginateOption enables pagination customization.

func WithEpicFilter

func WithEpicFilter(filter func(*EpicQuery) (*EpicQuery, error)) EpicPaginateOption

WithEpicFilter configures pagination filter.

func WithEpicOrder

func WithEpicOrder(order *EpicOrder) EpicPaginateOption

WithEpicOrder configures pagination ordering.

type EpicQuery

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

EpicQuery is the builder for querying Epic entities.

func (*EpicQuery) Aggregate

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

Aggregate returns a EpicSelect configured with the given aggregations.

func (*EpicQuery) All

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

All executes the query and returns a list of Epics.

func (*EpicQuery) AllX

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

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

func (*EpicQuery) Clone

func (eq *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) CollectFields

func (e *EpicQuery) CollectFields(ctx context.Context, satisfies ...string) (*EpicQuery, error)

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

func (*EpicQuery) Count

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

Count returns the count of the given query.

func (*EpicQuery) CountX

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

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

func (*EpicQuery) Exist

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

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

func (*EpicQuery) ExistX

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

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

func (*EpicQuery) First

func (eq *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 (eq *EpicQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*EpicQuery) FirstIDX

func (eq *EpicQuery) FirstIDX(ctx context.Context) int

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

func (*EpicQuery) FirstX

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

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

func (*EpicQuery) GroupBy

func (eq *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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

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

func (*EpicQuery) IDs

func (eq *EpicQuery) IDs(ctx context.Context) ([]int, error)

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

func (*EpicQuery) IDsX

func (eq *EpicQuery) IDsX(ctx context.Context) []int

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

func (*EpicQuery) Limit

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

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

func (*EpicQuery) Offset

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

Offset to start from.

func (*EpicQuery) Only

func (eq *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 (eq *EpicQuery) OnlyID(ctx context.Context) (id int, 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 (eq *EpicQuery) OnlyIDX(ctx context.Context) int

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

func (*EpicQuery) OnlyX

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

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

func (*EpicQuery) Order

func (eq *EpicQuery) Order(o ...OrderFunc) *EpicQuery

Order specifies how the records should be ordered.

func (*EpicQuery) Paginate

func (e *EpicQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...EpicPaginateOption,
) (*EpicConnection, error)

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

func (*EpicQuery) QueryAssignee

func (eq *EpicQuery) QueryAssignee() *UserQuery

QueryAssignee chains the current query on the "assignee" edge.

func (*EpicQuery) QueryComments

func (eq *EpicQuery) QueryComments() *CommentQuery

QueryComments chains the current query on the "comments" edge.

func (*EpicQuery) QueryProject

func (eq *EpicQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*EpicQuery) QueryReporter

func (eq *EpicQuery) QueryReporter() *UserQuery

QueryReporter chains the current query on the "reporter" edge.

func (*EpicQuery) Select

func (eq *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 {
	Name string `json:"name,omitempty"`
}

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

func (*EpicQuery) Unique

func (eq *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 (eq *EpicQuery) Where(ps ...predicate.Epic) *EpicQuery

Where adds a new predicate for the EpicQuery builder.

func (*EpicQuery) WithAssignee

func (eq *EpicQuery) WithAssignee(opts ...func(*UserQuery)) *EpicQuery

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

func (*EpicQuery) WithComments

func (eq *EpicQuery) WithComments(opts ...func(*CommentQuery)) *EpicQuery

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

func (*EpicQuery) WithNamedComments

func (eq *EpicQuery) WithNamedComments(name string, opts ...func(*CommentQuery)) *EpicQuery

WithNamedComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EpicQuery) WithProject

func (eq *EpicQuery) WithProject(opts ...func(*ProjectQuery)) *EpicQuery

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

func (*EpicQuery) WithReporter

func (eq *EpicQuery) WithReporter(opts ...func(*UserQuery)) *EpicQuery

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

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 (es *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 (es *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) AddCommentIDs

func (eu *EpicUpdate) AddCommentIDs(ids ...int) *EpicUpdate

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*EpicUpdate) AddComments

func (eu *EpicUpdate) AddComments(c ...*Comment) *EpicUpdate

AddComments adds the "comments" edges to the Comment entity.

func (*EpicUpdate) ClearAssignee

func (eu *EpicUpdate) ClearAssignee() *EpicUpdate

ClearAssignee clears the "assignee" edge to the User entity.

func (*EpicUpdate) ClearComments

func (eu *EpicUpdate) ClearComments() *EpicUpdate

ClearComments clears all "comments" edges to the Comment entity.

func (*EpicUpdate) ClearProject

func (eu *EpicUpdate) ClearProject() *EpicUpdate

ClearProject clears the "project" edge to the Project entity.

func (*EpicUpdate) ClearReporter

func (eu *EpicUpdate) ClearReporter() *EpicUpdate

ClearReporter clears the "reporter" edge to the User entity.

func (*EpicUpdate) Exec

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

Exec executes the query.

func (*EpicUpdate) ExecX

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

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

func (*EpicUpdate) Mutation

func (eu *EpicUpdate) Mutation() *EpicMutation

Mutation returns the EpicMutation object of the builder.

func (*EpicUpdate) RemoveCommentIDs

func (eu *EpicUpdate) RemoveCommentIDs(ids ...int) *EpicUpdate

RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.

func (*EpicUpdate) RemoveComments

func (eu *EpicUpdate) RemoveComments(c ...*Comment) *EpicUpdate

RemoveComments removes "comments" edges to Comment entities.

func (*EpicUpdate) Save

func (eu *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 (eu *EpicUpdate) SaveX(ctx context.Context) int

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

func (*EpicUpdate) SetAssignee

func (eu *EpicUpdate) SetAssignee(u *User) *EpicUpdate

SetAssignee sets the "assignee" edge to the User entity.

func (*EpicUpdate) SetAssigneeID

func (eu *EpicUpdate) SetAssigneeID(id int) *EpicUpdate

SetAssigneeID sets the "assignee" edge to the User entity by ID.

func (*EpicUpdate) SetDescription

func (eu *EpicUpdate) SetDescription(s string) *EpicUpdate

SetDescription sets the "description" field.

func (*EpicUpdate) SetInput

func (c *EpicUpdate) SetInput(i UpdateEpicInput) *EpicUpdate

SetInput applies the change-set in the UpdateEpicInput on the EpicUpdate builder.

func (*EpicUpdate) SetName

func (eu *EpicUpdate) SetName(s string) *EpicUpdate

SetName sets the "name" field.

func (*EpicUpdate) SetNillableAssigneeID

func (eu *EpicUpdate) SetNillableAssigneeID(id *int) *EpicUpdate

SetNillableAssigneeID sets the "assignee" edge to the User entity by ID if the given value is not nil.

func (*EpicUpdate) SetNillableProjectID

func (eu *EpicUpdate) SetNillableProjectID(id *int) *EpicUpdate

SetNillableProjectID sets the "project" edge to the Project entity by ID if the given value is not nil.

func (*EpicUpdate) SetNillableReporterID

func (eu *EpicUpdate) SetNillableReporterID(id *int) *EpicUpdate

SetNillableReporterID sets the "reporter" edge to the User entity by ID if the given value is not nil.

func (*EpicUpdate) SetProject

func (eu *EpicUpdate) SetProject(p *Project) *EpicUpdate

SetProject sets the "project" edge to the Project entity.

func (*EpicUpdate) SetProjectID

func (eu *EpicUpdate) SetProjectID(id int) *EpicUpdate

SetProjectID sets the "project" edge to the Project entity by ID.

func (*EpicUpdate) SetReporter

func (eu *EpicUpdate) SetReporter(u *User) *EpicUpdate

SetReporter sets the "reporter" edge to the User entity.

func (*EpicUpdate) SetReporterID

func (eu *EpicUpdate) SetReporterID(id int) *EpicUpdate

SetReporterID sets the "reporter" edge to the User entity by ID.

func (*EpicUpdate) Where

func (eu *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) AddCommentIDs

func (euo *EpicUpdateOne) AddCommentIDs(ids ...int) *EpicUpdateOne

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*EpicUpdateOne) AddComments

func (euo *EpicUpdateOne) AddComments(c ...*Comment) *EpicUpdateOne

AddComments adds the "comments" edges to the Comment entity.

func (*EpicUpdateOne) ClearAssignee

func (euo *EpicUpdateOne) ClearAssignee() *EpicUpdateOne

ClearAssignee clears the "assignee" edge to the User entity.

func (*EpicUpdateOne) ClearComments

func (euo *EpicUpdateOne) ClearComments() *EpicUpdateOne

ClearComments clears all "comments" edges to the Comment entity.

func (*EpicUpdateOne) ClearProject

func (euo *EpicUpdateOne) ClearProject() *EpicUpdateOne

ClearProject clears the "project" edge to the Project entity.

func (*EpicUpdateOne) ClearReporter

func (euo *EpicUpdateOne) ClearReporter() *EpicUpdateOne

ClearReporter clears the "reporter" edge to the User entity.

func (*EpicUpdateOne) Exec

func (euo *EpicUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EpicUpdateOne) ExecX

func (euo *EpicUpdateOne) ExecX(ctx context.Context)

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

func (*EpicUpdateOne) Mutation

func (euo *EpicUpdateOne) Mutation() *EpicMutation

Mutation returns the EpicMutation object of the builder.

func (*EpicUpdateOne) RemoveCommentIDs

func (euo *EpicUpdateOne) RemoveCommentIDs(ids ...int) *EpicUpdateOne

RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.

func (*EpicUpdateOne) RemoveComments

func (euo *EpicUpdateOne) RemoveComments(c ...*Comment) *EpicUpdateOne

RemoveComments removes "comments" edges to Comment entities.

func (*EpicUpdateOne) Save

func (euo *EpicUpdateOne) Save(ctx context.Context) (*Epic, error)

Save executes the query and returns the updated Epic entity.

func (*EpicUpdateOne) SaveX

func (euo *EpicUpdateOne) SaveX(ctx context.Context) *Epic

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

func (*EpicUpdateOne) Select

func (euo *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) SetAssignee

func (euo *EpicUpdateOne) SetAssignee(u *User) *EpicUpdateOne

SetAssignee sets the "assignee" edge to the User entity.

func (*EpicUpdateOne) SetAssigneeID

func (euo *EpicUpdateOne) SetAssigneeID(id int) *EpicUpdateOne

SetAssigneeID sets the "assignee" edge to the User entity by ID.

func (*EpicUpdateOne) SetDescription

func (euo *EpicUpdateOne) SetDescription(s string) *EpicUpdateOne

SetDescription sets the "description" field.

func (*EpicUpdateOne) SetInput

SetInput applies the change-set in the UpdateEpicInput on the EpicUpdateOne builder.

func (*EpicUpdateOne) SetName

func (euo *EpicUpdateOne) SetName(s string) *EpicUpdateOne

SetName sets the "name" field.

func (*EpicUpdateOne) SetNillableAssigneeID

func (euo *EpicUpdateOne) SetNillableAssigneeID(id *int) *EpicUpdateOne

SetNillableAssigneeID sets the "assignee" edge to the User entity by ID if the given value is not nil.

func (*EpicUpdateOne) SetNillableProjectID

func (euo *EpicUpdateOne) SetNillableProjectID(id *int) *EpicUpdateOne

SetNillableProjectID sets the "project" edge to the Project entity by ID if the given value is not nil.

func (*EpicUpdateOne) SetNillableReporterID

func (euo *EpicUpdateOne) SetNillableReporterID(id *int) *EpicUpdateOne

SetNillableReporterID sets the "reporter" edge to the User entity by ID if the given value is not nil.

func (*EpicUpdateOne) SetProject

func (euo *EpicUpdateOne) SetProject(p *Project) *EpicUpdateOne

SetProject sets the "project" edge to the Project entity.

func (*EpicUpdateOne) SetProjectID

func (euo *EpicUpdateOne) SetProjectID(id int) *EpicUpdateOne

SetProjectID sets the "project" edge to the Project entity by ID.

func (*EpicUpdateOne) SetReporter

func (euo *EpicUpdateOne) SetReporter(u *User) *EpicUpdateOne

SetReporter sets the "reporter" edge to the User entity.

func (*EpicUpdateOne) SetReporterID

func (euo *EpicUpdateOne) SetReporterID(id int) *EpicUpdateOne

SetReporterID sets the "reporter" edge to the User entity by ID.

type EpicWhereInput

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

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

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

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`

	// "project" edge predicates.
	HasProject     *bool                `json:"hasProject,omitempty"`
	HasProjectWith []*ProjectWhereInput `json:"hasProjectWith,omitempty"`

	// "reporter" edge predicates.
	HasReporter     *bool             `json:"hasReporter,omitempty"`
	HasReporterWith []*UserWhereInput `json:"hasReporterWith,omitempty"`

	// "assignee" edge predicates.
	HasAssignee     *bool             `json:"hasAssignee,omitempty"`
	HasAssigneeWith []*UserWhereInput `json:"hasAssigneeWith,omitempty"`

	// "comments" edge predicates.
	HasComments     *bool                `json:"hasComments,omitempty"`
	HasCommentsWith []*CommentWhereInput `json:"hasCommentsWith,omitempty"`
}

EpicWhereInput represents a where input for filtering Epic queries.

func (*EpicWhereInput) AddPredicates

func (i *EpicWhereInput) AddPredicates(predicates ...predicate.Epic)

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

func (*EpicWhereInput) Filter

func (i *EpicWhereInput) Filter(q *EpicQuery) (*EpicQuery, error)

Filter applies the EpicWhereInput filter on the EpicQuery builder.

func (*EpicWhereInput) P

func (i *EpicWhereInput) P() (predicate.Epic, error)

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

type Epics

type Epics []*Epic

Epics is a parsable slice of Epic.

type Field

type Field struct {
	Type  string `json:"type,omitempty"`  // field type.
	Name  string `json:"name,omitempty"`  // field name (as in struct).
	Value string `json:"value,omitempty"` // stringified value.
}

Field of a node.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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 Node

type Node struct {
	ID     int      `json:"id,omitempty"`     // node id.
	Type   string   `json:"type,omitempty"`   // node type.
	Fields []*Field `json:"fields,omitempty"` // node fields.
	Edges  []*Edge  `json:"edges,omitempty"`  // node edges.
}

Node in the graph.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	Node(context.Context) (*Node, error)
}

Noder wraps the basic Node method.

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection string

OrderDirection defines the directions in which to order a list of items.

const (
	// OrderDirectionAsc specifies an ascending order.
	OrderDirectionAsc OrderDirection = "ASC"
	// OrderDirectionDesc specifies a descending order.
	OrderDirectionDesc OrderDirection = "DESC"
)

func (OrderDirection) MarshalGQL

func (o OrderDirection) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OrderDirection) String

func (o OrderDirection) String() string

String implements fmt.Stringer interface.

func (*OrderDirection) UnmarshalGQL

func (o *OrderDirection) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

func (OrderDirection) Validate

func (o OrderDirection) Validate() error

Validate the order direction value.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type PageInfo

type PageInfo struct {
	HasNextPage     bool    `json:"hasNextPage"`
	HasPreviousPage bool    `json:"hasPreviousPage"`
	StartCursor     *Cursor `json:"startCursor"`
	EndCursor       *Cursor `json:"endCursor"`
}

PageInfo of a connection type.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Project

type Project struct {

	// ID of the ent.
	ID int `json:"id,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProjectQuery when eager-loading is set.
	Edges ProjectEdges `json:"edges"`
	// contains filtered or unexported fields
}

Project is the model entity for the Project schema.

func (*Project) Comments

func (pr *Project) Comments(ctx context.Context) (result []*Comment, err error)

func (*Project) Epics

func (pr *Project) Epics(ctx context.Context) (result []*Epic, err error)

func (*Project) NamedComments

func (pr *Project) NamedComments(name string) ([]*Comment, error)

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

func (*Project) NamedEpics

func (pr *Project) NamedEpics(name string) ([]*Epic, error)

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

func (*Project) Node

func (pr *Project) Node(ctx context.Context) (node *Node, err error)

func (*Project) Owner

func (pr *Project) Owner(ctx context.Context) (*User, error)

func (*Project) QueryComments

func (pr *Project) QueryComments() *CommentQuery

QueryComments queries the "comments" edge of the Project entity.

func (*Project) QueryEpics

func (pr *Project) QueryEpics() *EpicQuery

QueryEpics queries the "epics" edge of the Project entity.

func (*Project) QueryOwner

func (pr *Project) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the Project entity.

func (*Project) String

func (pr *Project) String() string

String implements the fmt.Stringer.

func (*Project) ToEdge

func (pr *Project) ToEdge(order *ProjectOrder) *ProjectEdge

ToEdge converts Project into ProjectEdge.

func (*Project) Unwrap

func (pr *Project) Unwrap() *Project

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

func (pr *Project) Update() *ProjectUpdateOne

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

type ProjectClient

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

ProjectClient is a client for the Project schema.

func NewProjectClient

func NewProjectClient(c config) *ProjectClient

NewProjectClient returns a client for the Project from the given config.

func (*ProjectClient) Create

func (c *ProjectClient) Create() *ProjectCreate

Create returns a builder for creating a Project entity.

func (*ProjectClient) CreateBulk

func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk

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

func (*ProjectClient) Delete

func (c *ProjectClient) Delete() *ProjectDelete

Delete returns a delete builder for Project.

func (*ProjectClient) DeleteOne

func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProjectClient) DeleteOneID

func (c *ProjectClient) DeleteOneID(id int) *ProjectDeleteOne

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

func (*ProjectClient) Get

func (c *ProjectClient) Get(ctx context.Context, id int) (*Project, error)

Get returns a Project entity by its id.

func (*ProjectClient) GetX

func (c *ProjectClient) GetX(ctx context.Context, id int) *Project

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

func (*ProjectClient) Hooks

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

Hooks returns the client hooks.

func (*ProjectClient) Intercept

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

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

func (*ProjectClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ProjectClient) Query

func (c *ProjectClient) Query() *ProjectQuery

Query returns a query builder for Project.

func (*ProjectClient) QueryComments

func (c *ProjectClient) QueryComments(pr *Project) *CommentQuery

QueryComments queries the comments edge of a Project.

func (*ProjectClient) QueryEpics

func (c *ProjectClient) QueryEpics(pr *Project) *EpicQuery

QueryEpics queries the epics edge of a Project.

func (*ProjectClient) QueryOwner

func (c *ProjectClient) QueryOwner(pr *Project) *UserQuery

QueryOwner queries the owner edge of a Project.

func (*ProjectClient) Update

func (c *ProjectClient) Update() *ProjectUpdate

Update returns an update builder for Project.

func (*ProjectClient) UpdateOne

func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProjectClient) UpdateOneID

func (c *ProjectClient) UpdateOneID(id int) *ProjectUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProjectClient) Use

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

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

type ProjectConnection

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

ProjectConnection is the connection containing edges to Project.

type ProjectCreate

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

ProjectCreate is the builder for creating a Project entity.

func (*ProjectCreate) AddCommentIDs

func (pc *ProjectCreate) AddCommentIDs(ids ...int) *ProjectCreate

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*ProjectCreate) AddComments

func (pc *ProjectCreate) AddComments(c ...*Comment) *ProjectCreate

AddComments adds the "comments" edges to the Comment entity.

func (*ProjectCreate) AddEpicIDs

func (pc *ProjectCreate) AddEpicIDs(ids ...int) *ProjectCreate

AddEpicIDs adds the "epics" edge to the Epic entity by IDs.

func (*ProjectCreate) AddEpics

func (pc *ProjectCreate) AddEpics(e ...*Epic) *ProjectCreate

AddEpics adds the "epics" edges to the Epic entity.

func (*ProjectCreate) Exec

func (pc *ProjectCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreate) ExecX

func (pc *ProjectCreate) ExecX(ctx context.Context)

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

func (*ProjectCreate) Mutation

func (pc *ProjectCreate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectCreate) Save

func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)

Save creates the Project in the database.

func (*ProjectCreate) SaveX

func (pc *ProjectCreate) SaveX(ctx context.Context) *Project

SaveX calls Save and panics if Save returns an error.

func (*ProjectCreate) SetDescription

func (pc *ProjectCreate) SetDescription(s string) *ProjectCreate

SetDescription sets the "description" field.

func (*ProjectCreate) SetInput

SetInput applies the change-set in the CreateProjectInput on the ProjectCreate builder.

func (*ProjectCreate) SetName

func (pc *ProjectCreate) SetName(s string) *ProjectCreate

SetName sets the "name" field.

func (*ProjectCreate) SetNillableDescription

func (pc *ProjectCreate) SetNillableDescription(s *string) *ProjectCreate

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

func (*ProjectCreate) SetNillableOwnerID

func (pc *ProjectCreate) SetNillableOwnerID(id *int) *ProjectCreate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*ProjectCreate) SetOwner

func (pc *ProjectCreate) SetOwner(u *User) *ProjectCreate

SetOwner sets the "owner" edge to the User entity.

func (*ProjectCreate) SetOwnerID

func (pc *ProjectCreate) SetOwnerID(id int) *ProjectCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

type ProjectCreateBulk

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

ProjectCreateBulk is the builder for creating many Project entities in bulk.

func (*ProjectCreateBulk) Exec

func (pcb *ProjectCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreateBulk) ExecX

func (pcb *ProjectCreateBulk) ExecX(ctx context.Context)

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

func (*ProjectCreateBulk) Save

func (pcb *ProjectCreateBulk) Save(ctx context.Context) ([]*Project, error)

Save creates the Project entities in the database.

func (*ProjectCreateBulk) SaveX

func (pcb *ProjectCreateBulk) SaveX(ctx context.Context) []*Project

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

type ProjectDelete

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

ProjectDelete is the builder for deleting a Project entity.

func (*ProjectDelete) Exec

func (pd *ProjectDelete) Exec(ctx context.Context) (int, error)

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

func (*ProjectDelete) ExecX

func (pd *ProjectDelete) ExecX(ctx context.Context) int

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

func (*ProjectDelete) Where

func (pd *ProjectDelete) Where(ps ...predicate.Project) *ProjectDelete

Where appends a list predicates to the ProjectDelete builder.

type ProjectDeleteOne

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

ProjectDeleteOne is the builder for deleting a single Project entity.

func (*ProjectDeleteOne) Exec

func (pdo *ProjectDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProjectDeleteOne) ExecX

func (pdo *ProjectDeleteOne) ExecX(ctx context.Context)

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

type ProjectEdge

type ProjectEdge struct {
	Node   *Project `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

ProjectEdge is the edge representation of Project.

type ProjectEdges

type ProjectEdges struct {
	// Epics holds the value of the epics edge.
	Epics []*Epic `json:"epics,omitempty"`
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// Comments holds the value of the comments edge.
	Comments []*Comment `json:"comments,omitempty"`
	// contains filtered or unexported fields
}

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

func (ProjectEdges) CommentsOrErr

func (e ProjectEdges) CommentsOrErr() ([]*Comment, error)

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

func (ProjectEdges) EpicsOrErr

func (e ProjectEdges) EpicsOrErr() ([]*Epic, error)

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

func (ProjectEdges) OwnerOrErr

func (e ProjectEdges) OwnerOrErr() (*User, error)

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

type ProjectGroupBy

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

ProjectGroupBy is the group-by builder for Project entities.

func (*ProjectGroupBy) Aggregate

func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy

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

func (*ProjectGroupBy) Bool

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

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

func (*ProjectGroupBy) BoolX

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

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

func (*ProjectGroupBy) Bools

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

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

func (*ProjectGroupBy) BoolsX

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

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

func (*ProjectGroupBy) Float64

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

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

func (*ProjectGroupBy) Float64X

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

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

func (*ProjectGroupBy) Float64s

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

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

func (*ProjectGroupBy) Float64sX

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

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

func (*ProjectGroupBy) Int

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

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

func (*ProjectGroupBy) IntX

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

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

func (*ProjectGroupBy) Ints

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

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

func (*ProjectGroupBy) IntsX

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

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

func (*ProjectGroupBy) Scan

func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error

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

func (*ProjectGroupBy) ScanX

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

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

func (*ProjectGroupBy) String

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

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

func (*ProjectGroupBy) StringX

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

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

func (*ProjectGroupBy) Strings

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

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

func (*ProjectGroupBy) StringsX

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

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

type ProjectMutation

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

ProjectMutation represents an operation that mutates the Project nodes in the graph.

func (*ProjectMutation) AddCommentIDs

func (m *ProjectMutation) AddCommentIDs(ids ...int)

AddCommentIDs adds the "comments" edge to the Comment entity by ids.

func (*ProjectMutation) AddEpicIDs

func (m *ProjectMutation) AddEpicIDs(ids ...int)

AddEpicIDs adds the "epics" edge to the Epic entity by ids.

func (*ProjectMutation) AddField

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

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

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

func (*ProjectMutation) AddedField

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

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

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

func (*ProjectMutation) AddedIDs

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

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

func (*ProjectMutation) ClearComments

func (m *ProjectMutation) ClearComments()

ClearComments clears the "comments" edge to the Comment entity.

func (*ProjectMutation) ClearDescription

func (m *ProjectMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ProjectMutation) ClearEdge

func (m *ProjectMutation) 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 (*ProjectMutation) ClearEpics

func (m *ProjectMutation) ClearEpics()

ClearEpics clears the "epics" edge to the Epic entity.

func (*ProjectMutation) ClearField

func (m *ProjectMutation) 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 (*ProjectMutation) ClearOwner

func (m *ProjectMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*ProjectMutation) ClearedEdges

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

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

func (*ProjectMutation) ClearedFields

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

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

func (ProjectMutation) Client

func (m ProjectMutation) 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 (*ProjectMutation) CommentsCleared

func (m *ProjectMutation) CommentsCleared() bool

CommentsCleared reports if the "comments" edge to the Comment entity was cleared.

func (*ProjectMutation) CommentsIDs

func (m *ProjectMutation) CommentsIDs() (ids []int)

CommentsIDs returns the "comments" edge IDs in the mutation.

func (*ProjectMutation) Description

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

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

func (*ProjectMutation) DescriptionCleared

func (m *ProjectMutation) DescriptionCleared() bool

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

func (*ProjectMutation) EdgeCleared

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

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

func (*ProjectMutation) EpicsCleared

func (m *ProjectMutation) EpicsCleared() bool

EpicsCleared reports if the "epics" edge to the Epic entity was cleared.

func (*ProjectMutation) EpicsIDs

func (m *ProjectMutation) EpicsIDs() (ids []int)

EpicsIDs returns the "epics" edge IDs in the mutation.

func (*ProjectMutation) Field

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

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

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

func (*ProjectMutation) Fields

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

func (m *ProjectMutation) 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 (*ProjectMutation) IDs

func (m *ProjectMutation) 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 (*ProjectMutation) Name

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

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

func (*ProjectMutation) OldDescription

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

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

func (*ProjectMutation) OldField

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

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

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

func (*ProjectMutation) Op

func (m *ProjectMutation) Op() Op

Op returns the operation name.

func (*ProjectMutation) OwnerCleared

func (m *ProjectMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*ProjectMutation) OwnerID

func (m *ProjectMutation) OwnerID() (id int, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*ProjectMutation) OwnerIDs

func (m *ProjectMutation) OwnerIDs() (ids []int)

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

func (*ProjectMutation) RemoveCommentIDs

func (m *ProjectMutation) RemoveCommentIDs(ids ...int)

RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.

func (*ProjectMutation) RemoveEpicIDs

func (m *ProjectMutation) RemoveEpicIDs(ids ...int)

RemoveEpicIDs removes the "epics" edge to the Epic entity by IDs.

func (*ProjectMutation) RemovedCommentsIDs

func (m *ProjectMutation) RemovedCommentsIDs() (ids []int)

RemovedComments returns the removed IDs of the "comments" edge to the Comment entity.

func (*ProjectMutation) RemovedEdges

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

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

func (*ProjectMutation) RemovedEpicsIDs

func (m *ProjectMutation) RemovedEpicsIDs() (ids []int)

RemovedEpics returns the removed IDs of the "epics" edge to the Epic entity.

func (*ProjectMutation) RemovedIDs

func (m *ProjectMutation) 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 (*ProjectMutation) ResetComments

func (m *ProjectMutation) ResetComments()

ResetComments resets all changes to the "comments" edge.

func (*ProjectMutation) ResetDescription

func (m *ProjectMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ProjectMutation) ResetEdge

func (m *ProjectMutation) 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 (*ProjectMutation) ResetEpics

func (m *ProjectMutation) ResetEpics()

ResetEpics resets all changes to the "epics" edge.

func (*ProjectMutation) ResetField

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

func (m *ProjectMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProjectMutation) ResetOwner

func (m *ProjectMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*ProjectMutation) SetDescription

func (m *ProjectMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ProjectMutation) SetField

func (m *ProjectMutation) 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 (*ProjectMutation) SetName

func (m *ProjectMutation) SetName(s string)

SetName sets the "name" field.

func (*ProjectMutation) SetOp

func (m *ProjectMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProjectMutation) SetOwnerID

func (m *ProjectMutation) SetOwnerID(id int)

SetOwnerID sets the "owner" edge to the User entity by id.

func (ProjectMutation) Tx

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

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

func (*ProjectMutation) Type

func (m *ProjectMutation) Type() string

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

func (*ProjectMutation) Where

func (m *ProjectMutation) Where(ps ...predicate.Project)

Where appends a list predicates to the ProjectMutation builder.

func (*ProjectMutation) WhereP

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

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

type ProjectOrder

type ProjectOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *ProjectOrderField `json:"field"`
}

ProjectOrder defines the ordering of Project.

type ProjectOrderField

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

ProjectOrderField defines the ordering field of Project.

type ProjectPaginateOption

type ProjectPaginateOption func(*projectPager) error

ProjectPaginateOption enables pagination customization.

func WithProjectFilter

func WithProjectFilter(filter func(*ProjectQuery) (*ProjectQuery, error)) ProjectPaginateOption

WithProjectFilter configures pagination filter.

func WithProjectOrder

func WithProjectOrder(order *ProjectOrder) ProjectPaginateOption

WithProjectOrder configures pagination ordering.

type ProjectQuery

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

ProjectQuery is the builder for querying Project entities.

func (*ProjectQuery) Aggregate

func (pq *ProjectQuery) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate returns a ProjectSelect configured with the given aggregations.

func (*ProjectQuery) All

func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)

All executes the query and returns a list of Projects.

func (*ProjectQuery) AllX

func (pq *ProjectQuery) AllX(ctx context.Context) []*Project

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

func (*ProjectQuery) Clone

func (pq *ProjectQuery) Clone() *ProjectQuery

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

func (*ProjectQuery) CollectFields

func (pr *ProjectQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProjectQuery, error)

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

func (*ProjectQuery) Count

func (pq *ProjectQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProjectQuery) CountX

func (pq *ProjectQuery) CountX(ctx context.Context) int

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

func (*ProjectQuery) Exist

func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)

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

func (*ProjectQuery) ExistX

func (pq *ProjectQuery) ExistX(ctx context.Context) bool

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

func (*ProjectQuery) First

func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)

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

func (*ProjectQuery) FirstID

func (pq *ProjectQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ProjectQuery) FirstIDX

func (pq *ProjectQuery) FirstIDX(ctx context.Context) int

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

func (*ProjectQuery) FirstX

func (pq *ProjectQuery) FirstX(ctx context.Context) *Project

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

func (*ProjectQuery) GroupBy

func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy

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.Project.Query().
	GroupBy(project.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProjectQuery) IDs

func (pq *ProjectQuery) IDs(ctx context.Context) ([]int, error)

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

func (*ProjectQuery) IDsX

func (pq *ProjectQuery) IDsX(ctx context.Context) []int

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

func (*ProjectQuery) Limit

func (pq *ProjectQuery) Limit(limit int) *ProjectQuery

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

func (*ProjectQuery) Offset

func (pq *ProjectQuery) Offset(offset int) *ProjectQuery

Offset to start from.

func (*ProjectQuery) Only

func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)

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

func (*ProjectQuery) OnlyID

func (pq *ProjectQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ProjectQuery) OnlyIDX

func (pq *ProjectQuery) OnlyIDX(ctx context.Context) int

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

func (*ProjectQuery) OnlyX

func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project

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

func (*ProjectQuery) Order

func (pq *ProjectQuery) Order(o ...OrderFunc) *ProjectQuery

Order specifies how the records should be ordered.

func (*ProjectQuery) Paginate

func (pr *ProjectQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ProjectPaginateOption,
) (*ProjectConnection, error)

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

func (*ProjectQuery) QueryComments

func (pq *ProjectQuery) QueryComments() *CommentQuery

QueryComments chains the current query on the "comments" edge.

func (*ProjectQuery) QueryEpics

func (pq *ProjectQuery) QueryEpics() *EpicQuery

QueryEpics chains the current query on the "epics" edge.

func (*ProjectQuery) QueryOwner

func (pq *ProjectQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*ProjectQuery) Select

func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect

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.Project.Query().
	Select(project.FieldName).
	Scan(ctx, &v)

func (*ProjectQuery) Unique

func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery

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

func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery

Where adds a new predicate for the ProjectQuery builder.

func (*ProjectQuery) WithComments

func (pq *ProjectQuery) WithComments(opts ...func(*CommentQuery)) *ProjectQuery

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

func (*ProjectQuery) WithEpics

func (pq *ProjectQuery) WithEpics(opts ...func(*EpicQuery)) *ProjectQuery

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

func (*ProjectQuery) WithNamedComments

func (pq *ProjectQuery) WithNamedComments(name string, opts ...func(*CommentQuery)) *ProjectQuery

WithNamedComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithNamedEpics

func (pq *ProjectQuery) WithNamedEpics(name string, opts ...func(*EpicQuery)) *ProjectQuery

WithNamedEpics tells the query-builder to eager-load the nodes that are connected to the "epics" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithOwner

func (pq *ProjectQuery) WithOwner(opts ...func(*UserQuery)) *ProjectQuery

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

type ProjectSelect

type ProjectSelect struct {
	*ProjectQuery
	// contains filtered or unexported fields
}

ProjectSelect is the builder for selecting fields of Project entities.

func (*ProjectSelect) Aggregate

func (ps *ProjectSelect) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProjectSelect) Bool

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

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

func (*ProjectSelect) BoolX

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

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

func (*ProjectSelect) Bools

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

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

func (*ProjectSelect) BoolsX

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

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

func (*ProjectSelect) Float64

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

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

func (*ProjectSelect) Float64X

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

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

func (*ProjectSelect) Float64s

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

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

func (*ProjectSelect) Float64sX

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

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

func (*ProjectSelect) Int

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

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

func (*ProjectSelect) IntX

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

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

func (*ProjectSelect) Ints

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

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

func (*ProjectSelect) IntsX

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

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

func (*ProjectSelect) Scan

func (ps *ProjectSelect) Scan(ctx context.Context, v any) error

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

func (*ProjectSelect) ScanX

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

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

func (*ProjectSelect) String

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

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

func (*ProjectSelect) StringX

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

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

func (*ProjectSelect) Strings

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

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

func (*ProjectSelect) StringsX

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

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

type ProjectUpdate

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

ProjectUpdate is the builder for updating Project entities.

func (*ProjectUpdate) AddCommentIDs

func (pu *ProjectUpdate) AddCommentIDs(ids ...int) *ProjectUpdate

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*ProjectUpdate) AddComments

func (pu *ProjectUpdate) AddComments(c ...*Comment) *ProjectUpdate

AddComments adds the "comments" edges to the Comment entity.

func (*ProjectUpdate) AddEpicIDs

func (pu *ProjectUpdate) AddEpicIDs(ids ...int) *ProjectUpdate

AddEpicIDs adds the "epics" edge to the Epic entity by IDs.

func (*ProjectUpdate) AddEpics

func (pu *ProjectUpdate) AddEpics(e ...*Epic) *ProjectUpdate

AddEpics adds the "epics" edges to the Epic entity.

func (*ProjectUpdate) ClearComments

func (pu *ProjectUpdate) ClearComments() *ProjectUpdate

ClearComments clears all "comments" edges to the Comment entity.

func (*ProjectUpdate) ClearDescription

func (pu *ProjectUpdate) ClearDescription() *ProjectUpdate

ClearDescription clears the value of the "description" field.

func (*ProjectUpdate) ClearEpics

func (pu *ProjectUpdate) ClearEpics() *ProjectUpdate

ClearEpics clears all "epics" edges to the Epic entity.

func (*ProjectUpdate) ClearOwner

func (pu *ProjectUpdate) ClearOwner() *ProjectUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*ProjectUpdate) Exec

func (pu *ProjectUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpdate) ExecX

func (pu *ProjectUpdate) ExecX(ctx context.Context)

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

func (*ProjectUpdate) Mutation

func (pu *ProjectUpdate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdate) RemoveCommentIDs

func (pu *ProjectUpdate) RemoveCommentIDs(ids ...int) *ProjectUpdate

RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.

func (*ProjectUpdate) RemoveComments

func (pu *ProjectUpdate) RemoveComments(c ...*Comment) *ProjectUpdate

RemoveComments removes "comments" edges to Comment entities.

func (*ProjectUpdate) RemoveEpicIDs

func (pu *ProjectUpdate) RemoveEpicIDs(ids ...int) *ProjectUpdate

RemoveEpicIDs removes the "epics" edge to Epic entities by IDs.

func (*ProjectUpdate) RemoveEpics

func (pu *ProjectUpdate) RemoveEpics(e ...*Epic) *ProjectUpdate

RemoveEpics removes "epics" edges to Epic entities.

func (*ProjectUpdate) Save

func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)

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

func (*ProjectUpdate) SaveX

func (pu *ProjectUpdate) SaveX(ctx context.Context) int

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

func (*ProjectUpdate) SetDescription

func (pu *ProjectUpdate) SetDescription(s string) *ProjectUpdate

SetDescription sets the "description" field.

func (*ProjectUpdate) SetInput

SetInput applies the change-set in the UpdateProjectInput on the ProjectUpdate builder.

func (*ProjectUpdate) SetName

func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate

SetName sets the "name" field.

func (*ProjectUpdate) SetNillableDescription

func (pu *ProjectUpdate) SetNillableDescription(s *string) *ProjectUpdate

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

func (*ProjectUpdate) SetNillableOwnerID

func (pu *ProjectUpdate) SetNillableOwnerID(id *int) *ProjectUpdate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*ProjectUpdate) SetOwner

func (pu *ProjectUpdate) SetOwner(u *User) *ProjectUpdate

SetOwner sets the "owner" edge to the User entity.

func (*ProjectUpdate) SetOwnerID

func (pu *ProjectUpdate) SetOwnerID(id int) *ProjectUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*ProjectUpdate) Where

func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate

Where appends a list predicates to the ProjectUpdate builder.

type ProjectUpdateOne

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

ProjectUpdateOne is the builder for updating a single Project entity.

func (*ProjectUpdateOne) AddCommentIDs

func (puo *ProjectUpdateOne) AddCommentIDs(ids ...int) *ProjectUpdateOne

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*ProjectUpdateOne) AddComments

func (puo *ProjectUpdateOne) AddComments(c ...*Comment) *ProjectUpdateOne

AddComments adds the "comments" edges to the Comment entity.

func (*ProjectUpdateOne) AddEpicIDs

func (puo *ProjectUpdateOne) AddEpicIDs(ids ...int) *ProjectUpdateOne

AddEpicIDs adds the "epics" edge to the Epic entity by IDs.

func (*ProjectUpdateOne) AddEpics

func (puo *ProjectUpdateOne) AddEpics(e ...*Epic) *ProjectUpdateOne

AddEpics adds the "epics" edges to the Epic entity.

func (*ProjectUpdateOne) ClearComments

func (puo *ProjectUpdateOne) ClearComments() *ProjectUpdateOne

ClearComments clears all "comments" edges to the Comment entity.

func (*ProjectUpdateOne) ClearDescription

func (puo *ProjectUpdateOne) ClearDescription() *ProjectUpdateOne

ClearDescription clears the value of the "description" field.

func (*ProjectUpdateOne) ClearEpics

func (puo *ProjectUpdateOne) ClearEpics() *ProjectUpdateOne

ClearEpics clears all "epics" edges to the Epic entity.

func (*ProjectUpdateOne) ClearOwner

func (puo *ProjectUpdateOne) ClearOwner() *ProjectUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*ProjectUpdateOne) Exec

func (puo *ProjectUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProjectUpdateOne) ExecX

func (puo *ProjectUpdateOne) ExecX(ctx context.Context)

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

func (*ProjectUpdateOne) Mutation

func (puo *ProjectUpdateOne) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdateOne) RemoveCommentIDs

func (puo *ProjectUpdateOne) RemoveCommentIDs(ids ...int) *ProjectUpdateOne

RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.

func (*ProjectUpdateOne) RemoveComments

func (puo *ProjectUpdateOne) RemoveComments(c ...*Comment) *ProjectUpdateOne

RemoveComments removes "comments" edges to Comment entities.

func (*ProjectUpdateOne) RemoveEpicIDs

func (puo *ProjectUpdateOne) RemoveEpicIDs(ids ...int) *ProjectUpdateOne

RemoveEpicIDs removes the "epics" edge to Epic entities by IDs.

func (*ProjectUpdateOne) RemoveEpics

func (puo *ProjectUpdateOne) RemoveEpics(e ...*Epic) *ProjectUpdateOne

RemoveEpics removes "epics" edges to Epic entities.

func (*ProjectUpdateOne) Save

func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)

Save executes the query and returns the updated Project entity.

func (*ProjectUpdateOne) SaveX

func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project

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

func (*ProjectUpdateOne) Select

func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne

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

func (*ProjectUpdateOne) SetDescription

func (puo *ProjectUpdateOne) SetDescription(s string) *ProjectUpdateOne

SetDescription sets the "description" field.

func (*ProjectUpdateOne) SetInput

SetInput applies the change-set in the UpdateProjectInput on the ProjectUpdateOne builder.

func (*ProjectUpdateOne) SetName

func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne

SetName sets the "name" field.

func (*ProjectUpdateOne) SetNillableDescription

func (puo *ProjectUpdateOne) SetNillableDescription(s *string) *ProjectUpdateOne

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

func (*ProjectUpdateOne) SetNillableOwnerID

func (puo *ProjectUpdateOne) SetNillableOwnerID(id *int) *ProjectUpdateOne

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*ProjectUpdateOne) SetOwner

func (puo *ProjectUpdateOne) SetOwner(u *User) *ProjectUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*ProjectUpdateOne) SetOwnerID

func (puo *ProjectUpdateOne) SetOwnerID(id int) *ProjectUpdateOne

SetOwnerID sets the "owner" edge to the User entity by ID.

type ProjectWhereInput

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

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

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

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionIsNil        bool     `json:"descriptionIsNil,omitempty"`
	DescriptionNotNil       bool     `json:"descriptionNotNil,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`

	// "epics" edge predicates.
	HasEpics     *bool             `json:"hasEpics,omitempty"`
	HasEpicsWith []*EpicWhereInput `json:"hasEpicsWith,omitempty"`

	// "owner" edge predicates.
	HasOwner     *bool             `json:"hasOwner,omitempty"`
	HasOwnerWith []*UserWhereInput `json:"hasOwnerWith,omitempty"`

	// "comments" edge predicates.
	HasComments     *bool                `json:"hasComments,omitempty"`
	HasCommentsWith []*CommentWhereInput `json:"hasCommentsWith,omitempty"`
}

ProjectWhereInput represents a where input for filtering Project queries.

func (*ProjectWhereInput) AddPredicates

func (i *ProjectWhereInput) AddPredicates(predicates ...predicate.Project)

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

func (*ProjectWhereInput) Filter

Filter applies the ProjectWhereInput filter on the ProjectQuery builder.

func (*ProjectWhereInput) P

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

type Projects

type Projects []*Project

Projects is a parsable slice of Project.

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 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 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
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// 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 UpdateCommentInput

type UpdateCommentInput struct {
	Text             *string
	AddEpicIDs       []int
	RemoveEpicIDs    []int
	AddProjectIDs    []int
	RemoveProjectIDs []int
	AddUserIDs       []int
	RemoveUserIDs    []int
}

UpdateCommentInput represents a mutation input for updating comments.

func (*UpdateCommentInput) Mutate

func (i *UpdateCommentInput) Mutate(m *CommentMutation)

Mutate applies the UpdateCommentInput on the CommentMutation builder.

type UpdateEpicInput

type UpdateEpicInput struct {
	Name             *string
	Description      *string
	ClearProject     bool
	ProjectID        *int
	ClearReporter    bool
	ReporterID       *int
	ClearAssignee    bool
	AssigneeID       *int
	AddCommentIDs    []int
	RemoveCommentIDs []int
}

UpdateEpicInput represents a mutation input for updating epics.

func (*UpdateEpicInput) Mutate

func (i *UpdateEpicInput) Mutate(m *EpicMutation)

Mutate applies the UpdateEpicInput on the EpicMutation builder.

type UpdateProjectInput

type UpdateProjectInput struct {
	Name             *string
	ClearDescription bool
	Description      *string
	AddEpicIDs       []int
	RemoveEpicIDs    []int
	ClearOwner       bool
	OwnerID          *int
	AddCommentIDs    []int
	RemoveCommentIDs []int
}

UpdateProjectInput represents a mutation input for updating projects.

func (*UpdateProjectInput) Mutate

func (i *UpdateProjectInput) Mutate(m *ProjectMutation)

Mutate applies the UpdateProjectInput on the ProjectMutation builder.

type UpdateUserInput

type UpdateUserInput struct {
	Name              *string
	Surname           *string
	Username          *string
	Email             *string
	AddOwnIDs         []int
	RemoveOwnIDs      []int
	AddReporterIDs    []int
	RemoveReporterIDs []int
	AddAssigneeIDs    []int
	RemoveAssigneeIDs []int
	AddCommentIDs     []int
	RemoveCommentIDs  []int
}

UpdateUserInput represents a mutation input for updating users.

func (*UpdateUserInput) Mutate

func (i *UpdateUserInput) Mutate(m *UserMutation)

Mutate applies the UpdateUserInput on the UserMutation builder.

type User

type User struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Surname holds the value of the "surname" field.
	Surname string `json:"surname,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) Assignee

func (u *User) Assignee(ctx context.Context) (result []*Epic, err error)

func (*User) Comments

func (u *User) Comments(ctx context.Context) (result []*Comment, err error)

func (*User) NamedAssignee

func (u *User) NamedAssignee(name string) ([]*Epic, error)

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

func (*User) NamedComments

func (u *User) NamedComments(name string) ([]*Comment, error)

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

func (*User) NamedOwns

func (u *User) NamedOwns(name string) ([]*Project, error)

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

func (*User) NamedReporter

func (u *User) NamedReporter(name string) ([]*Epic, error)

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

func (*User) Node

func (u *User) Node(ctx context.Context) (node *Node, err error)

func (*User) Owns

func (u *User) Owns(ctx context.Context) (result []*Project, err error)

func (*User) QueryAssignee

func (u *User) QueryAssignee() *EpicQuery

QueryAssignee queries the "assignee" edge of the User entity.

func (*User) QueryComments

func (u *User) QueryComments() *CommentQuery

QueryComments queries the "comments" edge of the User entity.

func (*User) QueryOwns

func (u *User) QueryOwns() *ProjectQuery

QueryOwns queries the "owns" edge of the User entity.

func (*User) QueryReporter

func (u *User) QueryReporter() *EpicQuery

QueryReporter queries the "reporter" edge of the User entity.

func (*User) Reporter

func (u *User) Reporter(ctx context.Context) (result []*Epic, err error)

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) ToEdge

func (u *User) ToEdge(order *UserOrder) *UserEdge

ToEdge converts User into UserEdge.

func (*User) Unwrap

func (u *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 (u *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.

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(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

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

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *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)

Use 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) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryAssignee

func (c *UserClient) QueryAssignee(u *User) *EpicQuery

QueryAssignee queries the assignee edge of a User.

func (*UserClient) QueryComments

func (c *UserClient) QueryComments(u *User) *CommentQuery

QueryComments queries the comments edge of a User.

func (*UserClient) QueryOwns

func (c *UserClient) QueryOwns(u *User) *ProjectQuery

QueryOwns queries the owns edge of a User.

func (*UserClient) QueryReporter

func (c *UserClient) QueryReporter(u *User) *EpicQuery

QueryReporter queries the reporter edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int) *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 UserConnection

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

UserConnection is the connection containing edges to User.

type UserCreate

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

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddAssignee

func (uc *UserCreate) AddAssignee(e ...*Epic) *UserCreate

AddAssignee adds the "assignee" edges to the Epic entity.

func (*UserCreate) AddAssigneeIDs

func (uc *UserCreate) AddAssigneeIDs(ids ...int) *UserCreate

AddAssigneeIDs adds the "assignee" edge to the Epic entity by IDs.

func (*UserCreate) AddCommentIDs

func (uc *UserCreate) AddCommentIDs(ids ...int) *UserCreate

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*UserCreate) AddComments

func (uc *UserCreate) AddComments(c ...*Comment) *UserCreate

AddComments adds the "comments" edges to the Comment entity.

func (*UserCreate) AddOwnIDs

func (uc *UserCreate) AddOwnIDs(ids ...int) *UserCreate

AddOwnIDs adds the "owns" edge to the Project entity by IDs.

func (*UserCreate) AddOwns

func (uc *UserCreate) AddOwns(p ...*Project) *UserCreate

AddOwns adds the "owns" edges to the Project entity.

func (*UserCreate) AddReporter

func (uc *UserCreate) AddReporter(e ...*Epic) *UserCreate

AddReporter adds the "reporter" edges to the Epic entity.

func (*UserCreate) AddReporterIDs

func (uc *UserCreate) AddReporterIDs(ids ...int) *UserCreate

AddReporterIDs adds the "reporter" edge to the Epic entity by IDs.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

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

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetInput

func (c *UserCreate) SetInput(i CreateUserInput) *UserCreate

SetInput applies the change-set in the CreateUserInput on the UserCreate builder.

func (*UserCreate) SetName

func (uc *UserCreate) SetName(s string) *UserCreate

SetName sets the "name" field.

func (*UserCreate) SetSurname

func (uc *UserCreate) SetSurname(s string) *UserCreate

SetSurname sets the "surname" field.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" 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 (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

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

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *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 (ud *UserDelete) Exec(ctx context.Context) (int, error)

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

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

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

func (*UserDelete) Where

func (ud *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 (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

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

type UserEdge

type UserEdge struct {
	Node   *User  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

UserEdge is the edge representation of User.

type UserEdges

type UserEdges struct {
	// Owns holds the value of the owns edge.
	Owns []*Project `json:"owns,omitempty"`
	// Reporter holds the value of the reporter edge.
	Reporter []*Epic `json:"reporter,omitempty"`
	// Assignee holds the value of the assignee edge.
	Assignee []*Epic `json:"assignee,omitempty"`
	// Comments holds the value of the comments edge.
	Comments []*Comment `json:"comments,omitempty"`
	// contains filtered or unexported fields
}

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

func (UserEdges) AssigneeOrErr

func (e UserEdges) AssigneeOrErr() ([]*Epic, error)

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

func (UserEdges) CommentsOrErr

func (e UserEdges) CommentsOrErr() ([]*Comment, error)

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

func (UserEdges) OwnsOrErr

func (e UserEdges) OwnsOrErr() ([]*Project, error)

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

func (UserEdges) ReporterOrErr

func (e UserEdges) ReporterOrErr() ([]*Epic, error)

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

type UserGroupBy

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

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *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 (ugb *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) AddAssigneeIDs

func (m *UserMutation) AddAssigneeIDs(ids ...int)

AddAssigneeIDs adds the "assignee" edge to the Epic entity by ids.

func (*UserMutation) AddCommentIDs

func (m *UserMutation) AddCommentIDs(ids ...int)

AddCommentIDs adds the "comments" edge to the Comment entity by ids.

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) AddOwnIDs

func (m *UserMutation) AddOwnIDs(ids ...int)

AddOwnIDs adds the "owns" edge to the Project entity by ids.

func (*UserMutation) AddReporterIDs

func (m *UserMutation) AddReporterIDs(ids ...int)

AddReporterIDs adds the "reporter" edge to the Epic entity by ids.

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) AssigneeCleared

func (m *UserMutation) AssigneeCleared() bool

AssigneeCleared reports if the "assignee" edge to the Epic entity was cleared.

func (*UserMutation) AssigneeIDs

func (m *UserMutation) AssigneeIDs() (ids []int)

AssigneeIDs returns the "assignee" edge IDs in the mutation.

func (*UserMutation) ClearAssignee

func (m *UserMutation) ClearAssignee()

ClearAssignee clears the "assignee" edge to the Epic entity.

func (*UserMutation) ClearComments

func (m *UserMutation) ClearComments()

ClearComments clears the "comments" edge to the Comment entity.

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) 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) ClearOwns

func (m *UserMutation) ClearOwns()

ClearOwns clears the "owns" edge to the Project entity.

func (*UserMutation) ClearReporter

func (m *UserMutation) ClearReporter()

ClearReporter clears the "reporter" edge to the Epic entity.

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) CommentsCleared

func (m *UserMutation) CommentsCleared() bool

CommentsCleared reports if the "comments" edge to the Comment entity was cleared.

func (*UserMutation) CommentsIDs

func (m *UserMutation) CommentsIDs() (ids []int)

CommentsIDs returns the "comments" edge IDs in the 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) 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) ID

func (m *UserMutation) 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 (*UserMutation) IDs

func (m *UserMutation) 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 (*UserMutation) Name

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

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

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) OldName

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

OldName returns the old "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) OldSurname

func (m *UserMutation) OldSurname(ctx context.Context) (v string, err error)

OldSurname returns the old "surname" 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) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" 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) OwnsCleared

func (m *UserMutation) OwnsCleared() bool

OwnsCleared reports if the "owns" edge to the Project entity was cleared.

func (*UserMutation) OwnsIDs

func (m *UserMutation) OwnsIDs() (ids []int)

OwnsIDs returns the "owns" edge IDs in the mutation.

func (*UserMutation) RemoveAssigneeIDs

func (m *UserMutation) RemoveAssigneeIDs(ids ...int)

RemoveAssigneeIDs removes the "assignee" edge to the Epic entity by IDs.

func (*UserMutation) RemoveCommentIDs

func (m *UserMutation) RemoveCommentIDs(ids ...int)

RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.

func (*UserMutation) RemoveOwnIDs

func (m *UserMutation) RemoveOwnIDs(ids ...int)

RemoveOwnIDs removes the "owns" edge to the Project entity by IDs.

func (*UserMutation) RemoveReporterIDs

func (m *UserMutation) RemoveReporterIDs(ids ...int)

RemoveReporterIDs removes the "reporter" edge to the Epic entity by IDs.

func (*UserMutation) RemovedAssigneeIDs

func (m *UserMutation) RemovedAssigneeIDs() (ids []int)

RemovedAssignee returns the removed IDs of the "assignee" edge to the Epic entity.

func (*UserMutation) RemovedCommentsIDs

func (m *UserMutation) RemovedCommentsIDs() (ids []int)

RemovedComments returns the removed IDs of the "comments" edge to the Comment entity.

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) RemovedOwnsIDs

func (m *UserMutation) RemovedOwnsIDs() (ids []int)

RemovedOwns returns the removed IDs of the "owns" edge to the Project entity.

func (*UserMutation) RemovedReporterIDs

func (m *UserMutation) RemovedReporterIDs() (ids []int)

RemovedReporter returns the removed IDs of the "reporter" edge to the Epic entity.

func (*UserMutation) ReporterCleared

func (m *UserMutation) ReporterCleared() bool

ReporterCleared reports if the "reporter" edge to the Epic entity was cleared.

func (*UserMutation) ReporterIDs

func (m *UserMutation) ReporterIDs() (ids []int)

ReporterIDs returns the "reporter" edge IDs in the mutation.

func (*UserMutation) ResetAssignee

func (m *UserMutation) ResetAssignee()

ResetAssignee resets all changes to the "assignee" edge.

func (*UserMutation) ResetComments

func (m *UserMutation) ResetComments()

ResetComments resets all changes to the "comments" edge.

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) ResetName

func (m *UserMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserMutation) ResetOwns

func (m *UserMutation) ResetOwns()

ResetOwns resets all changes to the "owns" edge.

func (*UserMutation) ResetReporter

func (m *UserMutation) ResetReporter()

ResetReporter resets all changes to the "reporter" edge.

func (*UserMutation) ResetSurname

func (m *UserMutation) ResetSurname()

ResetSurname resets all changes to the "surname" field.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" 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) SetName

func (m *UserMutation) SetName(s string)

SetName sets the "name" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetSurname

func (m *UserMutation) SetSurname(s string)

SetSurname sets the "surname" field.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*UserMutation) Surname

func (m *UserMutation) Surname() (r string, exists bool)

Surname returns the value of the "surname" field in the mutation.

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) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

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 UserOrder

type UserOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *UserOrderField `json:"field"`
}

UserOrder defines the ordering of User.

type UserOrderField

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

UserOrderField defines the ordering field of User.

type UserPaginateOption

type UserPaginateOption func(*userPager) error

UserPaginateOption enables pagination customization.

func WithUserFilter

func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption

WithUserFilter configures pagination filter.

func WithUserOrder

func WithUserOrder(order *UserOrder) UserPaginateOption

WithUserOrder configures pagination ordering.

type UserQuery

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

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

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

func (*UserQuery) Clone

func (uq *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) CollectFields

func (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)

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

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

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

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

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

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

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

func (*UserQuery) First

func (uq *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 (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

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

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

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

func (*UserQuery) GroupBy

func (uq *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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)

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

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

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

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

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

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *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 (uq *UserQuery) OnlyID(ctx context.Context) (id int, 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 (uq *UserQuery) OnlyIDX(ctx context.Context) int

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

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

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

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Paginate

func (u *UserQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserPaginateOption,
) (*UserConnection, error)

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

func (*UserQuery) QueryAssignee

func (uq *UserQuery) QueryAssignee() *EpicQuery

QueryAssignee chains the current query on the "assignee" edge.

func (*UserQuery) QueryComments

func (uq *UserQuery) QueryComments() *CommentQuery

QueryComments chains the current query on the "comments" edge.

func (*UserQuery) QueryOwns

func (uq *UserQuery) QueryOwns() *ProjectQuery

QueryOwns chains the current query on the "owns" edge.

func (*UserQuery) QueryReporter

func (uq *UserQuery) QueryReporter() *EpicQuery

QueryReporter chains the current query on the "reporter" edge.

func (*UserQuery) Select

func (uq *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 {
	Name string `json:"name,omitempty"`
}

client.User.Query().
	Select(user.FieldName).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *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 (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithAssignee

func (uq *UserQuery) WithAssignee(opts ...func(*EpicQuery)) *UserQuery

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

func (*UserQuery) WithComments

func (uq *UserQuery) WithComments(opts ...func(*CommentQuery)) *UserQuery

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

func (*UserQuery) WithNamedAssignee

func (uq *UserQuery) WithNamedAssignee(name string, opts ...func(*EpicQuery)) *UserQuery

WithNamedAssignee tells the query-builder to eager-load the nodes that are connected to the "assignee" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedComments

func (uq *UserQuery) WithNamedComments(name string, opts ...func(*CommentQuery)) *UserQuery

WithNamedComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedOwns

func (uq *UserQuery) WithNamedOwns(name string, opts ...func(*ProjectQuery)) *UserQuery

WithNamedOwns tells the query-builder to eager-load the nodes that are connected to the "owns" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedReporter

func (uq *UserQuery) WithNamedReporter(name string, opts ...func(*EpicQuery)) *UserQuery

WithNamedReporter tells the query-builder to eager-load the nodes that are connected to the "reporter" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOwns

func (uq *UserQuery) WithOwns(opts ...func(*ProjectQuery)) *UserQuery

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

func (*UserQuery) WithReporter

func (uq *UserQuery) WithReporter(opts ...func(*EpicQuery)) *UserQuery

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

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 (us *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 (us *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) AddAssignee

func (uu *UserUpdate) AddAssignee(e ...*Epic) *UserUpdate

AddAssignee adds the "assignee" edges to the Epic entity.

func (*UserUpdate) AddAssigneeIDs

func (uu *UserUpdate) AddAssigneeIDs(ids ...int) *UserUpdate

AddAssigneeIDs adds the "assignee" edge to the Epic entity by IDs.

func (*UserUpdate) AddCommentIDs

func (uu *UserUpdate) AddCommentIDs(ids ...int) *UserUpdate

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*UserUpdate) AddComments

func (uu *UserUpdate) AddComments(c ...*Comment) *UserUpdate

AddComments adds the "comments" edges to the Comment entity.

func (*UserUpdate) AddOwnIDs

func (uu *UserUpdate) AddOwnIDs(ids ...int) *UserUpdate

AddOwnIDs adds the "owns" edge to the Project entity by IDs.

func (*UserUpdate) AddOwns

func (uu *UserUpdate) AddOwns(p ...*Project) *UserUpdate

AddOwns adds the "owns" edges to the Project entity.

func (*UserUpdate) AddReporter

func (uu *UserUpdate) AddReporter(e ...*Epic) *UserUpdate

AddReporter adds the "reporter" edges to the Epic entity.

func (*UserUpdate) AddReporterIDs

func (uu *UserUpdate) AddReporterIDs(ids ...int) *UserUpdate

AddReporterIDs adds the "reporter" edge to the Epic entity by IDs.

func (*UserUpdate) ClearAssignee

func (uu *UserUpdate) ClearAssignee() *UserUpdate

ClearAssignee clears all "assignee" edges to the Epic entity.

func (*UserUpdate) ClearComments

func (uu *UserUpdate) ClearComments() *UserUpdate

ClearComments clears all "comments" edges to the Comment entity.

func (*UserUpdate) ClearOwns

func (uu *UserUpdate) ClearOwns() *UserUpdate

ClearOwns clears all "owns" edges to the Project entity.

func (*UserUpdate) ClearReporter

func (uu *UserUpdate) ClearReporter() *UserUpdate

ClearReporter clears all "reporter" edges to the Epic entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

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

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveAssignee

func (uu *UserUpdate) RemoveAssignee(e ...*Epic) *UserUpdate

RemoveAssignee removes "assignee" edges to Epic entities.

func (*UserUpdate) RemoveAssigneeIDs

func (uu *UserUpdate) RemoveAssigneeIDs(ids ...int) *UserUpdate

RemoveAssigneeIDs removes the "assignee" edge to Epic entities by IDs.

func (*UserUpdate) RemoveCommentIDs

func (uu *UserUpdate) RemoveCommentIDs(ids ...int) *UserUpdate

RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.

func (*UserUpdate) RemoveComments

func (uu *UserUpdate) RemoveComments(c ...*Comment) *UserUpdate

RemoveComments removes "comments" edges to Comment entities.

func (*UserUpdate) RemoveOwnIDs

func (uu *UserUpdate) RemoveOwnIDs(ids ...int) *UserUpdate

RemoveOwnIDs removes the "owns" edge to Project entities by IDs.

func (*UserUpdate) RemoveOwns

func (uu *UserUpdate) RemoveOwns(p ...*Project) *UserUpdate

RemoveOwns removes "owns" edges to Project entities.

func (*UserUpdate) RemoveReporter

func (uu *UserUpdate) RemoveReporter(e ...*Epic) *UserUpdate

RemoveReporter removes "reporter" edges to Epic entities.

func (*UserUpdate) RemoveReporterIDs

func (uu *UserUpdate) RemoveReporterIDs(ids ...int) *UserUpdate

RemoveReporterIDs removes the "reporter" edge to Epic entities by IDs.

func (*UserUpdate) Save

func (uu *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 (uu *UserUpdate) SaveX(ctx context.Context) int

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

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetInput

func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate

SetInput applies the change-set in the UpdateUserInput on the UserUpdate builder.

func (*UserUpdate) SetName

func (uu *UserUpdate) SetName(s string) *UserUpdate

SetName sets the "name" field.

func (*UserUpdate) SetSurname

func (uu *UserUpdate) SetSurname(s string) *UserUpdate

SetSurname sets the "surname" field.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) Where

func (uu *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) AddAssignee

func (uuo *UserUpdateOne) AddAssignee(e ...*Epic) *UserUpdateOne

AddAssignee adds the "assignee" edges to the Epic entity.

func (*UserUpdateOne) AddAssigneeIDs

func (uuo *UserUpdateOne) AddAssigneeIDs(ids ...int) *UserUpdateOne

AddAssigneeIDs adds the "assignee" edge to the Epic entity by IDs.

func (*UserUpdateOne) AddCommentIDs

func (uuo *UserUpdateOne) AddCommentIDs(ids ...int) *UserUpdateOne

AddCommentIDs adds the "comments" edge to the Comment entity by IDs.

func (*UserUpdateOne) AddComments

func (uuo *UserUpdateOne) AddComments(c ...*Comment) *UserUpdateOne

AddComments adds the "comments" edges to the Comment entity.

func (*UserUpdateOne) AddOwnIDs

func (uuo *UserUpdateOne) AddOwnIDs(ids ...int) *UserUpdateOne

AddOwnIDs adds the "owns" edge to the Project entity by IDs.

func (*UserUpdateOne) AddOwns

func (uuo *UserUpdateOne) AddOwns(p ...*Project) *UserUpdateOne

AddOwns adds the "owns" edges to the Project entity.

func (*UserUpdateOne) AddReporter

func (uuo *UserUpdateOne) AddReporter(e ...*Epic) *UserUpdateOne

AddReporter adds the "reporter" edges to the Epic entity.

func (*UserUpdateOne) AddReporterIDs

func (uuo *UserUpdateOne) AddReporterIDs(ids ...int) *UserUpdateOne

AddReporterIDs adds the "reporter" edge to the Epic entity by IDs.

func (*UserUpdateOne) ClearAssignee

func (uuo *UserUpdateOne) ClearAssignee() *UserUpdateOne

ClearAssignee clears all "assignee" edges to the Epic entity.

func (*UserUpdateOne) ClearComments

func (uuo *UserUpdateOne) ClearComments() *UserUpdateOne

ClearComments clears all "comments" edges to the Comment entity.

func (*UserUpdateOne) ClearOwns

func (uuo *UserUpdateOne) ClearOwns() *UserUpdateOne

ClearOwns clears all "owns" edges to the Project entity.

func (*UserUpdateOne) ClearReporter

func (uuo *UserUpdateOne) ClearReporter() *UserUpdateOne

ClearReporter clears all "reporter" edges to the Epic entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

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

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveAssignee

func (uuo *UserUpdateOne) RemoveAssignee(e ...*Epic) *UserUpdateOne

RemoveAssignee removes "assignee" edges to Epic entities.

func (*UserUpdateOne) RemoveAssigneeIDs

func (uuo *UserUpdateOne) RemoveAssigneeIDs(ids ...int) *UserUpdateOne

RemoveAssigneeIDs removes the "assignee" edge to Epic entities by IDs.

func (*UserUpdateOne) RemoveCommentIDs

func (uuo *UserUpdateOne) RemoveCommentIDs(ids ...int) *UserUpdateOne

RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.

func (*UserUpdateOne) RemoveComments

func (uuo *UserUpdateOne) RemoveComments(c ...*Comment) *UserUpdateOne

RemoveComments removes "comments" edges to Comment entities.

func (*UserUpdateOne) RemoveOwnIDs

func (uuo *UserUpdateOne) RemoveOwnIDs(ids ...int) *UserUpdateOne

RemoveOwnIDs removes the "owns" edge to Project entities by IDs.

func (*UserUpdateOne) RemoveOwns

func (uuo *UserUpdateOne) RemoveOwns(p ...*Project) *UserUpdateOne

RemoveOwns removes "owns" edges to Project entities.

func (*UserUpdateOne) RemoveReporter

func (uuo *UserUpdateOne) RemoveReporter(e ...*Epic) *UserUpdateOne

RemoveReporter removes "reporter" edges to Epic entities.

func (*UserUpdateOne) RemoveReporterIDs

func (uuo *UserUpdateOne) RemoveReporterIDs(ids ...int) *UserUpdateOne

RemoveReporterIDs removes the "reporter" edge to Epic entities by IDs.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

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

func (*UserUpdateOne) Select

func (uuo *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) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserInput on the UserUpdateOne builder.

func (*UserUpdateOne) SetName

func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne

SetName sets the "name" field.

func (*UserUpdateOne) SetSurname

func (uuo *UserUpdateOne) SetSurname(s string) *UserUpdateOne

SetSurname sets the "surname" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

type UserWhereInput

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

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

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

	// "surname" field predicates.
	Surname             *string  `json:"surname,omitempty"`
	SurnameNEQ          *string  `json:"surnameNEQ,omitempty"`
	SurnameIn           []string `json:"surnameIn,omitempty"`
	SurnameNotIn        []string `json:"surnameNotIn,omitempty"`
	SurnameGT           *string  `json:"surnameGT,omitempty"`
	SurnameGTE          *string  `json:"surnameGTE,omitempty"`
	SurnameLT           *string  `json:"surnameLT,omitempty"`
	SurnameLTE          *string  `json:"surnameLTE,omitempty"`
	SurnameContains     *string  `json:"surnameContains,omitempty"`
	SurnameHasPrefix    *string  `json:"surnameHasPrefix,omitempty"`
	SurnameHasSuffix    *string  `json:"surnameHasSuffix,omitempty"`
	SurnameEqualFold    *string  `json:"surnameEqualFold,omitempty"`
	SurnameContainsFold *string  `json:"surnameContainsFold,omitempty"`

	// "username" field predicates.
	Username             *string  `json:"username,omitempty"`
	UsernameNEQ          *string  `json:"usernameNEQ,omitempty"`
	UsernameIn           []string `json:"usernameIn,omitempty"`
	UsernameNotIn        []string `json:"usernameNotIn,omitempty"`
	UsernameGT           *string  `json:"usernameGT,omitempty"`
	UsernameGTE          *string  `json:"usernameGTE,omitempty"`
	UsernameLT           *string  `json:"usernameLT,omitempty"`
	UsernameLTE          *string  `json:"usernameLTE,omitempty"`
	UsernameContains     *string  `json:"usernameContains,omitempty"`
	UsernameHasPrefix    *string  `json:"usernameHasPrefix,omitempty"`
	UsernameHasSuffix    *string  `json:"usernameHasSuffix,omitempty"`
	UsernameEqualFold    *string  `json:"usernameEqualFold,omitempty"`
	UsernameContainsFold *string  `json:"usernameContainsFold,omitempty"`

	// "email" field predicates.
	Email             *string  `json:"email,omitempty"`
	EmailNEQ          *string  `json:"emailNEQ,omitempty"`
	EmailIn           []string `json:"emailIn,omitempty"`
	EmailNotIn        []string `json:"emailNotIn,omitempty"`
	EmailGT           *string  `json:"emailGT,omitempty"`
	EmailGTE          *string  `json:"emailGTE,omitempty"`
	EmailLT           *string  `json:"emailLT,omitempty"`
	EmailLTE          *string  `json:"emailLTE,omitempty"`
	EmailContains     *string  `json:"emailContains,omitempty"`
	EmailHasPrefix    *string  `json:"emailHasPrefix,omitempty"`
	EmailHasSuffix    *string  `json:"emailHasSuffix,omitempty"`
	EmailEqualFold    *string  `json:"emailEqualFold,omitempty"`
	EmailContainsFold *string  `json:"emailContainsFold,omitempty"`

	// "owns" edge predicates.
	HasOwns     *bool                `json:"hasOwns,omitempty"`
	HasOwnsWith []*ProjectWhereInput `json:"hasOwnsWith,omitempty"`

	// "reporter" edge predicates.
	HasReporter     *bool             `json:"hasReporter,omitempty"`
	HasReporterWith []*EpicWhereInput `json:"hasReporterWith,omitempty"`

	// "assignee" edge predicates.
	HasAssignee     *bool             `json:"hasAssignee,omitempty"`
	HasAssigneeWith []*EpicWhereInput `json:"hasAssigneeWith,omitempty"`

	// "comments" edge predicates.
	HasComments     *bool                `json:"hasComments,omitempty"`
	HasCommentsWith []*CommentWhereInput `json:"hasCommentsWith,omitempty"`
}

UserWhereInput represents a where input for filtering User queries.

func (*UserWhereInput) AddPredicates

func (i *UserWhereInput) AddPredicates(predicates ...predicate.User)

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

func (*UserWhereInput) Filter

func (i *UserWhereInput) Filter(q *UserQuery) (*UserQuery, error)

Filter applies the UserWhereInput filter on the UserQuery builder.

func (*UserWhereInput) P

func (i *UserWhereInput) P() (predicate.User, error)

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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