generated

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 20 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.
	TypeFeed         = "Feed"
	TypeFeedFieldMap = "FeedFieldMap"
)

Variables

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

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

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

GroupBy(field1, field2).
Aggregate(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.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
	// Feed is the client for interacting with the Feed builders.
	Feed *FeedClient
	// FeedFieldMap is the client for interacting with the FeedFieldMap builders.
	FeedFieldMap *FeedFieldMapClient
	// 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().
	Feed.
	Query().
	Count(ctx)

func (*Client) Intercept

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

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

func (*Client) Mutate

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

Mutate implements the ent.Mutator interface.

func (*Client) Tx

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

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

func (*Client) Use

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

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

type 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 Feed

type Feed struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Label holds the value of the "label" field.
	Label string `json:"label,omitempty"`
	// Path holds the value of the "path" field.
	Path string `json:"path,omitempty"`
	// Format holds the value of the "format" field.
	Format string `json:"format,omitempty"`
	// Status holds the value of the "status" field.
	Status int `json:"status,omitempty"`
	// ContentTypes holds the value of the "content_types" field.
	ContentTypes string `json:"content_types,omitempty"`
	// TermIds holds the value of the "term_ids" field.
	TermIds string `json:"term_ids,omitempty"`
	// ItemLimit holds the value of the "item_limit" field.
	ItemLimit int `json:"item_limit,omitempty"`
	// Days holds the value of the "days" field.
	Days int `json:"days,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Language holds the value of the "language" field.
	Language string `json:"language,omitempty"`
	// ImageStyle holds the value of the "image_style" field.
	ImageStyle string `json:"image_style,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Feed is the model entity for the Feed schema.

func (*Feed) String

func (_m *Feed) String() string

String implements the fmt.Stringer.

func (*Feed) Unwrap

func (_m *Feed) Unwrap() *Feed

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

func (_m *Feed) Update() *FeedUpdateOne

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

func (*Feed) Value

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

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

type FeedClient

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

FeedClient is a client for the Feed schema.

func NewFeedClient

func NewFeedClient(c config) *FeedClient

NewFeedClient returns a client for the Feed from the given config.

func (*FeedClient) Create

func (c *FeedClient) Create() *FeedCreate

Create returns a builder for creating a Feed entity.

func (*FeedClient) CreateBulk

func (c *FeedClient) CreateBulk(builders ...*FeedCreate) *FeedCreateBulk

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

func (*FeedClient) Delete

func (c *FeedClient) Delete() *FeedDelete

Delete returns a delete builder for Feed.

func (*FeedClient) DeleteOne

func (c *FeedClient) DeleteOne(_m *Feed) *FeedDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FeedClient) DeleteOneID

func (c *FeedClient) DeleteOneID(id int) *FeedDeleteOne

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

func (*FeedClient) Get

func (c *FeedClient) Get(ctx context.Context, id int) (*Feed, error)

Get returns a Feed entity by its id.

func (*FeedClient) GetX

func (c *FeedClient) GetX(ctx context.Context, id int) *Feed

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

func (*FeedClient) Hooks

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

Hooks returns the client hooks.

func (*FeedClient) Intercept

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

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

func (*FeedClient) Interceptors

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

Interceptors returns the client interceptors.

func (*FeedClient) MapCreateBulk

func (c *FeedClient) MapCreateBulk(slice any, setFunc func(*FeedCreate, int)) *FeedCreateBulk

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

func (*FeedClient) Query

func (c *FeedClient) Query() *FeedQuery

Query returns a query builder for Feed.

func (*FeedClient) Update

func (c *FeedClient) Update() *FeedUpdate

Update returns an update builder for Feed.

func (*FeedClient) UpdateOne

func (c *FeedClient) UpdateOne(_m *Feed) *FeedUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FeedClient) UpdateOneID

func (c *FeedClient) UpdateOneID(id int) *FeedUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FeedClient) Use

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

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

type FeedCreate

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

FeedCreate is the builder for creating a Feed entity.

func (*FeedCreate) Exec

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

Exec executes the query.

func (*FeedCreate) ExecX

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

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

func (*FeedCreate) Mutation

func (_c *FeedCreate) Mutation() *FeedMutation

Mutation returns the FeedMutation object of the builder.

func (*FeedCreate) Save

func (_c *FeedCreate) Save(ctx context.Context) (*Feed, error)

Save creates the Feed in the database.

func (*FeedCreate) SaveX

func (_c *FeedCreate) SaveX(ctx context.Context) *Feed

SaveX calls Save and panics if Save returns an error.

func (*FeedCreate) SetContentTypes

func (_c *FeedCreate) SetContentTypes(v string) *FeedCreate

SetContentTypes sets the "content_types" field.

func (*FeedCreate) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*FeedCreate) SetDays

func (_c *FeedCreate) SetDays(v int) *FeedCreate

SetDays sets the "days" field.

func (*FeedCreate) SetDescription

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

SetDescription sets the "description" field.

func (*FeedCreate) SetFormat

func (_c *FeedCreate) SetFormat(v string) *FeedCreate

SetFormat sets the "format" field.

func (*FeedCreate) SetID

func (_c *FeedCreate) SetID(v int) *FeedCreate

SetID sets the "id" field.

func (*FeedCreate) SetImageStyle

func (_c *FeedCreate) SetImageStyle(v string) *FeedCreate

SetImageStyle sets the "image_style" field.

func (*FeedCreate) SetItemLimit

func (_c *FeedCreate) SetItemLimit(v int) *FeedCreate

SetItemLimit sets the "item_limit" field.

func (*FeedCreate) SetLabel

func (_c *FeedCreate) SetLabel(v string) *FeedCreate

SetLabel sets the "label" field.

func (*FeedCreate) SetLanguage

func (_c *FeedCreate) SetLanguage(v string) *FeedCreate

SetLanguage sets the "language" field.

func (*FeedCreate) SetNillableContentTypes

func (_c *FeedCreate) SetNillableContentTypes(v *string) *FeedCreate

SetNillableContentTypes sets the "content_types" field if the given value is not nil.

func (*FeedCreate) SetNillableDays

func (_c *FeedCreate) SetNillableDays(v *int) *FeedCreate

SetNillableDays sets the "days" field if the given value is not nil.

func (*FeedCreate) SetNillableDescription

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

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

func (*FeedCreate) SetNillableFormat

func (_c *FeedCreate) SetNillableFormat(v *string) *FeedCreate

SetNillableFormat sets the "format" field if the given value is not nil.

func (*FeedCreate) SetNillableImageStyle

func (_c *FeedCreate) SetNillableImageStyle(v *string) *FeedCreate

SetNillableImageStyle sets the "image_style" field if the given value is not nil.

func (*FeedCreate) SetNillableItemLimit

func (_c *FeedCreate) SetNillableItemLimit(v *int) *FeedCreate

SetNillableItemLimit sets the "item_limit" field if the given value is not nil.

func (*FeedCreate) SetNillableLanguage

func (_c *FeedCreate) SetNillableLanguage(v *string) *FeedCreate

SetNillableLanguage sets the "language" field if the given value is not nil.

func (*FeedCreate) SetNillableStatus

func (_c *FeedCreate) SetNillableStatus(v *int) *FeedCreate

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

func (*FeedCreate) SetNillableTermIds

func (_c *FeedCreate) SetNillableTermIds(v *string) *FeedCreate

SetNillableTermIds sets the "term_ids" field if the given value is not nil.

func (*FeedCreate) SetNillableTitle

func (_c *FeedCreate) SetNillableTitle(v *string) *FeedCreate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*FeedCreate) SetPath

func (_c *FeedCreate) SetPath(v string) *FeedCreate

SetPath sets the "path" field.

func (*FeedCreate) SetStatus

func (_c *FeedCreate) SetStatus(v int) *FeedCreate

SetStatus sets the "status" field.

func (*FeedCreate) SetTermIds

func (_c *FeedCreate) SetTermIds(v string) *FeedCreate

SetTermIds sets the "term_ids" field.

func (*FeedCreate) SetTitle

func (_c *FeedCreate) SetTitle(v string) *FeedCreate

SetTitle sets the "title" field.

func (*FeedCreate) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

type FeedCreateBulk

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

FeedCreateBulk is the builder for creating many Feed entities in bulk.

func (*FeedCreateBulk) Exec

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

Exec executes the query.

func (*FeedCreateBulk) ExecX

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

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

func (*FeedCreateBulk) Save

func (_c *FeedCreateBulk) Save(ctx context.Context) ([]*Feed, error)

Save creates the Feed entities in the database.

func (*FeedCreateBulk) SaveX

func (_c *FeedCreateBulk) SaveX(ctx context.Context) []*Feed

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

type FeedDelete

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

FeedDelete is the builder for deleting a Feed entity.

func (*FeedDelete) Exec

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

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

func (*FeedDelete) ExecX

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

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

func (*FeedDelete) Where

func (_d *FeedDelete) Where(ps ...predicate.Feed) *FeedDelete

Where appends a list predicates to the FeedDelete builder.

type FeedDeleteOne

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

FeedDeleteOne is the builder for deleting a single Feed entity.

func (*FeedDeleteOne) Exec

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

Exec executes the deletion query.

func (*FeedDeleteOne) ExecX

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

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

func (*FeedDeleteOne) Where

func (_d *FeedDeleteOne) Where(ps ...predicate.Feed) *FeedDeleteOne

Where appends a list predicates to the FeedDelete builder.

type FeedFieldMap

type FeedFieldMap struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// FeedID holds the value of the "feed_id" field.
	FeedID int `json:"feed_id,omitempty"`
	// ContentType holds the value of the "content_type" field.
	ContentType string `json:"content_type,omitempty"`
	// BodyField holds the value of the "body_field" field.
	BodyField string `json:"body_field,omitempty"`
	// ImageField holds the value of the "image_field" field.
	ImageField string `json:"image_field,omitempty"`
	// CategoryField holds the value of the "category_field" field.
	CategoryField string `json:"category_field,omitempty"`
	// contains filtered or unexported fields
}

FeedFieldMap is the model entity for the FeedFieldMap schema.

func (*FeedFieldMap) String

func (_m *FeedFieldMap) String() string

String implements the fmt.Stringer.

func (*FeedFieldMap) Unwrap

func (_m *FeedFieldMap) Unwrap() *FeedFieldMap

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

func (_m *FeedFieldMap) Update() *FeedFieldMapUpdateOne

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

func (*FeedFieldMap) Value

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

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

type FeedFieldMapClient

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

FeedFieldMapClient is a client for the FeedFieldMap schema.

func NewFeedFieldMapClient

func NewFeedFieldMapClient(c config) *FeedFieldMapClient

NewFeedFieldMapClient returns a client for the FeedFieldMap from the given config.

func (*FeedFieldMapClient) Create

Create returns a builder for creating a FeedFieldMap entity.

func (*FeedFieldMapClient) CreateBulk

func (c *FeedFieldMapClient) CreateBulk(builders ...*FeedFieldMapCreate) *FeedFieldMapCreateBulk

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

func (*FeedFieldMapClient) Delete

Delete returns a delete builder for FeedFieldMap.

func (*FeedFieldMapClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FeedFieldMapClient) DeleteOneID

func (c *FeedFieldMapClient) DeleteOneID(id int) *FeedFieldMapDeleteOne

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

func (*FeedFieldMapClient) Get

Get returns a FeedFieldMap entity by its id.

func (*FeedFieldMapClient) GetX

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

func (*FeedFieldMapClient) Hooks

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

Hooks returns the client hooks.

func (*FeedFieldMapClient) Intercept

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

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

func (*FeedFieldMapClient) Interceptors

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

Interceptors returns the client interceptors.

func (*FeedFieldMapClient) MapCreateBulk

func (c *FeedFieldMapClient) MapCreateBulk(slice any, setFunc func(*FeedFieldMapCreate, int)) *FeedFieldMapCreateBulk

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

func (*FeedFieldMapClient) Query

Query returns a query builder for FeedFieldMap.

func (*FeedFieldMapClient) Update

Update returns an update builder for FeedFieldMap.

func (*FeedFieldMapClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*FeedFieldMapClient) UpdateOneID

func (c *FeedFieldMapClient) UpdateOneID(id int) *FeedFieldMapUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FeedFieldMapClient) Use

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

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

type FeedFieldMapCreate

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

FeedFieldMapCreate is the builder for creating a FeedFieldMap entity.

func (*FeedFieldMapCreate) Exec

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

Exec executes the query.

func (*FeedFieldMapCreate) ExecX

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

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

func (*FeedFieldMapCreate) Mutation

func (_c *FeedFieldMapCreate) Mutation() *FeedFieldMapMutation

Mutation returns the FeedFieldMapMutation object of the builder.

func (*FeedFieldMapCreate) Save

Save creates the FeedFieldMap in the database.

func (*FeedFieldMapCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*FeedFieldMapCreate) SetBodyField

func (_c *FeedFieldMapCreate) SetBodyField(v string) *FeedFieldMapCreate

SetBodyField sets the "body_field" field.

func (*FeedFieldMapCreate) SetCategoryField

func (_c *FeedFieldMapCreate) SetCategoryField(v string) *FeedFieldMapCreate

SetCategoryField sets the "category_field" field.

func (*FeedFieldMapCreate) SetContentType

func (_c *FeedFieldMapCreate) SetContentType(v string) *FeedFieldMapCreate

SetContentType sets the "content_type" field.

func (*FeedFieldMapCreate) SetFeedID

func (_c *FeedFieldMapCreate) SetFeedID(v int) *FeedFieldMapCreate

SetFeedID sets the "feed_id" field.

func (*FeedFieldMapCreate) SetID

SetID sets the "id" field.

func (*FeedFieldMapCreate) SetImageField

func (_c *FeedFieldMapCreate) SetImageField(v string) *FeedFieldMapCreate

SetImageField sets the "image_field" field.

func (*FeedFieldMapCreate) SetNillableBodyField

func (_c *FeedFieldMapCreate) SetNillableBodyField(v *string) *FeedFieldMapCreate

SetNillableBodyField sets the "body_field" field if the given value is not nil.

func (*FeedFieldMapCreate) SetNillableCategoryField

func (_c *FeedFieldMapCreate) SetNillableCategoryField(v *string) *FeedFieldMapCreate

SetNillableCategoryField sets the "category_field" field if the given value is not nil.

func (*FeedFieldMapCreate) SetNillableImageField

func (_c *FeedFieldMapCreate) SetNillableImageField(v *string) *FeedFieldMapCreate

SetNillableImageField sets the "image_field" field if the given value is not nil.

type FeedFieldMapCreateBulk

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

FeedFieldMapCreateBulk is the builder for creating many FeedFieldMap entities in bulk.

func (*FeedFieldMapCreateBulk) Exec

Exec executes the query.

func (*FeedFieldMapCreateBulk) ExecX

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

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

func (*FeedFieldMapCreateBulk) Save

Save creates the FeedFieldMap entities in the database.

func (*FeedFieldMapCreateBulk) SaveX

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

type FeedFieldMapDelete

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

FeedFieldMapDelete is the builder for deleting a FeedFieldMap entity.

func (*FeedFieldMapDelete) Exec

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

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

func (*FeedFieldMapDelete) ExecX

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

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

func (*FeedFieldMapDelete) Where

Where appends a list predicates to the FeedFieldMapDelete builder.

type FeedFieldMapDeleteOne

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

FeedFieldMapDeleteOne is the builder for deleting a single FeedFieldMap entity.

func (*FeedFieldMapDeleteOne) Exec

Exec executes the deletion query.

func (*FeedFieldMapDeleteOne) ExecX

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

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

func (*FeedFieldMapDeleteOne) Where

Where appends a list predicates to the FeedFieldMapDelete builder.

type FeedFieldMapGroupBy

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

FeedFieldMapGroupBy is the group-by builder for FeedFieldMap entities.

func (*FeedFieldMapGroupBy) Aggregate

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

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

func (*FeedFieldMapGroupBy) Bool

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

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

func (*FeedFieldMapGroupBy) BoolX

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

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

func (*FeedFieldMapGroupBy) Bools

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

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

func (*FeedFieldMapGroupBy) BoolsX

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

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

func (*FeedFieldMapGroupBy) Float64

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

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

func (*FeedFieldMapGroupBy) Float64X

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

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

func (*FeedFieldMapGroupBy) Float64s

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

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

func (*FeedFieldMapGroupBy) Float64sX

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

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

func (*FeedFieldMapGroupBy) Int

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

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

func (*FeedFieldMapGroupBy) IntX

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

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

func (*FeedFieldMapGroupBy) Ints

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

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

func (*FeedFieldMapGroupBy) IntsX

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

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

func (*FeedFieldMapGroupBy) Scan

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

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

func (*FeedFieldMapGroupBy) ScanX

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

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

func (*FeedFieldMapGroupBy) String

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

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

func (*FeedFieldMapGroupBy) StringX

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

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

func (*FeedFieldMapGroupBy) Strings

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

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

func (*FeedFieldMapGroupBy) StringsX

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

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

type FeedFieldMapMutation

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

FeedFieldMapMutation represents an operation that mutates the FeedFieldMap nodes in the graph.

func (*FeedFieldMapMutation) AddFeedID

func (m *FeedFieldMapMutation) AddFeedID(i int)

AddFeedID adds i to the "feed_id" field.

func (*FeedFieldMapMutation) AddField

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

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

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

func (*FeedFieldMapMutation) AddedFeedID

func (m *FeedFieldMapMutation) AddedFeedID() (r int, exists bool)

AddedFeedID returns the value that was added to the "feed_id" field in this mutation.

func (*FeedFieldMapMutation) AddedField

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

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

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

func (*FeedFieldMapMutation) AddedIDs

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

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

func (*FeedFieldMapMutation) BodyField

func (m *FeedFieldMapMutation) BodyField() (r string, exists bool)

BodyField returns the value of the "body_field" field in the mutation.

func (*FeedFieldMapMutation) CategoryField

func (m *FeedFieldMapMutation) CategoryField() (r string, exists bool)

CategoryField returns the value of the "category_field" field in the mutation.

func (*FeedFieldMapMutation) ClearEdge

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

func (m *FeedFieldMapMutation) 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 (*FeedFieldMapMutation) ClearedEdges

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

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

func (*FeedFieldMapMutation) ClearedFields

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

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

func (FeedFieldMapMutation) Client

func (m FeedFieldMapMutation) 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 (*FeedFieldMapMutation) ContentType

func (m *FeedFieldMapMutation) ContentType() (r string, exists bool)

ContentType returns the value of the "content_type" field in the mutation.

func (*FeedFieldMapMutation) EdgeCleared

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

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

func (*FeedFieldMapMutation) FeedID

func (m *FeedFieldMapMutation) FeedID() (r int, exists bool)

FeedID returns the value of the "feed_id" field in the mutation.

func (*FeedFieldMapMutation) Field

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

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

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

func (*FeedFieldMapMutation) Fields

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

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

func (m *FeedFieldMapMutation) 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 (*FeedFieldMapMutation) ImageField

func (m *FeedFieldMapMutation) ImageField() (r string, exists bool)

ImageField returns the value of the "image_field" field in the mutation.

func (*FeedFieldMapMutation) OldBodyField

func (m *FeedFieldMapMutation) OldBodyField(ctx context.Context) (v string, err error)

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

func (*FeedFieldMapMutation) OldCategoryField

func (m *FeedFieldMapMutation) OldCategoryField(ctx context.Context) (v string, err error)

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

func (*FeedFieldMapMutation) OldContentType

func (m *FeedFieldMapMutation) OldContentType(ctx context.Context) (v string, err error)

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

func (*FeedFieldMapMutation) OldFeedID

func (m *FeedFieldMapMutation) OldFeedID(ctx context.Context) (v int, err error)

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

func (*FeedFieldMapMutation) OldField

func (m *FeedFieldMapMutation) 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 (*FeedFieldMapMutation) OldImageField

func (m *FeedFieldMapMutation) OldImageField(ctx context.Context) (v string, err error)

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

func (*FeedFieldMapMutation) Op

func (m *FeedFieldMapMutation) Op() Op

Op returns the operation name.

func (*FeedFieldMapMutation) RemovedEdges

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

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

func (*FeedFieldMapMutation) RemovedIDs

func (m *FeedFieldMapMutation) 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 (*FeedFieldMapMutation) ResetBodyField

func (m *FeedFieldMapMutation) ResetBodyField()

ResetBodyField resets all changes to the "body_field" field.

func (*FeedFieldMapMutation) ResetCategoryField

func (m *FeedFieldMapMutation) ResetCategoryField()

ResetCategoryField resets all changes to the "category_field" field.

func (*FeedFieldMapMutation) ResetContentType

func (m *FeedFieldMapMutation) ResetContentType()

ResetContentType resets all changes to the "content_type" field.

func (*FeedFieldMapMutation) ResetEdge

func (m *FeedFieldMapMutation) 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 (*FeedFieldMapMutation) ResetFeedID

func (m *FeedFieldMapMutation) ResetFeedID()

ResetFeedID resets all changes to the "feed_id" field.

func (*FeedFieldMapMutation) ResetField

func (m *FeedFieldMapMutation) 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 (*FeedFieldMapMutation) ResetImageField

func (m *FeedFieldMapMutation) ResetImageField()

ResetImageField resets all changes to the "image_field" field.

func (*FeedFieldMapMutation) SetBodyField

func (m *FeedFieldMapMutation) SetBodyField(s string)

SetBodyField sets the "body_field" field.

func (*FeedFieldMapMutation) SetCategoryField

func (m *FeedFieldMapMutation) SetCategoryField(s string)

SetCategoryField sets the "category_field" field.

func (*FeedFieldMapMutation) SetContentType

func (m *FeedFieldMapMutation) SetContentType(s string)

SetContentType sets the "content_type" field.

func (*FeedFieldMapMutation) SetFeedID

func (m *FeedFieldMapMutation) SetFeedID(i int)

SetFeedID sets the "feed_id" field.

func (*FeedFieldMapMutation) SetField

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

func (m *FeedFieldMapMutation) SetID(id int)

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

func (*FeedFieldMapMutation) SetImageField

func (m *FeedFieldMapMutation) SetImageField(s string)

SetImageField sets the "image_field" field.

func (*FeedFieldMapMutation) SetOp

func (m *FeedFieldMapMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (FeedFieldMapMutation) Tx

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

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

func (*FeedFieldMapMutation) Type

func (m *FeedFieldMapMutation) Type() string

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

func (*FeedFieldMapMutation) Where

Where appends a list predicates to the FeedFieldMapMutation builder.

func (*FeedFieldMapMutation) WhereP

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

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

type FeedFieldMapQuery

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

FeedFieldMapQuery is the builder for querying FeedFieldMap entities.

func (*FeedFieldMapQuery) Aggregate

func (_q *FeedFieldMapQuery) Aggregate(fns ...AggregateFunc) *FeedFieldMapSelect

Aggregate returns a FeedFieldMapSelect configured with the given aggregations.

func (*FeedFieldMapQuery) All

func (_q *FeedFieldMapQuery) All(ctx context.Context) ([]*FeedFieldMap, error)

All executes the query and returns a list of FeedFieldMaps.

func (*FeedFieldMapQuery) AllX

func (_q *FeedFieldMapQuery) AllX(ctx context.Context) []*FeedFieldMap

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

func (*FeedFieldMapQuery) Clone

func (_q *FeedFieldMapQuery) Clone() *FeedFieldMapQuery

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

func (*FeedFieldMapQuery) Count

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

Count returns the count of the given query.

func (*FeedFieldMapQuery) CountX

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

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

func (*FeedFieldMapQuery) Exist

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

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

func (*FeedFieldMapQuery) ExistX

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

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

func (*FeedFieldMapQuery) First

func (_q *FeedFieldMapQuery) First(ctx context.Context) (*FeedFieldMap, error)

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

func (*FeedFieldMapQuery) FirstID

func (_q *FeedFieldMapQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*FeedFieldMapQuery) FirstIDX

func (_q *FeedFieldMapQuery) FirstIDX(ctx context.Context) int

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

func (*FeedFieldMapQuery) FirstX

func (_q *FeedFieldMapQuery) FirstX(ctx context.Context) *FeedFieldMap

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

func (*FeedFieldMapQuery) GroupBy

func (_q *FeedFieldMapQuery) GroupBy(field string, fields ...string) *FeedFieldMapGroupBy

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 {
	FeedID int `json:"feed_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.FeedFieldMap.Query().
	GroupBy(feedfieldmap.FieldFeedID).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*FeedFieldMapQuery) IDs

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

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

func (*FeedFieldMapQuery) IDsX

func (_q *FeedFieldMapQuery) IDsX(ctx context.Context) []int

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

func (*FeedFieldMapQuery) Limit

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

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

func (*FeedFieldMapQuery) Offset

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

Offset to start from.

func (*FeedFieldMapQuery) Only

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

func (*FeedFieldMapQuery) OnlyID

func (_q *FeedFieldMapQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*FeedFieldMapQuery) OnlyIDX

func (_q *FeedFieldMapQuery) OnlyIDX(ctx context.Context) int

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

func (*FeedFieldMapQuery) OnlyX

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

func (*FeedFieldMapQuery) Order

Order specifies how the records should be ordered.

func (*FeedFieldMapQuery) Select

func (_q *FeedFieldMapQuery) Select(fields ...string) *FeedFieldMapSelect

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 {
	FeedID int `json:"feed_id,omitempty"`
}

client.FeedFieldMap.Query().
	Select(feedfieldmap.FieldFeedID).
	Scan(ctx, &v)

func (*FeedFieldMapQuery) Unique

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

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

Where adds a new predicate for the FeedFieldMapQuery builder.

type FeedFieldMapSelect

type FeedFieldMapSelect struct {
	*FeedFieldMapQuery
	// contains filtered or unexported fields
}

FeedFieldMapSelect is the builder for selecting fields of FeedFieldMap entities.

func (*FeedFieldMapSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*FeedFieldMapSelect) Bool

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

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

func (*FeedFieldMapSelect) BoolX

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

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

func (*FeedFieldMapSelect) Bools

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

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

func (*FeedFieldMapSelect) BoolsX

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

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

func (*FeedFieldMapSelect) Float64

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

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

func (*FeedFieldMapSelect) Float64X

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

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

func (*FeedFieldMapSelect) Float64s

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

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

func (*FeedFieldMapSelect) Float64sX

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

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

func (*FeedFieldMapSelect) Int

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

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

func (*FeedFieldMapSelect) IntX

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

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

func (*FeedFieldMapSelect) Ints

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

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

func (*FeedFieldMapSelect) IntsX

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

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

func (*FeedFieldMapSelect) Scan

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

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

func (*FeedFieldMapSelect) ScanX

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

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

func (*FeedFieldMapSelect) String

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

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

func (*FeedFieldMapSelect) StringX

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

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

func (*FeedFieldMapSelect) Strings

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

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

func (*FeedFieldMapSelect) StringsX

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

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

type FeedFieldMapUpdate

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

FeedFieldMapUpdate is the builder for updating FeedFieldMap entities.

func (*FeedFieldMapUpdate) AddFeedID

func (_u *FeedFieldMapUpdate) AddFeedID(v int) *FeedFieldMapUpdate

AddFeedID adds value to the "feed_id" field.

func (*FeedFieldMapUpdate) Exec

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

Exec executes the query.

func (*FeedFieldMapUpdate) ExecX

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

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

func (*FeedFieldMapUpdate) Mutation

func (_u *FeedFieldMapUpdate) Mutation() *FeedFieldMapMutation

Mutation returns the FeedFieldMapMutation object of the builder.

func (*FeedFieldMapUpdate) Save

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

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

func (*FeedFieldMapUpdate) SaveX

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

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

func (*FeedFieldMapUpdate) SetBodyField

func (_u *FeedFieldMapUpdate) SetBodyField(v string) *FeedFieldMapUpdate

SetBodyField sets the "body_field" field.

func (*FeedFieldMapUpdate) SetCategoryField

func (_u *FeedFieldMapUpdate) SetCategoryField(v string) *FeedFieldMapUpdate

SetCategoryField sets the "category_field" field.

func (*FeedFieldMapUpdate) SetContentType

func (_u *FeedFieldMapUpdate) SetContentType(v string) *FeedFieldMapUpdate

SetContentType sets the "content_type" field.

func (*FeedFieldMapUpdate) SetFeedID

func (_u *FeedFieldMapUpdate) SetFeedID(v int) *FeedFieldMapUpdate

SetFeedID sets the "feed_id" field.

func (*FeedFieldMapUpdate) SetImageField

func (_u *FeedFieldMapUpdate) SetImageField(v string) *FeedFieldMapUpdate

SetImageField sets the "image_field" field.

func (*FeedFieldMapUpdate) SetNillableBodyField

func (_u *FeedFieldMapUpdate) SetNillableBodyField(v *string) *FeedFieldMapUpdate

SetNillableBodyField sets the "body_field" field if the given value is not nil.

func (*FeedFieldMapUpdate) SetNillableCategoryField

func (_u *FeedFieldMapUpdate) SetNillableCategoryField(v *string) *FeedFieldMapUpdate

SetNillableCategoryField sets the "category_field" field if the given value is not nil.

func (*FeedFieldMapUpdate) SetNillableContentType

func (_u *FeedFieldMapUpdate) SetNillableContentType(v *string) *FeedFieldMapUpdate

SetNillableContentType sets the "content_type" field if the given value is not nil.

func (*FeedFieldMapUpdate) SetNillableFeedID

func (_u *FeedFieldMapUpdate) SetNillableFeedID(v *int) *FeedFieldMapUpdate

SetNillableFeedID sets the "feed_id" field if the given value is not nil.

func (*FeedFieldMapUpdate) SetNillableImageField

func (_u *FeedFieldMapUpdate) SetNillableImageField(v *string) *FeedFieldMapUpdate

SetNillableImageField sets the "image_field" field if the given value is not nil.

func (*FeedFieldMapUpdate) Where

Where appends a list predicates to the FeedFieldMapUpdate builder.

type FeedFieldMapUpdateOne

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

FeedFieldMapUpdateOne is the builder for updating a single FeedFieldMap entity.

func (*FeedFieldMapUpdateOne) AddFeedID

AddFeedID adds value to the "feed_id" field.

func (*FeedFieldMapUpdateOne) Exec

Exec executes the query on the entity.

func (*FeedFieldMapUpdateOne) ExecX

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

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

func (*FeedFieldMapUpdateOne) Mutation

Mutation returns the FeedFieldMapMutation object of the builder.

func (*FeedFieldMapUpdateOne) Save

Save executes the query and returns the updated FeedFieldMap entity.

func (*FeedFieldMapUpdateOne) SaveX

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

func (*FeedFieldMapUpdateOne) Select

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

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

func (*FeedFieldMapUpdateOne) SetBodyField

func (_u *FeedFieldMapUpdateOne) SetBodyField(v string) *FeedFieldMapUpdateOne

SetBodyField sets the "body_field" field.

func (*FeedFieldMapUpdateOne) SetCategoryField

func (_u *FeedFieldMapUpdateOne) SetCategoryField(v string) *FeedFieldMapUpdateOne

SetCategoryField sets the "category_field" field.

func (*FeedFieldMapUpdateOne) SetContentType

func (_u *FeedFieldMapUpdateOne) SetContentType(v string) *FeedFieldMapUpdateOne

SetContentType sets the "content_type" field.

func (*FeedFieldMapUpdateOne) SetFeedID

SetFeedID sets the "feed_id" field.

func (*FeedFieldMapUpdateOne) SetImageField

func (_u *FeedFieldMapUpdateOne) SetImageField(v string) *FeedFieldMapUpdateOne

SetImageField sets the "image_field" field.

func (*FeedFieldMapUpdateOne) SetNillableBodyField

func (_u *FeedFieldMapUpdateOne) SetNillableBodyField(v *string) *FeedFieldMapUpdateOne

SetNillableBodyField sets the "body_field" field if the given value is not nil.

func (*FeedFieldMapUpdateOne) SetNillableCategoryField

func (_u *FeedFieldMapUpdateOne) SetNillableCategoryField(v *string) *FeedFieldMapUpdateOne

SetNillableCategoryField sets the "category_field" field if the given value is not nil.

func (*FeedFieldMapUpdateOne) SetNillableContentType

func (_u *FeedFieldMapUpdateOne) SetNillableContentType(v *string) *FeedFieldMapUpdateOne

SetNillableContentType sets the "content_type" field if the given value is not nil.

func (*FeedFieldMapUpdateOne) SetNillableFeedID

func (_u *FeedFieldMapUpdateOne) SetNillableFeedID(v *int) *FeedFieldMapUpdateOne

SetNillableFeedID sets the "feed_id" field if the given value is not nil.

func (*FeedFieldMapUpdateOne) SetNillableImageField

func (_u *FeedFieldMapUpdateOne) SetNillableImageField(v *string) *FeedFieldMapUpdateOne

SetNillableImageField sets the "image_field" field if the given value is not nil.

func (*FeedFieldMapUpdateOne) Where

Where appends a list predicates to the FeedFieldMapUpdate builder.

type FeedFieldMaps

type FeedFieldMaps []*FeedFieldMap

FeedFieldMaps is a parsable slice of FeedFieldMap.

type FeedGroupBy

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

FeedGroupBy is the group-by builder for Feed entities.

func (*FeedGroupBy) Aggregate

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

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

func (*FeedGroupBy) Bool

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

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

func (*FeedGroupBy) BoolX

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

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

func (*FeedGroupBy) Bools

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

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

func (*FeedGroupBy) BoolsX

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

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

func (*FeedGroupBy) Float64

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

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

func (*FeedGroupBy) Float64X

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

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

func (*FeedGroupBy) Float64s

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

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

func (*FeedGroupBy) Float64sX

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

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

func (*FeedGroupBy) Int

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

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

func (*FeedGroupBy) IntX

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

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

func (*FeedGroupBy) Ints

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

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

func (*FeedGroupBy) IntsX

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

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

func (*FeedGroupBy) Scan

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

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

func (*FeedGroupBy) ScanX

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

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

func (*FeedGroupBy) String

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

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

func (*FeedGroupBy) StringX

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

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

func (*FeedGroupBy) Strings

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

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

func (*FeedGroupBy) StringsX

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

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

type FeedMutation

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

FeedMutation represents an operation that mutates the Feed nodes in the graph.

func (*FeedMutation) AddDays

func (m *FeedMutation) AddDays(i int)

AddDays adds i to the "days" field.

func (*FeedMutation) AddField

func (m *FeedMutation) 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 (*FeedMutation) AddItemLimit

func (m *FeedMutation) AddItemLimit(i int)

AddItemLimit adds i to the "item_limit" field.

func (*FeedMutation) AddStatus

func (m *FeedMutation) AddStatus(i int)

AddStatus adds i to the "status" field.

func (*FeedMutation) AddedDays

func (m *FeedMutation) AddedDays() (r int, exists bool)

AddedDays returns the value that was added to the "days" field in this mutation.

func (*FeedMutation) AddedEdges

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

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

func (*FeedMutation) AddedField

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

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

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

func (*FeedMutation) AddedIDs

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

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

func (*FeedMutation) AddedItemLimit

func (m *FeedMutation) AddedItemLimit() (r int, exists bool)

AddedItemLimit returns the value that was added to the "item_limit" field in this mutation.

func (*FeedMutation) AddedStatus

func (m *FeedMutation) AddedStatus() (r int, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*FeedMutation) ClearEdge

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

func (m *FeedMutation) 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 (*FeedMutation) ClearedEdges

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

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

func (*FeedMutation) ClearedFields

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

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

func (FeedMutation) Client

func (m FeedMutation) 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 (*FeedMutation) ContentTypes

func (m *FeedMutation) ContentTypes() (r string, exists bool)

ContentTypes returns the value of the "content_types" field in the mutation.

func (*FeedMutation) CreatedAt

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

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

func (*FeedMutation) Days

func (m *FeedMutation) Days() (r int, exists bool)

Days returns the value of the "days" field in the mutation.

func (*FeedMutation) Description

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

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

func (*FeedMutation) EdgeCleared

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

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

func (*FeedMutation) Field

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

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

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

func (*FeedMutation) Fields

func (m *FeedMutation) 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 (*FeedMutation) Format

func (m *FeedMutation) Format() (r string, exists bool)

Format returns the value of the "format" field in the mutation.

func (*FeedMutation) ID

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

func (m *FeedMutation) 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 (*FeedMutation) ImageStyle

func (m *FeedMutation) ImageStyle() (r string, exists bool)

ImageStyle returns the value of the "image_style" field in the mutation.

func (*FeedMutation) ItemLimit

func (m *FeedMutation) ItemLimit() (r int, exists bool)

ItemLimit returns the value of the "item_limit" field in the mutation.

func (*FeedMutation) Label

func (m *FeedMutation) Label() (r string, exists bool)

Label returns the value of the "label" field in the mutation.

func (*FeedMutation) Language

func (m *FeedMutation) Language() (r string, exists bool)

Language returns the value of the "language" field in the mutation.

func (*FeedMutation) OldContentTypes

func (m *FeedMutation) OldContentTypes(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldCreatedAt

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

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

func (*FeedMutation) OldDays

func (m *FeedMutation) OldDays(ctx context.Context) (v int, err error)

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

func (*FeedMutation) OldDescription

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

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

func (*FeedMutation) OldField

func (m *FeedMutation) 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 (*FeedMutation) OldFormat

func (m *FeedMutation) OldFormat(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldImageStyle

func (m *FeedMutation) OldImageStyle(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldItemLimit

func (m *FeedMutation) OldItemLimit(ctx context.Context) (v int, err error)

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

func (*FeedMutation) OldLabel

func (m *FeedMutation) OldLabel(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldLanguage

func (m *FeedMutation) OldLanguage(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldPath

func (m *FeedMutation) OldPath(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldStatus

func (m *FeedMutation) OldStatus(ctx context.Context) (v int, err error)

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

func (*FeedMutation) OldTermIds

func (m *FeedMutation) OldTermIds(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldTitle

func (m *FeedMutation) OldTitle(ctx context.Context) (v string, err error)

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

func (*FeedMutation) OldUpdatedAt

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

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

func (*FeedMutation) Op

func (m *FeedMutation) Op() Op

Op returns the operation name.

func (*FeedMutation) Path

func (m *FeedMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*FeedMutation) RemovedEdges

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

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

func (*FeedMutation) RemovedIDs

func (m *FeedMutation) 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 (*FeedMutation) ResetContentTypes

func (m *FeedMutation) ResetContentTypes()

ResetContentTypes resets all changes to the "content_types" field.

func (*FeedMutation) ResetCreatedAt

func (m *FeedMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FeedMutation) ResetDays

func (m *FeedMutation) ResetDays()

ResetDays resets all changes to the "days" field.

func (*FeedMutation) ResetDescription

func (m *FeedMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*FeedMutation) ResetEdge

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

func (m *FeedMutation) 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 (*FeedMutation) ResetFormat

func (m *FeedMutation) ResetFormat()

ResetFormat resets all changes to the "format" field.

func (*FeedMutation) ResetImageStyle

func (m *FeedMutation) ResetImageStyle()

ResetImageStyle resets all changes to the "image_style" field.

func (*FeedMutation) ResetItemLimit

func (m *FeedMutation) ResetItemLimit()

ResetItemLimit resets all changes to the "item_limit" field.

func (*FeedMutation) ResetLabel

func (m *FeedMutation) ResetLabel()

ResetLabel resets all changes to the "label" field.

func (*FeedMutation) ResetLanguage

func (m *FeedMutation) ResetLanguage()

ResetLanguage resets all changes to the "language" field.

func (*FeedMutation) ResetPath

func (m *FeedMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*FeedMutation) ResetStatus

func (m *FeedMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*FeedMutation) ResetTermIds

func (m *FeedMutation) ResetTermIds()

ResetTermIds resets all changes to the "term_ids" field.

func (*FeedMutation) ResetTitle

func (m *FeedMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*FeedMutation) ResetUpdatedAt

func (m *FeedMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FeedMutation) SetContentTypes

func (m *FeedMutation) SetContentTypes(s string)

SetContentTypes sets the "content_types" field.

func (*FeedMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*FeedMutation) SetDays

func (m *FeedMutation) SetDays(i int)

SetDays sets the "days" field.

func (*FeedMutation) SetDescription

func (m *FeedMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*FeedMutation) SetField

func (m *FeedMutation) 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 (*FeedMutation) SetFormat

func (m *FeedMutation) SetFormat(s string)

SetFormat sets the "format" field.

func (*FeedMutation) SetID

func (m *FeedMutation) SetID(id int)

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

func (*FeedMutation) SetImageStyle

func (m *FeedMutation) SetImageStyle(s string)

SetImageStyle sets the "image_style" field.

func (*FeedMutation) SetItemLimit

func (m *FeedMutation) SetItemLimit(i int)

SetItemLimit sets the "item_limit" field.

func (*FeedMutation) SetLabel

func (m *FeedMutation) SetLabel(s string)

SetLabel sets the "label" field.

func (*FeedMutation) SetLanguage

func (m *FeedMutation) SetLanguage(s string)

SetLanguage sets the "language" field.

func (*FeedMutation) SetOp

func (m *FeedMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FeedMutation) SetPath

func (m *FeedMutation) SetPath(s string)

SetPath sets the "path" field.

func (*FeedMutation) SetStatus

func (m *FeedMutation) SetStatus(i int)

SetStatus sets the "status" field.

func (*FeedMutation) SetTermIds

func (m *FeedMutation) SetTermIds(s string)

SetTermIds sets the "term_ids" field.

func (*FeedMutation) SetTitle

func (m *FeedMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*FeedMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*FeedMutation) Status

func (m *FeedMutation) Status() (r int, exists bool)

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

func (*FeedMutation) TermIds

func (m *FeedMutation) TermIds() (r string, exists bool)

TermIds returns the value of the "term_ids" field in the mutation.

func (*FeedMutation) Title

func (m *FeedMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (FeedMutation) Tx

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

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

func (*FeedMutation) Type

func (m *FeedMutation) Type() string

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

func (*FeedMutation) UpdatedAt

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

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

func (*FeedMutation) Where

func (m *FeedMutation) Where(ps ...predicate.Feed)

Where appends a list predicates to the FeedMutation builder.

func (*FeedMutation) WhereP

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

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

type FeedQuery

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

FeedQuery is the builder for querying Feed entities.

func (*FeedQuery) Aggregate

func (_q *FeedQuery) Aggregate(fns ...AggregateFunc) *FeedSelect

Aggregate returns a FeedSelect configured with the given aggregations.

func (*FeedQuery) All

func (_q *FeedQuery) All(ctx context.Context) ([]*Feed, error)

All executes the query and returns a list of Feeds.

func (*FeedQuery) AllX

func (_q *FeedQuery) AllX(ctx context.Context) []*Feed

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

func (*FeedQuery) Clone

func (_q *FeedQuery) Clone() *FeedQuery

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

func (*FeedQuery) Count

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

Count returns the count of the given query.

func (*FeedQuery) CountX

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

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

func (*FeedQuery) Exist

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

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

func (*FeedQuery) ExistX

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

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

func (*FeedQuery) First

func (_q *FeedQuery) First(ctx context.Context) (*Feed, error)

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

func (*FeedQuery) FirstID

func (_q *FeedQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*FeedQuery) FirstIDX

func (_q *FeedQuery) FirstIDX(ctx context.Context) int

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

func (*FeedQuery) FirstX

func (_q *FeedQuery) FirstX(ctx context.Context) *Feed

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

func (*FeedQuery) GroupBy

func (_q *FeedQuery) GroupBy(field string, fields ...string) *FeedGroupBy

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

client.Feed.Query().
	GroupBy(feed.FieldLabel).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*FeedQuery) IDs

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

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

func (*FeedQuery) IDsX

func (_q *FeedQuery) IDsX(ctx context.Context) []int

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

func (*FeedQuery) Limit

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

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

func (*FeedQuery) Offset

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

Offset to start from.

func (*FeedQuery) Only

func (_q *FeedQuery) Only(ctx context.Context) (*Feed, error)

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

func (*FeedQuery) OnlyID

func (_q *FeedQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*FeedQuery) OnlyIDX

func (_q *FeedQuery) OnlyIDX(ctx context.Context) int

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

func (*FeedQuery) OnlyX

func (_q *FeedQuery) OnlyX(ctx context.Context) *Feed

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

func (*FeedQuery) Order

func (_q *FeedQuery) Order(o ...feed.OrderOption) *FeedQuery

Order specifies how the records should be ordered.

func (*FeedQuery) Select

func (_q *FeedQuery) Select(fields ...string) *FeedSelect

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

client.Feed.Query().
	Select(feed.FieldLabel).
	Scan(ctx, &v)

func (*FeedQuery) Unique

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

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

func (_q *FeedQuery) Where(ps ...predicate.Feed) *FeedQuery

Where adds a new predicate for the FeedQuery builder.

type FeedSelect

type FeedSelect struct {
	*FeedQuery
	// contains filtered or unexported fields
}

FeedSelect is the builder for selecting fields of Feed entities.

func (*FeedSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*FeedSelect) Bool

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

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

func (*FeedSelect) BoolX

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

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

func (*FeedSelect) Bools

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

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

func (*FeedSelect) BoolsX

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

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

func (*FeedSelect) Float64

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

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

func (*FeedSelect) Float64X

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

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

func (*FeedSelect) Float64s

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

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

func (*FeedSelect) Float64sX

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

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

func (*FeedSelect) Int

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

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

func (*FeedSelect) IntX

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

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

func (*FeedSelect) Ints

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

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

func (*FeedSelect) IntsX

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

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

func (*FeedSelect) Scan

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

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

func (*FeedSelect) ScanX

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

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

func (*FeedSelect) String

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

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

func (*FeedSelect) StringX

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

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

func (*FeedSelect) Strings

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

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

func (*FeedSelect) StringsX

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

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

type FeedUpdate

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

FeedUpdate is the builder for updating Feed entities.

func (*FeedUpdate) AddDays

func (_u *FeedUpdate) AddDays(v int) *FeedUpdate

AddDays adds value to the "days" field.

func (*FeedUpdate) AddItemLimit

func (_u *FeedUpdate) AddItemLimit(v int) *FeedUpdate

AddItemLimit adds value to the "item_limit" field.

func (*FeedUpdate) AddStatus

func (_u *FeedUpdate) AddStatus(v int) *FeedUpdate

AddStatus adds value to the "status" field.

func (*FeedUpdate) Exec

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

Exec executes the query.

func (*FeedUpdate) ExecX

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

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

func (*FeedUpdate) Mutation

func (_u *FeedUpdate) Mutation() *FeedMutation

Mutation returns the FeedMutation object of the builder.

func (*FeedUpdate) Save

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

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

func (*FeedUpdate) SaveX

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

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

func (*FeedUpdate) SetContentTypes

func (_u *FeedUpdate) SetContentTypes(v string) *FeedUpdate

SetContentTypes sets the "content_types" field.

func (*FeedUpdate) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*FeedUpdate) SetDays

func (_u *FeedUpdate) SetDays(v int) *FeedUpdate

SetDays sets the "days" field.

func (*FeedUpdate) SetDescription

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

SetDescription sets the "description" field.

func (*FeedUpdate) SetFormat

func (_u *FeedUpdate) SetFormat(v string) *FeedUpdate

SetFormat sets the "format" field.

func (*FeedUpdate) SetImageStyle

func (_u *FeedUpdate) SetImageStyle(v string) *FeedUpdate

SetImageStyle sets the "image_style" field.

func (*FeedUpdate) SetItemLimit

func (_u *FeedUpdate) SetItemLimit(v int) *FeedUpdate

SetItemLimit sets the "item_limit" field.

func (*FeedUpdate) SetLabel

func (_u *FeedUpdate) SetLabel(v string) *FeedUpdate

SetLabel sets the "label" field.

func (*FeedUpdate) SetLanguage

func (_u *FeedUpdate) SetLanguage(v string) *FeedUpdate

SetLanguage sets the "language" field.

func (*FeedUpdate) SetNillableContentTypes

func (_u *FeedUpdate) SetNillableContentTypes(v *string) *FeedUpdate

SetNillableContentTypes sets the "content_types" field if the given value is not nil.

func (*FeedUpdate) SetNillableCreatedAt

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

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

func (*FeedUpdate) SetNillableDays

func (_u *FeedUpdate) SetNillableDays(v *int) *FeedUpdate

SetNillableDays sets the "days" field if the given value is not nil.

func (*FeedUpdate) SetNillableDescription

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

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

func (*FeedUpdate) SetNillableFormat

func (_u *FeedUpdate) SetNillableFormat(v *string) *FeedUpdate

SetNillableFormat sets the "format" field if the given value is not nil.

func (*FeedUpdate) SetNillableImageStyle

func (_u *FeedUpdate) SetNillableImageStyle(v *string) *FeedUpdate

SetNillableImageStyle sets the "image_style" field if the given value is not nil.

func (*FeedUpdate) SetNillableItemLimit

func (_u *FeedUpdate) SetNillableItemLimit(v *int) *FeedUpdate

SetNillableItemLimit sets the "item_limit" field if the given value is not nil.

func (*FeedUpdate) SetNillableLabel

func (_u *FeedUpdate) SetNillableLabel(v *string) *FeedUpdate

SetNillableLabel sets the "label" field if the given value is not nil.

func (*FeedUpdate) SetNillableLanguage

func (_u *FeedUpdate) SetNillableLanguage(v *string) *FeedUpdate

SetNillableLanguage sets the "language" field if the given value is not nil.

func (*FeedUpdate) SetNillablePath

func (_u *FeedUpdate) SetNillablePath(v *string) *FeedUpdate

SetNillablePath sets the "path" field if the given value is not nil.

func (*FeedUpdate) SetNillableStatus

func (_u *FeedUpdate) SetNillableStatus(v *int) *FeedUpdate

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

func (*FeedUpdate) SetNillableTermIds

func (_u *FeedUpdate) SetNillableTermIds(v *string) *FeedUpdate

SetNillableTermIds sets the "term_ids" field if the given value is not nil.

func (*FeedUpdate) SetNillableTitle

func (_u *FeedUpdate) SetNillableTitle(v *string) *FeedUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*FeedUpdate) SetNillableUpdatedAt

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

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

func (*FeedUpdate) SetPath

func (_u *FeedUpdate) SetPath(v string) *FeedUpdate

SetPath sets the "path" field.

func (*FeedUpdate) SetStatus

func (_u *FeedUpdate) SetStatus(v int) *FeedUpdate

SetStatus sets the "status" field.

func (*FeedUpdate) SetTermIds

func (_u *FeedUpdate) SetTermIds(v string) *FeedUpdate

SetTermIds sets the "term_ids" field.

func (*FeedUpdate) SetTitle

func (_u *FeedUpdate) SetTitle(v string) *FeedUpdate

SetTitle sets the "title" field.

func (*FeedUpdate) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*FeedUpdate) Where

func (_u *FeedUpdate) Where(ps ...predicate.Feed) *FeedUpdate

Where appends a list predicates to the FeedUpdate builder.

type FeedUpdateOne

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

FeedUpdateOne is the builder for updating a single Feed entity.

func (*FeedUpdateOne) AddDays

func (_u *FeedUpdateOne) AddDays(v int) *FeedUpdateOne

AddDays adds value to the "days" field.

func (*FeedUpdateOne) AddItemLimit

func (_u *FeedUpdateOne) AddItemLimit(v int) *FeedUpdateOne

AddItemLimit adds value to the "item_limit" field.

func (*FeedUpdateOne) AddStatus

func (_u *FeedUpdateOne) AddStatus(v int) *FeedUpdateOne

AddStatus adds value to the "status" field.

func (*FeedUpdateOne) Exec

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

Exec executes the query on the entity.

func (*FeedUpdateOne) ExecX

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

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

func (*FeedUpdateOne) Mutation

func (_u *FeedUpdateOne) Mutation() *FeedMutation

Mutation returns the FeedMutation object of the builder.

func (*FeedUpdateOne) Save

func (_u *FeedUpdateOne) Save(ctx context.Context) (*Feed, error)

Save executes the query and returns the updated Feed entity.

func (*FeedUpdateOne) SaveX

func (_u *FeedUpdateOne) SaveX(ctx context.Context) *Feed

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

func (*FeedUpdateOne) Select

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

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

func (*FeedUpdateOne) SetContentTypes

func (_u *FeedUpdateOne) SetContentTypes(v string) *FeedUpdateOne

SetContentTypes sets the "content_types" field.

func (*FeedUpdateOne) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*FeedUpdateOne) SetDays

func (_u *FeedUpdateOne) SetDays(v int) *FeedUpdateOne

SetDays sets the "days" field.

func (*FeedUpdateOne) SetDescription

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

SetDescription sets the "description" field.

func (*FeedUpdateOne) SetFormat

func (_u *FeedUpdateOne) SetFormat(v string) *FeedUpdateOne

SetFormat sets the "format" field.

func (*FeedUpdateOne) SetImageStyle

func (_u *FeedUpdateOne) SetImageStyle(v string) *FeedUpdateOne

SetImageStyle sets the "image_style" field.

func (*FeedUpdateOne) SetItemLimit

func (_u *FeedUpdateOne) SetItemLimit(v int) *FeedUpdateOne

SetItemLimit sets the "item_limit" field.

func (*FeedUpdateOne) SetLabel

func (_u *FeedUpdateOne) SetLabel(v string) *FeedUpdateOne

SetLabel sets the "label" field.

func (*FeedUpdateOne) SetLanguage

func (_u *FeedUpdateOne) SetLanguage(v string) *FeedUpdateOne

SetLanguage sets the "language" field.

func (*FeedUpdateOne) SetNillableContentTypes

func (_u *FeedUpdateOne) SetNillableContentTypes(v *string) *FeedUpdateOne

SetNillableContentTypes sets the "content_types" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableCreatedAt

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

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

func (*FeedUpdateOne) SetNillableDays

func (_u *FeedUpdateOne) SetNillableDays(v *int) *FeedUpdateOne

SetNillableDays sets the "days" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableDescription

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

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

func (*FeedUpdateOne) SetNillableFormat

func (_u *FeedUpdateOne) SetNillableFormat(v *string) *FeedUpdateOne

SetNillableFormat sets the "format" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableImageStyle

func (_u *FeedUpdateOne) SetNillableImageStyle(v *string) *FeedUpdateOne

SetNillableImageStyle sets the "image_style" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableItemLimit

func (_u *FeedUpdateOne) SetNillableItemLimit(v *int) *FeedUpdateOne

SetNillableItemLimit sets the "item_limit" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableLabel

func (_u *FeedUpdateOne) SetNillableLabel(v *string) *FeedUpdateOne

SetNillableLabel sets the "label" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableLanguage

func (_u *FeedUpdateOne) SetNillableLanguage(v *string) *FeedUpdateOne

SetNillableLanguage sets the "language" field if the given value is not nil.

func (*FeedUpdateOne) SetNillablePath

func (_u *FeedUpdateOne) SetNillablePath(v *string) *FeedUpdateOne

SetNillablePath sets the "path" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableStatus

func (_u *FeedUpdateOne) SetNillableStatus(v *int) *FeedUpdateOne

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

func (*FeedUpdateOne) SetNillableTermIds

func (_u *FeedUpdateOne) SetNillableTermIds(v *string) *FeedUpdateOne

SetNillableTermIds sets the "term_ids" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableTitle

func (_u *FeedUpdateOne) SetNillableTitle(v *string) *FeedUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*FeedUpdateOne) SetNillableUpdatedAt

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

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

func (*FeedUpdateOne) SetPath

func (_u *FeedUpdateOne) SetPath(v string) *FeedUpdateOne

SetPath sets the "path" field.

func (*FeedUpdateOne) SetStatus

func (_u *FeedUpdateOne) SetStatus(v int) *FeedUpdateOne

SetStatus sets the "status" field.

func (*FeedUpdateOne) SetTermIds

func (_u *FeedUpdateOne) SetTermIds(v string) *FeedUpdateOne

SetTermIds sets the "term_ids" field.

func (*FeedUpdateOne) SetTitle

func (_u *FeedUpdateOne) SetTitle(v string) *FeedUpdateOne

SetTitle sets the "title" field.

func (*FeedUpdateOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*FeedUpdateOne) Where

func (_u *FeedUpdateOne) Where(ps ...predicate.Feed) *FeedUpdateOne

Where appends a list predicates to the FeedUpdate builder.

type Feeds

type Feeds []*Feed

Feeds is a parsable slice of Feed.

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

func (*NotFoundError) Is

func (e *NotFoundError) Is(target error) bool

Is makes errors.Is(err, schemakit.ErrEntityNotFound) true for ent's not-found errors, so the engine recognizes the module's missing record as it does the core's (its handlers answer 404).

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

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

type Querier

type Querier = ent.Querier

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

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

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

type Query

type Query = ent.Query

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

type QueryContext

type QueryContext = ent.QueryContext

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

type 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 {

	// Feed is the client for interacting with the Feed builders.
	Feed *FeedClient
	// FeedFieldMap is the client for interacting with the FeedFieldMap builders.
	FeedFieldMap *FeedFieldMapClient
	// 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 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