Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Activities
- type Activity
- type ActivityClient
- func (c *ActivityClient) Create() *ActivityCreate
- func (c *ActivityClient) CreateBulk(builders ...*ActivityCreate) *ActivityCreateBulk
- func (c *ActivityClient) Delete() *ActivityDelete
- func (c *ActivityClient) DeleteOne(a *Activity) *ActivityDeleteOne
- func (c *ActivityClient) DeleteOneID(id string) *ActivityDeleteOne
- func (c *ActivityClient) Get(ctx context.Context, id string) (*Activity, error)
- func (c *ActivityClient) GetX(ctx context.Context, id string) *Activity
- func (c *ActivityClient) Hooks() []Hook
- func (c *ActivityClient) Intercept(interceptors ...Interceptor)
- func (c *ActivityClient) Interceptors() []Interceptor
- func (c *ActivityClient) MapCreateBulk(slice any, setFunc func(*ActivityCreate, int)) *ActivityCreateBulk
- func (c *ActivityClient) Query() *ActivityQuery
- func (c *ActivityClient) Update() *ActivityUpdate
- func (c *ActivityClient) UpdateOne(a *Activity) *ActivityUpdateOne
- func (c *ActivityClient) UpdateOneID(id string) *ActivityUpdateOne
- func (c *ActivityClient) Use(hooks ...Hook)
- type ActivityCreate
- func (ac *ActivityCreate) Exec(ctx context.Context) error
- func (ac *ActivityCreate) ExecX(ctx context.Context)
- func (ac *ActivityCreate) Mutation() *ActivityMutation
- func (ac *ActivityCreate) OnConflict(opts ...sql.ConflictOption) *ActivityUpsertOne
- func (ac *ActivityCreate) OnConflictColumns(columns ...string) *ActivityUpsertOne
- func (ac *ActivityCreate) Save(ctx context.Context) (*Activity, error)
- func (ac *ActivityCreate) SaveX(ctx context.Context) *Activity
- func (ac *ActivityCreate) SetBody(s string) *ActivityCreate
- func (ac *ActivityCreate) SetCreatedAt(t time.Time) *ActivityCreate
- func (ac *ActivityCreate) SetEmbedding1536(pg pgvector.Vector) *ActivityCreate
- func (ac *ActivityCreate) SetEmbedding3072(pg pgvector.Vector) *ActivityCreate
- func (ac *ActivityCreate) SetFullSummary(s string) *ActivityCreate
- func (ac *ActivityCreate) SetID(s string) *ActivityCreate
- func (ac *ActivityCreate) SetImageURL(s string) *ActivityCreate
- func (ac *ActivityCreate) SetNillableEmbedding1536(pg *pgvector.Vector) *ActivityCreate
- func (ac *ActivityCreate) SetNillableEmbedding3072(pg *pgvector.Vector) *ActivityCreate
- func (ac *ActivityCreate) SetNillableSocialScore(f *float64) *ActivityCreate
- func (ac *ActivityCreate) SetNillableUpdateCount(i *int) *ActivityCreate
- func (ac *ActivityCreate) SetRawJSON(s string) *ActivityCreate
- func (ac *ActivityCreate) SetShortSummary(s string) *ActivityCreate
- func (ac *ActivityCreate) SetSocialScore(f float64) *ActivityCreate
- func (ac *ActivityCreate) SetSourceType(s string) *ActivityCreate
- func (ac *ActivityCreate) SetSourceUids(s []string) *ActivityCreate
- func (ac *ActivityCreate) SetTitle(s string) *ActivityCreate
- func (ac *ActivityCreate) SetUID(s string) *ActivityCreate
- func (ac *ActivityCreate) SetURL(s string) *ActivityCreate
- func (ac *ActivityCreate) SetUpdateCount(i int) *ActivityCreate
- type ActivityCreateBulk
- func (acb *ActivityCreateBulk) Exec(ctx context.Context) error
- func (acb *ActivityCreateBulk) ExecX(ctx context.Context)
- func (acb *ActivityCreateBulk) OnConflict(opts ...sql.ConflictOption) *ActivityUpsertBulk
- func (acb *ActivityCreateBulk) OnConflictColumns(columns ...string) *ActivityUpsertBulk
- func (acb *ActivityCreateBulk) Save(ctx context.Context) ([]*Activity, error)
- func (acb *ActivityCreateBulk) SaveX(ctx context.Context) []*Activity
- type ActivityDelete
- type ActivityDeleteOne
- type ActivityGroupBy
- func (agb *ActivityGroupBy) Aggregate(fns ...AggregateFunc) *ActivityGroupBy
- func (s *ActivityGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ActivityGroupBy) BoolX(ctx context.Context) bool
- func (s *ActivityGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ActivityGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ActivityGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ActivityGroupBy) Float64X(ctx context.Context) float64
- func (s *ActivityGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ActivityGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ActivityGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ActivityGroupBy) IntX(ctx context.Context) int
- func (s *ActivityGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ActivityGroupBy) IntsX(ctx context.Context) []int
- func (agb *ActivityGroupBy) Scan(ctx context.Context, v any) error
- func (s *ActivityGroupBy) ScanX(ctx context.Context, v any)
- func (s *ActivityGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ActivityGroupBy) StringX(ctx context.Context) string
- func (s *ActivityGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ActivityGroupBy) StringsX(ctx context.Context) []string
- type ActivityMutation
- func (m *ActivityMutation) AddField(name string, value ent.Value) error
- func (m *ActivityMutation) AddSocialScore(f float64)
- func (m *ActivityMutation) AddUpdateCount(i int)
- func (m *ActivityMutation) AddedEdges() []string
- func (m *ActivityMutation) AddedField(name string) (ent.Value, bool)
- func (m *ActivityMutation) AddedFields() []string
- func (m *ActivityMutation) AddedIDs(name string) []ent.Value
- func (m *ActivityMutation) AddedSocialScore() (r float64, exists bool)
- func (m *ActivityMutation) AddedUpdateCount() (r int, exists bool)
- func (m *ActivityMutation) AppendSourceUids(s []string)
- func (m *ActivityMutation) AppendedSourceUids() ([]string, bool)
- func (m *ActivityMutation) Body() (r string, exists bool)
- func (m *ActivityMutation) ClearEdge(name string) error
- func (m *ActivityMutation) ClearEmbedding1536()
- func (m *ActivityMutation) ClearEmbedding3072()
- func (m *ActivityMutation) ClearField(name string) error
- func (m *ActivityMutation) ClearedEdges() []string
- func (m *ActivityMutation) ClearedFields() []string
- func (m ActivityMutation) Client() *Client
- func (m *ActivityMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ActivityMutation) EdgeCleared(name string) bool
- func (m *ActivityMutation) Embedding1536() (r pgvector.Vector, exists bool)
- func (m *ActivityMutation) Embedding1536Cleared() bool
- func (m *ActivityMutation) Embedding3072() (r pgvector.Vector, exists bool)
- func (m *ActivityMutation) Embedding3072Cleared() bool
- func (m *ActivityMutation) Field(name string) (ent.Value, bool)
- func (m *ActivityMutation) FieldCleared(name string) bool
- func (m *ActivityMutation) Fields() []string
- func (m *ActivityMutation) FullSummary() (r string, exists bool)
- func (m *ActivityMutation) ID() (id string, exists bool)
- func (m *ActivityMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ActivityMutation) ImageURL() (r string, exists bool)
- func (m *ActivityMutation) OldBody(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ActivityMutation) OldEmbedding1536(ctx context.Context) (v *pgvector.Vector, err error)
- func (m *ActivityMutation) OldEmbedding3072(ctx context.Context) (v *pgvector.Vector, err error)
- func (m *ActivityMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ActivityMutation) OldFullSummary(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldImageURL(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldRawJSON(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldShortSummary(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldSocialScore(ctx context.Context) (v float64, err error)
- func (m *ActivityMutation) OldSourceType(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldSourceUids(ctx context.Context) (v []string, err error)
- func (m *ActivityMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldUID(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *ActivityMutation) OldUpdateCount(ctx context.Context) (v int, err error)
- func (m *ActivityMutation) Op() Op
- func (m *ActivityMutation) RawJSON() (r string, exists bool)
- func (m *ActivityMutation) RemovedEdges() []string
- func (m *ActivityMutation) RemovedIDs(name string) []ent.Value
- func (m *ActivityMutation) ResetBody()
- func (m *ActivityMutation) ResetCreatedAt()
- func (m *ActivityMutation) ResetEdge(name string) error
- func (m *ActivityMutation) ResetEmbedding1536()
- func (m *ActivityMutation) ResetEmbedding3072()
- func (m *ActivityMutation) ResetField(name string) error
- func (m *ActivityMutation) ResetFullSummary()
- func (m *ActivityMutation) ResetImageURL()
- func (m *ActivityMutation) ResetRawJSON()
- func (m *ActivityMutation) ResetShortSummary()
- func (m *ActivityMutation) ResetSocialScore()
- func (m *ActivityMutation) ResetSourceType()
- func (m *ActivityMutation) ResetSourceUids()
- func (m *ActivityMutation) ResetTitle()
- func (m *ActivityMutation) ResetUID()
- func (m *ActivityMutation) ResetURL()
- func (m *ActivityMutation) ResetUpdateCount()
- func (m *ActivityMutation) SetBody(s string)
- func (m *ActivityMutation) SetCreatedAt(t time.Time)
- func (m *ActivityMutation) SetEmbedding1536(pg pgvector.Vector)
- func (m *ActivityMutation) SetEmbedding3072(pg pgvector.Vector)
- func (m *ActivityMutation) SetField(name string, value ent.Value) error
- func (m *ActivityMutation) SetFullSummary(s string)
- func (m *ActivityMutation) SetID(id string)
- func (m *ActivityMutation) SetImageURL(s string)
- func (m *ActivityMutation) SetOp(op Op)
- func (m *ActivityMutation) SetRawJSON(s string)
- func (m *ActivityMutation) SetShortSummary(s string)
- func (m *ActivityMutation) SetSocialScore(f float64)
- func (m *ActivityMutation) SetSourceType(s string)
- func (m *ActivityMutation) SetSourceUids(s []string)
- func (m *ActivityMutation) SetTitle(s string)
- func (m *ActivityMutation) SetUID(s string)
- func (m *ActivityMutation) SetURL(s string)
- func (m *ActivityMutation) SetUpdateCount(i int)
- func (m *ActivityMutation) ShortSummary() (r string, exists bool)
- func (m *ActivityMutation) SocialScore() (r float64, exists bool)
- func (m *ActivityMutation) SourceType() (r string, exists bool)
- func (m *ActivityMutation) SourceUids() (r []string, exists bool)
- func (m *ActivityMutation) Title() (r string, exists bool)
- func (m ActivityMutation) Tx() (*Tx, error)
- func (m *ActivityMutation) Type() string
- func (m *ActivityMutation) UID() (r string, exists bool)
- func (m *ActivityMutation) URL() (r string, exists bool)
- func (m *ActivityMutation) UpdateCount() (r int, exists bool)
- func (m *ActivityMutation) Where(ps ...predicate.Activity)
- func (m *ActivityMutation) WhereP(ps ...func(*sql.Selector))
- type ActivityQuery
- func (aq *ActivityQuery) Aggregate(fns ...AggregateFunc) *ActivitySelect
- func (aq *ActivityQuery) All(ctx context.Context) ([]*Activity, error)
- func (aq *ActivityQuery) AllX(ctx context.Context) []*Activity
- func (aq *ActivityQuery) Clone() *ActivityQuery
- func (aq *ActivityQuery) Count(ctx context.Context) (int, error)
- func (aq *ActivityQuery) CountX(ctx context.Context) int
- func (aq *ActivityQuery) Exist(ctx context.Context) (bool, error)
- func (aq *ActivityQuery) ExistX(ctx context.Context) bool
- func (aq *ActivityQuery) First(ctx context.Context) (*Activity, error)
- func (aq *ActivityQuery) FirstID(ctx context.Context) (id string, err error)
- func (aq *ActivityQuery) FirstIDX(ctx context.Context) string
- func (aq *ActivityQuery) FirstX(ctx context.Context) *Activity
- func (aq *ActivityQuery) GroupBy(field string, fields ...string) *ActivityGroupBy
- func (aq *ActivityQuery) IDs(ctx context.Context) (ids []string, err error)
- func (aq *ActivityQuery) IDsX(ctx context.Context) []string
- func (aq *ActivityQuery) Limit(limit int) *ActivityQuery
- func (aq *ActivityQuery) Offset(offset int) *ActivityQuery
- func (aq *ActivityQuery) Only(ctx context.Context) (*Activity, error)
- func (aq *ActivityQuery) OnlyID(ctx context.Context) (id string, err error)
- func (aq *ActivityQuery) OnlyIDX(ctx context.Context) string
- func (aq *ActivityQuery) OnlyX(ctx context.Context) *Activity
- func (aq *ActivityQuery) Order(o ...activity.OrderOption) *ActivityQuery
- func (aq *ActivityQuery) Select(fields ...string) *ActivitySelect
- func (aq *ActivityQuery) Unique(unique bool) *ActivityQuery
- func (aq *ActivityQuery) Where(ps ...predicate.Activity) *ActivityQuery
- type ActivitySelect
- func (as *ActivitySelect) Aggregate(fns ...AggregateFunc) *ActivitySelect
- func (s *ActivitySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ActivitySelect) BoolX(ctx context.Context) bool
- func (s *ActivitySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ActivitySelect) BoolsX(ctx context.Context) []bool
- func (s *ActivitySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ActivitySelect) Float64X(ctx context.Context) float64
- func (s *ActivitySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ActivitySelect) Float64sX(ctx context.Context) []float64
- func (s *ActivitySelect) Int(ctx context.Context) (_ int, err error)
- func (s *ActivitySelect) IntX(ctx context.Context) int
- func (s *ActivitySelect) Ints(ctx context.Context) ([]int, error)
- func (s *ActivitySelect) IntsX(ctx context.Context) []int
- func (as *ActivitySelect) Scan(ctx context.Context, v any) error
- func (s *ActivitySelect) ScanX(ctx context.Context, v any)
- func (s *ActivitySelect) String(ctx context.Context) (_ string, err error)
- func (s *ActivitySelect) StringX(ctx context.Context) string
- func (s *ActivitySelect) Strings(ctx context.Context) ([]string, error)
- func (s *ActivitySelect) StringsX(ctx context.Context) []string
- type ActivityUpdate
- func (au *ActivityUpdate) AddSocialScore(f float64) *ActivityUpdate
- func (au *ActivityUpdate) AddUpdateCount(i int) *ActivityUpdate
- func (au *ActivityUpdate) AppendSourceUids(s []string) *ActivityUpdate
- func (au *ActivityUpdate) ClearEmbedding1536() *ActivityUpdate
- func (au *ActivityUpdate) ClearEmbedding3072() *ActivityUpdate
- func (au *ActivityUpdate) Exec(ctx context.Context) error
- func (au *ActivityUpdate) ExecX(ctx context.Context)
- func (au *ActivityUpdate) Mutation() *ActivityMutation
- func (au *ActivityUpdate) Save(ctx context.Context) (int, error)
- func (au *ActivityUpdate) SaveX(ctx context.Context) int
- func (au *ActivityUpdate) SetBody(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetCreatedAt(t time.Time) *ActivityUpdate
- func (au *ActivityUpdate) SetEmbedding1536(pg pgvector.Vector) *ActivityUpdate
- func (au *ActivityUpdate) SetEmbedding3072(pg pgvector.Vector) *ActivityUpdate
- func (au *ActivityUpdate) SetFullSummary(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetImageURL(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableBody(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableCreatedAt(t *time.Time) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableEmbedding1536(pg *pgvector.Vector) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableEmbedding3072(pg *pgvector.Vector) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableFullSummary(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableImageURL(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableRawJSON(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableShortSummary(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableSocialScore(f *float64) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableSourceType(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableTitle(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableUID(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableURL(s *string) *ActivityUpdate
- func (au *ActivityUpdate) SetNillableUpdateCount(i *int) *ActivityUpdate
- func (au *ActivityUpdate) SetRawJSON(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetShortSummary(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetSocialScore(f float64) *ActivityUpdate
- func (au *ActivityUpdate) SetSourceType(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetSourceUids(s []string) *ActivityUpdate
- func (au *ActivityUpdate) SetTitle(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetUID(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetURL(s string) *ActivityUpdate
- func (au *ActivityUpdate) SetUpdateCount(i int) *ActivityUpdate
- func (au *ActivityUpdate) Where(ps ...predicate.Activity) *ActivityUpdate
- type ActivityUpdateOne
- func (auo *ActivityUpdateOne) AddSocialScore(f float64) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) AddUpdateCount(i int) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) AppendSourceUids(s []string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) ClearEmbedding1536() *ActivityUpdateOne
- func (auo *ActivityUpdateOne) ClearEmbedding3072() *ActivityUpdateOne
- func (auo *ActivityUpdateOne) Exec(ctx context.Context) error
- func (auo *ActivityUpdateOne) ExecX(ctx context.Context)
- func (auo *ActivityUpdateOne) Mutation() *ActivityMutation
- func (auo *ActivityUpdateOne) Save(ctx context.Context) (*Activity, error)
- func (auo *ActivityUpdateOne) SaveX(ctx context.Context) *Activity
- func (auo *ActivityUpdateOne) Select(field string, fields ...string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetBody(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetCreatedAt(t time.Time) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetEmbedding1536(pg pgvector.Vector) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetEmbedding3072(pg pgvector.Vector) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetFullSummary(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetImageURL(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableBody(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableCreatedAt(t *time.Time) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableEmbedding1536(pg *pgvector.Vector) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableEmbedding3072(pg *pgvector.Vector) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableFullSummary(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableImageURL(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableRawJSON(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableShortSummary(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableSocialScore(f *float64) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableSourceType(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableTitle(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableUID(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableURL(s *string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetNillableUpdateCount(i *int) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetRawJSON(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetShortSummary(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetSocialScore(f float64) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetSourceType(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetSourceUids(s []string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetTitle(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetUID(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetURL(s string) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) SetUpdateCount(i int) *ActivityUpdateOne
- func (auo *ActivityUpdateOne) Where(ps ...predicate.Activity) *ActivityUpdateOne
- type ActivityUpsert
- func (u *ActivityUpsert) AddSocialScore(v float64) *ActivityUpsert
- func (u *ActivityUpsert) AddUpdateCount(v int) *ActivityUpsert
- func (u *ActivityUpsert) ClearEmbedding1536() *ActivityUpsert
- func (u *ActivityUpsert) ClearEmbedding3072() *ActivityUpsert
- func (u *ActivityUpsert) SetBody(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetCreatedAt(v time.Time) *ActivityUpsert
- func (u *ActivityUpsert) SetEmbedding1536(v pgvector.Vector) *ActivityUpsert
- func (u *ActivityUpsert) SetEmbedding3072(v pgvector.Vector) *ActivityUpsert
- func (u *ActivityUpsert) SetFullSummary(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetImageURL(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetRawJSON(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetShortSummary(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetSocialScore(v float64) *ActivityUpsert
- func (u *ActivityUpsert) SetSourceType(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetSourceUids(v []string) *ActivityUpsert
- func (u *ActivityUpsert) SetTitle(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetUID(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetURL(v string) *ActivityUpsert
- func (u *ActivityUpsert) SetUpdateCount(v int) *ActivityUpsert
- func (u *ActivityUpsert) UpdateBody() *ActivityUpsert
- func (u *ActivityUpsert) UpdateCreatedAt() *ActivityUpsert
- func (u *ActivityUpsert) UpdateEmbedding1536() *ActivityUpsert
- func (u *ActivityUpsert) UpdateEmbedding3072() *ActivityUpsert
- func (u *ActivityUpsert) UpdateFullSummary() *ActivityUpsert
- func (u *ActivityUpsert) UpdateImageURL() *ActivityUpsert
- func (u *ActivityUpsert) UpdateRawJSON() *ActivityUpsert
- func (u *ActivityUpsert) UpdateShortSummary() *ActivityUpsert
- func (u *ActivityUpsert) UpdateSocialScore() *ActivityUpsert
- func (u *ActivityUpsert) UpdateSourceType() *ActivityUpsert
- func (u *ActivityUpsert) UpdateSourceUids() *ActivityUpsert
- func (u *ActivityUpsert) UpdateTitle() *ActivityUpsert
- func (u *ActivityUpsert) UpdateUID() *ActivityUpsert
- func (u *ActivityUpsert) UpdateURL() *ActivityUpsert
- func (u *ActivityUpsert) UpdateUpdateCount() *ActivityUpsert
- type ActivityUpsertBulk
- func (u *ActivityUpsertBulk) AddSocialScore(v float64) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) AddUpdateCount(v int) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) ClearEmbedding1536() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) ClearEmbedding3072() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) DoNothing() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) Exec(ctx context.Context) error
- func (u *ActivityUpsertBulk) ExecX(ctx context.Context)
- func (u *ActivityUpsertBulk) Ignore() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetBody(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetCreatedAt(v time.Time) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetEmbedding1536(v pgvector.Vector) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetEmbedding3072(v pgvector.Vector) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetFullSummary(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetImageURL(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetRawJSON(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetShortSummary(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetSocialScore(v float64) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetSourceType(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetSourceUids(v []string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetTitle(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetUID(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetURL(v string) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) SetUpdateCount(v int) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) Update(set func(*ActivityUpsert)) *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateBody() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateCreatedAt() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateEmbedding1536() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateEmbedding3072() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateFullSummary() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateImageURL() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateNewValues() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateRawJSON() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateShortSummary() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateSocialScore() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateSourceType() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateSourceUids() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateTitle() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateUID() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateURL() *ActivityUpsertBulk
- func (u *ActivityUpsertBulk) UpdateUpdateCount() *ActivityUpsertBulk
- type ActivityUpsertOne
- func (u *ActivityUpsertOne) AddSocialScore(v float64) *ActivityUpsertOne
- func (u *ActivityUpsertOne) AddUpdateCount(v int) *ActivityUpsertOne
- func (u *ActivityUpsertOne) ClearEmbedding1536() *ActivityUpsertOne
- func (u *ActivityUpsertOne) ClearEmbedding3072() *ActivityUpsertOne
- func (u *ActivityUpsertOne) DoNothing() *ActivityUpsertOne
- func (u *ActivityUpsertOne) Exec(ctx context.Context) error
- func (u *ActivityUpsertOne) ExecX(ctx context.Context)
- func (u *ActivityUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *ActivityUpsertOne) IDX(ctx context.Context) string
- func (u *ActivityUpsertOne) Ignore() *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetBody(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetCreatedAt(v time.Time) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetEmbedding1536(v pgvector.Vector) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetEmbedding3072(v pgvector.Vector) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetFullSummary(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetImageURL(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetRawJSON(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetShortSummary(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetSocialScore(v float64) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetSourceType(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetSourceUids(v []string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetTitle(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetUID(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetURL(v string) *ActivityUpsertOne
- func (u *ActivityUpsertOne) SetUpdateCount(v int) *ActivityUpsertOne
- func (u *ActivityUpsertOne) Update(set func(*ActivityUpsert)) *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateBody() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateCreatedAt() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateEmbedding1536() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateEmbedding3072() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateFullSummary() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateImageURL() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateNewValues() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateRawJSON() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateShortSummary() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateSocialScore() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateSourceType() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateSourceUids() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateTitle() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateUID() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateURL() *ActivityUpsertOne
- func (u *ActivityUpsertOne) UpdateUpdateCount() *ActivityUpsertOne
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Feed
- type FeedClient
- func (c *FeedClient) Create() *FeedCreate
- func (c *FeedClient) CreateBulk(builders ...*FeedCreate) *FeedCreateBulk
- func (c *FeedClient) Delete() *FeedDelete
- func (c *FeedClient) DeleteOne(f *Feed) *FeedDeleteOne
- func (c *FeedClient) DeleteOneID(id string) *FeedDeleteOne
- func (c *FeedClient) Get(ctx context.Context, id string) (*Feed, error)
- func (c *FeedClient) GetX(ctx context.Context, id string) *Feed
- func (c *FeedClient) Hooks() []Hook
- func (c *FeedClient) Intercept(interceptors ...Interceptor)
- func (c *FeedClient) Interceptors() []Interceptor
- func (c *FeedClient) MapCreateBulk(slice any, setFunc func(*FeedCreate, int)) *FeedCreateBulk
- func (c *FeedClient) Query() *FeedQuery
- func (c *FeedClient) Update() *FeedUpdate
- func (c *FeedClient) UpdateOne(f *Feed) *FeedUpdateOne
- func (c *FeedClient) UpdateOneID(id string) *FeedUpdateOne
- func (c *FeedClient) Use(hooks ...Hook)
- type FeedCreate
- func (fc *FeedCreate) Exec(ctx context.Context) error
- func (fc *FeedCreate) ExecX(ctx context.Context)
- func (fc *FeedCreate) Mutation() *FeedMutation
- func (fc *FeedCreate) OnConflict(opts ...sql.ConflictOption) *FeedUpsertOne
- func (fc *FeedCreate) OnConflictColumns(columns ...string) *FeedUpsertOne
- func (fc *FeedCreate) Save(ctx context.Context) (*Feed, error)
- func (fc *FeedCreate) SaveX(ctx context.Context) *Feed
- func (fc *FeedCreate) SetCreatedAt(t time.Time) *FeedCreate
- func (fc *FeedCreate) SetID(s string) *FeedCreate
- func (fc *FeedCreate) SetIcon(s string) *FeedCreate
- func (fc *FeedCreate) SetName(s string) *FeedCreate
- func (fc *FeedCreate) SetPublic(b bool) *FeedCreate
- func (fc *FeedCreate) SetQuery(s string) *FeedCreate
- func (fc *FeedCreate) SetSourceUids(s []string) *FeedCreate
- func (fc *FeedCreate) SetUpdatedAt(t time.Time) *FeedCreate
- func (fc *FeedCreate) SetUserID(s string) *FeedCreate
- type FeedCreateBulk
- func (fcb *FeedCreateBulk) Exec(ctx context.Context) error
- func (fcb *FeedCreateBulk) ExecX(ctx context.Context)
- func (fcb *FeedCreateBulk) OnConflict(opts ...sql.ConflictOption) *FeedUpsertBulk
- func (fcb *FeedCreateBulk) OnConflictColumns(columns ...string) *FeedUpsertBulk
- func (fcb *FeedCreateBulk) Save(ctx context.Context) ([]*Feed, error)
- func (fcb *FeedCreateBulk) SaveX(ctx context.Context) []*Feed
- type FeedDelete
- type FeedDeleteOne
- type FeedGroupBy
- func (fgb *FeedGroupBy) Aggregate(fns ...AggregateFunc) *FeedGroupBy
- func (s *FeedGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FeedGroupBy) BoolX(ctx context.Context) bool
- func (s *FeedGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FeedGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FeedGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FeedGroupBy) Float64X(ctx context.Context) float64
- func (s *FeedGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FeedGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FeedGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FeedGroupBy) IntX(ctx context.Context) int
- func (s *FeedGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FeedGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FeedGroupBy) Scan(ctx context.Context, v any) error
- func (s *FeedGroupBy) ScanX(ctx context.Context, v any)
- func (s *FeedGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FeedGroupBy) StringX(ctx context.Context) string
- func (s *FeedGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FeedGroupBy) StringsX(ctx context.Context) []string
- type FeedMutation
- func (m *FeedMutation) AddField(name string, value ent.Value) error
- func (m *FeedMutation) AddedEdges() []string
- func (m *FeedMutation) AddedField(name string) (ent.Value, bool)
- func (m *FeedMutation) AddedFields() []string
- func (m *FeedMutation) AddedIDs(name string) []ent.Value
- func (m *FeedMutation) AppendSourceUids(s []string)
- func (m *FeedMutation) AppendedSourceUids() ([]string, bool)
- func (m *FeedMutation) ClearEdge(name string) error
- func (m *FeedMutation) ClearField(name string) error
- func (m *FeedMutation) ClearedEdges() []string
- func (m *FeedMutation) ClearedFields() []string
- func (m FeedMutation) Client() *Client
- func (m *FeedMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FeedMutation) EdgeCleared(name string) bool
- func (m *FeedMutation) Field(name string) (ent.Value, bool)
- func (m *FeedMutation) FieldCleared(name string) bool
- func (m *FeedMutation) Fields() []string
- func (m *FeedMutation) ID() (id string, exists bool)
- func (m *FeedMutation) IDs(ctx context.Context) ([]string, error)
- func (m *FeedMutation) Icon() (r string, exists bool)
- func (m *FeedMutation) Name() (r string, exists bool)
- func (m *FeedMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FeedMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FeedMutation) OldIcon(ctx context.Context) (v string, err error)
- func (m *FeedMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FeedMutation) OldPublic(ctx context.Context) (v bool, err error)
- func (m *FeedMutation) OldQuery(ctx context.Context) (v string, err error)
- func (m *FeedMutation) OldSourceUids(ctx context.Context) (v []string, err error)
- func (m *FeedMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FeedMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *FeedMutation) Op() Op
- func (m *FeedMutation) Public() (r bool, exists bool)
- func (m *FeedMutation) Query() (r string, exists bool)
- func (m *FeedMutation) RemovedEdges() []string
- func (m *FeedMutation) RemovedIDs(name string) []ent.Value
- func (m *FeedMutation) ResetCreatedAt()
- func (m *FeedMutation) ResetEdge(name string) error
- func (m *FeedMutation) ResetField(name string) error
- func (m *FeedMutation) ResetIcon()
- func (m *FeedMutation) ResetName()
- func (m *FeedMutation) ResetPublic()
- func (m *FeedMutation) ResetQuery()
- func (m *FeedMutation) ResetSourceUids()
- func (m *FeedMutation) ResetUpdatedAt()
- func (m *FeedMutation) ResetUserID()
- func (m *FeedMutation) SetCreatedAt(t time.Time)
- func (m *FeedMutation) SetField(name string, value ent.Value) error
- func (m *FeedMutation) SetID(id string)
- func (m *FeedMutation) SetIcon(s string)
- func (m *FeedMutation) SetName(s string)
- func (m *FeedMutation) SetOp(op Op)
- func (m *FeedMutation) SetPublic(b bool)
- func (m *FeedMutation) SetQuery(s string)
- func (m *FeedMutation) SetSourceUids(s []string)
- func (m *FeedMutation) SetUpdatedAt(t time.Time)
- func (m *FeedMutation) SetUserID(s string)
- func (m *FeedMutation) SourceUids() (r []string, exists bool)
- func (m FeedMutation) Tx() (*Tx, error)
- func (m *FeedMutation) Type() string
- func (m *FeedMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FeedMutation) UserID() (r string, exists bool)
- func (m *FeedMutation) Where(ps ...predicate.Feed)
- func (m *FeedMutation) WhereP(ps ...func(*sql.Selector))
- type FeedQuery
- func (fq *FeedQuery) Aggregate(fns ...AggregateFunc) *FeedSelect
- func (fq *FeedQuery) All(ctx context.Context) ([]*Feed, error)
- func (fq *FeedQuery) AllX(ctx context.Context) []*Feed
- func (fq *FeedQuery) Clone() *FeedQuery
- func (fq *FeedQuery) Count(ctx context.Context) (int, error)
- func (fq *FeedQuery) CountX(ctx context.Context) int
- func (fq *FeedQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FeedQuery) ExistX(ctx context.Context) bool
- func (fq *FeedQuery) First(ctx context.Context) (*Feed, error)
- func (fq *FeedQuery) FirstID(ctx context.Context) (id string, err error)
- func (fq *FeedQuery) FirstIDX(ctx context.Context) string
- func (fq *FeedQuery) FirstX(ctx context.Context) *Feed
- func (fq *FeedQuery) GroupBy(field string, fields ...string) *FeedGroupBy
- func (fq *FeedQuery) IDs(ctx context.Context) (ids []string, err error)
- func (fq *FeedQuery) IDsX(ctx context.Context) []string
- func (fq *FeedQuery) Limit(limit int) *FeedQuery
- func (fq *FeedQuery) Offset(offset int) *FeedQuery
- func (fq *FeedQuery) Only(ctx context.Context) (*Feed, error)
- func (fq *FeedQuery) OnlyID(ctx context.Context) (id string, err error)
- func (fq *FeedQuery) OnlyIDX(ctx context.Context) string
- func (fq *FeedQuery) OnlyX(ctx context.Context) *Feed
- func (fq *FeedQuery) Order(o ...feed.OrderOption) *FeedQuery
- func (fq *FeedQuery) Select(fields ...string) *FeedSelect
- func (fq *FeedQuery) Unique(unique bool) *FeedQuery
- func (fq *FeedQuery) Where(ps ...predicate.Feed) *FeedQuery
- type FeedSelect
- func (fs *FeedSelect) Aggregate(fns ...AggregateFunc) *FeedSelect
- func (s *FeedSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FeedSelect) BoolX(ctx context.Context) bool
- func (s *FeedSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FeedSelect) BoolsX(ctx context.Context) []bool
- func (s *FeedSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FeedSelect) Float64X(ctx context.Context) float64
- func (s *FeedSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FeedSelect) Float64sX(ctx context.Context) []float64
- func (s *FeedSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FeedSelect) IntX(ctx context.Context) int
- func (s *FeedSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FeedSelect) IntsX(ctx context.Context) []int
- func (fs *FeedSelect) Scan(ctx context.Context, v any) error
- func (s *FeedSelect) ScanX(ctx context.Context, v any)
- func (s *FeedSelect) String(ctx context.Context) (_ string, err error)
- func (s *FeedSelect) StringX(ctx context.Context) string
- func (s *FeedSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FeedSelect) StringsX(ctx context.Context) []string
- type FeedUpdate
- func (fu *FeedUpdate) AppendSourceUids(s []string) *FeedUpdate
- func (fu *FeedUpdate) Exec(ctx context.Context) error
- func (fu *FeedUpdate) ExecX(ctx context.Context)
- func (fu *FeedUpdate) Mutation() *FeedMutation
- func (fu *FeedUpdate) Save(ctx context.Context) (int, error)
- func (fu *FeedUpdate) SaveX(ctx context.Context) int
- func (fu *FeedUpdate) SetCreatedAt(t time.Time) *FeedUpdate
- func (fu *FeedUpdate) SetIcon(s string) *FeedUpdate
- func (fu *FeedUpdate) SetName(s string) *FeedUpdate
- func (fu *FeedUpdate) SetNillableCreatedAt(t *time.Time) *FeedUpdate
- func (fu *FeedUpdate) SetNillableIcon(s *string) *FeedUpdate
- func (fu *FeedUpdate) SetNillableName(s *string) *FeedUpdate
- func (fu *FeedUpdate) SetNillablePublic(b *bool) *FeedUpdate
- func (fu *FeedUpdate) SetNillableQuery(s *string) *FeedUpdate
- func (fu *FeedUpdate) SetNillableUpdatedAt(t *time.Time) *FeedUpdate
- func (fu *FeedUpdate) SetNillableUserID(s *string) *FeedUpdate
- func (fu *FeedUpdate) SetPublic(b bool) *FeedUpdate
- func (fu *FeedUpdate) SetQuery(s string) *FeedUpdate
- func (fu *FeedUpdate) SetSourceUids(s []string) *FeedUpdate
- func (fu *FeedUpdate) SetUpdatedAt(t time.Time) *FeedUpdate
- func (fu *FeedUpdate) SetUserID(s string) *FeedUpdate
- func (fu *FeedUpdate) Where(ps ...predicate.Feed) *FeedUpdate
- type FeedUpdateOne
- func (fuo *FeedUpdateOne) AppendSourceUids(s []string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) Exec(ctx context.Context) error
- func (fuo *FeedUpdateOne) ExecX(ctx context.Context)
- func (fuo *FeedUpdateOne) Mutation() *FeedMutation
- func (fuo *FeedUpdateOne) Save(ctx context.Context) (*Feed, error)
- func (fuo *FeedUpdateOne) SaveX(ctx context.Context) *Feed
- func (fuo *FeedUpdateOne) Select(field string, fields ...string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetCreatedAt(t time.Time) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetIcon(s string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetName(s string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetNillableCreatedAt(t *time.Time) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetNillableIcon(s *string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetNillableName(s *string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetNillablePublic(b *bool) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetNillableQuery(s *string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetNillableUpdatedAt(t *time.Time) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetNillableUserID(s *string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetPublic(b bool) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetQuery(s string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetSourceUids(s []string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetUpdatedAt(t time.Time) *FeedUpdateOne
- func (fuo *FeedUpdateOne) SetUserID(s string) *FeedUpdateOne
- func (fuo *FeedUpdateOne) Where(ps ...predicate.Feed) *FeedUpdateOne
- type FeedUpsert
- func (u *FeedUpsert) SetCreatedAt(v time.Time) *FeedUpsert
- func (u *FeedUpsert) SetIcon(v string) *FeedUpsert
- func (u *FeedUpsert) SetName(v string) *FeedUpsert
- func (u *FeedUpsert) SetPublic(v bool) *FeedUpsert
- func (u *FeedUpsert) SetQuery(v string) *FeedUpsert
- func (u *FeedUpsert) SetSourceUids(v []string) *FeedUpsert
- func (u *FeedUpsert) SetUpdatedAt(v time.Time) *FeedUpsert
- func (u *FeedUpsert) SetUserID(v string) *FeedUpsert
- func (u *FeedUpsert) UpdateCreatedAt() *FeedUpsert
- func (u *FeedUpsert) UpdateIcon() *FeedUpsert
- func (u *FeedUpsert) UpdateName() *FeedUpsert
- func (u *FeedUpsert) UpdatePublic() *FeedUpsert
- func (u *FeedUpsert) UpdateQuery() *FeedUpsert
- func (u *FeedUpsert) UpdateSourceUids() *FeedUpsert
- func (u *FeedUpsert) UpdateUpdatedAt() *FeedUpsert
- func (u *FeedUpsert) UpdateUserID() *FeedUpsert
- type FeedUpsertBulk
- func (u *FeedUpsertBulk) DoNothing() *FeedUpsertBulk
- func (u *FeedUpsertBulk) Exec(ctx context.Context) error
- func (u *FeedUpsertBulk) ExecX(ctx context.Context)
- func (u *FeedUpsertBulk) Ignore() *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetCreatedAt(v time.Time) *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetIcon(v string) *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetName(v string) *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetPublic(v bool) *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetQuery(v string) *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetSourceUids(v []string) *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetUpdatedAt(v time.Time) *FeedUpsertBulk
- func (u *FeedUpsertBulk) SetUserID(v string) *FeedUpsertBulk
- func (u *FeedUpsertBulk) Update(set func(*FeedUpsert)) *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateCreatedAt() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateIcon() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateName() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateNewValues() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdatePublic() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateQuery() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateSourceUids() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateUpdatedAt() *FeedUpsertBulk
- func (u *FeedUpsertBulk) UpdateUserID() *FeedUpsertBulk
- type FeedUpsertOne
- func (u *FeedUpsertOne) DoNothing() *FeedUpsertOne
- func (u *FeedUpsertOne) Exec(ctx context.Context) error
- func (u *FeedUpsertOne) ExecX(ctx context.Context)
- func (u *FeedUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *FeedUpsertOne) IDX(ctx context.Context) string
- func (u *FeedUpsertOne) Ignore() *FeedUpsertOne
- func (u *FeedUpsertOne) SetCreatedAt(v time.Time) *FeedUpsertOne
- func (u *FeedUpsertOne) SetIcon(v string) *FeedUpsertOne
- func (u *FeedUpsertOne) SetName(v string) *FeedUpsertOne
- func (u *FeedUpsertOne) SetPublic(v bool) *FeedUpsertOne
- func (u *FeedUpsertOne) SetQuery(v string) *FeedUpsertOne
- func (u *FeedUpsertOne) SetSourceUids(v []string) *FeedUpsertOne
- func (u *FeedUpsertOne) SetUpdatedAt(v time.Time) *FeedUpsertOne
- func (u *FeedUpsertOne) SetUserID(v string) *FeedUpsertOne
- func (u *FeedUpsertOne) Update(set func(*FeedUpsert)) *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateCreatedAt() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateIcon() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateName() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateNewValues() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdatePublic() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateQuery() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateSourceUids() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateUpdatedAt() *FeedUpsertOne
- func (u *FeedUpsertOne) UpdateUserID() *FeedUpsertOne
- type Feeds
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Source
- type SourceClient
- func (c *SourceClient) Create() *SourceCreate
- func (c *SourceClient) CreateBulk(builders ...*SourceCreate) *SourceCreateBulk
- func (c *SourceClient) Delete() *SourceDelete
- func (c *SourceClient) DeleteOne(s *Source) *SourceDeleteOne
- func (c *SourceClient) DeleteOneID(id string) *SourceDeleteOne
- func (c *SourceClient) Get(ctx context.Context, id string) (*Source, error)
- func (c *SourceClient) GetX(ctx context.Context, id string) *Source
- func (c *SourceClient) Hooks() []Hook
- func (c *SourceClient) Intercept(interceptors ...Interceptor)
- func (c *SourceClient) Interceptors() []Interceptor
- func (c *SourceClient) MapCreateBulk(slice any, setFunc func(*SourceCreate, int)) *SourceCreateBulk
- func (c *SourceClient) Query() *SourceQuery
- func (c *SourceClient) Update() *SourceUpdate
- func (c *SourceClient) UpdateOne(s *Source) *SourceUpdateOne
- func (c *SourceClient) UpdateOneID(id string) *SourceUpdateOne
- func (c *SourceClient) Use(hooks ...Hook)
- type SourceCreate
- func (sc *SourceCreate) Exec(ctx context.Context) error
- func (sc *SourceCreate) ExecX(ctx context.Context)
- func (sc *SourceCreate) Mutation() *SourceMutation
- func (sc *SourceCreate) OnConflict(opts ...sql.ConflictOption) *SourceUpsertOne
- func (sc *SourceCreate) OnConflictColumns(columns ...string) *SourceUpsertOne
- func (sc *SourceCreate) Save(ctx context.Context) (*Source, error)
- func (sc *SourceCreate) SaveX(ctx context.Context) *Source
- func (sc *SourceCreate) SetID(s string) *SourceCreate
- func (sc *SourceCreate) SetName(s string) *SourceCreate
- func (sc *SourceCreate) SetRawJSON(s string) *SourceCreate
- func (sc *SourceCreate) SetType(s string) *SourceCreate
- func (sc *SourceCreate) SetURL(s string) *SourceCreate
- type SourceCreateBulk
- func (scb *SourceCreateBulk) Exec(ctx context.Context) error
- func (scb *SourceCreateBulk) ExecX(ctx context.Context)
- func (scb *SourceCreateBulk) OnConflict(opts ...sql.ConflictOption) *SourceUpsertBulk
- func (scb *SourceCreateBulk) OnConflictColumns(columns ...string) *SourceUpsertBulk
- func (scb *SourceCreateBulk) Save(ctx context.Context) ([]*Source, error)
- func (scb *SourceCreateBulk) SaveX(ctx context.Context) []*Source
- type SourceDelete
- type SourceDeleteOne
- type SourceGroupBy
- func (sgb *SourceGroupBy) Aggregate(fns ...AggregateFunc) *SourceGroupBy
- func (s *SourceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SourceGroupBy) BoolX(ctx context.Context) bool
- func (s *SourceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SourceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SourceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SourceGroupBy) Float64X(ctx context.Context) float64
- func (s *SourceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SourceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SourceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SourceGroupBy) IntX(ctx context.Context) int
- func (s *SourceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SourceGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SourceGroupBy) Scan(ctx context.Context, v any) error
- func (s *SourceGroupBy) ScanX(ctx context.Context, v any)
- func (s *SourceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SourceGroupBy) StringX(ctx context.Context) string
- func (s *SourceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SourceGroupBy) StringsX(ctx context.Context) []string
- type SourceMutation
- func (m *SourceMutation) AddField(name string, value ent.Value) error
- func (m *SourceMutation) AddedEdges() []string
- func (m *SourceMutation) AddedField(name string) (ent.Value, bool)
- func (m *SourceMutation) AddedFields() []string
- func (m *SourceMutation) AddedIDs(name string) []ent.Value
- func (m *SourceMutation) ClearEdge(name string) error
- func (m *SourceMutation) ClearField(name string) error
- func (m *SourceMutation) ClearedEdges() []string
- func (m *SourceMutation) ClearedFields() []string
- func (m SourceMutation) Client() *Client
- func (m *SourceMutation) EdgeCleared(name string) bool
- func (m *SourceMutation) Field(name string) (ent.Value, bool)
- func (m *SourceMutation) FieldCleared(name string) bool
- func (m *SourceMutation) Fields() []string
- func (m *SourceMutation) GetType() (r string, exists bool)
- func (m *SourceMutation) ID() (id string, exists bool)
- func (m *SourceMutation) IDs(ctx context.Context) ([]string, error)
- func (m *SourceMutation) Name() (r string, exists bool)
- func (m *SourceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SourceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SourceMutation) OldRawJSON(ctx context.Context) (v string, err error)
- func (m *SourceMutation) OldType(ctx context.Context) (v string, err error)
- func (m *SourceMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *SourceMutation) Op() Op
- func (m *SourceMutation) RawJSON() (r string, exists bool)
- func (m *SourceMutation) RemovedEdges() []string
- func (m *SourceMutation) RemovedIDs(name string) []ent.Value
- func (m *SourceMutation) ResetEdge(name string) error
- func (m *SourceMutation) ResetField(name string) error
- func (m *SourceMutation) ResetName()
- func (m *SourceMutation) ResetRawJSON()
- func (m *SourceMutation) ResetType()
- func (m *SourceMutation) ResetURL()
- func (m *SourceMutation) SetField(name string, value ent.Value) error
- func (m *SourceMutation) SetID(id string)
- func (m *SourceMutation) SetName(s string)
- func (m *SourceMutation) SetOp(op Op)
- func (m *SourceMutation) SetRawJSON(s string)
- func (m *SourceMutation) SetType(s string)
- func (m *SourceMutation) SetURL(s string)
- func (m SourceMutation) Tx() (*Tx, error)
- func (m *SourceMutation) Type() string
- func (m *SourceMutation) URL() (r string, exists bool)
- func (m *SourceMutation) Where(ps ...predicate.Source)
- func (m *SourceMutation) WhereP(ps ...func(*sql.Selector))
- type SourceQuery
- func (sq *SourceQuery) Aggregate(fns ...AggregateFunc) *SourceSelect
- func (sq *SourceQuery) All(ctx context.Context) ([]*Source, error)
- func (sq *SourceQuery) AllX(ctx context.Context) []*Source
- func (sq *SourceQuery) Clone() *SourceQuery
- func (sq *SourceQuery) Count(ctx context.Context) (int, error)
- func (sq *SourceQuery) CountX(ctx context.Context) int
- func (sq *SourceQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SourceQuery) ExistX(ctx context.Context) bool
- func (sq *SourceQuery) First(ctx context.Context) (*Source, error)
- func (sq *SourceQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SourceQuery) FirstIDX(ctx context.Context) string
- func (sq *SourceQuery) FirstX(ctx context.Context) *Source
- func (sq *SourceQuery) GroupBy(field string, fields ...string) *SourceGroupBy
- func (sq *SourceQuery) IDs(ctx context.Context) (ids []string, err error)
- func (sq *SourceQuery) IDsX(ctx context.Context) []string
- func (sq *SourceQuery) Limit(limit int) *SourceQuery
- func (sq *SourceQuery) Offset(offset int) *SourceQuery
- func (sq *SourceQuery) Only(ctx context.Context) (*Source, error)
- func (sq *SourceQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SourceQuery) OnlyIDX(ctx context.Context) string
- func (sq *SourceQuery) OnlyX(ctx context.Context) *Source
- func (sq *SourceQuery) Order(o ...source.OrderOption) *SourceQuery
- func (sq *SourceQuery) Select(fields ...string) *SourceSelect
- func (sq *SourceQuery) Unique(unique bool) *SourceQuery
- func (sq *SourceQuery) Where(ps ...predicate.Source) *SourceQuery
- type SourceSelect
- func (ss *SourceSelect) Aggregate(fns ...AggregateFunc) *SourceSelect
- func (s *SourceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SourceSelect) BoolX(ctx context.Context) bool
- func (s *SourceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SourceSelect) BoolsX(ctx context.Context) []bool
- func (s *SourceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SourceSelect) Float64X(ctx context.Context) float64
- func (s *SourceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SourceSelect) Float64sX(ctx context.Context) []float64
- func (s *SourceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SourceSelect) IntX(ctx context.Context) int
- func (s *SourceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SourceSelect) IntsX(ctx context.Context) []int
- func (ss *SourceSelect) Scan(ctx context.Context, v any) error
- func (s *SourceSelect) ScanX(ctx context.Context, v any)
- func (s *SourceSelect) String(ctx context.Context) (_ string, err error)
- func (s *SourceSelect) StringX(ctx context.Context) string
- func (s *SourceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SourceSelect) StringsX(ctx context.Context) []string
- type SourceUpdate
- func (su *SourceUpdate) Exec(ctx context.Context) error
- func (su *SourceUpdate) ExecX(ctx context.Context)
- func (su *SourceUpdate) Mutation() *SourceMutation
- func (su *SourceUpdate) Save(ctx context.Context) (int, error)
- func (su *SourceUpdate) SaveX(ctx context.Context) int
- func (su *SourceUpdate) SetName(s string) *SourceUpdate
- func (su *SourceUpdate) SetNillableName(s *string) *SourceUpdate
- func (su *SourceUpdate) SetNillableRawJSON(s *string) *SourceUpdate
- func (su *SourceUpdate) SetNillableType(s *string) *SourceUpdate
- func (su *SourceUpdate) SetNillableURL(s *string) *SourceUpdate
- func (su *SourceUpdate) SetRawJSON(s string) *SourceUpdate
- func (su *SourceUpdate) SetType(s string) *SourceUpdate
- func (su *SourceUpdate) SetURL(s string) *SourceUpdate
- func (su *SourceUpdate) Where(ps ...predicate.Source) *SourceUpdate
- type SourceUpdateOne
- func (suo *SourceUpdateOne) Exec(ctx context.Context) error
- func (suo *SourceUpdateOne) ExecX(ctx context.Context)
- func (suo *SourceUpdateOne) Mutation() *SourceMutation
- func (suo *SourceUpdateOne) Save(ctx context.Context) (*Source, error)
- func (suo *SourceUpdateOne) SaveX(ctx context.Context) *Source
- func (suo *SourceUpdateOne) Select(field string, fields ...string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetName(s string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableName(s *string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableRawJSON(s *string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableType(s *string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableURL(s *string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetRawJSON(s string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetType(s string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetURL(s string) *SourceUpdateOne
- func (suo *SourceUpdateOne) Where(ps ...predicate.Source) *SourceUpdateOne
- type SourceUpsert
- func (u *SourceUpsert) SetName(v string) *SourceUpsert
- func (u *SourceUpsert) SetRawJSON(v string) *SourceUpsert
- func (u *SourceUpsert) SetType(v string) *SourceUpsert
- func (u *SourceUpsert) SetURL(v string) *SourceUpsert
- func (u *SourceUpsert) UpdateName() *SourceUpsert
- func (u *SourceUpsert) UpdateRawJSON() *SourceUpsert
- func (u *SourceUpsert) UpdateType() *SourceUpsert
- func (u *SourceUpsert) UpdateURL() *SourceUpsert
- type SourceUpsertBulk
- func (u *SourceUpsertBulk) DoNothing() *SourceUpsertBulk
- func (u *SourceUpsertBulk) Exec(ctx context.Context) error
- func (u *SourceUpsertBulk) ExecX(ctx context.Context)
- func (u *SourceUpsertBulk) Ignore() *SourceUpsertBulk
- func (u *SourceUpsertBulk) SetName(v string) *SourceUpsertBulk
- func (u *SourceUpsertBulk) SetRawJSON(v string) *SourceUpsertBulk
- func (u *SourceUpsertBulk) SetType(v string) *SourceUpsertBulk
- func (u *SourceUpsertBulk) SetURL(v string) *SourceUpsertBulk
- func (u *SourceUpsertBulk) Update(set func(*SourceUpsert)) *SourceUpsertBulk
- func (u *SourceUpsertBulk) UpdateName() *SourceUpsertBulk
- func (u *SourceUpsertBulk) UpdateNewValues() *SourceUpsertBulk
- func (u *SourceUpsertBulk) UpdateRawJSON() *SourceUpsertBulk
- func (u *SourceUpsertBulk) UpdateType() *SourceUpsertBulk
- func (u *SourceUpsertBulk) UpdateURL() *SourceUpsertBulk
- type SourceUpsertOne
- func (u *SourceUpsertOne) DoNothing() *SourceUpsertOne
- func (u *SourceUpsertOne) Exec(ctx context.Context) error
- func (u *SourceUpsertOne) ExecX(ctx context.Context)
- func (u *SourceUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *SourceUpsertOne) IDX(ctx context.Context) string
- func (u *SourceUpsertOne) Ignore() *SourceUpsertOne
- func (u *SourceUpsertOne) SetName(v string) *SourceUpsertOne
- func (u *SourceUpsertOne) SetRawJSON(v string) *SourceUpsertOne
- func (u *SourceUpsertOne) SetType(v string) *SourceUpsertOne
- func (u *SourceUpsertOne) SetURL(v string) *SourceUpsertOne
- func (u *SourceUpsertOne) Update(set func(*SourceUpsert)) *SourceUpsertOne
- func (u *SourceUpsertOne) UpdateName() *SourceUpsertOne
- func (u *SourceUpsertOne) UpdateNewValues() *SourceUpsertOne
- func (u *SourceUpsertOne) UpdateRawJSON() *SourceUpsertOne
- func (u *SourceUpsertOne) UpdateType() *SourceUpsertOne
- func (u *SourceUpsertOne) UpdateURL() *SourceUpsertOne
- type Sources
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeActivity = "Activity" TypeFeed = "Feed" TypeSource = "Source" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Activity ¶
type Activity struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// UID holds the value of the "uid" field.
UID string `json:"uid,omitempty"`
// SourceUids holds the value of the "source_uids" field.
SourceUids []string `json:"source_uids,omitempty"`
// SourceType holds the value of the "source_type" field.
SourceType string `json:"source_type,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// Body holds the value of the "body" field.
Body string `json:"body,omitempty"`
// URL holds the value of the "url" field.
URL string `json:"url,omitempty"`
// ImageURL holds the value of the "image_url" field.
ImageURL string `json:"image_url,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ShortSummary holds the value of the "short_summary" field.
ShortSummary string `json:"short_summary,omitempty"`
// FullSummary holds the value of the "full_summary" field.
FullSummary string `json:"full_summary,omitempty"`
// RawJSON holds the value of the "raw_json" field.
RawJSON string `json:"raw_json,omitempty"`
// Embedding1536 holds the value of the "embedding_1536" field.
Embedding1536 *pgvector.Vector `json:"embedding_1536,omitempty"`
// Embedding3072 holds the value of the "embedding_3072" field.
Embedding3072 *pgvector.Vector `json:"embedding_3072,omitempty"`
// SocialScore holds the value of the "social_score" field.
SocialScore float64 `json:"social_score,omitempty"`
// UpdateCount holds the value of the "update_count" field.
UpdateCount int `json:"update_count,omitempty"`
// contains filtered or unexported fields
}
Activity is the model entity for the Activity schema.
func (*Activity) Unwrap ¶
Unwrap unwraps the Activity 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 (*Activity) Update ¶
func (a *Activity) Update() *ActivityUpdateOne
Update returns a builder for updating this Activity. Note that you need to call Activity.Unwrap() before calling this method if this Activity was returned from a transaction, and the transaction was committed or rolled back.
type ActivityClient ¶
type ActivityClient struct {
// contains filtered or unexported fields
}
ActivityClient is a client for the Activity schema.
func NewActivityClient ¶
func NewActivityClient(c config) *ActivityClient
NewActivityClient returns a client for the Activity from the given config.
func (*ActivityClient) Create ¶
func (c *ActivityClient) Create() *ActivityCreate
Create returns a builder for creating a Activity entity.
func (*ActivityClient) CreateBulk ¶
func (c *ActivityClient) CreateBulk(builders ...*ActivityCreate) *ActivityCreateBulk
CreateBulk returns a builder for creating a bulk of Activity entities.
func (*ActivityClient) Delete ¶
func (c *ActivityClient) Delete() *ActivityDelete
Delete returns a delete builder for Activity.
func (*ActivityClient) DeleteOne ¶
func (c *ActivityClient) DeleteOne(a *Activity) *ActivityDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ActivityClient) DeleteOneID ¶
func (c *ActivityClient) DeleteOneID(id string) *ActivityDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ActivityClient) GetX ¶
func (c *ActivityClient) GetX(ctx context.Context, id string) *Activity
GetX is like Get, but panics if an error occurs.
func (*ActivityClient) Hooks ¶
func (c *ActivityClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ActivityClient) Intercept ¶
func (c *ActivityClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `activity.Intercept(f(g(h())))`.
func (*ActivityClient) Interceptors ¶
func (c *ActivityClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ActivityClient) MapCreateBulk ¶
func (c *ActivityClient) MapCreateBulk(slice any, setFunc func(*ActivityCreate, int)) *ActivityCreateBulk
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 (*ActivityClient) Query ¶
func (c *ActivityClient) Query() *ActivityQuery
Query returns a query builder for Activity.
func (*ActivityClient) Update ¶
func (c *ActivityClient) Update() *ActivityUpdate
Update returns an update builder for Activity.
func (*ActivityClient) UpdateOne ¶
func (c *ActivityClient) UpdateOne(a *Activity) *ActivityUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ActivityClient) UpdateOneID ¶
func (c *ActivityClient) UpdateOneID(id string) *ActivityUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ActivityClient) Use ¶
func (c *ActivityClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `activity.Hooks(f(g(h())))`.
type ActivityCreate ¶
type ActivityCreate struct {
// contains filtered or unexported fields
}
ActivityCreate is the builder for creating a Activity entity.
func (*ActivityCreate) Exec ¶
func (ac *ActivityCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ActivityCreate) ExecX ¶
func (ac *ActivityCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivityCreate) Mutation ¶
func (ac *ActivityCreate) Mutation() *ActivityMutation
Mutation returns the ActivityMutation object of the builder.
func (*ActivityCreate) OnConflict ¶
func (ac *ActivityCreate) OnConflict(opts ...sql.ConflictOption) *ActivityUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Activity.Create().
SetUID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ActivityUpsert) {
SetUID(v+v).
}).
Exec(ctx)
func (*ActivityCreate) OnConflictColumns ¶
func (ac *ActivityCreate) OnConflictColumns(columns ...string) *ActivityUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Activity.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ActivityCreate) Save ¶
func (ac *ActivityCreate) Save(ctx context.Context) (*Activity, error)
Save creates the Activity in the database.
func (*ActivityCreate) SaveX ¶
func (ac *ActivityCreate) SaveX(ctx context.Context) *Activity
SaveX calls Save and panics if Save returns an error.
func (*ActivityCreate) SetBody ¶
func (ac *ActivityCreate) SetBody(s string) *ActivityCreate
SetBody sets the "body" field.
func (*ActivityCreate) SetCreatedAt ¶
func (ac *ActivityCreate) SetCreatedAt(t time.Time) *ActivityCreate
SetCreatedAt sets the "created_at" field.
func (*ActivityCreate) SetEmbedding1536 ¶
func (ac *ActivityCreate) SetEmbedding1536(pg pgvector.Vector) *ActivityCreate
SetEmbedding1536 sets the "embedding_1536" field.
func (*ActivityCreate) SetEmbedding3072 ¶
func (ac *ActivityCreate) SetEmbedding3072(pg pgvector.Vector) *ActivityCreate
SetEmbedding3072 sets the "embedding_3072" field.
func (*ActivityCreate) SetFullSummary ¶
func (ac *ActivityCreate) SetFullSummary(s string) *ActivityCreate
SetFullSummary sets the "full_summary" field.
func (*ActivityCreate) SetID ¶
func (ac *ActivityCreate) SetID(s string) *ActivityCreate
SetID sets the "id" field.
func (*ActivityCreate) SetImageURL ¶
func (ac *ActivityCreate) SetImageURL(s string) *ActivityCreate
SetImageURL sets the "image_url" field.
func (*ActivityCreate) SetNillableEmbedding1536 ¶
func (ac *ActivityCreate) SetNillableEmbedding1536(pg *pgvector.Vector) *ActivityCreate
SetNillableEmbedding1536 sets the "embedding_1536" field if the given value is not nil.
func (*ActivityCreate) SetNillableEmbedding3072 ¶
func (ac *ActivityCreate) SetNillableEmbedding3072(pg *pgvector.Vector) *ActivityCreate
SetNillableEmbedding3072 sets the "embedding_3072" field if the given value is not nil.
func (*ActivityCreate) SetNillableSocialScore ¶
func (ac *ActivityCreate) SetNillableSocialScore(f *float64) *ActivityCreate
SetNillableSocialScore sets the "social_score" field if the given value is not nil.
func (*ActivityCreate) SetNillableUpdateCount ¶
func (ac *ActivityCreate) SetNillableUpdateCount(i *int) *ActivityCreate
SetNillableUpdateCount sets the "update_count" field if the given value is not nil.
func (*ActivityCreate) SetRawJSON ¶
func (ac *ActivityCreate) SetRawJSON(s string) *ActivityCreate
SetRawJSON sets the "raw_json" field.
func (*ActivityCreate) SetShortSummary ¶
func (ac *ActivityCreate) SetShortSummary(s string) *ActivityCreate
SetShortSummary sets the "short_summary" field.
func (*ActivityCreate) SetSocialScore ¶
func (ac *ActivityCreate) SetSocialScore(f float64) *ActivityCreate
SetSocialScore sets the "social_score" field.
func (*ActivityCreate) SetSourceType ¶
func (ac *ActivityCreate) SetSourceType(s string) *ActivityCreate
SetSourceType sets the "source_type" field.
func (*ActivityCreate) SetSourceUids ¶
func (ac *ActivityCreate) SetSourceUids(s []string) *ActivityCreate
SetSourceUids sets the "source_uids" field.
func (*ActivityCreate) SetTitle ¶
func (ac *ActivityCreate) SetTitle(s string) *ActivityCreate
SetTitle sets the "title" field.
func (*ActivityCreate) SetUID ¶
func (ac *ActivityCreate) SetUID(s string) *ActivityCreate
SetUID sets the "uid" field.
func (*ActivityCreate) SetURL ¶
func (ac *ActivityCreate) SetURL(s string) *ActivityCreate
SetURL sets the "url" field.
func (*ActivityCreate) SetUpdateCount ¶
func (ac *ActivityCreate) SetUpdateCount(i int) *ActivityCreate
SetUpdateCount sets the "update_count" field.
type ActivityCreateBulk ¶
type ActivityCreateBulk struct {
// contains filtered or unexported fields
}
ActivityCreateBulk is the builder for creating many Activity entities in bulk.
func (*ActivityCreateBulk) Exec ¶
func (acb *ActivityCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ActivityCreateBulk) ExecX ¶
func (acb *ActivityCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivityCreateBulk) OnConflict ¶
func (acb *ActivityCreateBulk) OnConflict(opts ...sql.ConflictOption) *ActivityUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Activity.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ActivityUpsert) {
SetUID(v+v).
}).
Exec(ctx)
func (*ActivityCreateBulk) OnConflictColumns ¶
func (acb *ActivityCreateBulk) OnConflictColumns(columns ...string) *ActivityUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Activity.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ActivityDelete ¶
type ActivityDelete struct {
// contains filtered or unexported fields
}
ActivityDelete is the builder for deleting a Activity entity.
func (*ActivityDelete) Exec ¶
func (ad *ActivityDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ActivityDelete) ExecX ¶
func (ad *ActivityDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ActivityDelete) Where ¶
func (ad *ActivityDelete) Where(ps ...predicate.Activity) *ActivityDelete
Where appends a list predicates to the ActivityDelete builder.
type ActivityDeleteOne ¶
type ActivityDeleteOne struct {
// contains filtered or unexported fields
}
ActivityDeleteOne is the builder for deleting a single Activity entity.
func (*ActivityDeleteOne) Exec ¶
func (ado *ActivityDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ActivityDeleteOne) ExecX ¶
func (ado *ActivityDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivityDeleteOne) Where ¶
func (ado *ActivityDeleteOne) Where(ps ...predicate.Activity) *ActivityDeleteOne
Where appends a list predicates to the ActivityDelete builder.
type ActivityGroupBy ¶
type ActivityGroupBy struct {
// contains filtered or unexported fields
}
ActivityGroupBy is the group-by builder for Activity entities.
func (*ActivityGroupBy) Aggregate ¶
func (agb *ActivityGroupBy) Aggregate(fns ...AggregateFunc) *ActivityGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ActivityGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ActivityGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ActivityGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ActivityGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ActivityGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ActivityGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ActivityGroupBy) Scan ¶
func (agb *ActivityGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ActivityGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ActivityMutation ¶
type ActivityMutation struct {
// contains filtered or unexported fields
}
ActivityMutation represents an operation that mutates the Activity nodes in the graph.
func (*ActivityMutation) AddField ¶
func (m *ActivityMutation) 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 (*ActivityMutation) AddSocialScore ¶
func (m *ActivityMutation) AddSocialScore(f float64)
AddSocialScore adds f to the "social_score" field.
func (*ActivityMutation) AddUpdateCount ¶
func (m *ActivityMutation) AddUpdateCount(i int)
AddUpdateCount adds i to the "update_count" field.
func (*ActivityMutation) AddedEdges ¶
func (m *ActivityMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ActivityMutation) AddedField ¶
func (m *ActivityMutation) 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 (*ActivityMutation) AddedFields ¶
func (m *ActivityMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ActivityMutation) AddedIDs ¶
func (m *ActivityMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ActivityMutation) AddedSocialScore ¶
func (m *ActivityMutation) AddedSocialScore() (r float64, exists bool)
AddedSocialScore returns the value that was added to the "social_score" field in this mutation.
func (*ActivityMutation) AddedUpdateCount ¶
func (m *ActivityMutation) AddedUpdateCount() (r int, exists bool)
AddedUpdateCount returns the value that was added to the "update_count" field in this mutation.
func (*ActivityMutation) AppendSourceUids ¶
func (m *ActivityMutation) AppendSourceUids(s []string)
AppendSourceUids adds s to the "source_uids" field.
func (*ActivityMutation) AppendedSourceUids ¶
func (m *ActivityMutation) AppendedSourceUids() ([]string, bool)
AppendedSourceUids returns the list of values that were appended to the "source_uids" field in this mutation.
func (*ActivityMutation) Body ¶
func (m *ActivityMutation) Body() (r string, exists bool)
Body returns the value of the "body" field in the mutation.
func (*ActivityMutation) ClearEdge ¶
func (m *ActivityMutation) 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 (*ActivityMutation) ClearEmbedding1536 ¶
func (m *ActivityMutation) ClearEmbedding1536()
ClearEmbedding1536 clears the value of the "embedding_1536" field.
func (*ActivityMutation) ClearEmbedding3072 ¶
func (m *ActivityMutation) ClearEmbedding3072()
ClearEmbedding3072 clears the value of the "embedding_3072" field.
func (*ActivityMutation) ClearField ¶
func (m *ActivityMutation) 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 (*ActivityMutation) ClearedEdges ¶
func (m *ActivityMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ActivityMutation) ClearedFields ¶
func (m *ActivityMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ActivityMutation) Client ¶
func (m ActivityMutation) 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 (*ActivityMutation) CreatedAt ¶
func (m *ActivityMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ActivityMutation) EdgeCleared ¶
func (m *ActivityMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ActivityMutation) Embedding1536 ¶
func (m *ActivityMutation) Embedding1536() (r pgvector.Vector, exists bool)
Embedding1536 returns the value of the "embedding_1536" field in the mutation.
func (*ActivityMutation) Embedding1536Cleared ¶
func (m *ActivityMutation) Embedding1536Cleared() bool
Embedding1536Cleared returns if the "embedding_1536" field was cleared in this mutation.
func (*ActivityMutation) Embedding3072 ¶
func (m *ActivityMutation) Embedding3072() (r pgvector.Vector, exists bool)
Embedding3072 returns the value of the "embedding_3072" field in the mutation.
func (*ActivityMutation) Embedding3072Cleared ¶
func (m *ActivityMutation) Embedding3072Cleared() bool
Embedding3072Cleared returns if the "embedding_3072" field was cleared in this mutation.
func (*ActivityMutation) Field ¶
func (m *ActivityMutation) 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 (*ActivityMutation) FieldCleared ¶
func (m *ActivityMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ActivityMutation) Fields ¶
func (m *ActivityMutation) 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 (*ActivityMutation) FullSummary ¶
func (m *ActivityMutation) FullSummary() (r string, exists bool)
FullSummary returns the value of the "full_summary" field in the mutation.
func (*ActivityMutation) ID ¶
func (m *ActivityMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ActivityMutation) IDs ¶
func (m *ActivityMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ActivityMutation) ImageURL ¶
func (m *ActivityMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (*ActivityMutation) OldBody ¶
func (m *ActivityMutation) OldBody(ctx context.Context) (v string, err error)
OldBody returns the old "body" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldEmbedding1536 ¶
OldEmbedding1536 returns the old "embedding_1536" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldEmbedding3072 ¶
OldEmbedding3072 returns the old "embedding_3072" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldField ¶
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 (*ActivityMutation) OldFullSummary ¶
func (m *ActivityMutation) OldFullSummary(ctx context.Context) (v string, err error)
OldFullSummary returns the old "full_summary" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldImageURL ¶
func (m *ActivityMutation) OldImageURL(ctx context.Context) (v string, err error)
OldImageURL returns the old "image_url" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldRawJSON ¶
func (m *ActivityMutation) OldRawJSON(ctx context.Context) (v string, err error)
OldRawJSON returns the old "raw_json" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldShortSummary ¶
func (m *ActivityMutation) OldShortSummary(ctx context.Context) (v string, err error)
OldShortSummary returns the old "short_summary" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldSocialScore ¶
func (m *ActivityMutation) OldSocialScore(ctx context.Context) (v float64, err error)
OldSocialScore returns the old "social_score" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldSourceType ¶
func (m *ActivityMutation) OldSourceType(ctx context.Context) (v string, err error)
OldSourceType returns the old "source_type" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldSourceUids ¶
func (m *ActivityMutation) OldSourceUids(ctx context.Context) (v []string, err error)
OldSourceUids returns the old "source_uids" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldTitle ¶
func (m *ActivityMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldUID ¶
func (m *ActivityMutation) OldUID(ctx context.Context) (v string, err error)
OldUID returns the old "uid" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldURL ¶
func (m *ActivityMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) OldUpdateCount ¶
func (m *ActivityMutation) OldUpdateCount(ctx context.Context) (v int, err error)
OldUpdateCount returns the old "update_count" field's value of the Activity entity. If the Activity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ActivityMutation) RawJSON ¶
func (m *ActivityMutation) RawJSON() (r string, exists bool)
RawJSON returns the value of the "raw_json" field in the mutation.
func (*ActivityMutation) RemovedEdges ¶
func (m *ActivityMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ActivityMutation) RemovedIDs ¶
func (m *ActivityMutation) 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 (*ActivityMutation) ResetBody ¶
func (m *ActivityMutation) ResetBody()
ResetBody resets all changes to the "body" field.
func (*ActivityMutation) ResetCreatedAt ¶
func (m *ActivityMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ActivityMutation) ResetEdge ¶
func (m *ActivityMutation) 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 (*ActivityMutation) ResetEmbedding1536 ¶
func (m *ActivityMutation) ResetEmbedding1536()
ResetEmbedding1536 resets all changes to the "embedding_1536" field.
func (*ActivityMutation) ResetEmbedding3072 ¶
func (m *ActivityMutation) ResetEmbedding3072()
ResetEmbedding3072 resets all changes to the "embedding_3072" field.
func (*ActivityMutation) ResetField ¶
func (m *ActivityMutation) 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 (*ActivityMutation) ResetFullSummary ¶
func (m *ActivityMutation) ResetFullSummary()
ResetFullSummary resets all changes to the "full_summary" field.
func (*ActivityMutation) ResetImageURL ¶
func (m *ActivityMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (*ActivityMutation) ResetRawJSON ¶
func (m *ActivityMutation) ResetRawJSON()
ResetRawJSON resets all changes to the "raw_json" field.
func (*ActivityMutation) ResetShortSummary ¶
func (m *ActivityMutation) ResetShortSummary()
ResetShortSummary resets all changes to the "short_summary" field.
func (*ActivityMutation) ResetSocialScore ¶
func (m *ActivityMutation) ResetSocialScore()
ResetSocialScore resets all changes to the "social_score" field.
func (*ActivityMutation) ResetSourceType ¶
func (m *ActivityMutation) ResetSourceType()
ResetSourceType resets all changes to the "source_type" field.
func (*ActivityMutation) ResetSourceUids ¶
func (m *ActivityMutation) ResetSourceUids()
ResetSourceUids resets all changes to the "source_uids" field.
func (*ActivityMutation) ResetTitle ¶
func (m *ActivityMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ActivityMutation) ResetUID ¶
func (m *ActivityMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*ActivityMutation) ResetURL ¶
func (m *ActivityMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*ActivityMutation) ResetUpdateCount ¶
func (m *ActivityMutation) ResetUpdateCount()
ResetUpdateCount resets all changes to the "update_count" field.
func (*ActivityMutation) SetBody ¶
func (m *ActivityMutation) SetBody(s string)
SetBody sets the "body" field.
func (*ActivityMutation) SetCreatedAt ¶
func (m *ActivityMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ActivityMutation) SetEmbedding1536 ¶
func (m *ActivityMutation) SetEmbedding1536(pg pgvector.Vector)
SetEmbedding1536 sets the "embedding_1536" field.
func (*ActivityMutation) SetEmbedding3072 ¶
func (m *ActivityMutation) SetEmbedding3072(pg pgvector.Vector)
SetEmbedding3072 sets the "embedding_3072" field.
func (*ActivityMutation) SetField ¶
func (m *ActivityMutation) 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 (*ActivityMutation) SetFullSummary ¶
func (m *ActivityMutation) SetFullSummary(s string)
SetFullSummary sets the "full_summary" field.
func (*ActivityMutation) SetID ¶
func (m *ActivityMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Activity entities.
func (*ActivityMutation) SetImageURL ¶
func (m *ActivityMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (*ActivityMutation) SetOp ¶
func (m *ActivityMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ActivityMutation) SetRawJSON ¶
func (m *ActivityMutation) SetRawJSON(s string)
SetRawJSON sets the "raw_json" field.
func (*ActivityMutation) SetShortSummary ¶
func (m *ActivityMutation) SetShortSummary(s string)
SetShortSummary sets the "short_summary" field.
func (*ActivityMutation) SetSocialScore ¶
func (m *ActivityMutation) SetSocialScore(f float64)
SetSocialScore sets the "social_score" field.
func (*ActivityMutation) SetSourceType ¶
func (m *ActivityMutation) SetSourceType(s string)
SetSourceType sets the "source_type" field.
func (*ActivityMutation) SetSourceUids ¶
func (m *ActivityMutation) SetSourceUids(s []string)
SetSourceUids sets the "source_uids" field.
func (*ActivityMutation) SetTitle ¶
func (m *ActivityMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ActivityMutation) SetUID ¶
func (m *ActivityMutation) SetUID(s string)
SetUID sets the "uid" field.
func (*ActivityMutation) SetURL ¶
func (m *ActivityMutation) SetURL(s string)
SetURL sets the "url" field.
func (*ActivityMutation) SetUpdateCount ¶
func (m *ActivityMutation) SetUpdateCount(i int)
SetUpdateCount sets the "update_count" field.
func (*ActivityMutation) ShortSummary ¶
func (m *ActivityMutation) ShortSummary() (r string, exists bool)
ShortSummary returns the value of the "short_summary" field in the mutation.
func (*ActivityMutation) SocialScore ¶
func (m *ActivityMutation) SocialScore() (r float64, exists bool)
SocialScore returns the value of the "social_score" field in the mutation.
func (*ActivityMutation) SourceType ¶
func (m *ActivityMutation) SourceType() (r string, exists bool)
SourceType returns the value of the "source_type" field in the mutation.
func (*ActivityMutation) SourceUids ¶
func (m *ActivityMutation) SourceUids() (r []string, exists bool)
SourceUids returns the value of the "source_uids" field in the mutation.
func (*ActivityMutation) Title ¶
func (m *ActivityMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (ActivityMutation) Tx ¶
func (m ActivityMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ActivityMutation) Type ¶
func (m *ActivityMutation) Type() string
Type returns the node type of this mutation (Activity).
func (*ActivityMutation) UID ¶
func (m *ActivityMutation) UID() (r string, exists bool)
UID returns the value of the "uid" field in the mutation.
func (*ActivityMutation) URL ¶
func (m *ActivityMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*ActivityMutation) UpdateCount ¶
func (m *ActivityMutation) UpdateCount() (r int, exists bool)
UpdateCount returns the value of the "update_count" field in the mutation.
func (*ActivityMutation) Where ¶
func (m *ActivityMutation) Where(ps ...predicate.Activity)
Where appends a list predicates to the ActivityMutation builder.
func (*ActivityMutation) WhereP ¶
func (m *ActivityMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ActivityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ActivityQuery ¶
type ActivityQuery struct {
// contains filtered or unexported fields
}
ActivityQuery is the builder for querying Activity entities.
func (*ActivityQuery) Aggregate ¶
func (aq *ActivityQuery) Aggregate(fns ...AggregateFunc) *ActivitySelect
Aggregate returns a ActivitySelect configured with the given aggregations.
func (*ActivityQuery) All ¶
func (aq *ActivityQuery) All(ctx context.Context) ([]*Activity, error)
All executes the query and returns a list of Activities.
func (*ActivityQuery) AllX ¶
func (aq *ActivityQuery) AllX(ctx context.Context) []*Activity
AllX is like All, but panics if an error occurs.
func (*ActivityQuery) Clone ¶
func (aq *ActivityQuery) Clone() *ActivityQuery
Clone returns a duplicate of the ActivityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ActivityQuery) Count ¶
func (aq *ActivityQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ActivityQuery) CountX ¶
func (aq *ActivityQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ActivityQuery) Exist ¶
func (aq *ActivityQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ActivityQuery) ExistX ¶
func (aq *ActivityQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ActivityQuery) First ¶
func (aq *ActivityQuery) First(ctx context.Context) (*Activity, error)
First returns the first Activity entity from the query. Returns a *NotFoundError when no Activity was found.
func (*ActivityQuery) FirstID ¶
func (aq *ActivityQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Activity ID from the query. Returns a *NotFoundError when no Activity ID was found.
func (*ActivityQuery) FirstIDX ¶
func (aq *ActivityQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ActivityQuery) FirstX ¶
func (aq *ActivityQuery) FirstX(ctx context.Context) *Activity
FirstX is like First, but panics if an error occurs.
func (*ActivityQuery) GroupBy ¶
func (aq *ActivityQuery) GroupBy(field string, fields ...string) *ActivityGroupBy
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 {
UID string `json:"uid,omitempty"`
Count int `json:"count,omitempty"`
}
client.Activity.Query().
GroupBy(activity.FieldUID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ActivityQuery) IDs ¶
func (aq *ActivityQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Activity IDs.
func (*ActivityQuery) IDsX ¶
func (aq *ActivityQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ActivityQuery) Limit ¶
func (aq *ActivityQuery) Limit(limit int) *ActivityQuery
Limit the number of records to be returned by this query.
func (*ActivityQuery) Offset ¶
func (aq *ActivityQuery) Offset(offset int) *ActivityQuery
Offset to start from.
func (*ActivityQuery) Only ¶
func (aq *ActivityQuery) Only(ctx context.Context) (*Activity, error)
Only returns a single Activity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Activity entity is found. Returns a *NotFoundError when no Activity entities are found.
func (*ActivityQuery) OnlyID ¶
func (aq *ActivityQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Activity ID in the query. Returns a *NotSingularError when more than one Activity ID is found. Returns a *NotFoundError when no entities are found.
func (*ActivityQuery) OnlyIDX ¶
func (aq *ActivityQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ActivityQuery) OnlyX ¶
func (aq *ActivityQuery) OnlyX(ctx context.Context) *Activity
OnlyX is like Only, but panics if an error occurs.
func (*ActivityQuery) Order ¶
func (aq *ActivityQuery) Order(o ...activity.OrderOption) *ActivityQuery
Order specifies how the records should be ordered.
func (*ActivityQuery) Select ¶
func (aq *ActivityQuery) Select(fields ...string) *ActivitySelect
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 {
UID string `json:"uid,omitempty"`
}
client.Activity.Query().
Select(activity.FieldUID).
Scan(ctx, &v)
func (*ActivityQuery) Unique ¶
func (aq *ActivityQuery) Unique(unique bool) *ActivityQuery
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 (*ActivityQuery) Where ¶
func (aq *ActivityQuery) Where(ps ...predicate.Activity) *ActivityQuery
Where adds a new predicate for the ActivityQuery builder.
type ActivitySelect ¶
type ActivitySelect struct {
*ActivityQuery
// contains filtered or unexported fields
}
ActivitySelect is the builder for selecting fields of Activity entities.
func (*ActivitySelect) Aggregate ¶
func (as *ActivitySelect) Aggregate(fns ...AggregateFunc) *ActivitySelect
Aggregate adds the given aggregation functions to the selector query.
func (*ActivitySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ActivitySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ActivitySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ActivitySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ActivitySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ActivitySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ActivitySelect) Scan ¶
func (as *ActivitySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ActivitySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ActivityUpdate ¶
type ActivityUpdate struct {
// contains filtered or unexported fields
}
ActivityUpdate is the builder for updating Activity entities.
func (*ActivityUpdate) AddSocialScore ¶
func (au *ActivityUpdate) AddSocialScore(f float64) *ActivityUpdate
AddSocialScore adds f to the "social_score" field.
func (*ActivityUpdate) AddUpdateCount ¶
func (au *ActivityUpdate) AddUpdateCount(i int) *ActivityUpdate
AddUpdateCount adds i to the "update_count" field.
func (*ActivityUpdate) AppendSourceUids ¶
func (au *ActivityUpdate) AppendSourceUids(s []string) *ActivityUpdate
AppendSourceUids appends s to the "source_uids" field.
func (*ActivityUpdate) ClearEmbedding1536 ¶
func (au *ActivityUpdate) ClearEmbedding1536() *ActivityUpdate
ClearEmbedding1536 clears the value of the "embedding_1536" field.
func (*ActivityUpdate) ClearEmbedding3072 ¶
func (au *ActivityUpdate) ClearEmbedding3072() *ActivityUpdate
ClearEmbedding3072 clears the value of the "embedding_3072" field.
func (*ActivityUpdate) Exec ¶
func (au *ActivityUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ActivityUpdate) ExecX ¶
func (au *ActivityUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivityUpdate) Mutation ¶
func (au *ActivityUpdate) Mutation() *ActivityMutation
Mutation returns the ActivityMutation object of the builder.
func (*ActivityUpdate) Save ¶
func (au *ActivityUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ActivityUpdate) SaveX ¶
func (au *ActivityUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ActivityUpdate) SetBody ¶
func (au *ActivityUpdate) SetBody(s string) *ActivityUpdate
SetBody sets the "body" field.
func (*ActivityUpdate) SetCreatedAt ¶
func (au *ActivityUpdate) SetCreatedAt(t time.Time) *ActivityUpdate
SetCreatedAt sets the "created_at" field.
func (*ActivityUpdate) SetEmbedding1536 ¶
func (au *ActivityUpdate) SetEmbedding1536(pg pgvector.Vector) *ActivityUpdate
SetEmbedding1536 sets the "embedding_1536" field.
func (*ActivityUpdate) SetEmbedding3072 ¶
func (au *ActivityUpdate) SetEmbedding3072(pg pgvector.Vector) *ActivityUpdate
SetEmbedding3072 sets the "embedding_3072" field.
func (*ActivityUpdate) SetFullSummary ¶
func (au *ActivityUpdate) SetFullSummary(s string) *ActivityUpdate
SetFullSummary sets the "full_summary" field.
func (*ActivityUpdate) SetImageURL ¶
func (au *ActivityUpdate) SetImageURL(s string) *ActivityUpdate
SetImageURL sets the "image_url" field.
func (*ActivityUpdate) SetNillableBody ¶
func (au *ActivityUpdate) SetNillableBody(s *string) *ActivityUpdate
SetNillableBody sets the "body" field if the given value is not nil.
func (*ActivityUpdate) SetNillableCreatedAt ¶
func (au *ActivityUpdate) SetNillableCreatedAt(t *time.Time) *ActivityUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ActivityUpdate) SetNillableEmbedding1536 ¶
func (au *ActivityUpdate) SetNillableEmbedding1536(pg *pgvector.Vector) *ActivityUpdate
SetNillableEmbedding1536 sets the "embedding_1536" field if the given value is not nil.
func (*ActivityUpdate) SetNillableEmbedding3072 ¶
func (au *ActivityUpdate) SetNillableEmbedding3072(pg *pgvector.Vector) *ActivityUpdate
SetNillableEmbedding3072 sets the "embedding_3072" field if the given value is not nil.
func (*ActivityUpdate) SetNillableFullSummary ¶
func (au *ActivityUpdate) SetNillableFullSummary(s *string) *ActivityUpdate
SetNillableFullSummary sets the "full_summary" field if the given value is not nil.
func (*ActivityUpdate) SetNillableImageURL ¶
func (au *ActivityUpdate) SetNillableImageURL(s *string) *ActivityUpdate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*ActivityUpdate) SetNillableRawJSON ¶
func (au *ActivityUpdate) SetNillableRawJSON(s *string) *ActivityUpdate
SetNillableRawJSON sets the "raw_json" field if the given value is not nil.
func (*ActivityUpdate) SetNillableShortSummary ¶
func (au *ActivityUpdate) SetNillableShortSummary(s *string) *ActivityUpdate
SetNillableShortSummary sets the "short_summary" field if the given value is not nil.
func (*ActivityUpdate) SetNillableSocialScore ¶
func (au *ActivityUpdate) SetNillableSocialScore(f *float64) *ActivityUpdate
SetNillableSocialScore sets the "social_score" field if the given value is not nil.
func (*ActivityUpdate) SetNillableSourceType ¶
func (au *ActivityUpdate) SetNillableSourceType(s *string) *ActivityUpdate
SetNillableSourceType sets the "source_type" field if the given value is not nil.
func (*ActivityUpdate) SetNillableTitle ¶
func (au *ActivityUpdate) SetNillableTitle(s *string) *ActivityUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ActivityUpdate) SetNillableUID ¶
func (au *ActivityUpdate) SetNillableUID(s *string) *ActivityUpdate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*ActivityUpdate) SetNillableURL ¶
func (au *ActivityUpdate) SetNillableURL(s *string) *ActivityUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*ActivityUpdate) SetNillableUpdateCount ¶
func (au *ActivityUpdate) SetNillableUpdateCount(i *int) *ActivityUpdate
SetNillableUpdateCount sets the "update_count" field if the given value is not nil.
func (*ActivityUpdate) SetRawJSON ¶
func (au *ActivityUpdate) SetRawJSON(s string) *ActivityUpdate
SetRawJSON sets the "raw_json" field.
func (*ActivityUpdate) SetShortSummary ¶
func (au *ActivityUpdate) SetShortSummary(s string) *ActivityUpdate
SetShortSummary sets the "short_summary" field.
func (*ActivityUpdate) SetSocialScore ¶
func (au *ActivityUpdate) SetSocialScore(f float64) *ActivityUpdate
SetSocialScore sets the "social_score" field.
func (*ActivityUpdate) SetSourceType ¶
func (au *ActivityUpdate) SetSourceType(s string) *ActivityUpdate
SetSourceType sets the "source_type" field.
func (*ActivityUpdate) SetSourceUids ¶
func (au *ActivityUpdate) SetSourceUids(s []string) *ActivityUpdate
SetSourceUids sets the "source_uids" field.
func (*ActivityUpdate) SetTitle ¶
func (au *ActivityUpdate) SetTitle(s string) *ActivityUpdate
SetTitle sets the "title" field.
func (*ActivityUpdate) SetUID ¶
func (au *ActivityUpdate) SetUID(s string) *ActivityUpdate
SetUID sets the "uid" field.
func (*ActivityUpdate) SetURL ¶
func (au *ActivityUpdate) SetURL(s string) *ActivityUpdate
SetURL sets the "url" field.
func (*ActivityUpdate) SetUpdateCount ¶
func (au *ActivityUpdate) SetUpdateCount(i int) *ActivityUpdate
SetUpdateCount sets the "update_count" field.
func (*ActivityUpdate) Where ¶
func (au *ActivityUpdate) Where(ps ...predicate.Activity) *ActivityUpdate
Where appends a list predicates to the ActivityUpdate builder.
type ActivityUpdateOne ¶
type ActivityUpdateOne struct {
// contains filtered or unexported fields
}
ActivityUpdateOne is the builder for updating a single Activity entity.
func (*ActivityUpdateOne) AddSocialScore ¶
func (auo *ActivityUpdateOne) AddSocialScore(f float64) *ActivityUpdateOne
AddSocialScore adds f to the "social_score" field.
func (*ActivityUpdateOne) AddUpdateCount ¶
func (auo *ActivityUpdateOne) AddUpdateCount(i int) *ActivityUpdateOne
AddUpdateCount adds i to the "update_count" field.
func (*ActivityUpdateOne) AppendSourceUids ¶
func (auo *ActivityUpdateOne) AppendSourceUids(s []string) *ActivityUpdateOne
AppendSourceUids appends s to the "source_uids" field.
func (*ActivityUpdateOne) ClearEmbedding1536 ¶
func (auo *ActivityUpdateOne) ClearEmbedding1536() *ActivityUpdateOne
ClearEmbedding1536 clears the value of the "embedding_1536" field.
func (*ActivityUpdateOne) ClearEmbedding3072 ¶
func (auo *ActivityUpdateOne) ClearEmbedding3072() *ActivityUpdateOne
ClearEmbedding3072 clears the value of the "embedding_3072" field.
func (*ActivityUpdateOne) Exec ¶
func (auo *ActivityUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ActivityUpdateOne) ExecX ¶
func (auo *ActivityUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivityUpdateOne) Mutation ¶
func (auo *ActivityUpdateOne) Mutation() *ActivityMutation
Mutation returns the ActivityMutation object of the builder.
func (*ActivityUpdateOne) Save ¶
func (auo *ActivityUpdateOne) Save(ctx context.Context) (*Activity, error)
Save executes the query and returns the updated Activity entity.
func (*ActivityUpdateOne) SaveX ¶
func (auo *ActivityUpdateOne) SaveX(ctx context.Context) *Activity
SaveX is like Save, but panics if an error occurs.
func (*ActivityUpdateOne) Select ¶
func (auo *ActivityUpdateOne) Select(field string, fields ...string) *ActivityUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ActivityUpdateOne) SetBody ¶
func (auo *ActivityUpdateOne) SetBody(s string) *ActivityUpdateOne
SetBody sets the "body" field.
func (*ActivityUpdateOne) SetCreatedAt ¶
func (auo *ActivityUpdateOne) SetCreatedAt(t time.Time) *ActivityUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ActivityUpdateOne) SetEmbedding1536 ¶
func (auo *ActivityUpdateOne) SetEmbedding1536(pg pgvector.Vector) *ActivityUpdateOne
SetEmbedding1536 sets the "embedding_1536" field.
func (*ActivityUpdateOne) SetEmbedding3072 ¶
func (auo *ActivityUpdateOne) SetEmbedding3072(pg pgvector.Vector) *ActivityUpdateOne
SetEmbedding3072 sets the "embedding_3072" field.
func (*ActivityUpdateOne) SetFullSummary ¶
func (auo *ActivityUpdateOne) SetFullSummary(s string) *ActivityUpdateOne
SetFullSummary sets the "full_summary" field.
func (*ActivityUpdateOne) SetImageURL ¶
func (auo *ActivityUpdateOne) SetImageURL(s string) *ActivityUpdateOne
SetImageURL sets the "image_url" field.
func (*ActivityUpdateOne) SetNillableBody ¶
func (auo *ActivityUpdateOne) SetNillableBody(s *string) *ActivityUpdateOne
SetNillableBody sets the "body" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableCreatedAt ¶
func (auo *ActivityUpdateOne) SetNillableCreatedAt(t *time.Time) *ActivityUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableEmbedding1536 ¶
func (auo *ActivityUpdateOne) SetNillableEmbedding1536(pg *pgvector.Vector) *ActivityUpdateOne
SetNillableEmbedding1536 sets the "embedding_1536" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableEmbedding3072 ¶
func (auo *ActivityUpdateOne) SetNillableEmbedding3072(pg *pgvector.Vector) *ActivityUpdateOne
SetNillableEmbedding3072 sets the "embedding_3072" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableFullSummary ¶
func (auo *ActivityUpdateOne) SetNillableFullSummary(s *string) *ActivityUpdateOne
SetNillableFullSummary sets the "full_summary" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableImageURL ¶
func (auo *ActivityUpdateOne) SetNillableImageURL(s *string) *ActivityUpdateOne
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableRawJSON ¶
func (auo *ActivityUpdateOne) SetNillableRawJSON(s *string) *ActivityUpdateOne
SetNillableRawJSON sets the "raw_json" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableShortSummary ¶
func (auo *ActivityUpdateOne) SetNillableShortSummary(s *string) *ActivityUpdateOne
SetNillableShortSummary sets the "short_summary" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableSocialScore ¶
func (auo *ActivityUpdateOne) SetNillableSocialScore(f *float64) *ActivityUpdateOne
SetNillableSocialScore sets the "social_score" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableSourceType ¶
func (auo *ActivityUpdateOne) SetNillableSourceType(s *string) *ActivityUpdateOne
SetNillableSourceType sets the "source_type" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableTitle ¶
func (auo *ActivityUpdateOne) SetNillableTitle(s *string) *ActivityUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableUID ¶
func (auo *ActivityUpdateOne) SetNillableUID(s *string) *ActivityUpdateOne
SetNillableUID sets the "uid" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableURL ¶
func (auo *ActivityUpdateOne) SetNillableURL(s *string) *ActivityUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*ActivityUpdateOne) SetNillableUpdateCount ¶
func (auo *ActivityUpdateOne) SetNillableUpdateCount(i *int) *ActivityUpdateOne
SetNillableUpdateCount sets the "update_count" field if the given value is not nil.
func (*ActivityUpdateOne) SetRawJSON ¶
func (auo *ActivityUpdateOne) SetRawJSON(s string) *ActivityUpdateOne
SetRawJSON sets the "raw_json" field.
func (*ActivityUpdateOne) SetShortSummary ¶
func (auo *ActivityUpdateOne) SetShortSummary(s string) *ActivityUpdateOne
SetShortSummary sets the "short_summary" field.
func (*ActivityUpdateOne) SetSocialScore ¶
func (auo *ActivityUpdateOne) SetSocialScore(f float64) *ActivityUpdateOne
SetSocialScore sets the "social_score" field.
func (*ActivityUpdateOne) SetSourceType ¶
func (auo *ActivityUpdateOne) SetSourceType(s string) *ActivityUpdateOne
SetSourceType sets the "source_type" field.
func (*ActivityUpdateOne) SetSourceUids ¶
func (auo *ActivityUpdateOne) SetSourceUids(s []string) *ActivityUpdateOne
SetSourceUids sets the "source_uids" field.
func (*ActivityUpdateOne) SetTitle ¶
func (auo *ActivityUpdateOne) SetTitle(s string) *ActivityUpdateOne
SetTitle sets the "title" field.
func (*ActivityUpdateOne) SetUID ¶
func (auo *ActivityUpdateOne) SetUID(s string) *ActivityUpdateOne
SetUID sets the "uid" field.
func (*ActivityUpdateOne) SetURL ¶
func (auo *ActivityUpdateOne) SetURL(s string) *ActivityUpdateOne
SetURL sets the "url" field.
func (*ActivityUpdateOne) SetUpdateCount ¶
func (auo *ActivityUpdateOne) SetUpdateCount(i int) *ActivityUpdateOne
SetUpdateCount sets the "update_count" field.
func (*ActivityUpdateOne) Where ¶
func (auo *ActivityUpdateOne) Where(ps ...predicate.Activity) *ActivityUpdateOne
Where appends a list predicates to the ActivityUpdate builder.
type ActivityUpsert ¶
ActivityUpsert is the "OnConflict" setter.
func (*ActivityUpsert) AddSocialScore ¶
func (u *ActivityUpsert) AddSocialScore(v float64) *ActivityUpsert
AddSocialScore adds v to the "social_score" field.
func (*ActivityUpsert) AddUpdateCount ¶
func (u *ActivityUpsert) AddUpdateCount(v int) *ActivityUpsert
AddUpdateCount adds v to the "update_count" field.
func (*ActivityUpsert) ClearEmbedding1536 ¶
func (u *ActivityUpsert) ClearEmbedding1536() *ActivityUpsert
ClearEmbedding1536 clears the value of the "embedding_1536" field.
func (*ActivityUpsert) ClearEmbedding3072 ¶
func (u *ActivityUpsert) ClearEmbedding3072() *ActivityUpsert
ClearEmbedding3072 clears the value of the "embedding_3072" field.
func (*ActivityUpsert) SetBody ¶
func (u *ActivityUpsert) SetBody(v string) *ActivityUpsert
SetBody sets the "body" field.
func (*ActivityUpsert) SetCreatedAt ¶
func (u *ActivityUpsert) SetCreatedAt(v time.Time) *ActivityUpsert
SetCreatedAt sets the "created_at" field.
func (*ActivityUpsert) SetEmbedding1536 ¶
func (u *ActivityUpsert) SetEmbedding1536(v pgvector.Vector) *ActivityUpsert
SetEmbedding1536 sets the "embedding_1536" field.
func (*ActivityUpsert) SetEmbedding3072 ¶
func (u *ActivityUpsert) SetEmbedding3072(v pgvector.Vector) *ActivityUpsert
SetEmbedding3072 sets the "embedding_3072" field.
func (*ActivityUpsert) SetFullSummary ¶
func (u *ActivityUpsert) SetFullSummary(v string) *ActivityUpsert
SetFullSummary sets the "full_summary" field.
func (*ActivityUpsert) SetImageURL ¶
func (u *ActivityUpsert) SetImageURL(v string) *ActivityUpsert
SetImageURL sets the "image_url" field.
func (*ActivityUpsert) SetRawJSON ¶
func (u *ActivityUpsert) SetRawJSON(v string) *ActivityUpsert
SetRawJSON sets the "raw_json" field.
func (*ActivityUpsert) SetShortSummary ¶
func (u *ActivityUpsert) SetShortSummary(v string) *ActivityUpsert
SetShortSummary sets the "short_summary" field.
func (*ActivityUpsert) SetSocialScore ¶
func (u *ActivityUpsert) SetSocialScore(v float64) *ActivityUpsert
SetSocialScore sets the "social_score" field.
func (*ActivityUpsert) SetSourceType ¶
func (u *ActivityUpsert) SetSourceType(v string) *ActivityUpsert
SetSourceType sets the "source_type" field.
func (*ActivityUpsert) SetSourceUids ¶
func (u *ActivityUpsert) SetSourceUids(v []string) *ActivityUpsert
SetSourceUids sets the "source_uids" field.
func (*ActivityUpsert) SetTitle ¶
func (u *ActivityUpsert) SetTitle(v string) *ActivityUpsert
SetTitle sets the "title" field.
func (*ActivityUpsert) SetUID ¶
func (u *ActivityUpsert) SetUID(v string) *ActivityUpsert
SetUID sets the "uid" field.
func (*ActivityUpsert) SetURL ¶
func (u *ActivityUpsert) SetURL(v string) *ActivityUpsert
SetURL sets the "url" field.
func (*ActivityUpsert) SetUpdateCount ¶
func (u *ActivityUpsert) SetUpdateCount(v int) *ActivityUpsert
SetUpdateCount sets the "update_count" field.
func (*ActivityUpsert) UpdateBody ¶
func (u *ActivityUpsert) UpdateBody() *ActivityUpsert
UpdateBody sets the "body" field to the value that was provided on create.
func (*ActivityUpsert) UpdateCreatedAt ¶
func (u *ActivityUpsert) UpdateCreatedAt() *ActivityUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ActivityUpsert) UpdateEmbedding1536 ¶
func (u *ActivityUpsert) UpdateEmbedding1536() *ActivityUpsert
UpdateEmbedding1536 sets the "embedding_1536" field to the value that was provided on create.
func (*ActivityUpsert) UpdateEmbedding3072 ¶
func (u *ActivityUpsert) UpdateEmbedding3072() *ActivityUpsert
UpdateEmbedding3072 sets the "embedding_3072" field to the value that was provided on create.
func (*ActivityUpsert) UpdateFullSummary ¶
func (u *ActivityUpsert) UpdateFullSummary() *ActivityUpsert
UpdateFullSummary sets the "full_summary" field to the value that was provided on create.
func (*ActivityUpsert) UpdateImageURL ¶
func (u *ActivityUpsert) UpdateImageURL() *ActivityUpsert
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*ActivityUpsert) UpdateRawJSON ¶
func (u *ActivityUpsert) UpdateRawJSON() *ActivityUpsert
UpdateRawJSON sets the "raw_json" field to the value that was provided on create.
func (*ActivityUpsert) UpdateShortSummary ¶
func (u *ActivityUpsert) UpdateShortSummary() *ActivityUpsert
UpdateShortSummary sets the "short_summary" field to the value that was provided on create.
func (*ActivityUpsert) UpdateSocialScore ¶
func (u *ActivityUpsert) UpdateSocialScore() *ActivityUpsert
UpdateSocialScore sets the "social_score" field to the value that was provided on create.
func (*ActivityUpsert) UpdateSourceType ¶
func (u *ActivityUpsert) UpdateSourceType() *ActivityUpsert
UpdateSourceType sets the "source_type" field to the value that was provided on create.
func (*ActivityUpsert) UpdateSourceUids ¶
func (u *ActivityUpsert) UpdateSourceUids() *ActivityUpsert
UpdateSourceUids sets the "source_uids" field to the value that was provided on create.
func (*ActivityUpsert) UpdateTitle ¶
func (u *ActivityUpsert) UpdateTitle() *ActivityUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
func (*ActivityUpsert) UpdateUID ¶
func (u *ActivityUpsert) UpdateUID() *ActivityUpsert
UpdateUID sets the "uid" field to the value that was provided on create.
func (*ActivityUpsert) UpdateURL ¶
func (u *ActivityUpsert) UpdateURL() *ActivityUpsert
UpdateURL sets the "url" field to the value that was provided on create.
func (*ActivityUpsert) UpdateUpdateCount ¶
func (u *ActivityUpsert) UpdateUpdateCount() *ActivityUpsert
UpdateUpdateCount sets the "update_count" field to the value that was provided on create.
type ActivityUpsertBulk ¶
type ActivityUpsertBulk struct {
// contains filtered or unexported fields
}
ActivityUpsertBulk is the builder for "upsert"-ing a bulk of Activity nodes.
func (*ActivityUpsertBulk) AddSocialScore ¶
func (u *ActivityUpsertBulk) AddSocialScore(v float64) *ActivityUpsertBulk
AddSocialScore adds v to the "social_score" field.
func (*ActivityUpsertBulk) AddUpdateCount ¶
func (u *ActivityUpsertBulk) AddUpdateCount(v int) *ActivityUpsertBulk
AddUpdateCount adds v to the "update_count" field.
func (*ActivityUpsertBulk) ClearEmbedding1536 ¶
func (u *ActivityUpsertBulk) ClearEmbedding1536() *ActivityUpsertBulk
ClearEmbedding1536 clears the value of the "embedding_1536" field.
func (*ActivityUpsertBulk) ClearEmbedding3072 ¶
func (u *ActivityUpsertBulk) ClearEmbedding3072() *ActivityUpsertBulk
ClearEmbedding3072 clears the value of the "embedding_3072" field.
func (*ActivityUpsertBulk) DoNothing ¶
func (u *ActivityUpsertBulk) DoNothing() *ActivityUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ActivityUpsertBulk) Exec ¶
func (u *ActivityUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ActivityUpsertBulk) ExecX ¶
func (u *ActivityUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivityUpsertBulk) Ignore ¶
func (u *ActivityUpsertBulk) Ignore() *ActivityUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Activity.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ActivityUpsertBulk) SetBody ¶
func (u *ActivityUpsertBulk) SetBody(v string) *ActivityUpsertBulk
SetBody sets the "body" field.
func (*ActivityUpsertBulk) SetCreatedAt ¶
func (u *ActivityUpsertBulk) SetCreatedAt(v time.Time) *ActivityUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*ActivityUpsertBulk) SetEmbedding1536 ¶
func (u *ActivityUpsertBulk) SetEmbedding1536(v pgvector.Vector) *ActivityUpsertBulk
SetEmbedding1536 sets the "embedding_1536" field.
func (*ActivityUpsertBulk) SetEmbedding3072 ¶
func (u *ActivityUpsertBulk) SetEmbedding3072(v pgvector.Vector) *ActivityUpsertBulk
SetEmbedding3072 sets the "embedding_3072" field.
func (*ActivityUpsertBulk) SetFullSummary ¶
func (u *ActivityUpsertBulk) SetFullSummary(v string) *ActivityUpsertBulk
SetFullSummary sets the "full_summary" field.
func (*ActivityUpsertBulk) SetImageURL ¶
func (u *ActivityUpsertBulk) SetImageURL(v string) *ActivityUpsertBulk
SetImageURL sets the "image_url" field.
func (*ActivityUpsertBulk) SetRawJSON ¶
func (u *ActivityUpsertBulk) SetRawJSON(v string) *ActivityUpsertBulk
SetRawJSON sets the "raw_json" field.
func (*ActivityUpsertBulk) SetShortSummary ¶
func (u *ActivityUpsertBulk) SetShortSummary(v string) *ActivityUpsertBulk
SetShortSummary sets the "short_summary" field.
func (*ActivityUpsertBulk) SetSocialScore ¶
func (u *ActivityUpsertBulk) SetSocialScore(v float64) *ActivityUpsertBulk
SetSocialScore sets the "social_score" field.
func (*ActivityUpsertBulk) SetSourceType ¶
func (u *ActivityUpsertBulk) SetSourceType(v string) *ActivityUpsertBulk
SetSourceType sets the "source_type" field.
func (*ActivityUpsertBulk) SetSourceUids ¶
func (u *ActivityUpsertBulk) SetSourceUids(v []string) *ActivityUpsertBulk
SetSourceUids sets the "source_uids" field.
func (*ActivityUpsertBulk) SetTitle ¶
func (u *ActivityUpsertBulk) SetTitle(v string) *ActivityUpsertBulk
SetTitle sets the "title" field.
func (*ActivityUpsertBulk) SetUID ¶
func (u *ActivityUpsertBulk) SetUID(v string) *ActivityUpsertBulk
SetUID sets the "uid" field.
func (*ActivityUpsertBulk) SetURL ¶
func (u *ActivityUpsertBulk) SetURL(v string) *ActivityUpsertBulk
SetURL sets the "url" field.
func (*ActivityUpsertBulk) SetUpdateCount ¶
func (u *ActivityUpsertBulk) SetUpdateCount(v int) *ActivityUpsertBulk
SetUpdateCount sets the "update_count" field.
func (*ActivityUpsertBulk) Update ¶
func (u *ActivityUpsertBulk) Update(set func(*ActivityUpsert)) *ActivityUpsertBulk
Update allows overriding fields `UPDATE` values. See the ActivityCreateBulk.OnConflict documentation for more info.
func (*ActivityUpsertBulk) UpdateBody ¶
func (u *ActivityUpsertBulk) UpdateBody() *ActivityUpsertBulk
UpdateBody sets the "body" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateCreatedAt ¶
func (u *ActivityUpsertBulk) UpdateCreatedAt() *ActivityUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateEmbedding1536 ¶
func (u *ActivityUpsertBulk) UpdateEmbedding1536() *ActivityUpsertBulk
UpdateEmbedding1536 sets the "embedding_1536" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateEmbedding3072 ¶
func (u *ActivityUpsertBulk) UpdateEmbedding3072() *ActivityUpsertBulk
UpdateEmbedding3072 sets the "embedding_3072" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateFullSummary ¶
func (u *ActivityUpsertBulk) UpdateFullSummary() *ActivityUpsertBulk
UpdateFullSummary sets the "full_summary" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateImageURL ¶
func (u *ActivityUpsertBulk) UpdateImageURL() *ActivityUpsertBulk
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateNewValues ¶
func (u *ActivityUpsertBulk) UpdateNewValues() *ActivityUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Activity.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(activity.FieldID)
}),
).
Exec(ctx)
func (*ActivityUpsertBulk) UpdateRawJSON ¶
func (u *ActivityUpsertBulk) UpdateRawJSON() *ActivityUpsertBulk
UpdateRawJSON sets the "raw_json" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateShortSummary ¶
func (u *ActivityUpsertBulk) UpdateShortSummary() *ActivityUpsertBulk
UpdateShortSummary sets the "short_summary" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateSocialScore ¶
func (u *ActivityUpsertBulk) UpdateSocialScore() *ActivityUpsertBulk
UpdateSocialScore sets the "social_score" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateSourceType ¶
func (u *ActivityUpsertBulk) UpdateSourceType() *ActivityUpsertBulk
UpdateSourceType sets the "source_type" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateSourceUids ¶
func (u *ActivityUpsertBulk) UpdateSourceUids() *ActivityUpsertBulk
UpdateSourceUids sets the "source_uids" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateTitle ¶
func (u *ActivityUpsertBulk) UpdateTitle() *ActivityUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateUID ¶
func (u *ActivityUpsertBulk) UpdateUID() *ActivityUpsertBulk
UpdateUID sets the "uid" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateURL ¶
func (u *ActivityUpsertBulk) UpdateURL() *ActivityUpsertBulk
UpdateURL sets the "url" field to the value that was provided on create.
func (*ActivityUpsertBulk) UpdateUpdateCount ¶
func (u *ActivityUpsertBulk) UpdateUpdateCount() *ActivityUpsertBulk
UpdateUpdateCount sets the "update_count" field to the value that was provided on create.
type ActivityUpsertOne ¶
type ActivityUpsertOne struct {
// contains filtered or unexported fields
}
ActivityUpsertOne is the builder for "upsert"-ing
one Activity node.
func (*ActivityUpsertOne) AddSocialScore ¶
func (u *ActivityUpsertOne) AddSocialScore(v float64) *ActivityUpsertOne
AddSocialScore adds v to the "social_score" field.
func (*ActivityUpsertOne) AddUpdateCount ¶
func (u *ActivityUpsertOne) AddUpdateCount(v int) *ActivityUpsertOne
AddUpdateCount adds v to the "update_count" field.
func (*ActivityUpsertOne) ClearEmbedding1536 ¶
func (u *ActivityUpsertOne) ClearEmbedding1536() *ActivityUpsertOne
ClearEmbedding1536 clears the value of the "embedding_1536" field.
func (*ActivityUpsertOne) ClearEmbedding3072 ¶
func (u *ActivityUpsertOne) ClearEmbedding3072() *ActivityUpsertOne
ClearEmbedding3072 clears the value of the "embedding_3072" field.
func (*ActivityUpsertOne) DoNothing ¶
func (u *ActivityUpsertOne) DoNothing() *ActivityUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ActivityUpsertOne) Exec ¶
func (u *ActivityUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ActivityUpsertOne) ExecX ¶
func (u *ActivityUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActivityUpsertOne) ID ¶
func (u *ActivityUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ActivityUpsertOne) IDX ¶
func (u *ActivityUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*ActivityUpsertOne) Ignore ¶
func (u *ActivityUpsertOne) Ignore() *ActivityUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Activity.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ActivityUpsertOne) SetBody ¶
func (u *ActivityUpsertOne) SetBody(v string) *ActivityUpsertOne
SetBody sets the "body" field.
func (*ActivityUpsertOne) SetCreatedAt ¶
func (u *ActivityUpsertOne) SetCreatedAt(v time.Time) *ActivityUpsertOne
SetCreatedAt sets the "created_at" field.
func (*ActivityUpsertOne) SetEmbedding1536 ¶
func (u *ActivityUpsertOne) SetEmbedding1536(v pgvector.Vector) *ActivityUpsertOne
SetEmbedding1536 sets the "embedding_1536" field.
func (*ActivityUpsertOne) SetEmbedding3072 ¶
func (u *ActivityUpsertOne) SetEmbedding3072(v pgvector.Vector) *ActivityUpsertOne
SetEmbedding3072 sets the "embedding_3072" field.
func (*ActivityUpsertOne) SetFullSummary ¶
func (u *ActivityUpsertOne) SetFullSummary(v string) *ActivityUpsertOne
SetFullSummary sets the "full_summary" field.
func (*ActivityUpsertOne) SetImageURL ¶
func (u *ActivityUpsertOne) SetImageURL(v string) *ActivityUpsertOne
SetImageURL sets the "image_url" field.
func (*ActivityUpsertOne) SetRawJSON ¶
func (u *ActivityUpsertOne) SetRawJSON(v string) *ActivityUpsertOne
SetRawJSON sets the "raw_json" field.
func (*ActivityUpsertOne) SetShortSummary ¶
func (u *ActivityUpsertOne) SetShortSummary(v string) *ActivityUpsertOne
SetShortSummary sets the "short_summary" field.
func (*ActivityUpsertOne) SetSocialScore ¶
func (u *ActivityUpsertOne) SetSocialScore(v float64) *ActivityUpsertOne
SetSocialScore sets the "social_score" field.
func (*ActivityUpsertOne) SetSourceType ¶
func (u *ActivityUpsertOne) SetSourceType(v string) *ActivityUpsertOne
SetSourceType sets the "source_type" field.
func (*ActivityUpsertOne) SetSourceUids ¶
func (u *ActivityUpsertOne) SetSourceUids(v []string) *ActivityUpsertOne
SetSourceUids sets the "source_uids" field.
func (*ActivityUpsertOne) SetTitle ¶
func (u *ActivityUpsertOne) SetTitle(v string) *ActivityUpsertOne
SetTitle sets the "title" field.
func (*ActivityUpsertOne) SetUID ¶
func (u *ActivityUpsertOne) SetUID(v string) *ActivityUpsertOne
SetUID sets the "uid" field.
func (*ActivityUpsertOne) SetURL ¶
func (u *ActivityUpsertOne) SetURL(v string) *ActivityUpsertOne
SetURL sets the "url" field.
func (*ActivityUpsertOne) SetUpdateCount ¶
func (u *ActivityUpsertOne) SetUpdateCount(v int) *ActivityUpsertOne
SetUpdateCount sets the "update_count" field.
func (*ActivityUpsertOne) Update ¶
func (u *ActivityUpsertOne) Update(set func(*ActivityUpsert)) *ActivityUpsertOne
Update allows overriding fields `UPDATE` values. See the ActivityCreate.OnConflict documentation for more info.
func (*ActivityUpsertOne) UpdateBody ¶
func (u *ActivityUpsertOne) UpdateBody() *ActivityUpsertOne
UpdateBody sets the "body" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateCreatedAt ¶
func (u *ActivityUpsertOne) UpdateCreatedAt() *ActivityUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateEmbedding1536 ¶
func (u *ActivityUpsertOne) UpdateEmbedding1536() *ActivityUpsertOne
UpdateEmbedding1536 sets the "embedding_1536" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateEmbedding3072 ¶
func (u *ActivityUpsertOne) UpdateEmbedding3072() *ActivityUpsertOne
UpdateEmbedding3072 sets the "embedding_3072" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateFullSummary ¶
func (u *ActivityUpsertOne) UpdateFullSummary() *ActivityUpsertOne
UpdateFullSummary sets the "full_summary" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateImageURL ¶
func (u *ActivityUpsertOne) UpdateImageURL() *ActivityUpsertOne
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateNewValues ¶
func (u *ActivityUpsertOne) UpdateNewValues() *ActivityUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Activity.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(activity.FieldID)
}),
).
Exec(ctx)
func (*ActivityUpsertOne) UpdateRawJSON ¶
func (u *ActivityUpsertOne) UpdateRawJSON() *ActivityUpsertOne
UpdateRawJSON sets the "raw_json" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateShortSummary ¶
func (u *ActivityUpsertOne) UpdateShortSummary() *ActivityUpsertOne
UpdateShortSummary sets the "short_summary" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateSocialScore ¶
func (u *ActivityUpsertOne) UpdateSocialScore() *ActivityUpsertOne
UpdateSocialScore sets the "social_score" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateSourceType ¶
func (u *ActivityUpsertOne) UpdateSourceType() *ActivityUpsertOne
UpdateSourceType sets the "source_type" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateSourceUids ¶
func (u *ActivityUpsertOne) UpdateSourceUids() *ActivityUpsertOne
UpdateSourceUids sets the "source_uids" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateTitle ¶
func (u *ActivityUpsertOne) UpdateTitle() *ActivityUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateUID ¶
func (u *ActivityUpsertOne) UpdateUID() *ActivityUpsertOne
UpdateUID sets the "uid" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateURL ¶
func (u *ActivityUpsertOne) UpdateURL() *ActivityUpsertOne
UpdateURL sets the "url" field to the value that was provided on create.
func (*ActivityUpsertOne) UpdateUpdateCount ¶
func (u *ActivityUpsertOne) UpdateUpdateCount() *ActivityUpsertOne
UpdateUpdateCount sets the "update_count" field to the value that was provided on create.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Activity is the client for interacting with the Activity builders.
Activity *ActivityClient
// Feed is the client for interacting with the Feed builders.
Feed *FeedClient
// Source is the client for interacting with the Source builders.
Source *SourceClient
// contains filtered or unexported fields
}
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
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) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Activity. 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(...)`.
type CommitFunc ¶
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.
type CommitHook ¶
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 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 string `json:"id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID string `json:"user_id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Icon holds the value of the "icon" field.
Icon string `json:"icon,omitempty"`
// Query holds the value of the "query" field.
Query string `json:"query,omitempty"`
// Public holds the value of the "public" field.
Public bool `json:"public,omitempty"`
// SourceUids holds the value of the "source_uids" field.
SourceUids []string `json:"source_uids,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) Unwrap ¶
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 (f *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.
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(f *Feed) *FeedDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FeedClient) DeleteOneID ¶
func (c *FeedClient) DeleteOneID(id string) *FeedDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FeedClient) GetX ¶
func (c *FeedClient) GetX(ctx context.Context, id string) *Feed
GetX is like Get, but panics if an error occurs.
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(f *Feed) *FeedUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FeedClient) UpdateOneID ¶
func (c *FeedClient) UpdateOneID(id string) *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 (fc *FeedCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FeedCreate) ExecX ¶
func (fc *FeedCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FeedCreate) Mutation ¶
func (fc *FeedCreate) Mutation() *FeedMutation
Mutation returns the FeedMutation object of the builder.
func (*FeedCreate) OnConflict ¶
func (fc *FeedCreate) OnConflict(opts ...sql.ConflictOption) *FeedUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Feed.Create().
SetUserID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.FeedUpsert) {
SetUserID(v+v).
}).
Exec(ctx)
func (*FeedCreate) OnConflictColumns ¶
func (fc *FeedCreate) OnConflictColumns(columns ...string) *FeedUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Feed.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FeedCreate) Save ¶
func (fc *FeedCreate) Save(ctx context.Context) (*Feed, error)
Save creates the Feed in the database.
func (*FeedCreate) SaveX ¶
func (fc *FeedCreate) SaveX(ctx context.Context) *Feed
SaveX calls Save and panics if Save returns an error.
func (*FeedCreate) SetCreatedAt ¶
func (fc *FeedCreate) SetCreatedAt(t time.Time) *FeedCreate
SetCreatedAt sets the "created_at" field.
func (*FeedCreate) SetID ¶
func (fc *FeedCreate) SetID(s string) *FeedCreate
SetID sets the "id" field.
func (*FeedCreate) SetIcon ¶
func (fc *FeedCreate) SetIcon(s string) *FeedCreate
SetIcon sets the "icon" field.
func (*FeedCreate) SetName ¶
func (fc *FeedCreate) SetName(s string) *FeedCreate
SetName sets the "name" field.
func (*FeedCreate) SetPublic ¶
func (fc *FeedCreate) SetPublic(b bool) *FeedCreate
SetPublic sets the "public" field.
func (*FeedCreate) SetQuery ¶
func (fc *FeedCreate) SetQuery(s string) *FeedCreate
SetQuery sets the "query" field.
func (*FeedCreate) SetSourceUids ¶
func (fc *FeedCreate) SetSourceUids(s []string) *FeedCreate
SetSourceUids sets the "source_uids" field.
func (*FeedCreate) SetUpdatedAt ¶
func (fc *FeedCreate) SetUpdatedAt(t time.Time) *FeedCreate
SetUpdatedAt sets the "updated_at" field.
func (*FeedCreate) SetUserID ¶
func (fc *FeedCreate) SetUserID(s string) *FeedCreate
SetUserID sets the "user_id" 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 (fcb *FeedCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FeedCreateBulk) ExecX ¶
func (fcb *FeedCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FeedCreateBulk) OnConflict ¶
func (fcb *FeedCreateBulk) OnConflict(opts ...sql.ConflictOption) *FeedUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Feed.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.FeedUpsert) {
SetUserID(v+v).
}).
Exec(ctx)
func (*FeedCreateBulk) OnConflictColumns ¶
func (fcb *FeedCreateBulk) OnConflictColumns(columns ...string) *FeedUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Feed.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type FeedDelete ¶
type FeedDelete struct {
// contains filtered or unexported fields
}
FeedDelete is the builder for deleting a Feed entity.
func (*FeedDelete) Exec ¶
func (fd *FeedDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FeedDelete) ExecX ¶
func (fd *FeedDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FeedDelete) Where ¶
func (fd *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 (fdo *FeedDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FeedDeleteOne) ExecX ¶
func (fdo *FeedDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FeedDeleteOne) Where ¶
func (fdo *FeedDeleteOne) Where(ps ...predicate.Feed) *FeedDeleteOne
Where appends a list predicates to the FeedDelete builder.
type FeedGroupBy ¶
type FeedGroupBy struct {
// contains filtered or unexported fields
}
FeedGroupBy is the group-by builder for Feed entities.
func (*FeedGroupBy) Aggregate ¶
func (fgb *FeedGroupBy) Aggregate(fns ...AggregateFunc) *FeedGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FeedGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FeedGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FeedGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FeedGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FeedGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FeedGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FeedGroupBy) Scan ¶
func (fgb *FeedGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FeedGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FeedMutation ¶
type FeedMutation struct {
// contains filtered or unexported fields
}
FeedMutation represents an operation that mutates the Feed nodes in the graph.
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) 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) AppendSourceUids ¶
func (m *FeedMutation) AppendSourceUids(s []string)
AppendSourceUids adds s to the "source_uids" field.
func (*FeedMutation) AppendedSourceUids ¶
func (m *FeedMutation) AppendedSourceUids() ([]string, bool)
AppendedSourceUids returns the list of values that were appended to the "source_uids" 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) CreatedAt ¶
func (m *FeedMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" 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) ID ¶
func (m *FeedMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FeedMutation) IDs ¶
func (m *FeedMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FeedMutation) Icon ¶
func (m *FeedMutation) Icon() (r string, exists bool)
Icon returns the value of the "icon" field in the mutation.
func (*FeedMutation) Name ¶
func (m *FeedMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FeedMutation) OldCreatedAt ¶
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) OldField ¶
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) OldIcon ¶
func (m *FeedMutation) OldIcon(ctx context.Context) (v string, err error)
OldIcon returns the old "icon" 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) OldName ¶
func (m *FeedMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" 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) OldPublic ¶
func (m *FeedMutation) OldPublic(ctx context.Context) (v bool, err error)
OldPublic returns the old "public" 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) OldQuery ¶
func (m *FeedMutation) OldQuery(ctx context.Context) (v string, err error)
OldQuery returns the old "query" 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) OldSourceUids ¶
func (m *FeedMutation) OldSourceUids(ctx context.Context) (v []string, err error)
OldSourceUids returns the old "source_uids" 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 ¶
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) OldUserID ¶
func (m *FeedMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" 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) Public ¶
func (m *FeedMutation) Public() (r bool, exists bool)
Public returns the value of the "public" field in the mutation.
func (*FeedMutation) Query ¶
func (m *FeedMutation) Query() (r string, exists bool)
Query returns the value of the "query" 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) ResetCreatedAt ¶
func (m *FeedMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" 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) ResetIcon ¶
func (m *FeedMutation) ResetIcon()
ResetIcon resets all changes to the "icon" field.
func (*FeedMutation) ResetName ¶
func (m *FeedMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FeedMutation) ResetPublic ¶
func (m *FeedMutation) ResetPublic()
ResetPublic resets all changes to the "public" field.
func (*FeedMutation) ResetQuery ¶
func (m *FeedMutation) ResetQuery()
ResetQuery resets all changes to the "query" field.
func (*FeedMutation) ResetSourceUids ¶
func (m *FeedMutation) ResetSourceUids()
ResetSourceUids resets all changes to the "source_uids" field.
func (*FeedMutation) ResetUpdatedAt ¶
func (m *FeedMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FeedMutation) ResetUserID ¶
func (m *FeedMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*FeedMutation) SetCreatedAt ¶
func (m *FeedMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" 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) SetID ¶
func (m *FeedMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Feed entities.
func (*FeedMutation) SetIcon ¶
func (m *FeedMutation) SetIcon(s string)
SetIcon sets the "icon" field.
func (*FeedMutation) SetName ¶
func (m *FeedMutation) SetName(s string)
SetName sets the "name" field.
func (*FeedMutation) SetOp ¶
func (m *FeedMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FeedMutation) SetPublic ¶
func (m *FeedMutation) SetPublic(b bool)
SetPublic sets the "public" field.
func (*FeedMutation) SetQuery ¶
func (m *FeedMutation) SetQuery(s string)
SetQuery sets the "query" field.
func (*FeedMutation) SetSourceUids ¶
func (m *FeedMutation) SetSourceUids(s []string)
SetSourceUids sets the "source_uids" field.
func (*FeedMutation) SetUpdatedAt ¶
func (m *FeedMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FeedMutation) SetUserID ¶
func (m *FeedMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*FeedMutation) SourceUids ¶
func (m *FeedMutation) SourceUids() (r []string, exists bool)
SourceUids returns the value of the "source_uids" 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) UserID ¶
func (m *FeedMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" 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 (fq *FeedQuery) Aggregate(fns ...AggregateFunc) *FeedSelect
Aggregate returns a FeedSelect configured with the given aggregations.
func (*FeedQuery) Clone ¶
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) First ¶
First returns the first Feed entity from the query. Returns a *NotFoundError when no Feed was found.
func (*FeedQuery) FirstID ¶
FirstID returns the first Feed ID from the query. Returns a *NotFoundError when no Feed ID was found.
func (*FeedQuery) GroupBy ¶
func (fq *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 {
UserID string `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Feed.Query().
GroupBy(feed.FieldUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*FeedQuery) Only ¶
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 ¶
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) Order ¶
func (fq *FeedQuery) Order(o ...feed.OrderOption) *FeedQuery
Order specifies how the records should be ordered.
func (*FeedQuery) Select ¶
func (fq *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 {
UserID string `json:"user_id,omitempty"`
}
client.Feed.Query().
Select(feed.FieldUserID).
Scan(ctx, &v)
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 (fs *FeedSelect) Aggregate(fns ...AggregateFunc) *FeedSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FeedSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FeedSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FeedSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FeedSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FeedSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FeedSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FeedSelect) Scan ¶
func (fs *FeedSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FeedSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FeedUpdate ¶
type FeedUpdate struct {
// contains filtered or unexported fields
}
FeedUpdate is the builder for updating Feed entities.
func (*FeedUpdate) AppendSourceUids ¶
func (fu *FeedUpdate) AppendSourceUids(s []string) *FeedUpdate
AppendSourceUids appends s to the "source_uids" field.
func (*FeedUpdate) Exec ¶
func (fu *FeedUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FeedUpdate) ExecX ¶
func (fu *FeedUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FeedUpdate) Mutation ¶
func (fu *FeedUpdate) Mutation() *FeedMutation
Mutation returns the FeedMutation object of the builder.
func (*FeedUpdate) Save ¶
func (fu *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 (fu *FeedUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FeedUpdate) SetCreatedAt ¶
func (fu *FeedUpdate) SetCreatedAt(t time.Time) *FeedUpdate
SetCreatedAt sets the "created_at" field.
func (*FeedUpdate) SetIcon ¶
func (fu *FeedUpdate) SetIcon(s string) *FeedUpdate
SetIcon sets the "icon" field.
func (*FeedUpdate) SetName ¶
func (fu *FeedUpdate) SetName(s string) *FeedUpdate
SetName sets the "name" field.
func (*FeedUpdate) SetNillableCreatedAt ¶
func (fu *FeedUpdate) SetNillableCreatedAt(t *time.Time) *FeedUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FeedUpdate) SetNillableIcon ¶
func (fu *FeedUpdate) SetNillableIcon(s *string) *FeedUpdate
SetNillableIcon sets the "icon" field if the given value is not nil.
func (*FeedUpdate) SetNillableName ¶
func (fu *FeedUpdate) SetNillableName(s *string) *FeedUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*FeedUpdate) SetNillablePublic ¶
func (fu *FeedUpdate) SetNillablePublic(b *bool) *FeedUpdate
SetNillablePublic sets the "public" field if the given value is not nil.
func (*FeedUpdate) SetNillableQuery ¶
func (fu *FeedUpdate) SetNillableQuery(s *string) *FeedUpdate
SetNillableQuery sets the "query" field if the given value is not nil.
func (*FeedUpdate) SetNillableUpdatedAt ¶
func (fu *FeedUpdate) SetNillableUpdatedAt(t *time.Time) *FeedUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FeedUpdate) SetNillableUserID ¶
func (fu *FeedUpdate) SetNillableUserID(s *string) *FeedUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*FeedUpdate) SetPublic ¶
func (fu *FeedUpdate) SetPublic(b bool) *FeedUpdate
SetPublic sets the "public" field.
func (*FeedUpdate) SetQuery ¶
func (fu *FeedUpdate) SetQuery(s string) *FeedUpdate
SetQuery sets the "query" field.
func (*FeedUpdate) SetSourceUids ¶
func (fu *FeedUpdate) SetSourceUids(s []string) *FeedUpdate
SetSourceUids sets the "source_uids" field.
func (*FeedUpdate) SetUpdatedAt ¶
func (fu *FeedUpdate) SetUpdatedAt(t time.Time) *FeedUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FeedUpdate) SetUserID ¶
func (fu *FeedUpdate) SetUserID(s string) *FeedUpdate
SetUserID sets the "user_id" field.
func (*FeedUpdate) Where ¶
func (fu *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) AppendSourceUids ¶
func (fuo *FeedUpdateOne) AppendSourceUids(s []string) *FeedUpdateOne
AppendSourceUids appends s to the "source_uids" field.
func (*FeedUpdateOne) Exec ¶
func (fuo *FeedUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FeedUpdateOne) ExecX ¶
func (fuo *FeedUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FeedUpdateOne) Mutation ¶
func (fuo *FeedUpdateOne) Mutation() *FeedMutation
Mutation returns the FeedMutation object of the builder.
func (*FeedUpdateOne) Save ¶
func (fuo *FeedUpdateOne) Save(ctx context.Context) (*Feed, error)
Save executes the query and returns the updated Feed entity.
func (*FeedUpdateOne) SaveX ¶
func (fuo *FeedUpdateOne) SaveX(ctx context.Context) *Feed
SaveX is like Save, but panics if an error occurs.
func (*FeedUpdateOne) Select ¶
func (fuo *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) SetCreatedAt ¶
func (fuo *FeedUpdateOne) SetCreatedAt(t time.Time) *FeedUpdateOne
SetCreatedAt sets the "created_at" field.
func (*FeedUpdateOne) SetIcon ¶
func (fuo *FeedUpdateOne) SetIcon(s string) *FeedUpdateOne
SetIcon sets the "icon" field.
func (*FeedUpdateOne) SetName ¶
func (fuo *FeedUpdateOne) SetName(s string) *FeedUpdateOne
SetName sets the "name" field.
func (*FeedUpdateOne) SetNillableCreatedAt ¶
func (fuo *FeedUpdateOne) SetNillableCreatedAt(t *time.Time) *FeedUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FeedUpdateOne) SetNillableIcon ¶
func (fuo *FeedUpdateOne) SetNillableIcon(s *string) *FeedUpdateOne
SetNillableIcon sets the "icon" field if the given value is not nil.
func (*FeedUpdateOne) SetNillableName ¶
func (fuo *FeedUpdateOne) SetNillableName(s *string) *FeedUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*FeedUpdateOne) SetNillablePublic ¶
func (fuo *FeedUpdateOne) SetNillablePublic(b *bool) *FeedUpdateOne
SetNillablePublic sets the "public" field if the given value is not nil.
func (*FeedUpdateOne) SetNillableQuery ¶
func (fuo *FeedUpdateOne) SetNillableQuery(s *string) *FeedUpdateOne
SetNillableQuery sets the "query" field if the given value is not nil.
func (*FeedUpdateOne) SetNillableUpdatedAt ¶
func (fuo *FeedUpdateOne) SetNillableUpdatedAt(t *time.Time) *FeedUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FeedUpdateOne) SetNillableUserID ¶
func (fuo *FeedUpdateOne) SetNillableUserID(s *string) *FeedUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*FeedUpdateOne) SetPublic ¶
func (fuo *FeedUpdateOne) SetPublic(b bool) *FeedUpdateOne
SetPublic sets the "public" field.
func (*FeedUpdateOne) SetQuery ¶
func (fuo *FeedUpdateOne) SetQuery(s string) *FeedUpdateOne
SetQuery sets the "query" field.
func (*FeedUpdateOne) SetSourceUids ¶
func (fuo *FeedUpdateOne) SetSourceUids(s []string) *FeedUpdateOne
SetSourceUids sets the "source_uids" field.
func (*FeedUpdateOne) SetUpdatedAt ¶
func (fuo *FeedUpdateOne) SetUpdatedAt(t time.Time) *FeedUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FeedUpdateOne) SetUserID ¶
func (fuo *FeedUpdateOne) SetUserID(s string) *FeedUpdateOne
SetUserID sets the "user_id" field.
func (*FeedUpdateOne) Where ¶
func (fuo *FeedUpdateOne) Where(ps ...predicate.Feed) *FeedUpdateOne
Where appends a list predicates to the FeedUpdate builder.
type FeedUpsert ¶
FeedUpsert is the "OnConflict" setter.
func (*FeedUpsert) SetCreatedAt ¶
func (u *FeedUpsert) SetCreatedAt(v time.Time) *FeedUpsert
SetCreatedAt sets the "created_at" field.
func (*FeedUpsert) SetIcon ¶
func (u *FeedUpsert) SetIcon(v string) *FeedUpsert
SetIcon sets the "icon" field.
func (*FeedUpsert) SetName ¶
func (u *FeedUpsert) SetName(v string) *FeedUpsert
SetName sets the "name" field.
func (*FeedUpsert) SetPublic ¶
func (u *FeedUpsert) SetPublic(v bool) *FeedUpsert
SetPublic sets the "public" field.
func (*FeedUpsert) SetQuery ¶
func (u *FeedUpsert) SetQuery(v string) *FeedUpsert
SetQuery sets the "query" field.
func (*FeedUpsert) SetSourceUids ¶
func (u *FeedUpsert) SetSourceUids(v []string) *FeedUpsert
SetSourceUids sets the "source_uids" field.
func (*FeedUpsert) SetUpdatedAt ¶
func (u *FeedUpsert) SetUpdatedAt(v time.Time) *FeedUpsert
SetUpdatedAt sets the "updated_at" field.
func (*FeedUpsert) SetUserID ¶
func (u *FeedUpsert) SetUserID(v string) *FeedUpsert
SetUserID sets the "user_id" field.
func (*FeedUpsert) UpdateCreatedAt ¶
func (u *FeedUpsert) UpdateCreatedAt() *FeedUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FeedUpsert) UpdateIcon ¶
func (u *FeedUpsert) UpdateIcon() *FeedUpsert
UpdateIcon sets the "icon" field to the value that was provided on create.
func (*FeedUpsert) UpdateName ¶
func (u *FeedUpsert) UpdateName() *FeedUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*FeedUpsert) UpdatePublic ¶
func (u *FeedUpsert) UpdatePublic() *FeedUpsert
UpdatePublic sets the "public" field to the value that was provided on create.
func (*FeedUpsert) UpdateQuery ¶
func (u *FeedUpsert) UpdateQuery() *FeedUpsert
UpdateQuery sets the "query" field to the value that was provided on create.
func (*FeedUpsert) UpdateSourceUids ¶
func (u *FeedUpsert) UpdateSourceUids() *FeedUpsert
UpdateSourceUids sets the "source_uids" field to the value that was provided on create.
func (*FeedUpsert) UpdateUpdatedAt ¶
func (u *FeedUpsert) UpdateUpdatedAt() *FeedUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FeedUpsert) UpdateUserID ¶
func (u *FeedUpsert) UpdateUserID() *FeedUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type FeedUpsertBulk ¶
type FeedUpsertBulk struct {
// contains filtered or unexported fields
}
FeedUpsertBulk is the builder for "upsert"-ing a bulk of Feed nodes.
func (*FeedUpsertBulk) DoNothing ¶
func (u *FeedUpsertBulk) DoNothing() *FeedUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FeedUpsertBulk) Exec ¶
func (u *FeedUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FeedUpsertBulk) ExecX ¶
func (u *FeedUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FeedUpsertBulk) Ignore ¶
func (u *FeedUpsertBulk) Ignore() *FeedUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Feed.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FeedUpsertBulk) SetCreatedAt ¶
func (u *FeedUpsertBulk) SetCreatedAt(v time.Time) *FeedUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*FeedUpsertBulk) SetIcon ¶
func (u *FeedUpsertBulk) SetIcon(v string) *FeedUpsertBulk
SetIcon sets the "icon" field.
func (*FeedUpsertBulk) SetName ¶
func (u *FeedUpsertBulk) SetName(v string) *FeedUpsertBulk
SetName sets the "name" field.
func (*FeedUpsertBulk) SetPublic ¶
func (u *FeedUpsertBulk) SetPublic(v bool) *FeedUpsertBulk
SetPublic sets the "public" field.
func (*FeedUpsertBulk) SetQuery ¶
func (u *FeedUpsertBulk) SetQuery(v string) *FeedUpsertBulk
SetQuery sets the "query" field.
func (*FeedUpsertBulk) SetSourceUids ¶
func (u *FeedUpsertBulk) SetSourceUids(v []string) *FeedUpsertBulk
SetSourceUids sets the "source_uids" field.
func (*FeedUpsertBulk) SetUpdatedAt ¶
func (u *FeedUpsertBulk) SetUpdatedAt(v time.Time) *FeedUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*FeedUpsertBulk) SetUserID ¶
func (u *FeedUpsertBulk) SetUserID(v string) *FeedUpsertBulk
SetUserID sets the "user_id" field.
func (*FeedUpsertBulk) Update ¶
func (u *FeedUpsertBulk) Update(set func(*FeedUpsert)) *FeedUpsertBulk
Update allows overriding fields `UPDATE` values. See the FeedCreateBulk.OnConflict documentation for more info.
func (*FeedUpsertBulk) UpdateCreatedAt ¶
func (u *FeedUpsertBulk) UpdateCreatedAt() *FeedUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FeedUpsertBulk) UpdateIcon ¶
func (u *FeedUpsertBulk) UpdateIcon() *FeedUpsertBulk
UpdateIcon sets the "icon" field to the value that was provided on create.
func (*FeedUpsertBulk) UpdateName ¶
func (u *FeedUpsertBulk) UpdateName() *FeedUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*FeedUpsertBulk) UpdateNewValues ¶
func (u *FeedUpsertBulk) UpdateNewValues() *FeedUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Feed.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(feed.FieldID)
}),
).
Exec(ctx)
func (*FeedUpsertBulk) UpdatePublic ¶
func (u *FeedUpsertBulk) UpdatePublic() *FeedUpsertBulk
UpdatePublic sets the "public" field to the value that was provided on create.
func (*FeedUpsertBulk) UpdateQuery ¶
func (u *FeedUpsertBulk) UpdateQuery() *FeedUpsertBulk
UpdateQuery sets the "query" field to the value that was provided on create.
func (*FeedUpsertBulk) UpdateSourceUids ¶
func (u *FeedUpsertBulk) UpdateSourceUids() *FeedUpsertBulk
UpdateSourceUids sets the "source_uids" field to the value that was provided on create.
func (*FeedUpsertBulk) UpdateUpdatedAt ¶
func (u *FeedUpsertBulk) UpdateUpdatedAt() *FeedUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FeedUpsertBulk) UpdateUserID ¶
func (u *FeedUpsertBulk) UpdateUserID() *FeedUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type FeedUpsertOne ¶
type FeedUpsertOne struct {
// contains filtered or unexported fields
}
FeedUpsertOne is the builder for "upsert"-ing
one Feed node.
func (*FeedUpsertOne) DoNothing ¶
func (u *FeedUpsertOne) DoNothing() *FeedUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FeedUpsertOne) Exec ¶
func (u *FeedUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FeedUpsertOne) ExecX ¶
func (u *FeedUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FeedUpsertOne) ID ¶
func (u *FeedUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FeedUpsertOne) IDX ¶
func (u *FeedUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*FeedUpsertOne) Ignore ¶
func (u *FeedUpsertOne) Ignore() *FeedUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Feed.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*FeedUpsertOne) SetCreatedAt ¶
func (u *FeedUpsertOne) SetCreatedAt(v time.Time) *FeedUpsertOne
SetCreatedAt sets the "created_at" field.
func (*FeedUpsertOne) SetIcon ¶
func (u *FeedUpsertOne) SetIcon(v string) *FeedUpsertOne
SetIcon sets the "icon" field.
func (*FeedUpsertOne) SetName ¶
func (u *FeedUpsertOne) SetName(v string) *FeedUpsertOne
SetName sets the "name" field.
func (*FeedUpsertOne) SetPublic ¶
func (u *FeedUpsertOne) SetPublic(v bool) *FeedUpsertOne
SetPublic sets the "public" field.
func (*FeedUpsertOne) SetQuery ¶
func (u *FeedUpsertOne) SetQuery(v string) *FeedUpsertOne
SetQuery sets the "query" field.
func (*FeedUpsertOne) SetSourceUids ¶
func (u *FeedUpsertOne) SetSourceUids(v []string) *FeedUpsertOne
SetSourceUids sets the "source_uids" field.
func (*FeedUpsertOne) SetUpdatedAt ¶
func (u *FeedUpsertOne) SetUpdatedAt(v time.Time) *FeedUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*FeedUpsertOne) SetUserID ¶
func (u *FeedUpsertOne) SetUserID(v string) *FeedUpsertOne
SetUserID sets the "user_id" field.
func (*FeedUpsertOne) Update ¶
func (u *FeedUpsertOne) Update(set func(*FeedUpsert)) *FeedUpsertOne
Update allows overriding fields `UPDATE` values. See the FeedCreate.OnConflict documentation for more info.
func (*FeedUpsertOne) UpdateCreatedAt ¶
func (u *FeedUpsertOne) UpdateCreatedAt() *FeedUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FeedUpsertOne) UpdateIcon ¶
func (u *FeedUpsertOne) UpdateIcon() *FeedUpsertOne
UpdateIcon sets the "icon" field to the value that was provided on create.
func (*FeedUpsertOne) UpdateName ¶
func (u *FeedUpsertOne) UpdateName() *FeedUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*FeedUpsertOne) UpdateNewValues ¶
func (u *FeedUpsertOne) UpdateNewValues() *FeedUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Feed.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(feed.FieldID)
}),
).
Exec(ctx)
func (*FeedUpsertOne) UpdatePublic ¶
func (u *FeedUpsertOne) UpdatePublic() *FeedUpsertOne
UpdatePublic sets the "public" field to the value that was provided on create.
func (*FeedUpsertOne) UpdateQuery ¶
func (u *FeedUpsertOne) UpdateQuery() *FeedUpsertOne
UpdateQuery sets the "query" field to the value that was provided on create.
func (*FeedUpsertOne) UpdateSourceUids ¶
func (u *FeedUpsertOne) UpdateSourceUids() *FeedUpsertOne
UpdateSourceUids sets the "source_uids" field to the value that was provided on create.
func (*FeedUpsertOne) UpdateUpdatedAt ¶
func (u *FeedUpsertOne) UpdateUpdatedAt() *FeedUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FeedUpsertOne) UpdateUserID ¶
func (u *FeedUpsertOne) UpdateUserID() *FeedUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
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 NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
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 ¶
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.
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 ¶
Rollbacker is the interface that wraps the Rollback method.
type Source ¶
type Source struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// URL holds the value of the "url" field.
URL string `json:"url,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// RawJSON holds the value of the "raw_json" field.
RawJSON string `json:"raw_json,omitempty"`
// contains filtered or unexported fields
}
Source is the model entity for the Source schema.
func (*Source) Unwrap ¶
Unwrap unwraps the Source 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 (*Source) Update ¶
func (s *Source) Update() *SourceUpdateOne
Update returns a builder for updating this Source. Note that you need to call Source.Unwrap() before calling this method if this Source was returned from a transaction, and the transaction was committed or rolled back.
type SourceClient ¶
type SourceClient struct {
// contains filtered or unexported fields
}
SourceClient is a client for the Source schema.
func NewSourceClient ¶
func NewSourceClient(c config) *SourceClient
NewSourceClient returns a client for the Source from the given config.
func (*SourceClient) Create ¶
func (c *SourceClient) Create() *SourceCreate
Create returns a builder for creating a Source entity.
func (*SourceClient) CreateBulk ¶
func (c *SourceClient) CreateBulk(builders ...*SourceCreate) *SourceCreateBulk
CreateBulk returns a builder for creating a bulk of Source entities.
func (*SourceClient) Delete ¶
func (c *SourceClient) Delete() *SourceDelete
Delete returns a delete builder for Source.
func (*SourceClient) DeleteOne ¶
func (c *SourceClient) DeleteOne(s *Source) *SourceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SourceClient) DeleteOneID ¶
func (c *SourceClient) DeleteOneID(id string) *SourceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SourceClient) GetX ¶
func (c *SourceClient) GetX(ctx context.Context, id string) *Source
GetX is like Get, but panics if an error occurs.
func (*SourceClient) Intercept ¶
func (c *SourceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `source.Intercept(f(g(h())))`.
func (*SourceClient) Interceptors ¶
func (c *SourceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SourceClient) MapCreateBulk ¶
func (c *SourceClient) MapCreateBulk(slice any, setFunc func(*SourceCreate, int)) *SourceCreateBulk
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 (*SourceClient) Query ¶
func (c *SourceClient) Query() *SourceQuery
Query returns a query builder for Source.
func (*SourceClient) Update ¶
func (c *SourceClient) Update() *SourceUpdate
Update returns an update builder for Source.
func (*SourceClient) UpdateOne ¶
func (c *SourceClient) UpdateOne(s *Source) *SourceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SourceClient) UpdateOneID ¶
func (c *SourceClient) UpdateOneID(id string) *SourceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SourceClient) Use ¶
func (c *SourceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `source.Hooks(f(g(h())))`.
type SourceCreate ¶
type SourceCreate struct {
// contains filtered or unexported fields
}
SourceCreate is the builder for creating a Source entity.
func (*SourceCreate) Exec ¶
func (sc *SourceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceCreate) ExecX ¶
func (sc *SourceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceCreate) Mutation ¶
func (sc *SourceCreate) Mutation() *SourceMutation
Mutation returns the SourceMutation object of the builder.
func (*SourceCreate) OnConflict ¶
func (sc *SourceCreate) OnConflict(opts ...sql.ConflictOption) *SourceUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Source.Create().
SetName(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SourceUpsert) {
SetName(v+v).
}).
Exec(ctx)
func (*SourceCreate) OnConflictColumns ¶
func (sc *SourceCreate) OnConflictColumns(columns ...string) *SourceUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Source.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SourceCreate) Save ¶
func (sc *SourceCreate) Save(ctx context.Context) (*Source, error)
Save creates the Source in the database.
func (*SourceCreate) SaveX ¶
func (sc *SourceCreate) SaveX(ctx context.Context) *Source
SaveX calls Save and panics if Save returns an error.
func (*SourceCreate) SetID ¶
func (sc *SourceCreate) SetID(s string) *SourceCreate
SetID sets the "id" field.
func (*SourceCreate) SetName ¶
func (sc *SourceCreate) SetName(s string) *SourceCreate
SetName sets the "name" field.
func (*SourceCreate) SetRawJSON ¶
func (sc *SourceCreate) SetRawJSON(s string) *SourceCreate
SetRawJSON sets the "raw_json" field.
func (*SourceCreate) SetType ¶
func (sc *SourceCreate) SetType(s string) *SourceCreate
SetType sets the "type" field.
func (*SourceCreate) SetURL ¶
func (sc *SourceCreate) SetURL(s string) *SourceCreate
SetURL sets the "url" field.
type SourceCreateBulk ¶
type SourceCreateBulk struct {
// contains filtered or unexported fields
}
SourceCreateBulk is the builder for creating many Source entities in bulk.
func (*SourceCreateBulk) Exec ¶
func (scb *SourceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceCreateBulk) ExecX ¶
func (scb *SourceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceCreateBulk) OnConflict ¶
func (scb *SourceCreateBulk) OnConflict(opts ...sql.ConflictOption) *SourceUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Source.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SourceUpsert) {
SetName(v+v).
}).
Exec(ctx)
func (*SourceCreateBulk) OnConflictColumns ¶
func (scb *SourceCreateBulk) OnConflictColumns(columns ...string) *SourceUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Source.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type SourceDelete ¶
type SourceDelete struct {
// contains filtered or unexported fields
}
SourceDelete is the builder for deleting a Source entity.
func (*SourceDelete) Exec ¶
func (sd *SourceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SourceDelete) ExecX ¶
func (sd *SourceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SourceDelete) Where ¶
func (sd *SourceDelete) Where(ps ...predicate.Source) *SourceDelete
Where appends a list predicates to the SourceDelete builder.
type SourceDeleteOne ¶
type SourceDeleteOne struct {
// contains filtered or unexported fields
}
SourceDeleteOne is the builder for deleting a single Source entity.
func (*SourceDeleteOne) Exec ¶
func (sdo *SourceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SourceDeleteOne) ExecX ¶
func (sdo *SourceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceDeleteOne) Where ¶
func (sdo *SourceDeleteOne) Where(ps ...predicate.Source) *SourceDeleteOne
Where appends a list predicates to the SourceDelete builder.
type SourceGroupBy ¶
type SourceGroupBy struct {
// contains filtered or unexported fields
}
SourceGroupBy is the group-by builder for Source entities.
func (*SourceGroupBy) Aggregate ¶
func (sgb *SourceGroupBy) Aggregate(fns ...AggregateFunc) *SourceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SourceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Scan ¶
func (sgb *SourceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SourceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SourceMutation ¶
type SourceMutation struct {
// contains filtered or unexported fields
}
SourceMutation represents an operation that mutates the Source nodes in the graph.
func (*SourceMutation) AddField ¶
func (m *SourceMutation) 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 (*SourceMutation) AddedEdges ¶
func (m *SourceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SourceMutation) AddedField ¶
func (m *SourceMutation) 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 (*SourceMutation) AddedFields ¶
func (m *SourceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SourceMutation) AddedIDs ¶
func (m *SourceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SourceMutation) ClearEdge ¶
func (m *SourceMutation) 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 (*SourceMutation) ClearField ¶
func (m *SourceMutation) 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 (*SourceMutation) ClearedEdges ¶
func (m *SourceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SourceMutation) ClearedFields ¶
func (m *SourceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SourceMutation) Client ¶
func (m SourceMutation) 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 (*SourceMutation) EdgeCleared ¶
func (m *SourceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SourceMutation) Field ¶
func (m *SourceMutation) 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 (*SourceMutation) FieldCleared ¶
func (m *SourceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SourceMutation) Fields ¶
func (m *SourceMutation) 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 (*SourceMutation) GetType ¶
func (m *SourceMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*SourceMutation) ID ¶
func (m *SourceMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SourceMutation) IDs ¶
func (m *SourceMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SourceMutation) Name ¶
func (m *SourceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SourceMutation) OldField ¶
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 (*SourceMutation) OldName ¶
func (m *SourceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SourceMutation) OldRawJSON ¶
func (m *SourceMutation) OldRawJSON(ctx context.Context) (v string, err error)
OldRawJSON returns the old "raw_json" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SourceMutation) OldType ¶
func (m *SourceMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SourceMutation) OldURL ¶
func (m *SourceMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the Source entity. If the Source object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SourceMutation) RawJSON ¶
func (m *SourceMutation) RawJSON() (r string, exists bool)
RawJSON returns the value of the "raw_json" field in the mutation.
func (*SourceMutation) RemovedEdges ¶
func (m *SourceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SourceMutation) RemovedIDs ¶
func (m *SourceMutation) 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 (*SourceMutation) ResetEdge ¶
func (m *SourceMutation) 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 (*SourceMutation) ResetField ¶
func (m *SourceMutation) 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 (*SourceMutation) ResetName ¶
func (m *SourceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SourceMutation) ResetRawJSON ¶
func (m *SourceMutation) ResetRawJSON()
ResetRawJSON resets all changes to the "raw_json" field.
func (*SourceMutation) ResetType ¶
func (m *SourceMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*SourceMutation) ResetURL ¶
func (m *SourceMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*SourceMutation) SetField ¶
func (m *SourceMutation) 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 (*SourceMutation) SetID ¶
func (m *SourceMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Source entities.
func (*SourceMutation) SetName ¶
func (m *SourceMutation) SetName(s string)
SetName sets the "name" field.
func (*SourceMutation) SetOp ¶
func (m *SourceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SourceMutation) SetRawJSON ¶
func (m *SourceMutation) SetRawJSON(s string)
SetRawJSON sets the "raw_json" field.
func (*SourceMutation) SetType ¶
func (m *SourceMutation) SetType(s string)
SetType sets the "type" field.
func (*SourceMutation) SetURL ¶
func (m *SourceMutation) SetURL(s string)
SetURL sets the "url" field.
func (SourceMutation) Tx ¶
func (m SourceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SourceMutation) Type ¶
func (m *SourceMutation) Type() string
Type returns the node type of this mutation (Source).
func (*SourceMutation) URL ¶
func (m *SourceMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*SourceMutation) Where ¶
func (m *SourceMutation) Where(ps ...predicate.Source)
Where appends a list predicates to the SourceMutation builder.
func (*SourceMutation) WhereP ¶
func (m *SourceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SourceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SourceQuery ¶
type SourceQuery struct {
// contains filtered or unexported fields
}
SourceQuery is the builder for querying Source entities.
func (*SourceQuery) Aggregate ¶
func (sq *SourceQuery) Aggregate(fns ...AggregateFunc) *SourceSelect
Aggregate returns a SourceSelect configured with the given aggregations.
func (*SourceQuery) All ¶
func (sq *SourceQuery) All(ctx context.Context) ([]*Source, error)
All executes the query and returns a list of Sources.
func (*SourceQuery) AllX ¶
func (sq *SourceQuery) AllX(ctx context.Context) []*Source
AllX is like All, but panics if an error occurs.
func (*SourceQuery) Clone ¶
func (sq *SourceQuery) Clone() *SourceQuery
Clone returns a duplicate of the SourceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SourceQuery) Count ¶
func (sq *SourceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SourceQuery) CountX ¶
func (sq *SourceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SourceQuery) Exist ¶
func (sq *SourceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SourceQuery) ExistX ¶
func (sq *SourceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SourceQuery) First ¶
func (sq *SourceQuery) First(ctx context.Context) (*Source, error)
First returns the first Source entity from the query. Returns a *NotFoundError when no Source was found.
func (*SourceQuery) FirstID ¶
func (sq *SourceQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Source ID from the query. Returns a *NotFoundError when no Source ID was found.
func (*SourceQuery) FirstIDX ¶
func (sq *SourceQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*SourceQuery) FirstX ¶
func (sq *SourceQuery) FirstX(ctx context.Context) *Source
FirstX is like First, but panics if an error occurs.
func (*SourceQuery) GroupBy ¶
func (sq *SourceQuery) GroupBy(field string, fields ...string) *SourceGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.Source.Query().
GroupBy(source.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SourceQuery) IDs ¶
func (sq *SourceQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Source IDs.
func (*SourceQuery) IDsX ¶
func (sq *SourceQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*SourceQuery) Limit ¶
func (sq *SourceQuery) Limit(limit int) *SourceQuery
Limit the number of records to be returned by this query.
func (*SourceQuery) Offset ¶
func (sq *SourceQuery) Offset(offset int) *SourceQuery
Offset to start from.
func (*SourceQuery) Only ¶
func (sq *SourceQuery) Only(ctx context.Context) (*Source, error)
Only returns a single Source entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Source entity is found. Returns a *NotFoundError when no Source entities are found.
func (*SourceQuery) OnlyID ¶
func (sq *SourceQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Source ID in the query. Returns a *NotSingularError when more than one Source ID is found. Returns a *NotFoundError when no entities are found.
func (*SourceQuery) OnlyIDX ¶
func (sq *SourceQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SourceQuery) OnlyX ¶
func (sq *SourceQuery) OnlyX(ctx context.Context) *Source
OnlyX is like Only, but panics if an error occurs.
func (*SourceQuery) Order ¶
func (sq *SourceQuery) Order(o ...source.OrderOption) *SourceQuery
Order specifies how the records should be ordered.
func (*SourceQuery) Select ¶
func (sq *SourceQuery) Select(fields ...string) *SourceSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.Source.Query().
Select(source.FieldName).
Scan(ctx, &v)
func (*SourceQuery) Unique ¶
func (sq *SourceQuery) Unique(unique bool) *SourceQuery
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 (*SourceQuery) Where ¶
func (sq *SourceQuery) Where(ps ...predicate.Source) *SourceQuery
Where adds a new predicate for the SourceQuery builder.
type SourceSelect ¶
type SourceSelect struct {
*SourceQuery
// contains filtered or unexported fields
}
SourceSelect is the builder for selecting fields of Source entities.
func (*SourceSelect) Aggregate ¶
func (ss *SourceSelect) Aggregate(fns ...AggregateFunc) *SourceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SourceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Scan ¶
func (ss *SourceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SourceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SourceUpdate ¶
type SourceUpdate struct {
// contains filtered or unexported fields
}
SourceUpdate is the builder for updating Source entities.
func (*SourceUpdate) Exec ¶
func (su *SourceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceUpdate) ExecX ¶
func (su *SourceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceUpdate) Mutation ¶
func (su *SourceUpdate) Mutation() *SourceMutation
Mutation returns the SourceMutation object of the builder.
func (*SourceUpdate) Save ¶
func (su *SourceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SourceUpdate) SaveX ¶
func (su *SourceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SourceUpdate) SetName ¶
func (su *SourceUpdate) SetName(s string) *SourceUpdate
SetName sets the "name" field.
func (*SourceUpdate) SetNillableName ¶
func (su *SourceUpdate) SetNillableName(s *string) *SourceUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*SourceUpdate) SetNillableRawJSON ¶
func (su *SourceUpdate) SetNillableRawJSON(s *string) *SourceUpdate
SetNillableRawJSON sets the "raw_json" field if the given value is not nil.
func (*SourceUpdate) SetNillableType ¶
func (su *SourceUpdate) SetNillableType(s *string) *SourceUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*SourceUpdate) SetNillableURL ¶
func (su *SourceUpdate) SetNillableURL(s *string) *SourceUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*SourceUpdate) SetRawJSON ¶
func (su *SourceUpdate) SetRawJSON(s string) *SourceUpdate
SetRawJSON sets the "raw_json" field.
func (*SourceUpdate) SetType ¶
func (su *SourceUpdate) SetType(s string) *SourceUpdate
SetType sets the "type" field.
func (*SourceUpdate) SetURL ¶
func (su *SourceUpdate) SetURL(s string) *SourceUpdate
SetURL sets the "url" field.
func (*SourceUpdate) Where ¶
func (su *SourceUpdate) Where(ps ...predicate.Source) *SourceUpdate
Where appends a list predicates to the SourceUpdate builder.
type SourceUpdateOne ¶
type SourceUpdateOne struct {
// contains filtered or unexported fields
}
SourceUpdateOne is the builder for updating a single Source entity.
func (*SourceUpdateOne) Exec ¶
func (suo *SourceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SourceUpdateOne) ExecX ¶
func (suo *SourceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceUpdateOne) Mutation ¶
func (suo *SourceUpdateOne) Mutation() *SourceMutation
Mutation returns the SourceMutation object of the builder.
func (*SourceUpdateOne) Save ¶
func (suo *SourceUpdateOne) Save(ctx context.Context) (*Source, error)
Save executes the query and returns the updated Source entity.
func (*SourceUpdateOne) SaveX ¶
func (suo *SourceUpdateOne) SaveX(ctx context.Context) *Source
SaveX is like Save, but panics if an error occurs.
func (*SourceUpdateOne) Select ¶
func (suo *SourceUpdateOne) Select(field string, fields ...string) *SourceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SourceUpdateOne) SetName ¶
func (suo *SourceUpdateOne) SetName(s string) *SourceUpdateOne
SetName sets the "name" field.
func (*SourceUpdateOne) SetNillableName ¶
func (suo *SourceUpdateOne) SetNillableName(s *string) *SourceUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*SourceUpdateOne) SetNillableRawJSON ¶
func (suo *SourceUpdateOne) SetNillableRawJSON(s *string) *SourceUpdateOne
SetNillableRawJSON sets the "raw_json" field if the given value is not nil.
func (*SourceUpdateOne) SetNillableType ¶
func (suo *SourceUpdateOne) SetNillableType(s *string) *SourceUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*SourceUpdateOne) SetNillableURL ¶
func (suo *SourceUpdateOne) SetNillableURL(s *string) *SourceUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*SourceUpdateOne) SetRawJSON ¶
func (suo *SourceUpdateOne) SetRawJSON(s string) *SourceUpdateOne
SetRawJSON sets the "raw_json" field.
func (*SourceUpdateOne) SetType ¶
func (suo *SourceUpdateOne) SetType(s string) *SourceUpdateOne
SetType sets the "type" field.
func (*SourceUpdateOne) SetURL ¶
func (suo *SourceUpdateOne) SetURL(s string) *SourceUpdateOne
SetURL sets the "url" field.
func (*SourceUpdateOne) Where ¶
func (suo *SourceUpdateOne) Where(ps ...predicate.Source) *SourceUpdateOne
Where appends a list predicates to the SourceUpdate builder.
type SourceUpsert ¶
SourceUpsert is the "OnConflict" setter.
func (*SourceUpsert) SetName ¶
func (u *SourceUpsert) SetName(v string) *SourceUpsert
SetName sets the "name" field.
func (*SourceUpsert) SetRawJSON ¶
func (u *SourceUpsert) SetRawJSON(v string) *SourceUpsert
SetRawJSON sets the "raw_json" field.
func (*SourceUpsert) SetType ¶
func (u *SourceUpsert) SetType(v string) *SourceUpsert
SetType sets the "type" field.
func (*SourceUpsert) SetURL ¶
func (u *SourceUpsert) SetURL(v string) *SourceUpsert
SetURL sets the "url" field.
func (*SourceUpsert) UpdateName ¶
func (u *SourceUpsert) UpdateName() *SourceUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*SourceUpsert) UpdateRawJSON ¶
func (u *SourceUpsert) UpdateRawJSON() *SourceUpsert
UpdateRawJSON sets the "raw_json" field to the value that was provided on create.
func (*SourceUpsert) UpdateType ¶
func (u *SourceUpsert) UpdateType() *SourceUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*SourceUpsert) UpdateURL ¶
func (u *SourceUpsert) UpdateURL() *SourceUpsert
UpdateURL sets the "url" field to the value that was provided on create.
type SourceUpsertBulk ¶
type SourceUpsertBulk struct {
// contains filtered or unexported fields
}
SourceUpsertBulk is the builder for "upsert"-ing a bulk of Source nodes.
func (*SourceUpsertBulk) DoNothing ¶
func (u *SourceUpsertBulk) DoNothing() *SourceUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SourceUpsertBulk) Exec ¶
func (u *SourceUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceUpsertBulk) ExecX ¶
func (u *SourceUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceUpsertBulk) Ignore ¶
func (u *SourceUpsertBulk) Ignore() *SourceUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Source.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SourceUpsertBulk) SetName ¶
func (u *SourceUpsertBulk) SetName(v string) *SourceUpsertBulk
SetName sets the "name" field.
func (*SourceUpsertBulk) SetRawJSON ¶
func (u *SourceUpsertBulk) SetRawJSON(v string) *SourceUpsertBulk
SetRawJSON sets the "raw_json" field.
func (*SourceUpsertBulk) SetType ¶
func (u *SourceUpsertBulk) SetType(v string) *SourceUpsertBulk
SetType sets the "type" field.
func (*SourceUpsertBulk) SetURL ¶
func (u *SourceUpsertBulk) SetURL(v string) *SourceUpsertBulk
SetURL sets the "url" field.
func (*SourceUpsertBulk) Update ¶
func (u *SourceUpsertBulk) Update(set func(*SourceUpsert)) *SourceUpsertBulk
Update allows overriding fields `UPDATE` values. See the SourceCreateBulk.OnConflict documentation for more info.
func (*SourceUpsertBulk) UpdateName ¶
func (u *SourceUpsertBulk) UpdateName() *SourceUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*SourceUpsertBulk) UpdateNewValues ¶
func (u *SourceUpsertBulk) UpdateNewValues() *SourceUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Source.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(source.FieldID)
}),
).
Exec(ctx)
func (*SourceUpsertBulk) UpdateRawJSON ¶
func (u *SourceUpsertBulk) UpdateRawJSON() *SourceUpsertBulk
UpdateRawJSON sets the "raw_json" field to the value that was provided on create.
func (*SourceUpsertBulk) UpdateType ¶
func (u *SourceUpsertBulk) UpdateType() *SourceUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*SourceUpsertBulk) UpdateURL ¶
func (u *SourceUpsertBulk) UpdateURL() *SourceUpsertBulk
UpdateURL sets the "url" field to the value that was provided on create.
type SourceUpsertOne ¶
type SourceUpsertOne struct {
// contains filtered or unexported fields
}
SourceUpsertOne is the builder for "upsert"-ing
one Source node.
func (*SourceUpsertOne) DoNothing ¶
func (u *SourceUpsertOne) DoNothing() *SourceUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SourceUpsertOne) Exec ¶
func (u *SourceUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceUpsertOne) ExecX ¶
func (u *SourceUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceUpsertOne) ID ¶
func (u *SourceUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*SourceUpsertOne) IDX ¶
func (u *SourceUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*SourceUpsertOne) Ignore ¶
func (u *SourceUpsertOne) Ignore() *SourceUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Source.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*SourceUpsertOne) SetName ¶
func (u *SourceUpsertOne) SetName(v string) *SourceUpsertOne
SetName sets the "name" field.
func (*SourceUpsertOne) SetRawJSON ¶
func (u *SourceUpsertOne) SetRawJSON(v string) *SourceUpsertOne
SetRawJSON sets the "raw_json" field.
func (*SourceUpsertOne) SetType ¶
func (u *SourceUpsertOne) SetType(v string) *SourceUpsertOne
SetType sets the "type" field.
func (*SourceUpsertOne) SetURL ¶
func (u *SourceUpsertOne) SetURL(v string) *SourceUpsertOne
SetURL sets the "url" field.
func (*SourceUpsertOne) Update ¶
func (u *SourceUpsertOne) Update(set func(*SourceUpsert)) *SourceUpsertOne
Update allows overriding fields `UPDATE` values. See the SourceCreate.OnConflict documentation for more info.
func (*SourceUpsertOne) UpdateName ¶
func (u *SourceUpsertOne) UpdateName() *SourceUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*SourceUpsertOne) UpdateNewValues ¶
func (u *SourceUpsertOne) UpdateNewValues() *SourceUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Source.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(source.FieldID)
}),
).
Exec(ctx)
func (*SourceUpsertOne) UpdateRawJSON ¶
func (u *SourceUpsertOne) UpdateRawJSON() *SourceUpsertOne
UpdateRawJSON sets the "raw_json" field to the value that was provided on create.
func (*SourceUpsertOne) UpdateType ¶
func (u *SourceUpsertOne) UpdateType() *SourceUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*SourceUpsertOne) UpdateURL ¶
func (u *SourceUpsertOne) UpdateURL() *SourceUpsertOne
UpdateURL sets the "url" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// Activity is the client for interacting with the Activity builders.
Activity *ActivityClient
// Feed is the client for interacting with the Feed builders.
Feed *FeedClient
// Source is the client for interacting with the Source builders.
Source *SourceClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
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.