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 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 Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Organization
- func (o *Organization) QueryCreator() *UserQuery
- func (o *Organization) QueryEditor() *UserQuery
- func (o *Organization) QueryPlatforms() *PlatformQuery
- func (o *Organization) QueryUsers() *UserQuery
- func (o *Organization) String() string
- func (o *Organization) Unwrap() *Organization
- func (o *Organization) Update() *OrganizationUpdateOne
- func (o *Organization) Value(name string) (ent.Value, error)
- type OrganizationClient
- func (c *OrganizationClient) Create() *OrganizationCreate
- func (c *OrganizationClient) CreateBulk(builders ...*OrganizationCreate) *OrganizationCreateBulk
- func (c *OrganizationClient) Delete() *OrganizationDelete
- func (c *OrganizationClient) DeleteOne(o *Organization) *OrganizationDeleteOne
- func (c *OrganizationClient) DeleteOneID(id uuid.UUID) *OrganizationDeleteOne
- func (c *OrganizationClient) Get(ctx context.Context, id uuid.UUID) (*Organization, error)
- func (c *OrganizationClient) GetX(ctx context.Context, id uuid.UUID) *Organization
- func (c *OrganizationClient) Hooks() []Hook
- func (c *OrganizationClient) Intercept(interceptors ...Interceptor)
- func (c *OrganizationClient) Interceptors() []Interceptor
- func (c *OrganizationClient) MapCreateBulk(slice any, setFunc func(*OrganizationCreate, int)) *OrganizationCreateBulk
- func (c *OrganizationClient) Query() *OrganizationQuery
- func (c *OrganizationClient) QueryCreator(o *Organization) *UserQuery
- func (c *OrganizationClient) QueryEditor(o *Organization) *UserQuery
- func (c *OrganizationClient) QueryPlatforms(o *Organization) *PlatformQuery
- func (c *OrganizationClient) QueryUsers(o *Organization) *UserQuery
- func (c *OrganizationClient) Update() *OrganizationUpdate
- func (c *OrganizationClient) UpdateOne(o *Organization) *OrganizationUpdateOne
- func (c *OrganizationClient) UpdateOneID(id uuid.UUID) *OrganizationUpdateOne
- func (c *OrganizationClient) Use(hooks ...Hook)
- type OrganizationCreate
- func (oc *OrganizationCreate) AddPlatformIDs(ids ...uuid.UUID) *OrganizationCreate
- func (oc *OrganizationCreate) AddPlatforms(p ...*Platform) *OrganizationCreate
- func (oc *OrganizationCreate) AddUserIDs(ids ...uuid.UUID) *OrganizationCreate
- func (oc *OrganizationCreate) AddUsers(u ...*User) *OrganizationCreate
- func (oc *OrganizationCreate) Exec(ctx context.Context) error
- func (oc *OrganizationCreate) ExecX(ctx context.Context)
- func (oc *OrganizationCreate) Mutation() *OrganizationMutation
- func (oc *OrganizationCreate) OnConflict(opts ...sql.ConflictOption) *OrganizationUpsertOne
- func (oc *OrganizationCreate) OnConflictColumns(columns ...string) *OrganizationUpsertOne
- func (oc *OrganizationCreate) Save(ctx context.Context) (*Organization, error)
- func (oc *OrganizationCreate) SaveX(ctx context.Context) *Organization
- func (oc *OrganizationCreate) SetCreatedAt(t time.Time) *OrganizationCreate
- func (oc *OrganizationCreate) SetCreatedByID(u uuid.UUID) *OrganizationCreate
- func (oc *OrganizationCreate) SetCreator(u *User) *OrganizationCreate
- func (oc *OrganizationCreate) SetCreatorID(id uuid.UUID) *OrganizationCreate
- func (oc *OrganizationCreate) SetDisplayName(s string) *OrganizationCreate
- func (oc *OrganizationCreate) SetEditor(u *User) *OrganizationCreate
- func (oc *OrganizationCreate) SetEditorID(id uuid.UUID) *OrganizationCreate
- func (oc *OrganizationCreate) SetID(u uuid.UUID) *OrganizationCreate
- func (oc *OrganizationCreate) SetName(s string) *OrganizationCreate
- func (oc *OrganizationCreate) SetNillableCreatedAt(t *time.Time) *OrganizationCreate
- func (oc *OrganizationCreate) SetNillableID(u *uuid.UUID) *OrganizationCreate
- func (oc *OrganizationCreate) SetNillableUpdatedAt(t *time.Time) *OrganizationCreate
- func (oc *OrganizationCreate) SetUpdatedAt(t time.Time) *OrganizationCreate
- func (oc *OrganizationCreate) SetUpdatedByID(u uuid.UUID) *OrganizationCreate
- type OrganizationCreateBulk
- func (ocb *OrganizationCreateBulk) Exec(ctx context.Context) error
- func (ocb *OrganizationCreateBulk) ExecX(ctx context.Context)
- func (ocb *OrganizationCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrganizationUpsertBulk
- func (ocb *OrganizationCreateBulk) OnConflictColumns(columns ...string) *OrganizationUpsertBulk
- func (ocb *OrganizationCreateBulk) Save(ctx context.Context) ([]*Organization, error)
- func (ocb *OrganizationCreateBulk) SaveX(ctx context.Context) []*Organization
- type OrganizationDelete
- type OrganizationDeleteOne
- type OrganizationEdges
- type OrganizationGroupBy
- func (ogb *OrganizationGroupBy) Aggregate(fns ...AggregateFunc) *OrganizationGroupBy
- func (s *OrganizationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrganizationGroupBy) BoolX(ctx context.Context) bool
- func (s *OrganizationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrganizationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrganizationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrganizationGroupBy) Float64X(ctx context.Context) float64
- func (s *OrganizationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrganizationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrganizationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrganizationGroupBy) IntX(ctx context.Context) int
- func (s *OrganizationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrganizationGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OrganizationGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrganizationGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrganizationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrganizationGroupBy) StringX(ctx context.Context) string
- func (s *OrganizationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrganizationGroupBy) StringsX(ctx context.Context) []string
- type OrganizationMutation
- func (m *OrganizationMutation) AddField(name string, value ent.Value) error
- func (m *OrganizationMutation) AddPlatformIDs(ids ...uuid.UUID)
- func (m *OrganizationMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *OrganizationMutation) AddedEdges() []string
- func (m *OrganizationMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrganizationMutation) AddedFields() []string
- func (m *OrganizationMutation) AddedIDs(name string) []ent.Value
- func (m *OrganizationMutation) ClearCreator()
- func (m *OrganizationMutation) ClearEdge(name string) error
- func (m *OrganizationMutation) ClearEditor()
- func (m *OrganizationMutation) ClearField(name string) error
- func (m *OrganizationMutation) ClearPlatforms()
- func (m *OrganizationMutation) ClearUsers()
- func (m *OrganizationMutation) ClearedEdges() []string
- func (m *OrganizationMutation) ClearedFields() []string
- func (m OrganizationMutation) Client() *Client
- func (m *OrganizationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrganizationMutation) CreatedByID() (r uuid.UUID, exists bool)
- func (m *OrganizationMutation) CreatorCleared() bool
- func (m *OrganizationMutation) CreatorID() (id uuid.UUID, exists bool)
- func (m *OrganizationMutation) CreatorIDs() (ids []uuid.UUID)
- func (m *OrganizationMutation) DisplayName() (r string, exists bool)
- func (m *OrganizationMutation) EdgeCleared(name string) bool
- func (m *OrganizationMutation) EditorCleared() bool
- func (m *OrganizationMutation) EditorID() (id uuid.UUID, exists bool)
- func (m *OrganizationMutation) EditorIDs() (ids []uuid.UUID)
- func (m *OrganizationMutation) Field(name string) (ent.Value, bool)
- func (m *OrganizationMutation) FieldCleared(name string) bool
- func (m *OrganizationMutation) Fields() []string
- func (m *OrganizationMutation) ID() (id uuid.UUID, exists bool)
- func (m *OrganizationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OrganizationMutation) Name() (r string, exists bool)
- func (m *OrganizationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrganizationMutation) OldCreatedByID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrganizationMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *OrganizationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrganizationMutation) OldName(ctx context.Context) (v string, err error)
- func (m *OrganizationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrganizationMutation) OldUpdatedByID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrganizationMutation) Op() Op
- func (m *OrganizationMutation) PlatformsCleared() bool
- func (m *OrganizationMutation) PlatformsIDs() (ids []uuid.UUID)
- func (m *OrganizationMutation) RemovePlatformIDs(ids ...uuid.UUID)
- func (m *OrganizationMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *OrganizationMutation) RemovedEdges() []string
- func (m *OrganizationMutation) RemovedIDs(name string) []ent.Value
- func (m *OrganizationMutation) RemovedPlatformsIDs() (ids []uuid.UUID)
- func (m *OrganizationMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *OrganizationMutation) ResetCreatedAt()
- func (m *OrganizationMutation) ResetCreatedByID()
- func (m *OrganizationMutation) ResetCreator()
- func (m *OrganizationMutation) ResetDisplayName()
- func (m *OrganizationMutation) ResetEdge(name string) error
- func (m *OrganizationMutation) ResetEditor()
- func (m *OrganizationMutation) ResetField(name string) error
- func (m *OrganizationMutation) ResetName()
- func (m *OrganizationMutation) ResetPlatforms()
- func (m *OrganizationMutation) ResetUpdatedAt()
- func (m *OrganizationMutation) ResetUpdatedByID()
- func (m *OrganizationMutation) ResetUsers()
- func (m *OrganizationMutation) SetCreatedAt(t time.Time)
- func (m *OrganizationMutation) SetCreatedByID(u uuid.UUID)
- func (m *OrganizationMutation) SetCreatorID(id uuid.UUID)
- func (m *OrganizationMutation) SetDisplayName(s string)
- func (m *OrganizationMutation) SetEditorID(id uuid.UUID)
- func (m *OrganizationMutation) SetField(name string, value ent.Value) error
- func (m *OrganizationMutation) SetID(id uuid.UUID)
- func (m *OrganizationMutation) SetName(s string)
- func (m *OrganizationMutation) SetOp(op Op)
- func (m *OrganizationMutation) SetUpdatedAt(t time.Time)
- func (m *OrganizationMutation) SetUpdatedByID(u uuid.UUID)
- func (m OrganizationMutation) Tx() (*Tx, error)
- func (m *OrganizationMutation) Type() string
- func (m *OrganizationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrganizationMutation) UpdatedByID() (r uuid.UUID, exists bool)
- func (m *OrganizationMutation) UsersCleared() bool
- func (m *OrganizationMutation) UsersIDs() (ids []uuid.UUID)
- func (m *OrganizationMutation) Where(ps ...predicate.Organization)
- func (m *OrganizationMutation) WhereP(ps ...func(*sql.Selector))
- type OrganizationQuery
- func (oq *OrganizationQuery) Aggregate(fns ...AggregateFunc) *OrganizationSelect
- func (oq *OrganizationQuery) All(ctx context.Context) ([]*Organization, error)
- func (oq *OrganizationQuery) AllX(ctx context.Context) []*Organization
- func (oq *OrganizationQuery) Clone() *OrganizationQuery
- func (oq *OrganizationQuery) Count(ctx context.Context) (int, error)
- func (oq *OrganizationQuery) CountX(ctx context.Context) int
- func (oq *OrganizationQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OrganizationQuery) ExistX(ctx context.Context) bool
- func (oq *OrganizationQuery) First(ctx context.Context) (*Organization, error)
- func (oq *OrganizationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OrganizationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (oq *OrganizationQuery) FirstX(ctx context.Context) *Organization
- func (oq *OrganizationQuery) GroupBy(field string, fields ...string) *OrganizationGroupBy
- func (oq *OrganizationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (oq *OrganizationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (oq *OrganizationQuery) Limit(limit int) *OrganizationQuery
- func (oq *OrganizationQuery) Offset(offset int) *OrganizationQuery
- func (oq *OrganizationQuery) Only(ctx context.Context) (*Organization, error)
- func (oq *OrganizationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OrganizationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (oq *OrganizationQuery) OnlyX(ctx context.Context) *Organization
- func (oq *OrganizationQuery) Order(o ...organization.OrderOption) *OrganizationQuery
- func (oq *OrganizationQuery) QueryCreator() *UserQuery
- func (oq *OrganizationQuery) QueryEditor() *UserQuery
- func (oq *OrganizationQuery) QueryPlatforms() *PlatformQuery
- func (oq *OrganizationQuery) QueryUsers() *UserQuery
- func (oq *OrganizationQuery) Select(fields ...string) *OrganizationSelect
- func (oq *OrganizationQuery) Unique(unique bool) *OrganizationQuery
- func (oq *OrganizationQuery) Where(ps ...predicate.Organization) *OrganizationQuery
- func (oq *OrganizationQuery) WithCreator(opts ...func(*UserQuery)) *OrganizationQuery
- func (oq *OrganizationQuery) WithEditor(opts ...func(*UserQuery)) *OrganizationQuery
- func (oq *OrganizationQuery) WithPlatforms(opts ...func(*PlatformQuery)) *OrganizationQuery
- func (oq *OrganizationQuery) WithUsers(opts ...func(*UserQuery)) *OrganizationQuery
- type OrganizationSelect
- func (os *OrganizationSelect) Aggregate(fns ...AggregateFunc) *OrganizationSelect
- func (s *OrganizationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrganizationSelect) BoolX(ctx context.Context) bool
- func (s *OrganizationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrganizationSelect) BoolsX(ctx context.Context) []bool
- func (s *OrganizationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrganizationSelect) Float64X(ctx context.Context) float64
- func (s *OrganizationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrganizationSelect) Float64sX(ctx context.Context) []float64
- func (s *OrganizationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrganizationSelect) IntX(ctx context.Context) int
- func (s *OrganizationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrganizationSelect) IntsX(ctx context.Context) []int
- func (os *OrganizationSelect) Scan(ctx context.Context, v any) error
- func (s *OrganizationSelect) ScanX(ctx context.Context, v any)
- func (s *OrganizationSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrganizationSelect) StringX(ctx context.Context) string
- func (s *OrganizationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrganizationSelect) StringsX(ctx context.Context) []string
- type OrganizationUpdate
- func (ou *OrganizationUpdate) AddPlatformIDs(ids ...uuid.UUID) *OrganizationUpdate
- func (ou *OrganizationUpdate) AddPlatforms(p ...*Platform) *OrganizationUpdate
- func (ou *OrganizationUpdate) AddUserIDs(ids ...uuid.UUID) *OrganizationUpdate
- func (ou *OrganizationUpdate) AddUsers(u ...*User) *OrganizationUpdate
- func (ou *OrganizationUpdate) ClearEditor() *OrganizationUpdate
- func (ou *OrganizationUpdate) ClearPlatforms() *OrganizationUpdate
- func (ou *OrganizationUpdate) ClearUsers() *OrganizationUpdate
- func (ou *OrganizationUpdate) Exec(ctx context.Context) error
- func (ou *OrganizationUpdate) ExecX(ctx context.Context)
- func (ou *OrganizationUpdate) Mutation() *OrganizationMutation
- func (ou *OrganizationUpdate) RemovePlatformIDs(ids ...uuid.UUID) *OrganizationUpdate
- func (ou *OrganizationUpdate) RemovePlatforms(p ...*Platform) *OrganizationUpdate
- func (ou *OrganizationUpdate) RemoveUserIDs(ids ...uuid.UUID) *OrganizationUpdate
- func (ou *OrganizationUpdate) RemoveUsers(u ...*User) *OrganizationUpdate
- func (ou *OrganizationUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrganizationUpdate) SaveX(ctx context.Context) int
- func (ou *OrganizationUpdate) SetDisplayName(s string) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetEditor(u *User) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetEditorID(id uuid.UUID) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetName(s string) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetNillableDisplayName(s *string) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetNillableName(s *string) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetNillableUpdatedByID(u *uuid.UUID) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetUpdatedAt(t time.Time) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetUpdatedByID(u uuid.UUID) *OrganizationUpdate
- func (ou *OrganizationUpdate) Where(ps ...predicate.Organization) *OrganizationUpdate
- type OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) AddPlatformIDs(ids ...uuid.UUID) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) AddPlatforms(p ...*Platform) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) AddUserIDs(ids ...uuid.UUID) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) AddUsers(u ...*User) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) ClearEditor() *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) ClearPlatforms() *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) ClearUsers() *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrganizationUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrganizationUpdateOne) Mutation() *OrganizationMutation
- func (ouo *OrganizationUpdateOne) RemovePlatformIDs(ids ...uuid.UUID) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) RemovePlatforms(p ...*Platform) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) RemoveUsers(u ...*User) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) Save(ctx context.Context) (*Organization, error)
- func (ouo *OrganizationUpdateOne) SaveX(ctx context.Context) *Organization
- func (ouo *OrganizationUpdateOne) Select(field string, fields ...string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetDisplayName(s string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetEditor(u *User) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetEditorID(id uuid.UUID) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetName(s string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetNillableDisplayName(s *string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetNillableName(s *string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetNillableUpdatedByID(u *uuid.UUID) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetUpdatedAt(t time.Time) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetUpdatedByID(u uuid.UUID) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) Where(ps ...predicate.Organization) *OrganizationUpdateOne
- type OrganizationUpsert
- func (u *OrganizationUpsert) SetDisplayName(v string) *OrganizationUpsert
- func (u *OrganizationUpsert) SetName(v string) *OrganizationUpsert
- func (u *OrganizationUpsert) SetUpdatedAt(v time.Time) *OrganizationUpsert
- func (u *OrganizationUpsert) SetUpdatedByID(v uuid.UUID) *OrganizationUpsert
- func (u *OrganizationUpsert) UpdateDisplayName() *OrganizationUpsert
- func (u *OrganizationUpsert) UpdateName() *OrganizationUpsert
- func (u *OrganizationUpsert) UpdateUpdatedAt() *OrganizationUpsert
- func (u *OrganizationUpsert) UpdateUpdatedByID() *OrganizationUpsert
- type OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) DoNothing() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) Exec(ctx context.Context) error
- func (u *OrganizationUpsertBulk) ExecX(ctx context.Context)
- func (u *OrganizationUpsertBulk) Ignore() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) SetDisplayName(v string) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) SetName(v string) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) SetUpdatedAt(v time.Time) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) SetUpdatedByID(v uuid.UUID) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) Update(set func(*OrganizationUpsert)) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateDisplayName() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateName() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateNewValues() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateUpdatedAt() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateUpdatedByID() *OrganizationUpsertBulk
- type OrganizationUpsertOne
- func (u *OrganizationUpsertOne) DoNothing() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) Exec(ctx context.Context) error
- func (u *OrganizationUpsertOne) ExecX(ctx context.Context)
- func (u *OrganizationUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *OrganizationUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *OrganizationUpsertOne) Ignore() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) SetDisplayName(v string) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) SetName(v string) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) SetUpdatedAt(v time.Time) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) SetUpdatedByID(v uuid.UUID) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) Update(set func(*OrganizationUpsert)) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateDisplayName() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateName() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateNewValues() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateUpdatedAt() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateUpdatedByID() *OrganizationUpsertOne
- type Organizations
- type Platform
- func (pl *Platform) QueryCreator() *UserQuery
- func (pl *Platform) QueryEditor() *UserQuery
- func (pl *Platform) QueryOrganization() *OrganizationQuery
- func (pl *Platform) String() string
- func (pl *Platform) Unwrap() *Platform
- func (pl *Platform) Update() *PlatformUpdateOne
- func (pl *Platform) Value(name string) (ent.Value, error)
- type PlatformClient
- func (c *PlatformClient) Create() *PlatformCreate
- func (c *PlatformClient) CreateBulk(builders ...*PlatformCreate) *PlatformCreateBulk
- func (c *PlatformClient) Delete() *PlatformDelete
- func (c *PlatformClient) DeleteOne(pl *Platform) *PlatformDeleteOne
- func (c *PlatformClient) DeleteOneID(id uuid.UUID) *PlatformDeleteOne
- func (c *PlatformClient) Get(ctx context.Context, id uuid.UUID) (*Platform, error)
- func (c *PlatformClient) GetX(ctx context.Context, id uuid.UUID) *Platform
- func (c *PlatformClient) Hooks() []Hook
- func (c *PlatformClient) Intercept(interceptors ...Interceptor)
- func (c *PlatformClient) Interceptors() []Interceptor
- func (c *PlatformClient) MapCreateBulk(slice any, setFunc func(*PlatformCreate, int)) *PlatformCreateBulk
- func (c *PlatformClient) Query() *PlatformQuery
- func (c *PlatformClient) QueryCreator(pl *Platform) *UserQuery
- func (c *PlatformClient) QueryEditor(pl *Platform) *UserQuery
- func (c *PlatformClient) QueryOrganization(pl *Platform) *OrganizationQuery
- func (c *PlatformClient) Update() *PlatformUpdate
- func (c *PlatformClient) UpdateOne(pl *Platform) *PlatformUpdateOne
- func (c *PlatformClient) UpdateOneID(id uuid.UUID) *PlatformUpdateOne
- func (c *PlatformClient) Use(hooks ...Hook)
- type PlatformCreate
- func (pc *PlatformCreate) Exec(ctx context.Context) error
- func (pc *PlatformCreate) ExecX(ctx context.Context)
- func (pc *PlatformCreate) Mutation() *PlatformMutation
- func (pc *PlatformCreate) OnConflict(opts ...sql.ConflictOption) *PlatformUpsertOne
- func (pc *PlatformCreate) OnConflictColumns(columns ...string) *PlatformUpsertOne
- func (pc *PlatformCreate) Save(ctx context.Context) (*Platform, error)
- func (pc *PlatformCreate) SaveX(ctx context.Context) *Platform
- func (pc *PlatformCreate) SetCreatedAt(t time.Time) *PlatformCreate
- func (pc *PlatformCreate) SetCreatedByID(u uuid.UUID) *PlatformCreate
- func (pc *PlatformCreate) SetCreator(u *User) *PlatformCreate
- func (pc *PlatformCreate) SetCreatorID(id uuid.UUID) *PlatformCreate
- func (pc *PlatformCreate) SetCue(b []byte) *PlatformCreate
- func (pc *PlatformCreate) SetCueDefinition(s string) *PlatformCreate
- func (pc *PlatformCreate) SetDisplayName(s string) *PlatformCreate
- func (pc *PlatformCreate) SetEditor(u *User) *PlatformCreate
- func (pc *PlatformCreate) SetEditorID(id uuid.UUID) *PlatformCreate
- func (pc *PlatformCreate) SetForm(s *storage.Form) *PlatformCreate
- func (pc *PlatformCreate) SetID(u uuid.UUID) *PlatformCreate
- func (pc *PlatformCreate) SetModel(s *storage.Model) *PlatformCreate
- func (pc *PlatformCreate) SetName(s string) *PlatformCreate
- func (pc *PlatformCreate) SetNillableCreatedAt(t *time.Time) *PlatformCreate
- func (pc *PlatformCreate) SetNillableCueDefinition(s *string) *PlatformCreate
- func (pc *PlatformCreate) SetNillableID(u *uuid.UUID) *PlatformCreate
- func (pc *PlatformCreate) SetNillableUpdatedAt(t *time.Time) *PlatformCreate
- func (pc *PlatformCreate) SetOrgID(u uuid.UUID) *PlatformCreate
- func (pc *PlatformCreate) SetOrganization(o *Organization) *PlatformCreate
- func (pc *PlatformCreate) SetOrganizationID(id uuid.UUID) *PlatformCreate
- func (pc *PlatformCreate) SetUpdatedAt(t time.Time) *PlatformCreate
- func (pc *PlatformCreate) SetUpdatedByID(u uuid.UUID) *PlatformCreate
- type PlatformCreateBulk
- func (pcb *PlatformCreateBulk) Exec(ctx context.Context) error
- func (pcb *PlatformCreateBulk) ExecX(ctx context.Context)
- func (pcb *PlatformCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlatformUpsertBulk
- func (pcb *PlatformCreateBulk) OnConflictColumns(columns ...string) *PlatformUpsertBulk
- func (pcb *PlatformCreateBulk) Save(ctx context.Context) ([]*Platform, error)
- func (pcb *PlatformCreateBulk) SaveX(ctx context.Context) []*Platform
- type PlatformDelete
- type PlatformDeleteOne
- type PlatformEdges
- type PlatformGroupBy
- func (pgb *PlatformGroupBy) Aggregate(fns ...AggregateFunc) *PlatformGroupBy
- func (s *PlatformGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PlatformGroupBy) BoolX(ctx context.Context) bool
- func (s *PlatformGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PlatformGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PlatformGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PlatformGroupBy) Float64X(ctx context.Context) float64
- func (s *PlatformGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PlatformGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PlatformGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PlatformGroupBy) IntX(ctx context.Context) int
- func (s *PlatformGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PlatformGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PlatformGroupBy) Scan(ctx context.Context, v any) error
- func (s *PlatformGroupBy) ScanX(ctx context.Context, v any)
- func (s *PlatformGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PlatformGroupBy) StringX(ctx context.Context) string
- func (s *PlatformGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PlatformGroupBy) StringsX(ctx context.Context) []string
- type PlatformMutation
- func (m *PlatformMutation) AddField(name string, value ent.Value) error
- func (m *PlatformMutation) AddedEdges() []string
- func (m *PlatformMutation) AddedField(name string) (ent.Value, bool)
- func (m *PlatformMutation) AddedFields() []string
- func (m *PlatformMutation) AddedIDs(name string) []ent.Value
- func (m *PlatformMutation) ClearCreator()
- func (m *PlatformMutation) ClearCue()
- func (m *PlatformMutation) ClearCueDefinition()
- func (m *PlatformMutation) ClearEdge(name string) error
- func (m *PlatformMutation) ClearEditor()
- func (m *PlatformMutation) ClearField(name string) error
- func (m *PlatformMutation) ClearForm()
- func (m *PlatformMutation) ClearModel()
- func (m *PlatformMutation) ClearOrganization()
- func (m *PlatformMutation) ClearedEdges() []string
- func (m *PlatformMutation) ClearedFields() []string
- func (m PlatformMutation) Client() *Client
- func (m *PlatformMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PlatformMutation) CreatedByID() (r uuid.UUID, exists bool)
- func (m *PlatformMutation) CreatorCleared() bool
- func (m *PlatformMutation) CreatorID() (id uuid.UUID, exists bool)
- func (m *PlatformMutation) CreatorIDs() (ids []uuid.UUID)
- func (m *PlatformMutation) Cue() (r []byte, exists bool)
- func (m *PlatformMutation) CueCleared() bool
- func (m *PlatformMutation) CueDefinition() (r string, exists bool)
- func (m *PlatformMutation) CueDefinitionCleared() bool
- func (m *PlatformMutation) DisplayName() (r string, exists bool)
- func (m *PlatformMutation) EdgeCleared(name string) bool
- func (m *PlatformMutation) EditorCleared() bool
- func (m *PlatformMutation) EditorID() (id uuid.UUID, exists bool)
- func (m *PlatformMutation) EditorIDs() (ids []uuid.UUID)
- func (m *PlatformMutation) Field(name string) (ent.Value, bool)
- func (m *PlatformMutation) FieldCleared(name string) bool
- func (m *PlatformMutation) Fields() []string
- func (m *PlatformMutation) Form() (r *storage.Form, exists bool)
- func (m *PlatformMutation) FormCleared() bool
- func (m *PlatformMutation) ID() (id uuid.UUID, exists bool)
- func (m *PlatformMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PlatformMutation) Model() (r *storage.Model, exists bool)
- func (m *PlatformMutation) ModelCleared() bool
- func (m *PlatformMutation) Name() (r string, exists bool)
- func (m *PlatformMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlatformMutation) OldCreatedByID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PlatformMutation) OldCue(ctx context.Context) (v []byte, err error)
- func (m *PlatformMutation) OldCueDefinition(ctx context.Context) (v string, err error)
- func (m *PlatformMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *PlatformMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PlatformMutation) OldForm(ctx context.Context) (v *storage.Form, err error)
- func (m *PlatformMutation) OldModel(ctx context.Context) (v *storage.Model, err error)
- func (m *PlatformMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PlatformMutation) OldOrgID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PlatformMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlatformMutation) OldUpdatedByID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PlatformMutation) Op() Op
- func (m *PlatformMutation) OrgID() (r uuid.UUID, exists bool)
- func (m *PlatformMutation) OrganizationCleared() bool
- func (m *PlatformMutation) OrganizationID() (id uuid.UUID, exists bool)
- func (m *PlatformMutation) OrganizationIDs() (ids []uuid.UUID)
- func (m *PlatformMutation) RemovedEdges() []string
- func (m *PlatformMutation) RemovedIDs(name string) []ent.Value
- func (m *PlatformMutation) ResetCreatedAt()
- func (m *PlatformMutation) ResetCreatedByID()
- func (m *PlatformMutation) ResetCreator()
- func (m *PlatformMutation) ResetCue()
- func (m *PlatformMutation) ResetCueDefinition()
- func (m *PlatformMutation) ResetDisplayName()
- func (m *PlatformMutation) ResetEdge(name string) error
- func (m *PlatformMutation) ResetEditor()
- func (m *PlatformMutation) ResetField(name string) error
- func (m *PlatformMutation) ResetForm()
- func (m *PlatformMutation) ResetModel()
- func (m *PlatformMutation) ResetName()
- func (m *PlatformMutation) ResetOrgID()
- func (m *PlatformMutation) ResetOrganization()
- func (m *PlatformMutation) ResetUpdatedAt()
- func (m *PlatformMutation) ResetUpdatedByID()
- func (m *PlatformMutation) SetCreatedAt(t time.Time)
- func (m *PlatformMutation) SetCreatedByID(u uuid.UUID)
- func (m *PlatformMutation) SetCreatorID(id uuid.UUID)
- func (m *PlatformMutation) SetCue(b []byte)
- func (m *PlatformMutation) SetCueDefinition(s string)
- func (m *PlatformMutation) SetDisplayName(s string)
- func (m *PlatformMutation) SetEditorID(id uuid.UUID)
- func (m *PlatformMutation) SetField(name string, value ent.Value) error
- func (m *PlatformMutation) SetForm(s *storage.Form)
- func (m *PlatformMutation) SetID(id uuid.UUID)
- func (m *PlatformMutation) SetModel(s *storage.Model)
- func (m *PlatformMutation) SetName(s string)
- func (m *PlatformMutation) SetOp(op Op)
- func (m *PlatformMutation) SetOrgID(u uuid.UUID)
- func (m *PlatformMutation) SetOrganizationID(id uuid.UUID)
- func (m *PlatformMutation) SetUpdatedAt(t time.Time)
- func (m *PlatformMutation) SetUpdatedByID(u uuid.UUID)
- func (m PlatformMutation) Tx() (*Tx, error)
- func (m *PlatformMutation) Type() string
- func (m *PlatformMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PlatformMutation) UpdatedByID() (r uuid.UUID, exists bool)
- func (m *PlatformMutation) Where(ps ...predicate.Platform)
- func (m *PlatformMutation) WhereP(ps ...func(*sql.Selector))
- type PlatformQuery
- func (pq *PlatformQuery) Aggregate(fns ...AggregateFunc) *PlatformSelect
- func (pq *PlatformQuery) All(ctx context.Context) ([]*Platform, error)
- func (pq *PlatformQuery) AllX(ctx context.Context) []*Platform
- func (pq *PlatformQuery) Clone() *PlatformQuery
- func (pq *PlatformQuery) Count(ctx context.Context) (int, error)
- func (pq *PlatformQuery) CountX(ctx context.Context) int
- func (pq *PlatformQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PlatformQuery) ExistX(ctx context.Context) bool
- func (pq *PlatformQuery) First(ctx context.Context) (*Platform, error)
- func (pq *PlatformQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PlatformQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *PlatformQuery) FirstX(ctx context.Context) *Platform
- func (pq *PlatformQuery) GroupBy(field string, fields ...string) *PlatformGroupBy
- func (pq *PlatformQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pq *PlatformQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *PlatformQuery) Limit(limit int) *PlatformQuery
- func (pq *PlatformQuery) Offset(offset int) *PlatformQuery
- func (pq *PlatformQuery) Only(ctx context.Context) (*Platform, error)
- func (pq *PlatformQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PlatformQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *PlatformQuery) OnlyX(ctx context.Context) *Platform
- func (pq *PlatformQuery) Order(o ...platform.OrderOption) *PlatformQuery
- func (pq *PlatformQuery) QueryCreator() *UserQuery
- func (pq *PlatformQuery) QueryEditor() *UserQuery
- func (pq *PlatformQuery) QueryOrganization() *OrganizationQuery
- func (pq *PlatformQuery) Select(fields ...string) *PlatformSelect
- func (pq *PlatformQuery) Unique(unique bool) *PlatformQuery
- func (pq *PlatformQuery) Where(ps ...predicate.Platform) *PlatformQuery
- func (pq *PlatformQuery) WithCreator(opts ...func(*UserQuery)) *PlatformQuery
- func (pq *PlatformQuery) WithEditor(opts ...func(*UserQuery)) *PlatformQuery
- func (pq *PlatformQuery) WithOrganization(opts ...func(*OrganizationQuery)) *PlatformQuery
- type PlatformSelect
- func (ps *PlatformSelect) Aggregate(fns ...AggregateFunc) *PlatformSelect
- func (s *PlatformSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PlatformSelect) BoolX(ctx context.Context) bool
- func (s *PlatformSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PlatformSelect) BoolsX(ctx context.Context) []bool
- func (s *PlatformSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PlatformSelect) Float64X(ctx context.Context) float64
- func (s *PlatformSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PlatformSelect) Float64sX(ctx context.Context) []float64
- func (s *PlatformSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PlatformSelect) IntX(ctx context.Context) int
- func (s *PlatformSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PlatformSelect) IntsX(ctx context.Context) []int
- func (ps *PlatformSelect) Scan(ctx context.Context, v any) error
- func (s *PlatformSelect) ScanX(ctx context.Context, v any)
- func (s *PlatformSelect) String(ctx context.Context) (_ string, err error)
- func (s *PlatformSelect) StringX(ctx context.Context) string
- func (s *PlatformSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PlatformSelect) StringsX(ctx context.Context) []string
- type PlatformUpdate
- func (pu *PlatformUpdate) ClearCue() *PlatformUpdate
- func (pu *PlatformUpdate) ClearCueDefinition() *PlatformUpdate
- func (pu *PlatformUpdate) ClearEditor() *PlatformUpdate
- func (pu *PlatformUpdate) ClearForm() *PlatformUpdate
- func (pu *PlatformUpdate) ClearModel() *PlatformUpdate
- func (pu *PlatformUpdate) ClearOrganization() *PlatformUpdate
- func (pu *PlatformUpdate) Exec(ctx context.Context) error
- func (pu *PlatformUpdate) ExecX(ctx context.Context)
- func (pu *PlatformUpdate) Mutation() *PlatformMutation
- func (pu *PlatformUpdate) Save(ctx context.Context) (int, error)
- func (pu *PlatformUpdate) SaveX(ctx context.Context) int
- func (pu *PlatformUpdate) SetCue(b []byte) *PlatformUpdate
- func (pu *PlatformUpdate) SetCueDefinition(s string) *PlatformUpdate
- func (pu *PlatformUpdate) SetDisplayName(s string) *PlatformUpdate
- func (pu *PlatformUpdate) SetEditor(u *User) *PlatformUpdate
- func (pu *PlatformUpdate) SetEditorID(id uuid.UUID) *PlatformUpdate
- func (pu *PlatformUpdate) SetForm(s *storage.Form) *PlatformUpdate
- func (pu *PlatformUpdate) SetModel(s *storage.Model) *PlatformUpdate
- func (pu *PlatformUpdate) SetName(s string) *PlatformUpdate
- func (pu *PlatformUpdate) SetNillableCueDefinition(s *string) *PlatformUpdate
- func (pu *PlatformUpdate) SetNillableDisplayName(s *string) *PlatformUpdate
- func (pu *PlatformUpdate) SetNillableName(s *string) *PlatformUpdate
- func (pu *PlatformUpdate) SetNillableOrgID(u *uuid.UUID) *PlatformUpdate
- func (pu *PlatformUpdate) SetNillableUpdatedByID(u *uuid.UUID) *PlatformUpdate
- func (pu *PlatformUpdate) SetOrgID(u uuid.UUID) *PlatformUpdate
- func (pu *PlatformUpdate) SetOrganization(o *Organization) *PlatformUpdate
- func (pu *PlatformUpdate) SetOrganizationID(id uuid.UUID) *PlatformUpdate
- func (pu *PlatformUpdate) SetUpdatedAt(t time.Time) *PlatformUpdate
- func (pu *PlatformUpdate) SetUpdatedByID(u uuid.UUID) *PlatformUpdate
- func (pu *PlatformUpdate) Where(ps ...predicate.Platform) *PlatformUpdate
- type PlatformUpdateOne
- func (puo *PlatformUpdateOne) ClearCue() *PlatformUpdateOne
- func (puo *PlatformUpdateOne) ClearCueDefinition() *PlatformUpdateOne
- func (puo *PlatformUpdateOne) ClearEditor() *PlatformUpdateOne
- func (puo *PlatformUpdateOne) ClearForm() *PlatformUpdateOne
- func (puo *PlatformUpdateOne) ClearModel() *PlatformUpdateOne
- func (puo *PlatformUpdateOne) ClearOrganization() *PlatformUpdateOne
- func (puo *PlatformUpdateOne) Exec(ctx context.Context) error
- func (puo *PlatformUpdateOne) ExecX(ctx context.Context)
- func (puo *PlatformUpdateOne) Mutation() *PlatformMutation
- func (puo *PlatformUpdateOne) Save(ctx context.Context) (*Platform, error)
- func (puo *PlatformUpdateOne) SaveX(ctx context.Context) *Platform
- func (puo *PlatformUpdateOne) Select(field string, fields ...string) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetCue(b []byte) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetCueDefinition(s string) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetDisplayName(s string) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetEditor(u *User) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetEditorID(id uuid.UUID) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetForm(s *storage.Form) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetModel(s *storage.Model) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetName(s string) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetNillableCueDefinition(s *string) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetNillableDisplayName(s *string) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetNillableName(s *string) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetNillableOrgID(u *uuid.UUID) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetNillableUpdatedByID(u *uuid.UUID) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetOrgID(u uuid.UUID) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetOrganization(o *Organization) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetOrganizationID(id uuid.UUID) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetUpdatedAt(t time.Time) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) SetUpdatedByID(u uuid.UUID) *PlatformUpdateOne
- func (puo *PlatformUpdateOne) Where(ps ...predicate.Platform) *PlatformUpdateOne
- type PlatformUpsert
- func (u *PlatformUpsert) ClearCue() *PlatformUpsert
- func (u *PlatformUpsert) ClearCueDefinition() *PlatformUpsert
- func (u *PlatformUpsert) ClearForm() *PlatformUpsert
- func (u *PlatformUpsert) ClearModel() *PlatformUpsert
- func (u *PlatformUpsert) SetCue(v []byte) *PlatformUpsert
- func (u *PlatformUpsert) SetCueDefinition(v string) *PlatformUpsert
- func (u *PlatformUpsert) SetDisplayName(v string) *PlatformUpsert
- func (u *PlatformUpsert) SetForm(v *storage.Form) *PlatformUpsert
- func (u *PlatformUpsert) SetModel(v *storage.Model) *PlatformUpsert
- func (u *PlatformUpsert) SetName(v string) *PlatformUpsert
- func (u *PlatformUpsert) SetOrgID(v uuid.UUID) *PlatformUpsert
- func (u *PlatformUpsert) SetUpdatedAt(v time.Time) *PlatformUpsert
- func (u *PlatformUpsert) SetUpdatedByID(v uuid.UUID) *PlatformUpsert
- func (u *PlatformUpsert) UpdateCue() *PlatformUpsert
- func (u *PlatformUpsert) UpdateCueDefinition() *PlatformUpsert
- func (u *PlatformUpsert) UpdateDisplayName() *PlatformUpsert
- func (u *PlatformUpsert) UpdateForm() *PlatformUpsert
- func (u *PlatformUpsert) UpdateModel() *PlatformUpsert
- func (u *PlatformUpsert) UpdateName() *PlatformUpsert
- func (u *PlatformUpsert) UpdateOrgID() *PlatformUpsert
- func (u *PlatformUpsert) UpdateUpdatedAt() *PlatformUpsert
- func (u *PlatformUpsert) UpdateUpdatedByID() *PlatformUpsert
- type PlatformUpsertBulk
- func (u *PlatformUpsertBulk) ClearCue() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) ClearCueDefinition() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) ClearForm() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) ClearModel() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) DoNothing() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) Exec(ctx context.Context) error
- func (u *PlatformUpsertBulk) ExecX(ctx context.Context)
- func (u *PlatformUpsertBulk) Ignore() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetCue(v []byte) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetCueDefinition(v string) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetDisplayName(v string) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetForm(v *storage.Form) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetModel(v *storage.Model) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetName(v string) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetOrgID(v uuid.UUID) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetUpdatedAt(v time.Time) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) SetUpdatedByID(v uuid.UUID) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) Update(set func(*PlatformUpsert)) *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateCue() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateCueDefinition() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateDisplayName() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateForm() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateModel() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateName() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateNewValues() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateOrgID() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateUpdatedAt() *PlatformUpsertBulk
- func (u *PlatformUpsertBulk) UpdateUpdatedByID() *PlatformUpsertBulk
- type PlatformUpsertOne
- func (u *PlatformUpsertOne) ClearCue() *PlatformUpsertOne
- func (u *PlatformUpsertOne) ClearCueDefinition() *PlatformUpsertOne
- func (u *PlatformUpsertOne) ClearForm() *PlatformUpsertOne
- func (u *PlatformUpsertOne) ClearModel() *PlatformUpsertOne
- func (u *PlatformUpsertOne) DoNothing() *PlatformUpsertOne
- func (u *PlatformUpsertOne) Exec(ctx context.Context) error
- func (u *PlatformUpsertOne) ExecX(ctx context.Context)
- func (u *PlatformUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *PlatformUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *PlatformUpsertOne) Ignore() *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetCue(v []byte) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetCueDefinition(v string) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetDisplayName(v string) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetForm(v *storage.Form) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetModel(v *storage.Model) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetName(v string) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetOrgID(v uuid.UUID) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetUpdatedAt(v time.Time) *PlatformUpsertOne
- func (u *PlatformUpsertOne) SetUpdatedByID(v uuid.UUID) *PlatformUpsertOne
- func (u *PlatformUpsertOne) Update(set func(*PlatformUpsert)) *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateCue() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateCueDefinition() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateDisplayName() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateForm() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateModel() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateName() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateNewValues() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateOrgID() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateUpdatedAt() *PlatformUpsertOne
- func (u *PlatformUpsertOne) UpdateUpdatedByID() *PlatformUpsertOne
- type Platforms
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryOrganizations(u *User) *OrganizationQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddOrganizationIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddOrganizations(o ...*Organization) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetIss(s string) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetSub(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddOrganizationIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearOrganizations()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) Iss() (r string, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIss(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldSub(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) OrganizationsCleared() bool
- func (m *UserMutation) OrganizationsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemoveOrganizationIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedOrganizationsIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIss()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetOrganizations()
- func (m *UserMutation) ResetSub()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetIss(s string)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetSub(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) Sub() (r string, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryOrganizations() *OrganizationQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithOrganizations(opts ...func(*OrganizationQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddOrganizationIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddOrganizations(o ...*Organization) *UserUpdate
- func (uu *UserUpdate) ClearOrganizations() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveOrganizationIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveOrganizations(o ...*Organization) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetIss(s string) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableIss(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableSub(s *string) *UserUpdate
- func (uu *UserUpdate) SetSub(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddOrganizationIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOrganizations(o ...*Organization) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOrganizations() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveOrganizationIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOrganizations(o ...*Organization) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIss(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIss(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSub(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSub(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetIss(v string) *UserUpsert
- func (u *UserUpsert) SetName(v string) *UserUpsert
- func (u *UserUpsert) SetSub(v string) *UserUpsert
- func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdateIss() *UserUpsert
- func (u *UserUpsert) UpdateName() *UserUpsert
- func (u *UserUpsert) UpdateSub() *UserUpsert
- func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetIss(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetSub(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateIss() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateSub() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetIss(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetSub(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateIss() *UserUpsertOne
- func (u *UserUpsertOne) UpdateName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdateSub() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
- type Users
- 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. TypeOrganization = "Organization" TypePlatform = "Platform" TypeUser = "User" )
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 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 // Organization is the client for interacting with the Organization builders. Organization *OrganizationClient // Platform is the client for interacting with the Platform builders. Platform *PlatformClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
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(). Organization. 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 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 Organization ¶
type Organization struct { // ID of the ent. ID uuid.UUID `json:"id,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"` // CreatedByID holds the value of the "created_by_id" field. CreatedByID uuid.UUID `json:"created_by_id,omitempty"` // UpdatedByID holds the value of the "updated_by_id" field. UpdatedByID uuid.UUID `json:"updated_by_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrganizationQuery when eager-loading is set. Edges OrganizationEdges `json:"edges"` // contains filtered or unexported fields }
Organization is the model entity for the Organization schema.
func (*Organization) QueryCreator ¶
func (o *Organization) QueryCreator() *UserQuery
QueryCreator queries the "creator" edge of the Organization entity.
func (*Organization) QueryEditor ¶
func (o *Organization) QueryEditor() *UserQuery
QueryEditor queries the "editor" edge of the Organization entity.
func (*Organization) QueryPlatforms ¶
func (o *Organization) QueryPlatforms() *PlatformQuery
QueryPlatforms queries the "platforms" edge of the Organization entity.
func (*Organization) QueryUsers ¶
func (o *Organization) QueryUsers() *UserQuery
QueryUsers queries the "users" edge of the Organization entity.
func (*Organization) String ¶
func (o *Organization) String() string
String implements the fmt.Stringer.
func (*Organization) Unwrap ¶
func (o *Organization) Unwrap() *Organization
Unwrap unwraps the Organization 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 (*Organization) Update ¶
func (o *Organization) Update() *OrganizationUpdateOne
Update returns a builder for updating this Organization. Note that you need to call Organization.Unwrap() before calling this method if this Organization was returned from a transaction, and the transaction was committed or rolled back.
type OrganizationClient ¶
type OrganizationClient struct {
// contains filtered or unexported fields
}
OrganizationClient is a client for the Organization schema.
func NewOrganizationClient ¶
func NewOrganizationClient(c config) *OrganizationClient
NewOrganizationClient returns a client for the Organization from the given config.
func (*OrganizationClient) Create ¶
func (c *OrganizationClient) Create() *OrganizationCreate
Create returns a builder for creating a Organization entity.
func (*OrganizationClient) CreateBulk ¶
func (c *OrganizationClient) CreateBulk(builders ...*OrganizationCreate) *OrganizationCreateBulk
CreateBulk returns a builder for creating a bulk of Organization entities.
func (*OrganizationClient) Delete ¶
func (c *OrganizationClient) Delete() *OrganizationDelete
Delete returns a delete builder for Organization.
func (*OrganizationClient) DeleteOne ¶
func (c *OrganizationClient) DeleteOne(o *Organization) *OrganizationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrganizationClient) DeleteOneID ¶
func (c *OrganizationClient) DeleteOneID(id uuid.UUID) *OrganizationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrganizationClient) Get ¶
func (c *OrganizationClient) Get(ctx context.Context, id uuid.UUID) (*Organization, error)
Get returns a Organization entity by its id.
func (*OrganizationClient) GetX ¶
func (c *OrganizationClient) GetX(ctx context.Context, id uuid.UUID) *Organization
GetX is like Get, but panics if an error occurs.
func (*OrganizationClient) Hooks ¶
func (c *OrganizationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrganizationClient) Intercept ¶
func (c *OrganizationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `organization.Intercept(f(g(h())))`.
func (*OrganizationClient) Interceptors ¶
func (c *OrganizationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrganizationClient) MapCreateBulk ¶
func (c *OrganizationClient) MapCreateBulk(slice any, setFunc func(*OrganizationCreate, int)) *OrganizationCreateBulk
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 (*OrganizationClient) Query ¶
func (c *OrganizationClient) Query() *OrganizationQuery
Query returns a query builder for Organization.
func (*OrganizationClient) QueryCreator ¶
func (c *OrganizationClient) QueryCreator(o *Organization) *UserQuery
QueryCreator queries the creator edge of a Organization.
func (*OrganizationClient) QueryEditor ¶
func (c *OrganizationClient) QueryEditor(o *Organization) *UserQuery
QueryEditor queries the editor edge of a Organization.
func (*OrganizationClient) QueryPlatforms ¶
func (c *OrganizationClient) QueryPlatforms(o *Organization) *PlatformQuery
QueryPlatforms queries the platforms edge of a Organization.
func (*OrganizationClient) QueryUsers ¶
func (c *OrganizationClient) QueryUsers(o *Organization) *UserQuery
QueryUsers queries the users edge of a Organization.
func (*OrganizationClient) Update ¶
func (c *OrganizationClient) Update() *OrganizationUpdate
Update returns an update builder for Organization.
func (*OrganizationClient) UpdateOne ¶
func (c *OrganizationClient) UpdateOne(o *Organization) *OrganizationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrganizationClient) UpdateOneID ¶
func (c *OrganizationClient) UpdateOneID(id uuid.UUID) *OrganizationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrganizationClient) Use ¶
func (c *OrganizationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `organization.Hooks(f(g(h())))`.
type OrganizationCreate ¶
type OrganizationCreate struct {
// contains filtered or unexported fields
}
OrganizationCreate is the builder for creating a Organization entity.
func (*OrganizationCreate) AddPlatformIDs ¶
func (oc *OrganizationCreate) AddPlatformIDs(ids ...uuid.UUID) *OrganizationCreate
AddPlatformIDs adds the "platforms" edge to the Platform entity by IDs.
func (*OrganizationCreate) AddPlatforms ¶
func (oc *OrganizationCreate) AddPlatforms(p ...*Platform) *OrganizationCreate
AddPlatforms adds the "platforms" edges to the Platform entity.
func (*OrganizationCreate) AddUserIDs ¶
func (oc *OrganizationCreate) AddUserIDs(ids ...uuid.UUID) *OrganizationCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*OrganizationCreate) AddUsers ¶
func (oc *OrganizationCreate) AddUsers(u ...*User) *OrganizationCreate
AddUsers adds the "users" edges to the User entity.
func (*OrganizationCreate) Exec ¶
func (oc *OrganizationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrganizationCreate) ExecX ¶
func (oc *OrganizationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationCreate) Mutation ¶
func (oc *OrganizationCreate) Mutation() *OrganizationMutation
Mutation returns the OrganizationMutation object of the builder.
func (*OrganizationCreate) OnConflict ¶
func (oc *OrganizationCreate) OnConflict(opts ...sql.ConflictOption) *OrganizationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Organization.Create(). SetCreatedAt(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.OrganizationUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*OrganizationCreate) OnConflictColumns ¶
func (oc *OrganizationCreate) OnConflictColumns(columns ...string) *OrganizationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Organization.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OrganizationCreate) Save ¶
func (oc *OrganizationCreate) Save(ctx context.Context) (*Organization, error)
Save creates the Organization in the database.
func (*OrganizationCreate) SaveX ¶
func (oc *OrganizationCreate) SaveX(ctx context.Context) *Organization
SaveX calls Save and panics if Save returns an error.
func (*OrganizationCreate) SetCreatedAt ¶
func (oc *OrganizationCreate) SetCreatedAt(t time.Time) *OrganizationCreate
SetCreatedAt sets the "created_at" field.
func (*OrganizationCreate) SetCreatedByID ¶
func (oc *OrganizationCreate) SetCreatedByID(u uuid.UUID) *OrganizationCreate
SetCreatedByID sets the "created_by_id" field.
func (*OrganizationCreate) SetCreator ¶
func (oc *OrganizationCreate) SetCreator(u *User) *OrganizationCreate
SetCreator sets the "creator" edge to the User entity.
func (*OrganizationCreate) SetCreatorID ¶
func (oc *OrganizationCreate) SetCreatorID(id uuid.UUID) *OrganizationCreate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*OrganizationCreate) SetDisplayName ¶
func (oc *OrganizationCreate) SetDisplayName(s string) *OrganizationCreate
SetDisplayName sets the "display_name" field.
func (*OrganizationCreate) SetEditor ¶
func (oc *OrganizationCreate) SetEditor(u *User) *OrganizationCreate
SetEditor sets the "editor" edge to the User entity.
func (*OrganizationCreate) SetEditorID ¶
func (oc *OrganizationCreate) SetEditorID(id uuid.UUID) *OrganizationCreate
SetEditorID sets the "editor" edge to the User entity by ID.
func (*OrganizationCreate) SetID ¶
func (oc *OrganizationCreate) SetID(u uuid.UUID) *OrganizationCreate
SetID sets the "id" field.
func (*OrganizationCreate) SetName ¶
func (oc *OrganizationCreate) SetName(s string) *OrganizationCreate
SetName sets the "name" field.
func (*OrganizationCreate) SetNillableCreatedAt ¶
func (oc *OrganizationCreate) SetNillableCreatedAt(t *time.Time) *OrganizationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrganizationCreate) SetNillableID ¶
func (oc *OrganizationCreate) SetNillableID(u *uuid.UUID) *OrganizationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OrganizationCreate) SetNillableUpdatedAt ¶
func (oc *OrganizationCreate) SetNillableUpdatedAt(t *time.Time) *OrganizationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrganizationCreate) SetUpdatedAt ¶
func (oc *OrganizationCreate) SetUpdatedAt(t time.Time) *OrganizationCreate
SetUpdatedAt sets the "updated_at" field.
func (*OrganizationCreate) SetUpdatedByID ¶
func (oc *OrganizationCreate) SetUpdatedByID(u uuid.UUID) *OrganizationCreate
SetUpdatedByID sets the "updated_by_id" field.
type OrganizationCreateBulk ¶
type OrganizationCreateBulk struct {
// contains filtered or unexported fields
}
OrganizationCreateBulk is the builder for creating many Organization entities in bulk.
func (*OrganizationCreateBulk) Exec ¶
func (ocb *OrganizationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrganizationCreateBulk) ExecX ¶
func (ocb *OrganizationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationCreateBulk) OnConflict ¶
func (ocb *OrganizationCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrganizationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Organization.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.OrganizationUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*OrganizationCreateBulk) OnConflictColumns ¶
func (ocb *OrganizationCreateBulk) OnConflictColumns(columns ...string) *OrganizationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Organization.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OrganizationCreateBulk) Save ¶
func (ocb *OrganizationCreateBulk) Save(ctx context.Context) ([]*Organization, error)
Save creates the Organization entities in the database.
func (*OrganizationCreateBulk) SaveX ¶
func (ocb *OrganizationCreateBulk) SaveX(ctx context.Context) []*Organization
SaveX is like Save, but panics if an error occurs.
type OrganizationDelete ¶
type OrganizationDelete struct {
// contains filtered or unexported fields
}
OrganizationDelete is the builder for deleting a Organization entity.
func (*OrganizationDelete) Exec ¶
func (od *OrganizationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrganizationDelete) ExecX ¶
func (od *OrganizationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationDelete) Where ¶
func (od *OrganizationDelete) Where(ps ...predicate.Organization) *OrganizationDelete
Where appends a list predicates to the OrganizationDelete builder.
type OrganizationDeleteOne ¶
type OrganizationDeleteOne struct {
// contains filtered or unexported fields
}
OrganizationDeleteOne is the builder for deleting a single Organization entity.
func (*OrganizationDeleteOne) Exec ¶
func (odo *OrganizationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrganizationDeleteOne) ExecX ¶
func (odo *OrganizationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationDeleteOne) Where ¶
func (odo *OrganizationDeleteOne) Where(ps ...predicate.Organization) *OrganizationDeleteOne
Where appends a list predicates to the OrganizationDelete builder.
type OrganizationEdges ¶
type OrganizationEdges struct { // Creator holds the value of the creator edge. Creator *User `json:"creator,omitempty"` // Editor holds the value of the editor edge. Editor *User `json:"editor,omitempty"` // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // Platforms holds the value of the platforms edge. Platforms []*Platform `json:"platforms,omitempty"` // contains filtered or unexported fields }
OrganizationEdges holds the relations/edges for other nodes in the graph.
func (OrganizationEdges) CreatorOrErr ¶
func (e OrganizationEdges) CreatorOrErr() (*User, error)
CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrganizationEdges) EditorOrErr ¶
func (e OrganizationEdges) EditorOrErr() (*User, error)
EditorOrErr returns the Editor value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrganizationEdges) PlatformsOrErr ¶
func (e OrganizationEdges) PlatformsOrErr() ([]*Platform, error)
PlatformsOrErr returns the Platforms value or an error if the edge was not loaded in eager-loading.
func (OrganizationEdges) UsersOrErr ¶
func (e OrganizationEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type OrganizationGroupBy ¶
type OrganizationGroupBy struct {
// contains filtered or unexported fields
}
OrganizationGroupBy is the group-by builder for Organization entities.
func (*OrganizationGroupBy) Aggregate ¶
func (ogb *OrganizationGroupBy) Aggregate(fns ...AggregateFunc) *OrganizationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrganizationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrganizationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrganizationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrganizationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrganizationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrganizationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrganizationGroupBy) Scan ¶
func (ogb *OrganizationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrganizationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrganizationMutation ¶
type OrganizationMutation struct {
// contains filtered or unexported fields
}
OrganizationMutation represents an operation that mutates the Organization nodes in the graph.
func (*OrganizationMutation) AddField ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) AddPlatformIDs ¶
func (m *OrganizationMutation) AddPlatformIDs(ids ...uuid.UUID)
AddPlatformIDs adds the "platforms" edge to the Platform entity by ids.
func (*OrganizationMutation) AddUserIDs ¶
func (m *OrganizationMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*OrganizationMutation) AddedEdges ¶
func (m *OrganizationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrganizationMutation) AddedField ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) AddedFields ¶
func (m *OrganizationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrganizationMutation) AddedIDs ¶
func (m *OrganizationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrganizationMutation) ClearCreator ¶
func (m *OrganizationMutation) ClearCreator()
ClearCreator clears the "creator" edge to the User entity.
func (*OrganizationMutation) ClearEdge ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearEditor ¶
func (m *OrganizationMutation) ClearEditor()
ClearEditor clears the "editor" edge to the User entity.
func (*OrganizationMutation) ClearField ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearPlatforms ¶
func (m *OrganizationMutation) ClearPlatforms()
ClearPlatforms clears the "platforms" edge to the Platform entity.
func (*OrganizationMutation) ClearUsers ¶
func (m *OrganizationMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*OrganizationMutation) ClearedEdges ¶
func (m *OrganizationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrganizationMutation) ClearedFields ¶
func (m *OrganizationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrganizationMutation) Client ¶
func (m OrganizationMutation) 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 (*OrganizationMutation) CreatedAt ¶
func (m *OrganizationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrganizationMutation) CreatedByID ¶
func (m *OrganizationMutation) CreatedByID() (r uuid.UUID, exists bool)
CreatedByID returns the value of the "created_by_id" field in the mutation.
func (*OrganizationMutation) CreatorCleared ¶
func (m *OrganizationMutation) CreatorCleared() bool
CreatorCleared reports if the "creator" edge to the User entity was cleared.
func (*OrganizationMutation) CreatorID ¶
func (m *OrganizationMutation) CreatorID() (id uuid.UUID, exists bool)
CreatorID returns the "creator" edge ID in the mutation.
func (*OrganizationMutation) CreatorIDs ¶
func (m *OrganizationMutation) CreatorIDs() (ids []uuid.UUID)
CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.
func (*OrganizationMutation) DisplayName ¶
func (m *OrganizationMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*OrganizationMutation) EdgeCleared ¶
func (m *OrganizationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrganizationMutation) EditorCleared ¶
func (m *OrganizationMutation) EditorCleared() bool
EditorCleared reports if the "editor" edge to the User entity was cleared.
func (*OrganizationMutation) EditorID ¶
func (m *OrganizationMutation) EditorID() (id uuid.UUID, exists bool)
EditorID returns the "editor" edge ID in the mutation.
func (*OrganizationMutation) EditorIDs ¶
func (m *OrganizationMutation) EditorIDs() (ids []uuid.UUID)
EditorIDs returns the "editor" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EditorID instead. It exists only for internal usage by the builders.
func (*OrganizationMutation) Field ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) FieldCleared ¶
func (m *OrganizationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrganizationMutation) Fields ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) ID ¶
func (m *OrganizationMutation) ID() (id uuid.UUID, 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 (*OrganizationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrganizationMutation) Name ¶
func (m *OrganizationMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*OrganizationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Organization entity. If the Organization object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrganizationMutation) OldCreatedByID ¶
OldCreatedByID returns the old "created_by_id" field's value of the Organization entity. If the Organization object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrganizationMutation) OldDisplayName ¶
func (m *OrganizationMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_name" field's value of the Organization entity. If the Organization object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrganizationMutation) 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 (*OrganizationMutation) OldName ¶
func (m *OrganizationMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Organization entity. If the Organization object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrganizationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Organization entity. If the Organization object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrganizationMutation) OldUpdatedByID ¶
OldUpdatedByID returns the old "updated_by_id" field's value of the Organization entity. If the Organization object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrganizationMutation) Op ¶
func (m *OrganizationMutation) Op() Op
Op returns the operation name.
func (*OrganizationMutation) PlatformsCleared ¶
func (m *OrganizationMutation) PlatformsCleared() bool
PlatformsCleared reports if the "platforms" edge to the Platform entity was cleared.
func (*OrganizationMutation) PlatformsIDs ¶
func (m *OrganizationMutation) PlatformsIDs() (ids []uuid.UUID)
PlatformsIDs returns the "platforms" edge IDs in the mutation.
func (*OrganizationMutation) RemovePlatformIDs ¶
func (m *OrganizationMutation) RemovePlatformIDs(ids ...uuid.UUID)
RemovePlatformIDs removes the "platforms" edge to the Platform entity by IDs.
func (*OrganizationMutation) RemoveUserIDs ¶
func (m *OrganizationMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*OrganizationMutation) RemovedEdges ¶
func (m *OrganizationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrganizationMutation) RemovedIDs ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) RemovedPlatformsIDs ¶
func (m *OrganizationMutation) RemovedPlatformsIDs() (ids []uuid.UUID)
RemovedPlatforms returns the removed IDs of the "platforms" edge to the Platform entity.
func (*OrganizationMutation) RemovedUsersIDs ¶
func (m *OrganizationMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*OrganizationMutation) ResetCreatedAt ¶
func (m *OrganizationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrganizationMutation) ResetCreatedByID ¶
func (m *OrganizationMutation) ResetCreatedByID()
ResetCreatedByID resets all changes to the "created_by_id" field.
func (*OrganizationMutation) ResetCreator ¶
func (m *OrganizationMutation) ResetCreator()
ResetCreator resets all changes to the "creator" edge.
func (*OrganizationMutation) ResetDisplayName ¶
func (m *OrganizationMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*OrganizationMutation) ResetEdge ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetEditor ¶
func (m *OrganizationMutation) ResetEditor()
ResetEditor resets all changes to the "editor" edge.
func (*OrganizationMutation) ResetField ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetName ¶
func (m *OrganizationMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*OrganizationMutation) ResetPlatforms ¶
func (m *OrganizationMutation) ResetPlatforms()
ResetPlatforms resets all changes to the "platforms" edge.
func (*OrganizationMutation) ResetUpdatedAt ¶
func (m *OrganizationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrganizationMutation) ResetUpdatedByID ¶
func (m *OrganizationMutation) ResetUpdatedByID()
ResetUpdatedByID resets all changes to the "updated_by_id" field.
func (*OrganizationMutation) ResetUsers ¶
func (m *OrganizationMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*OrganizationMutation) SetCreatedAt ¶
func (m *OrganizationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrganizationMutation) SetCreatedByID ¶
func (m *OrganizationMutation) SetCreatedByID(u uuid.UUID)
SetCreatedByID sets the "created_by_id" field.
func (*OrganizationMutation) SetCreatorID ¶
func (m *OrganizationMutation) SetCreatorID(id uuid.UUID)
SetCreatorID sets the "creator" edge to the User entity by id.
func (*OrganizationMutation) SetDisplayName ¶
func (m *OrganizationMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*OrganizationMutation) SetEditorID ¶
func (m *OrganizationMutation) SetEditorID(id uuid.UUID)
SetEditorID sets the "editor" edge to the User entity by id.
func (*OrganizationMutation) SetField ¶
func (m *OrganizationMutation) 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 (*OrganizationMutation) SetID ¶
func (m *OrganizationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Organization entities.
func (*OrganizationMutation) SetName ¶
func (m *OrganizationMutation) SetName(s string)
SetName sets the "name" field.
func (*OrganizationMutation) SetOp ¶
func (m *OrganizationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrganizationMutation) SetUpdatedAt ¶
func (m *OrganizationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrganizationMutation) SetUpdatedByID ¶
func (m *OrganizationMutation) SetUpdatedByID(u uuid.UUID)
SetUpdatedByID sets the "updated_by_id" field.
func (OrganizationMutation) Tx ¶
func (m OrganizationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrganizationMutation) Type ¶
func (m *OrganizationMutation) Type() string
Type returns the node type of this mutation (Organization).
func (*OrganizationMutation) UpdatedAt ¶
func (m *OrganizationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrganizationMutation) UpdatedByID ¶
func (m *OrganizationMutation) UpdatedByID() (r uuid.UUID, exists bool)
UpdatedByID returns the value of the "updated_by_id" field in the mutation.
func (*OrganizationMutation) UsersCleared ¶
func (m *OrganizationMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*OrganizationMutation) UsersIDs ¶
func (m *OrganizationMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*OrganizationMutation) Where ¶
func (m *OrganizationMutation) Where(ps ...predicate.Organization)
Where appends a list predicates to the OrganizationMutation builder.
func (*OrganizationMutation) WhereP ¶
func (m *OrganizationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrganizationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrganizationQuery ¶
type OrganizationQuery struct {
// contains filtered or unexported fields
}
OrganizationQuery is the builder for querying Organization entities.
func (*OrganizationQuery) Aggregate ¶
func (oq *OrganizationQuery) Aggregate(fns ...AggregateFunc) *OrganizationSelect
Aggregate returns a OrganizationSelect configured with the given aggregations.
func (*OrganizationQuery) All ¶
func (oq *OrganizationQuery) All(ctx context.Context) ([]*Organization, error)
All executes the query and returns a list of Organizations.
func (*OrganizationQuery) AllX ¶
func (oq *OrganizationQuery) AllX(ctx context.Context) []*Organization
AllX is like All, but panics if an error occurs.
func (*OrganizationQuery) Clone ¶
func (oq *OrganizationQuery) Clone() *OrganizationQuery
Clone returns a duplicate of the OrganizationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrganizationQuery) Count ¶
func (oq *OrganizationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrganizationQuery) CountX ¶
func (oq *OrganizationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrganizationQuery) Exist ¶
func (oq *OrganizationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrganizationQuery) ExistX ¶
func (oq *OrganizationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrganizationQuery) First ¶
func (oq *OrganizationQuery) First(ctx context.Context) (*Organization, error)
First returns the first Organization entity from the query. Returns a *NotFoundError when no Organization was found.
func (*OrganizationQuery) FirstID ¶
FirstID returns the first Organization ID from the query. Returns a *NotFoundError when no Organization ID was found.
func (*OrganizationQuery) FirstIDX ¶
func (oq *OrganizationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrganizationQuery) FirstX ¶
func (oq *OrganizationQuery) FirstX(ctx context.Context) *Organization
FirstX is like First, but panics if an error occurs.
func (*OrganizationQuery) GroupBy ¶
func (oq *OrganizationQuery) GroupBy(field string, fields ...string) *OrganizationGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Organization.Query(). GroupBy(organization.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrganizationQuery) IDsX ¶
func (oq *OrganizationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*OrganizationQuery) Limit ¶
func (oq *OrganizationQuery) Limit(limit int) *OrganizationQuery
Limit the number of records to be returned by this query.
func (*OrganizationQuery) Offset ¶
func (oq *OrganizationQuery) Offset(offset int) *OrganizationQuery
Offset to start from.
func (*OrganizationQuery) Only ¶
func (oq *OrganizationQuery) Only(ctx context.Context) (*Organization, error)
Only returns a single Organization entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Organization entity is found. Returns a *NotFoundError when no Organization entities are found.
func (*OrganizationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Organization ID in the query. Returns a *NotSingularError when more than one Organization ID is found. Returns a *NotFoundError when no entities are found.
func (*OrganizationQuery) OnlyIDX ¶
func (oq *OrganizationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrganizationQuery) OnlyX ¶
func (oq *OrganizationQuery) OnlyX(ctx context.Context) *Organization
OnlyX is like Only, but panics if an error occurs.
func (*OrganizationQuery) Order ¶
func (oq *OrganizationQuery) Order(o ...organization.OrderOption) *OrganizationQuery
Order specifies how the records should be ordered.
func (*OrganizationQuery) QueryCreator ¶
func (oq *OrganizationQuery) QueryCreator() *UserQuery
QueryCreator chains the current query on the "creator" edge.
func (*OrganizationQuery) QueryEditor ¶
func (oq *OrganizationQuery) QueryEditor() *UserQuery
QueryEditor chains the current query on the "editor" edge.
func (*OrganizationQuery) QueryPlatforms ¶
func (oq *OrganizationQuery) QueryPlatforms() *PlatformQuery
QueryPlatforms chains the current query on the "platforms" edge.
func (*OrganizationQuery) QueryUsers ¶
func (oq *OrganizationQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*OrganizationQuery) Select ¶
func (oq *OrganizationQuery) Select(fields ...string) *OrganizationSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Organization.Query(). Select(organization.FieldCreatedAt). Scan(ctx, &v)
func (*OrganizationQuery) Unique ¶
func (oq *OrganizationQuery) Unique(unique bool) *OrganizationQuery
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 (*OrganizationQuery) Where ¶
func (oq *OrganizationQuery) Where(ps ...predicate.Organization) *OrganizationQuery
Where adds a new predicate for the OrganizationQuery builder.
func (*OrganizationQuery) WithCreator ¶
func (oq *OrganizationQuery) WithCreator(opts ...func(*UserQuery)) *OrganizationQuery
WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrganizationQuery) WithEditor ¶
func (oq *OrganizationQuery) WithEditor(opts ...func(*UserQuery)) *OrganizationQuery
WithEditor tells the query-builder to eager-load the nodes that are connected to the "editor" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrganizationQuery) WithPlatforms ¶
func (oq *OrganizationQuery) WithPlatforms(opts ...func(*PlatformQuery)) *OrganizationQuery
WithPlatforms tells the query-builder to eager-load the nodes that are connected to the "platforms" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrganizationQuery) WithUsers ¶
func (oq *OrganizationQuery) WithUsers(opts ...func(*UserQuery)) *OrganizationQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type OrganizationSelect ¶
type OrganizationSelect struct { *OrganizationQuery // contains filtered or unexported fields }
OrganizationSelect is the builder for selecting fields of Organization entities.
func (*OrganizationSelect) Aggregate ¶
func (os *OrganizationSelect) Aggregate(fns ...AggregateFunc) *OrganizationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrganizationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrganizationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrganizationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrganizationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrganizationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrganizationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrganizationSelect) Scan ¶
func (os *OrganizationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrganizationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrganizationUpdate ¶
type OrganizationUpdate struct {
// contains filtered or unexported fields
}
OrganizationUpdate is the builder for updating Organization entities.
func (*OrganizationUpdate) AddPlatformIDs ¶
func (ou *OrganizationUpdate) AddPlatformIDs(ids ...uuid.UUID) *OrganizationUpdate
AddPlatformIDs adds the "platforms" edge to the Platform entity by IDs.
func (*OrganizationUpdate) AddPlatforms ¶
func (ou *OrganizationUpdate) AddPlatforms(p ...*Platform) *OrganizationUpdate
AddPlatforms adds the "platforms" edges to the Platform entity.
func (*OrganizationUpdate) AddUserIDs ¶
func (ou *OrganizationUpdate) AddUserIDs(ids ...uuid.UUID) *OrganizationUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*OrganizationUpdate) AddUsers ¶
func (ou *OrganizationUpdate) AddUsers(u ...*User) *OrganizationUpdate
AddUsers adds the "users" edges to the User entity.
func (*OrganizationUpdate) ClearEditor ¶
func (ou *OrganizationUpdate) ClearEditor() *OrganizationUpdate
ClearEditor clears the "editor" edge to the User entity.
func (*OrganizationUpdate) ClearPlatforms ¶
func (ou *OrganizationUpdate) ClearPlatforms() *OrganizationUpdate
ClearPlatforms clears all "platforms" edges to the Platform entity.
func (*OrganizationUpdate) ClearUsers ¶
func (ou *OrganizationUpdate) ClearUsers() *OrganizationUpdate
ClearUsers clears all "users" edges to the User entity.
func (*OrganizationUpdate) Exec ¶
func (ou *OrganizationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrganizationUpdate) ExecX ¶
func (ou *OrganizationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationUpdate) Mutation ¶
func (ou *OrganizationUpdate) Mutation() *OrganizationMutation
Mutation returns the OrganizationMutation object of the builder.
func (*OrganizationUpdate) RemovePlatformIDs ¶
func (ou *OrganizationUpdate) RemovePlatformIDs(ids ...uuid.UUID) *OrganizationUpdate
RemovePlatformIDs removes the "platforms" edge to Platform entities by IDs.
func (*OrganizationUpdate) RemovePlatforms ¶
func (ou *OrganizationUpdate) RemovePlatforms(p ...*Platform) *OrganizationUpdate
RemovePlatforms removes "platforms" edges to Platform entities.
func (*OrganizationUpdate) RemoveUserIDs ¶
func (ou *OrganizationUpdate) RemoveUserIDs(ids ...uuid.UUID) *OrganizationUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*OrganizationUpdate) RemoveUsers ¶
func (ou *OrganizationUpdate) RemoveUsers(u ...*User) *OrganizationUpdate
RemoveUsers removes "users" edges to User entities.
func (*OrganizationUpdate) Save ¶
func (ou *OrganizationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrganizationUpdate) SaveX ¶
func (ou *OrganizationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrganizationUpdate) SetDisplayName ¶
func (ou *OrganizationUpdate) SetDisplayName(s string) *OrganizationUpdate
SetDisplayName sets the "display_name" field.
func (*OrganizationUpdate) SetEditor ¶
func (ou *OrganizationUpdate) SetEditor(u *User) *OrganizationUpdate
SetEditor sets the "editor" edge to the User entity.
func (*OrganizationUpdate) SetEditorID ¶
func (ou *OrganizationUpdate) SetEditorID(id uuid.UUID) *OrganizationUpdate
SetEditorID sets the "editor" edge to the User entity by ID.
func (*OrganizationUpdate) SetName ¶
func (ou *OrganizationUpdate) SetName(s string) *OrganizationUpdate
SetName sets the "name" field.
func (*OrganizationUpdate) SetNillableDisplayName ¶
func (ou *OrganizationUpdate) SetNillableDisplayName(s *string) *OrganizationUpdate
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*OrganizationUpdate) SetNillableName ¶
func (ou *OrganizationUpdate) SetNillableName(s *string) *OrganizationUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*OrganizationUpdate) SetNillableUpdatedByID ¶
func (ou *OrganizationUpdate) SetNillableUpdatedByID(u *uuid.UUID) *OrganizationUpdate
SetNillableUpdatedByID sets the "updated_by_id" field if the given value is not nil.
func (*OrganizationUpdate) SetUpdatedAt ¶
func (ou *OrganizationUpdate) SetUpdatedAt(t time.Time) *OrganizationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrganizationUpdate) SetUpdatedByID ¶
func (ou *OrganizationUpdate) SetUpdatedByID(u uuid.UUID) *OrganizationUpdate
SetUpdatedByID sets the "updated_by_id" field.
func (*OrganizationUpdate) Where ¶
func (ou *OrganizationUpdate) Where(ps ...predicate.Organization) *OrganizationUpdate
Where appends a list predicates to the OrganizationUpdate builder.
type OrganizationUpdateOne ¶
type OrganizationUpdateOne struct {
// contains filtered or unexported fields
}
OrganizationUpdateOne is the builder for updating a single Organization entity.
func (*OrganizationUpdateOne) AddPlatformIDs ¶
func (ouo *OrganizationUpdateOne) AddPlatformIDs(ids ...uuid.UUID) *OrganizationUpdateOne
AddPlatformIDs adds the "platforms" edge to the Platform entity by IDs.
func (*OrganizationUpdateOne) AddPlatforms ¶
func (ouo *OrganizationUpdateOne) AddPlatforms(p ...*Platform) *OrganizationUpdateOne
AddPlatforms adds the "platforms" edges to the Platform entity.
func (*OrganizationUpdateOne) AddUserIDs ¶
func (ouo *OrganizationUpdateOne) AddUserIDs(ids ...uuid.UUID) *OrganizationUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*OrganizationUpdateOne) AddUsers ¶
func (ouo *OrganizationUpdateOne) AddUsers(u ...*User) *OrganizationUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*OrganizationUpdateOne) ClearEditor ¶
func (ouo *OrganizationUpdateOne) ClearEditor() *OrganizationUpdateOne
ClearEditor clears the "editor" edge to the User entity.
func (*OrganizationUpdateOne) ClearPlatforms ¶
func (ouo *OrganizationUpdateOne) ClearPlatforms() *OrganizationUpdateOne
ClearPlatforms clears all "platforms" edges to the Platform entity.
func (*OrganizationUpdateOne) ClearUsers ¶
func (ouo *OrganizationUpdateOne) ClearUsers() *OrganizationUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*OrganizationUpdateOne) Exec ¶
func (ouo *OrganizationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrganizationUpdateOne) ExecX ¶
func (ouo *OrganizationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationUpdateOne) Mutation ¶
func (ouo *OrganizationUpdateOne) Mutation() *OrganizationMutation
Mutation returns the OrganizationMutation object of the builder.
func (*OrganizationUpdateOne) RemovePlatformIDs ¶
func (ouo *OrganizationUpdateOne) RemovePlatformIDs(ids ...uuid.UUID) *OrganizationUpdateOne
RemovePlatformIDs removes the "platforms" edge to Platform entities by IDs.
func (*OrganizationUpdateOne) RemovePlatforms ¶
func (ouo *OrganizationUpdateOne) RemovePlatforms(p ...*Platform) *OrganizationUpdateOne
RemovePlatforms removes "platforms" edges to Platform entities.
func (*OrganizationUpdateOne) RemoveUserIDs ¶
func (ouo *OrganizationUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *OrganizationUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*OrganizationUpdateOne) RemoveUsers ¶
func (ouo *OrganizationUpdateOne) RemoveUsers(u ...*User) *OrganizationUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*OrganizationUpdateOne) Save ¶
func (ouo *OrganizationUpdateOne) Save(ctx context.Context) (*Organization, error)
Save executes the query and returns the updated Organization entity.
func (*OrganizationUpdateOne) SaveX ¶
func (ouo *OrganizationUpdateOne) SaveX(ctx context.Context) *Organization
SaveX is like Save, but panics if an error occurs.
func (*OrganizationUpdateOne) Select ¶
func (ouo *OrganizationUpdateOne) Select(field string, fields ...string) *OrganizationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrganizationUpdateOne) SetDisplayName ¶
func (ouo *OrganizationUpdateOne) SetDisplayName(s string) *OrganizationUpdateOne
SetDisplayName sets the "display_name" field.
func (*OrganizationUpdateOne) SetEditor ¶
func (ouo *OrganizationUpdateOne) SetEditor(u *User) *OrganizationUpdateOne
SetEditor sets the "editor" edge to the User entity.
func (*OrganizationUpdateOne) SetEditorID ¶
func (ouo *OrganizationUpdateOne) SetEditorID(id uuid.UUID) *OrganizationUpdateOne
SetEditorID sets the "editor" edge to the User entity by ID.
func (*OrganizationUpdateOne) SetName ¶
func (ouo *OrganizationUpdateOne) SetName(s string) *OrganizationUpdateOne
SetName sets the "name" field.
func (*OrganizationUpdateOne) SetNillableDisplayName ¶
func (ouo *OrganizationUpdateOne) SetNillableDisplayName(s *string) *OrganizationUpdateOne
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*OrganizationUpdateOne) SetNillableName ¶
func (ouo *OrganizationUpdateOne) SetNillableName(s *string) *OrganizationUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*OrganizationUpdateOne) SetNillableUpdatedByID ¶
func (ouo *OrganizationUpdateOne) SetNillableUpdatedByID(u *uuid.UUID) *OrganizationUpdateOne
SetNillableUpdatedByID sets the "updated_by_id" field if the given value is not nil.
func (*OrganizationUpdateOne) SetUpdatedAt ¶
func (ouo *OrganizationUpdateOne) SetUpdatedAt(t time.Time) *OrganizationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrganizationUpdateOne) SetUpdatedByID ¶
func (ouo *OrganizationUpdateOne) SetUpdatedByID(u uuid.UUID) *OrganizationUpdateOne
SetUpdatedByID sets the "updated_by_id" field.
func (*OrganizationUpdateOne) Where ¶
func (ouo *OrganizationUpdateOne) Where(ps ...predicate.Organization) *OrganizationUpdateOne
Where appends a list predicates to the OrganizationUpdate builder.
type OrganizationUpsert ¶
OrganizationUpsert is the "OnConflict" setter.
func (*OrganizationUpsert) SetDisplayName ¶
func (u *OrganizationUpsert) SetDisplayName(v string) *OrganizationUpsert
SetDisplayName sets the "display_name" field.
func (*OrganizationUpsert) SetName ¶
func (u *OrganizationUpsert) SetName(v string) *OrganizationUpsert
SetName sets the "name" field.
func (*OrganizationUpsert) SetUpdatedAt ¶
func (u *OrganizationUpsert) SetUpdatedAt(v time.Time) *OrganizationUpsert
SetUpdatedAt sets the "updated_at" field.
func (*OrganizationUpsert) SetUpdatedByID ¶
func (u *OrganizationUpsert) SetUpdatedByID(v uuid.UUID) *OrganizationUpsert
SetUpdatedByID sets the "updated_by_id" field.
func (*OrganizationUpsert) UpdateDisplayName ¶
func (u *OrganizationUpsert) UpdateDisplayName() *OrganizationUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*OrganizationUpsert) UpdateName ¶
func (u *OrganizationUpsert) UpdateName() *OrganizationUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*OrganizationUpsert) UpdateUpdatedAt ¶
func (u *OrganizationUpsert) UpdateUpdatedAt() *OrganizationUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*OrganizationUpsert) UpdateUpdatedByID ¶
func (u *OrganizationUpsert) UpdateUpdatedByID() *OrganizationUpsert
UpdateUpdatedByID sets the "updated_by_id" field to the value that was provided on create.
type OrganizationUpsertBulk ¶
type OrganizationUpsertBulk struct {
// contains filtered or unexported fields
}
OrganizationUpsertBulk is the builder for "upsert"-ing a bulk of Organization nodes.
func (*OrganizationUpsertBulk) DoNothing ¶
func (u *OrganizationUpsertBulk) DoNothing() *OrganizationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OrganizationUpsertBulk) Exec ¶
func (u *OrganizationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrganizationUpsertBulk) ExecX ¶
func (u *OrganizationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationUpsertBulk) Ignore ¶
func (u *OrganizationUpsertBulk) Ignore() *OrganizationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Organization.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OrganizationUpsertBulk) SetDisplayName ¶
func (u *OrganizationUpsertBulk) SetDisplayName(v string) *OrganizationUpsertBulk
SetDisplayName sets the "display_name" field.
func (*OrganizationUpsertBulk) SetName ¶
func (u *OrganizationUpsertBulk) SetName(v string) *OrganizationUpsertBulk
SetName sets the "name" field.
func (*OrganizationUpsertBulk) SetUpdatedAt ¶
func (u *OrganizationUpsertBulk) SetUpdatedAt(v time.Time) *OrganizationUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*OrganizationUpsertBulk) SetUpdatedByID ¶
func (u *OrganizationUpsertBulk) SetUpdatedByID(v uuid.UUID) *OrganizationUpsertBulk
SetUpdatedByID sets the "updated_by_id" field.
func (*OrganizationUpsertBulk) Update ¶
func (u *OrganizationUpsertBulk) Update(set func(*OrganizationUpsert)) *OrganizationUpsertBulk
Update allows overriding fields `UPDATE` values. See the OrganizationCreateBulk.OnConflict documentation for more info.
func (*OrganizationUpsertBulk) UpdateDisplayName ¶
func (u *OrganizationUpsertBulk) UpdateDisplayName() *OrganizationUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*OrganizationUpsertBulk) UpdateName ¶
func (u *OrganizationUpsertBulk) UpdateName() *OrganizationUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*OrganizationUpsertBulk) UpdateNewValues ¶
func (u *OrganizationUpsertBulk) UpdateNewValues() *OrganizationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Organization.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(organization.FieldID) }), ). Exec(ctx)
func (*OrganizationUpsertBulk) UpdateUpdatedAt ¶
func (u *OrganizationUpsertBulk) UpdateUpdatedAt() *OrganizationUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*OrganizationUpsertBulk) UpdateUpdatedByID ¶
func (u *OrganizationUpsertBulk) UpdateUpdatedByID() *OrganizationUpsertBulk
UpdateUpdatedByID sets the "updated_by_id" field to the value that was provided on create.
type OrganizationUpsertOne ¶
type OrganizationUpsertOne struct {
// contains filtered or unexported fields
}
OrganizationUpsertOne is the builder for "upsert"-ing
one Organization node.
func (*OrganizationUpsertOne) DoNothing ¶
func (u *OrganizationUpsertOne) DoNothing() *OrganizationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OrganizationUpsertOne) Exec ¶
func (u *OrganizationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*OrganizationUpsertOne) ExecX ¶
func (u *OrganizationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrganizationUpsertOne) ID ¶
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*OrganizationUpsertOne) IDX ¶
func (u *OrganizationUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*OrganizationUpsertOne) Ignore ¶
func (u *OrganizationUpsertOne) Ignore() *OrganizationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Organization.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OrganizationUpsertOne) SetDisplayName ¶
func (u *OrganizationUpsertOne) SetDisplayName(v string) *OrganizationUpsertOne
SetDisplayName sets the "display_name" field.
func (*OrganizationUpsertOne) SetName ¶
func (u *OrganizationUpsertOne) SetName(v string) *OrganizationUpsertOne
SetName sets the "name" field.
func (*OrganizationUpsertOne) SetUpdatedAt ¶
func (u *OrganizationUpsertOne) SetUpdatedAt(v time.Time) *OrganizationUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*OrganizationUpsertOne) SetUpdatedByID ¶
func (u *OrganizationUpsertOne) SetUpdatedByID(v uuid.UUID) *OrganizationUpsertOne
SetUpdatedByID sets the "updated_by_id" field.
func (*OrganizationUpsertOne) Update ¶
func (u *OrganizationUpsertOne) Update(set func(*OrganizationUpsert)) *OrganizationUpsertOne
Update allows overriding fields `UPDATE` values. See the OrganizationCreate.OnConflict documentation for more info.
func (*OrganizationUpsertOne) UpdateDisplayName ¶
func (u *OrganizationUpsertOne) UpdateDisplayName() *OrganizationUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*OrganizationUpsertOne) UpdateName ¶
func (u *OrganizationUpsertOne) UpdateName() *OrganizationUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*OrganizationUpsertOne) UpdateNewValues ¶
func (u *OrganizationUpsertOne) UpdateNewValues() *OrganizationUpsertOne
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.Organization.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(organization.FieldID) }), ). Exec(ctx)
func (*OrganizationUpsertOne) UpdateUpdatedAt ¶
func (u *OrganizationUpsertOne) UpdateUpdatedAt() *OrganizationUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*OrganizationUpsertOne) UpdateUpdatedByID ¶
func (u *OrganizationUpsertOne) UpdateUpdatedByID() *OrganizationUpsertOne
UpdateUpdatedByID sets the "updated_by_id" field to the value that was provided on create.
type Organizations ¶
type Organizations []*Organization
Organizations is a parsable slice of Organization.
type Platform ¶
type Platform struct { // ID of the ent. ID uuid.UUID `json:"id,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"` // CreatedByID holds the value of the "created_by_id" field. CreatedByID uuid.UUID `json:"created_by_id,omitempty"` // UpdatedByID holds the value of the "updated_by_id" field. UpdatedByID uuid.UUID `json:"updated_by_id,omitempty"` // OrgID holds the value of the "org_id" field. OrgID uuid.UUID `json:"org_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // JSON representation of FormlyFormConfig[] refer to https://github.com/holos-run/holos/issues/161 Form *storage.Form `json:"form,omitempty"` // JSON representation of the form model which holds user input values refer to https://github.com/holos-run/holos/issues/161 Model *storage.Model `json:"model,omitempty"` // CUE definition to vet the model against e.g. #PlatformConfig Cue []byte `json:"cue,omitempty"` // The definition name to vet config_values against config_cue e.g. '#PlatformSpec' CueDefinition string `json:"cue_definition,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PlatformQuery when eager-loading is set. Edges PlatformEdges `json:"edges"` // contains filtered or unexported fields }
Platform is the model entity for the Platform schema.
func (*Platform) QueryCreator ¶
QueryCreator queries the "creator" edge of the Platform entity.
func (*Platform) QueryEditor ¶
QueryEditor queries the "editor" edge of the Platform entity.
func (*Platform) QueryOrganization ¶
func (pl *Platform) QueryOrganization() *OrganizationQuery
QueryOrganization queries the "organization" edge of the Platform entity.
func (*Platform) Unwrap ¶
Unwrap unwraps the Platform 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 (*Platform) Update ¶
func (pl *Platform) Update() *PlatformUpdateOne
Update returns a builder for updating this Platform. Note that you need to call Platform.Unwrap() before calling this method if this Platform was returned from a transaction, and the transaction was committed or rolled back.
type PlatformClient ¶
type PlatformClient struct {
// contains filtered or unexported fields
}
PlatformClient is a client for the Platform schema.
func NewPlatformClient ¶
func NewPlatformClient(c config) *PlatformClient
NewPlatformClient returns a client for the Platform from the given config.
func (*PlatformClient) Create ¶
func (c *PlatformClient) Create() *PlatformCreate
Create returns a builder for creating a Platform entity.
func (*PlatformClient) CreateBulk ¶
func (c *PlatformClient) CreateBulk(builders ...*PlatformCreate) *PlatformCreateBulk
CreateBulk returns a builder for creating a bulk of Platform entities.
func (*PlatformClient) Delete ¶
func (c *PlatformClient) Delete() *PlatformDelete
Delete returns a delete builder for Platform.
func (*PlatformClient) DeleteOne ¶
func (c *PlatformClient) DeleteOne(pl *Platform) *PlatformDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PlatformClient) DeleteOneID ¶
func (c *PlatformClient) DeleteOneID(id uuid.UUID) *PlatformDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PlatformClient) Hooks ¶
func (c *PlatformClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PlatformClient) Intercept ¶
func (c *PlatformClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `platform.Intercept(f(g(h())))`.
func (*PlatformClient) Interceptors ¶
func (c *PlatformClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PlatformClient) MapCreateBulk ¶
func (c *PlatformClient) MapCreateBulk(slice any, setFunc func(*PlatformCreate, int)) *PlatformCreateBulk
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 (*PlatformClient) Query ¶
func (c *PlatformClient) Query() *PlatformQuery
Query returns a query builder for Platform.
func (*PlatformClient) QueryCreator ¶
func (c *PlatformClient) QueryCreator(pl *Platform) *UserQuery
QueryCreator queries the creator edge of a Platform.
func (*PlatformClient) QueryEditor ¶
func (c *PlatformClient) QueryEditor(pl *Platform) *UserQuery
QueryEditor queries the editor edge of a Platform.
func (*PlatformClient) QueryOrganization ¶
func (c *PlatformClient) QueryOrganization(pl *Platform) *OrganizationQuery
QueryOrganization queries the organization edge of a Platform.
func (*PlatformClient) Update ¶
func (c *PlatformClient) Update() *PlatformUpdate
Update returns an update builder for Platform.
func (*PlatformClient) UpdateOne ¶
func (c *PlatformClient) UpdateOne(pl *Platform) *PlatformUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PlatformClient) UpdateOneID ¶
func (c *PlatformClient) UpdateOneID(id uuid.UUID) *PlatformUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PlatformClient) Use ¶
func (c *PlatformClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `platform.Hooks(f(g(h())))`.
type PlatformCreate ¶
type PlatformCreate struct {
// contains filtered or unexported fields
}
PlatformCreate is the builder for creating a Platform entity.
func (*PlatformCreate) Exec ¶
func (pc *PlatformCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformCreate) ExecX ¶
func (pc *PlatformCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformCreate) Mutation ¶
func (pc *PlatformCreate) Mutation() *PlatformMutation
Mutation returns the PlatformMutation object of the builder.
func (*PlatformCreate) OnConflict ¶
func (pc *PlatformCreate) OnConflict(opts ...sql.ConflictOption) *PlatformUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Platform.Create(). SetCreatedAt(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.PlatformUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*PlatformCreate) OnConflictColumns ¶
func (pc *PlatformCreate) OnConflictColumns(columns ...string) *PlatformUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Platform.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PlatformCreate) Save ¶
func (pc *PlatformCreate) Save(ctx context.Context) (*Platform, error)
Save creates the Platform in the database.
func (*PlatformCreate) SaveX ¶
func (pc *PlatformCreate) SaveX(ctx context.Context) *Platform
SaveX calls Save and panics if Save returns an error.
func (*PlatformCreate) SetCreatedAt ¶
func (pc *PlatformCreate) SetCreatedAt(t time.Time) *PlatformCreate
SetCreatedAt sets the "created_at" field.
func (*PlatformCreate) SetCreatedByID ¶
func (pc *PlatformCreate) SetCreatedByID(u uuid.UUID) *PlatformCreate
SetCreatedByID sets the "created_by_id" field.
func (*PlatformCreate) SetCreator ¶
func (pc *PlatformCreate) SetCreator(u *User) *PlatformCreate
SetCreator sets the "creator" edge to the User entity.
func (*PlatformCreate) SetCreatorID ¶
func (pc *PlatformCreate) SetCreatorID(id uuid.UUID) *PlatformCreate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*PlatformCreate) SetCue ¶
func (pc *PlatformCreate) SetCue(b []byte) *PlatformCreate
SetCue sets the "cue" field.
func (*PlatformCreate) SetCueDefinition ¶
func (pc *PlatformCreate) SetCueDefinition(s string) *PlatformCreate
SetCueDefinition sets the "cue_definition" field.
func (*PlatformCreate) SetDisplayName ¶
func (pc *PlatformCreate) SetDisplayName(s string) *PlatformCreate
SetDisplayName sets the "display_name" field.
func (*PlatformCreate) SetEditor ¶
func (pc *PlatformCreate) SetEditor(u *User) *PlatformCreate
SetEditor sets the "editor" edge to the User entity.
func (*PlatformCreate) SetEditorID ¶
func (pc *PlatformCreate) SetEditorID(id uuid.UUID) *PlatformCreate
SetEditorID sets the "editor" edge to the User entity by ID.
func (*PlatformCreate) SetForm ¶
func (pc *PlatformCreate) SetForm(s *storage.Form) *PlatformCreate
SetForm sets the "form" field.
func (*PlatformCreate) SetID ¶
func (pc *PlatformCreate) SetID(u uuid.UUID) *PlatformCreate
SetID sets the "id" field.
func (*PlatformCreate) SetModel ¶
func (pc *PlatformCreate) SetModel(s *storage.Model) *PlatformCreate
SetModel sets the "model" field.
func (*PlatformCreate) SetName ¶
func (pc *PlatformCreate) SetName(s string) *PlatformCreate
SetName sets the "name" field.
func (*PlatformCreate) SetNillableCreatedAt ¶
func (pc *PlatformCreate) SetNillableCreatedAt(t *time.Time) *PlatformCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PlatformCreate) SetNillableCueDefinition ¶
func (pc *PlatformCreate) SetNillableCueDefinition(s *string) *PlatformCreate
SetNillableCueDefinition sets the "cue_definition" field if the given value is not nil.
func (*PlatformCreate) SetNillableID ¶
func (pc *PlatformCreate) SetNillableID(u *uuid.UUID) *PlatformCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PlatformCreate) SetNillableUpdatedAt ¶
func (pc *PlatformCreate) SetNillableUpdatedAt(t *time.Time) *PlatformCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PlatformCreate) SetOrgID ¶
func (pc *PlatformCreate) SetOrgID(u uuid.UUID) *PlatformCreate
SetOrgID sets the "org_id" field.
func (*PlatformCreate) SetOrganization ¶
func (pc *PlatformCreate) SetOrganization(o *Organization) *PlatformCreate
SetOrganization sets the "organization" edge to the Organization entity.
func (*PlatformCreate) SetOrganizationID ¶
func (pc *PlatformCreate) SetOrganizationID(id uuid.UUID) *PlatformCreate
SetOrganizationID sets the "organization" edge to the Organization entity by ID.
func (*PlatformCreate) SetUpdatedAt ¶
func (pc *PlatformCreate) SetUpdatedAt(t time.Time) *PlatformCreate
SetUpdatedAt sets the "updated_at" field.
func (*PlatformCreate) SetUpdatedByID ¶
func (pc *PlatformCreate) SetUpdatedByID(u uuid.UUID) *PlatformCreate
SetUpdatedByID sets the "updated_by_id" field.
type PlatformCreateBulk ¶
type PlatformCreateBulk struct {
// contains filtered or unexported fields
}
PlatformCreateBulk is the builder for creating many Platform entities in bulk.
func (*PlatformCreateBulk) Exec ¶
func (pcb *PlatformCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformCreateBulk) ExecX ¶
func (pcb *PlatformCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformCreateBulk) OnConflict ¶
func (pcb *PlatformCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlatformUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Platform.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.PlatformUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*PlatformCreateBulk) OnConflictColumns ¶
func (pcb *PlatformCreateBulk) OnConflictColumns(columns ...string) *PlatformUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Platform.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type PlatformDelete ¶
type PlatformDelete struct {
// contains filtered or unexported fields
}
PlatformDelete is the builder for deleting a Platform entity.
func (*PlatformDelete) Exec ¶
func (pd *PlatformDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PlatformDelete) ExecX ¶
func (pd *PlatformDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PlatformDelete) Where ¶
func (pd *PlatformDelete) Where(ps ...predicate.Platform) *PlatformDelete
Where appends a list predicates to the PlatformDelete builder.
type PlatformDeleteOne ¶
type PlatformDeleteOne struct {
// contains filtered or unexported fields
}
PlatformDeleteOne is the builder for deleting a single Platform entity.
func (*PlatformDeleteOne) Exec ¶
func (pdo *PlatformDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PlatformDeleteOne) ExecX ¶
func (pdo *PlatformDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformDeleteOne) Where ¶
func (pdo *PlatformDeleteOne) Where(ps ...predicate.Platform) *PlatformDeleteOne
Where appends a list predicates to the PlatformDelete builder.
type PlatformEdges ¶
type PlatformEdges struct { // Creator holds the value of the creator edge. Creator *User `json:"creator,omitempty"` // Editor holds the value of the editor edge. Editor *User `json:"editor,omitempty"` // Organization holds the value of the organization edge. Organization *Organization `json:"organization,omitempty"` // contains filtered or unexported fields }
PlatformEdges holds the relations/edges for other nodes in the graph.
func (PlatformEdges) CreatorOrErr ¶
func (e PlatformEdges) CreatorOrErr() (*User, error)
CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PlatformEdges) EditorOrErr ¶
func (e PlatformEdges) EditorOrErr() (*User, error)
EditorOrErr returns the Editor value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PlatformEdges) OrganizationOrErr ¶
func (e PlatformEdges) OrganizationOrErr() (*Organization, error)
OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PlatformGroupBy ¶
type PlatformGroupBy struct {
// contains filtered or unexported fields
}
PlatformGroupBy is the group-by builder for Platform entities.
func (*PlatformGroupBy) Aggregate ¶
func (pgb *PlatformGroupBy) Aggregate(fns ...AggregateFunc) *PlatformGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PlatformGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PlatformGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PlatformGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PlatformGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PlatformGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PlatformGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PlatformGroupBy) Scan ¶
func (pgb *PlatformGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PlatformGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PlatformMutation ¶
type PlatformMutation struct {
// contains filtered or unexported fields
}
PlatformMutation represents an operation that mutates the Platform nodes in the graph.
func (*PlatformMutation) AddField ¶
func (m *PlatformMutation) 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 (*PlatformMutation) AddedEdges ¶
func (m *PlatformMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PlatformMutation) AddedField ¶
func (m *PlatformMutation) 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 (*PlatformMutation) AddedFields ¶
func (m *PlatformMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PlatformMutation) AddedIDs ¶
func (m *PlatformMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PlatformMutation) ClearCreator ¶
func (m *PlatformMutation) ClearCreator()
ClearCreator clears the "creator" edge to the User entity.
func (*PlatformMutation) ClearCue ¶
func (m *PlatformMutation) ClearCue()
ClearCue clears the value of the "cue" field.
func (*PlatformMutation) ClearCueDefinition ¶
func (m *PlatformMutation) ClearCueDefinition()
ClearCueDefinition clears the value of the "cue_definition" field.
func (*PlatformMutation) ClearEdge ¶
func (m *PlatformMutation) 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 (*PlatformMutation) ClearEditor ¶
func (m *PlatformMutation) ClearEditor()
ClearEditor clears the "editor" edge to the User entity.
func (*PlatformMutation) ClearField ¶
func (m *PlatformMutation) 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 (*PlatformMutation) ClearForm ¶
func (m *PlatformMutation) ClearForm()
ClearForm clears the value of the "form" field.
func (*PlatformMutation) ClearModel ¶
func (m *PlatformMutation) ClearModel()
ClearModel clears the value of the "model" field.
func (*PlatformMutation) ClearOrganization ¶
func (m *PlatformMutation) ClearOrganization()
ClearOrganization clears the "organization" edge to the Organization entity.
func (*PlatformMutation) ClearedEdges ¶
func (m *PlatformMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PlatformMutation) ClearedFields ¶
func (m *PlatformMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PlatformMutation) Client ¶
func (m PlatformMutation) 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 (*PlatformMutation) CreatedAt ¶
func (m *PlatformMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PlatformMutation) CreatedByID ¶
func (m *PlatformMutation) CreatedByID() (r uuid.UUID, exists bool)
CreatedByID returns the value of the "created_by_id" field in the mutation.
func (*PlatformMutation) CreatorCleared ¶
func (m *PlatformMutation) CreatorCleared() bool
CreatorCleared reports if the "creator" edge to the User entity was cleared.
func (*PlatformMutation) CreatorID ¶
func (m *PlatformMutation) CreatorID() (id uuid.UUID, exists bool)
CreatorID returns the "creator" edge ID in the mutation.
func (*PlatformMutation) CreatorIDs ¶
func (m *PlatformMutation) CreatorIDs() (ids []uuid.UUID)
CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.
func (*PlatformMutation) Cue ¶
func (m *PlatformMutation) Cue() (r []byte, exists bool)
Cue returns the value of the "cue" field in the mutation.
func (*PlatformMutation) CueCleared ¶
func (m *PlatformMutation) CueCleared() bool
CueCleared returns if the "cue" field was cleared in this mutation.
func (*PlatformMutation) CueDefinition ¶
func (m *PlatformMutation) CueDefinition() (r string, exists bool)
CueDefinition returns the value of the "cue_definition" field in the mutation.
func (*PlatformMutation) CueDefinitionCleared ¶
func (m *PlatformMutation) CueDefinitionCleared() bool
CueDefinitionCleared returns if the "cue_definition" field was cleared in this mutation.
func (*PlatformMutation) DisplayName ¶
func (m *PlatformMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*PlatformMutation) EdgeCleared ¶
func (m *PlatformMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PlatformMutation) EditorCleared ¶
func (m *PlatformMutation) EditorCleared() bool
EditorCleared reports if the "editor" edge to the User entity was cleared.
func (*PlatformMutation) EditorID ¶
func (m *PlatformMutation) EditorID() (id uuid.UUID, exists bool)
EditorID returns the "editor" edge ID in the mutation.
func (*PlatformMutation) EditorIDs ¶
func (m *PlatformMutation) EditorIDs() (ids []uuid.UUID)
EditorIDs returns the "editor" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EditorID instead. It exists only for internal usage by the builders.
func (*PlatformMutation) Field ¶
func (m *PlatformMutation) 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 (*PlatformMutation) FieldCleared ¶
func (m *PlatformMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PlatformMutation) Fields ¶
func (m *PlatformMutation) 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 (*PlatformMutation) Form ¶
func (m *PlatformMutation) Form() (r *storage.Form, exists bool)
Form returns the value of the "form" field in the mutation.
func (*PlatformMutation) FormCleared ¶
func (m *PlatformMutation) FormCleared() bool
FormCleared returns if the "form" field was cleared in this mutation.
func (*PlatformMutation) ID ¶
func (m *PlatformMutation) ID() (id uuid.UUID, 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 (*PlatformMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PlatformMutation) Model ¶
func (m *PlatformMutation) Model() (r *storage.Model, exists bool)
Model returns the value of the "model" field in the mutation.
func (*PlatformMutation) ModelCleared ¶
func (m *PlatformMutation) ModelCleared() bool
ModelCleared returns if the "model" field was cleared in this mutation.
func (*PlatformMutation) Name ¶
func (m *PlatformMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PlatformMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldCreatedByID ¶
OldCreatedByID returns the old "created_by_id" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldCue ¶
func (m *PlatformMutation) OldCue(ctx context.Context) (v []byte, err error)
OldCue returns the old "cue" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldCueDefinition ¶
func (m *PlatformMutation) OldCueDefinition(ctx context.Context) (v string, err error)
OldCueDefinition returns the old "cue_definition" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldDisplayName ¶
func (m *PlatformMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_name" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) 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 (*PlatformMutation) OldForm ¶
OldForm returns the old "form" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldModel ¶
OldModel returns the old "model" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldName ¶
func (m *PlatformMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldOrgID ¶
OldOrgID returns the old "org_id" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OldUpdatedByID ¶
OldUpdatedByID returns the old "updated_by_id" field's value of the Platform entity. If the Platform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlatformMutation) OrgID ¶
func (m *PlatformMutation) OrgID() (r uuid.UUID, exists bool)
OrgID returns the value of the "org_id" field in the mutation.
func (*PlatformMutation) OrganizationCleared ¶
func (m *PlatformMutation) OrganizationCleared() bool
OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.
func (*PlatformMutation) OrganizationID ¶
func (m *PlatformMutation) OrganizationID() (id uuid.UUID, exists bool)
OrganizationID returns the "organization" edge ID in the mutation.
func (*PlatformMutation) OrganizationIDs ¶
func (m *PlatformMutation) OrganizationIDs() (ids []uuid.UUID)
OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.
func (*PlatformMutation) RemovedEdges ¶
func (m *PlatformMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PlatformMutation) RemovedIDs ¶
func (m *PlatformMutation) 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 (*PlatformMutation) ResetCreatedAt ¶
func (m *PlatformMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PlatformMutation) ResetCreatedByID ¶
func (m *PlatformMutation) ResetCreatedByID()
ResetCreatedByID resets all changes to the "created_by_id" field.
func (*PlatformMutation) ResetCreator ¶
func (m *PlatformMutation) ResetCreator()
ResetCreator resets all changes to the "creator" edge.
func (*PlatformMutation) ResetCue ¶
func (m *PlatformMutation) ResetCue()
ResetCue resets all changes to the "cue" field.
func (*PlatformMutation) ResetCueDefinition ¶
func (m *PlatformMutation) ResetCueDefinition()
ResetCueDefinition resets all changes to the "cue_definition" field.
func (*PlatformMutation) ResetDisplayName ¶
func (m *PlatformMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*PlatformMutation) ResetEdge ¶
func (m *PlatformMutation) 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 (*PlatformMutation) ResetEditor ¶
func (m *PlatformMutation) ResetEditor()
ResetEditor resets all changes to the "editor" edge.
func (*PlatformMutation) ResetField ¶
func (m *PlatformMutation) 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 (*PlatformMutation) ResetForm ¶
func (m *PlatformMutation) ResetForm()
ResetForm resets all changes to the "form" field.
func (*PlatformMutation) ResetModel ¶
func (m *PlatformMutation) ResetModel()
ResetModel resets all changes to the "model" field.
func (*PlatformMutation) ResetName ¶
func (m *PlatformMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PlatformMutation) ResetOrgID ¶
func (m *PlatformMutation) ResetOrgID()
ResetOrgID resets all changes to the "org_id" field.
func (*PlatformMutation) ResetOrganization ¶
func (m *PlatformMutation) ResetOrganization()
ResetOrganization resets all changes to the "organization" edge.
func (*PlatformMutation) ResetUpdatedAt ¶
func (m *PlatformMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PlatformMutation) ResetUpdatedByID ¶
func (m *PlatformMutation) ResetUpdatedByID()
ResetUpdatedByID resets all changes to the "updated_by_id" field.
func (*PlatformMutation) SetCreatedAt ¶
func (m *PlatformMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PlatformMutation) SetCreatedByID ¶
func (m *PlatformMutation) SetCreatedByID(u uuid.UUID)
SetCreatedByID sets the "created_by_id" field.
func (*PlatformMutation) SetCreatorID ¶
func (m *PlatformMutation) SetCreatorID(id uuid.UUID)
SetCreatorID sets the "creator" edge to the User entity by id.
func (*PlatformMutation) SetCue ¶
func (m *PlatformMutation) SetCue(b []byte)
SetCue sets the "cue" field.
func (*PlatformMutation) SetCueDefinition ¶
func (m *PlatformMutation) SetCueDefinition(s string)
SetCueDefinition sets the "cue_definition" field.
func (*PlatformMutation) SetDisplayName ¶
func (m *PlatformMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*PlatformMutation) SetEditorID ¶
func (m *PlatformMutation) SetEditorID(id uuid.UUID)
SetEditorID sets the "editor" edge to the User entity by id.
func (*PlatformMutation) SetField ¶
func (m *PlatformMutation) 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 (*PlatformMutation) SetForm ¶
func (m *PlatformMutation) SetForm(s *storage.Form)
SetForm sets the "form" field.
func (*PlatformMutation) SetID ¶
func (m *PlatformMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Platform entities.
func (*PlatformMutation) SetModel ¶
func (m *PlatformMutation) SetModel(s *storage.Model)
SetModel sets the "model" field.
func (*PlatformMutation) SetName ¶
func (m *PlatformMutation) SetName(s string)
SetName sets the "name" field.
func (*PlatformMutation) SetOp ¶
func (m *PlatformMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PlatformMutation) SetOrgID ¶
func (m *PlatformMutation) SetOrgID(u uuid.UUID)
SetOrgID sets the "org_id" field.
func (*PlatformMutation) SetOrganizationID ¶
func (m *PlatformMutation) SetOrganizationID(id uuid.UUID)
SetOrganizationID sets the "organization" edge to the Organization entity by id.
func (*PlatformMutation) SetUpdatedAt ¶
func (m *PlatformMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PlatformMutation) SetUpdatedByID ¶
func (m *PlatformMutation) SetUpdatedByID(u uuid.UUID)
SetUpdatedByID sets the "updated_by_id" field.
func (PlatformMutation) Tx ¶
func (m PlatformMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PlatformMutation) Type ¶
func (m *PlatformMutation) Type() string
Type returns the node type of this mutation (Platform).
func (*PlatformMutation) UpdatedAt ¶
func (m *PlatformMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PlatformMutation) UpdatedByID ¶
func (m *PlatformMutation) UpdatedByID() (r uuid.UUID, exists bool)
UpdatedByID returns the value of the "updated_by_id" field in the mutation.
func (*PlatformMutation) Where ¶
func (m *PlatformMutation) Where(ps ...predicate.Platform)
Where appends a list predicates to the PlatformMutation builder.
func (*PlatformMutation) WhereP ¶
func (m *PlatformMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PlatformMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PlatformQuery ¶
type PlatformQuery struct {
// contains filtered or unexported fields
}
PlatformQuery is the builder for querying Platform entities.
func (*PlatformQuery) Aggregate ¶
func (pq *PlatformQuery) Aggregate(fns ...AggregateFunc) *PlatformSelect
Aggregate returns a PlatformSelect configured with the given aggregations.
func (*PlatformQuery) All ¶
func (pq *PlatformQuery) All(ctx context.Context) ([]*Platform, error)
All executes the query and returns a list of Platforms.
func (*PlatformQuery) AllX ¶
func (pq *PlatformQuery) AllX(ctx context.Context) []*Platform
AllX is like All, but panics if an error occurs.
func (*PlatformQuery) Clone ¶
func (pq *PlatformQuery) Clone() *PlatformQuery
Clone returns a duplicate of the PlatformQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PlatformQuery) Count ¶
func (pq *PlatformQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PlatformQuery) CountX ¶
func (pq *PlatformQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PlatformQuery) Exist ¶
func (pq *PlatformQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PlatformQuery) ExistX ¶
func (pq *PlatformQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PlatformQuery) First ¶
func (pq *PlatformQuery) First(ctx context.Context) (*Platform, error)
First returns the first Platform entity from the query. Returns a *NotFoundError when no Platform was found.
func (*PlatformQuery) FirstID ¶
FirstID returns the first Platform ID from the query. Returns a *NotFoundError when no Platform ID was found.
func (*PlatformQuery) FirstIDX ¶
func (pq *PlatformQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PlatformQuery) FirstX ¶
func (pq *PlatformQuery) FirstX(ctx context.Context) *Platform
FirstX is like First, but panics if an error occurs.
func (*PlatformQuery) GroupBy ¶
func (pq *PlatformQuery) GroupBy(field string, fields ...string) *PlatformGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Platform.Query(). GroupBy(platform.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PlatformQuery) IDsX ¶
func (pq *PlatformQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PlatformQuery) Limit ¶
func (pq *PlatformQuery) Limit(limit int) *PlatformQuery
Limit the number of records to be returned by this query.
func (*PlatformQuery) Offset ¶
func (pq *PlatformQuery) Offset(offset int) *PlatformQuery
Offset to start from.
func (*PlatformQuery) Only ¶
func (pq *PlatformQuery) Only(ctx context.Context) (*Platform, error)
Only returns a single Platform entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Platform entity is found. Returns a *NotFoundError when no Platform entities are found.
func (*PlatformQuery) OnlyID ¶
OnlyID is like Only, but returns the only Platform ID in the query. Returns a *NotSingularError when more than one Platform ID is found. Returns a *NotFoundError when no entities are found.
func (*PlatformQuery) OnlyIDX ¶
func (pq *PlatformQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PlatformQuery) OnlyX ¶
func (pq *PlatformQuery) OnlyX(ctx context.Context) *Platform
OnlyX is like Only, but panics if an error occurs.
func (*PlatformQuery) Order ¶
func (pq *PlatformQuery) Order(o ...platform.OrderOption) *PlatformQuery
Order specifies how the records should be ordered.
func (*PlatformQuery) QueryCreator ¶
func (pq *PlatformQuery) QueryCreator() *UserQuery
QueryCreator chains the current query on the "creator" edge.
func (*PlatformQuery) QueryEditor ¶
func (pq *PlatformQuery) QueryEditor() *UserQuery
QueryEditor chains the current query on the "editor" edge.
func (*PlatformQuery) QueryOrganization ¶
func (pq *PlatformQuery) QueryOrganization() *OrganizationQuery
QueryOrganization chains the current query on the "organization" edge.
func (*PlatformQuery) Select ¶
func (pq *PlatformQuery) Select(fields ...string) *PlatformSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Platform.Query(). Select(platform.FieldCreatedAt). Scan(ctx, &v)
func (*PlatformQuery) Unique ¶
func (pq *PlatformQuery) Unique(unique bool) *PlatformQuery
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 (*PlatformQuery) Where ¶
func (pq *PlatformQuery) Where(ps ...predicate.Platform) *PlatformQuery
Where adds a new predicate for the PlatformQuery builder.
func (*PlatformQuery) WithCreator ¶
func (pq *PlatformQuery) WithCreator(opts ...func(*UserQuery)) *PlatformQuery
WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.
func (*PlatformQuery) WithEditor ¶
func (pq *PlatformQuery) WithEditor(opts ...func(*UserQuery)) *PlatformQuery
WithEditor tells the query-builder to eager-load the nodes that are connected to the "editor" edge. The optional arguments are used to configure the query builder of the edge.
func (*PlatformQuery) WithOrganization ¶
func (pq *PlatformQuery) WithOrganization(opts ...func(*OrganizationQuery)) *PlatformQuery
WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.
type PlatformSelect ¶
type PlatformSelect struct { *PlatformQuery // contains filtered or unexported fields }
PlatformSelect is the builder for selecting fields of Platform entities.
func (*PlatformSelect) Aggregate ¶
func (ps *PlatformSelect) Aggregate(fns ...AggregateFunc) *PlatformSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PlatformSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PlatformSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PlatformSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PlatformSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PlatformSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PlatformSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PlatformSelect) Scan ¶
func (ps *PlatformSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PlatformSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PlatformUpdate ¶
type PlatformUpdate struct {
// contains filtered or unexported fields
}
PlatformUpdate is the builder for updating Platform entities.
func (*PlatformUpdate) ClearCue ¶
func (pu *PlatformUpdate) ClearCue() *PlatformUpdate
ClearCue clears the value of the "cue" field.
func (*PlatformUpdate) ClearCueDefinition ¶
func (pu *PlatformUpdate) ClearCueDefinition() *PlatformUpdate
ClearCueDefinition clears the value of the "cue_definition" field.
func (*PlatformUpdate) ClearEditor ¶
func (pu *PlatformUpdate) ClearEditor() *PlatformUpdate
ClearEditor clears the "editor" edge to the User entity.
func (*PlatformUpdate) ClearForm ¶
func (pu *PlatformUpdate) ClearForm() *PlatformUpdate
ClearForm clears the value of the "form" field.
func (*PlatformUpdate) ClearModel ¶
func (pu *PlatformUpdate) ClearModel() *PlatformUpdate
ClearModel clears the value of the "model" field.
func (*PlatformUpdate) ClearOrganization ¶
func (pu *PlatformUpdate) ClearOrganization() *PlatformUpdate
ClearOrganization clears the "organization" edge to the Organization entity.
func (*PlatformUpdate) Exec ¶
func (pu *PlatformUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformUpdate) ExecX ¶
func (pu *PlatformUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformUpdate) Mutation ¶
func (pu *PlatformUpdate) Mutation() *PlatformMutation
Mutation returns the PlatformMutation object of the builder.
func (*PlatformUpdate) Save ¶
func (pu *PlatformUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PlatformUpdate) SaveX ¶
func (pu *PlatformUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PlatformUpdate) SetCue ¶
func (pu *PlatformUpdate) SetCue(b []byte) *PlatformUpdate
SetCue sets the "cue" field.
func (*PlatformUpdate) SetCueDefinition ¶
func (pu *PlatformUpdate) SetCueDefinition(s string) *PlatformUpdate
SetCueDefinition sets the "cue_definition" field.
func (*PlatformUpdate) SetDisplayName ¶
func (pu *PlatformUpdate) SetDisplayName(s string) *PlatformUpdate
SetDisplayName sets the "display_name" field.
func (*PlatformUpdate) SetEditor ¶
func (pu *PlatformUpdate) SetEditor(u *User) *PlatformUpdate
SetEditor sets the "editor" edge to the User entity.
func (*PlatformUpdate) SetEditorID ¶
func (pu *PlatformUpdate) SetEditorID(id uuid.UUID) *PlatformUpdate
SetEditorID sets the "editor" edge to the User entity by ID.
func (*PlatformUpdate) SetForm ¶
func (pu *PlatformUpdate) SetForm(s *storage.Form) *PlatformUpdate
SetForm sets the "form" field.
func (*PlatformUpdate) SetModel ¶
func (pu *PlatformUpdate) SetModel(s *storage.Model) *PlatformUpdate
SetModel sets the "model" field.
func (*PlatformUpdate) SetName ¶
func (pu *PlatformUpdate) SetName(s string) *PlatformUpdate
SetName sets the "name" field.
func (*PlatformUpdate) SetNillableCueDefinition ¶
func (pu *PlatformUpdate) SetNillableCueDefinition(s *string) *PlatformUpdate
SetNillableCueDefinition sets the "cue_definition" field if the given value is not nil.
func (*PlatformUpdate) SetNillableDisplayName ¶
func (pu *PlatformUpdate) SetNillableDisplayName(s *string) *PlatformUpdate
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*PlatformUpdate) SetNillableName ¶
func (pu *PlatformUpdate) SetNillableName(s *string) *PlatformUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PlatformUpdate) SetNillableOrgID ¶
func (pu *PlatformUpdate) SetNillableOrgID(u *uuid.UUID) *PlatformUpdate
SetNillableOrgID sets the "org_id" field if the given value is not nil.
func (*PlatformUpdate) SetNillableUpdatedByID ¶
func (pu *PlatformUpdate) SetNillableUpdatedByID(u *uuid.UUID) *PlatformUpdate
SetNillableUpdatedByID sets the "updated_by_id" field if the given value is not nil.
func (*PlatformUpdate) SetOrgID ¶
func (pu *PlatformUpdate) SetOrgID(u uuid.UUID) *PlatformUpdate
SetOrgID sets the "org_id" field.
func (*PlatformUpdate) SetOrganization ¶
func (pu *PlatformUpdate) SetOrganization(o *Organization) *PlatformUpdate
SetOrganization sets the "organization" edge to the Organization entity.
func (*PlatformUpdate) SetOrganizationID ¶
func (pu *PlatformUpdate) SetOrganizationID(id uuid.UUID) *PlatformUpdate
SetOrganizationID sets the "organization" edge to the Organization entity by ID.
func (*PlatformUpdate) SetUpdatedAt ¶
func (pu *PlatformUpdate) SetUpdatedAt(t time.Time) *PlatformUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PlatformUpdate) SetUpdatedByID ¶
func (pu *PlatformUpdate) SetUpdatedByID(u uuid.UUID) *PlatformUpdate
SetUpdatedByID sets the "updated_by_id" field.
func (*PlatformUpdate) Where ¶
func (pu *PlatformUpdate) Where(ps ...predicate.Platform) *PlatformUpdate
Where appends a list predicates to the PlatformUpdate builder.
type PlatformUpdateOne ¶
type PlatformUpdateOne struct {
// contains filtered or unexported fields
}
PlatformUpdateOne is the builder for updating a single Platform entity.
func (*PlatformUpdateOne) ClearCue ¶
func (puo *PlatformUpdateOne) ClearCue() *PlatformUpdateOne
ClearCue clears the value of the "cue" field.
func (*PlatformUpdateOne) ClearCueDefinition ¶
func (puo *PlatformUpdateOne) ClearCueDefinition() *PlatformUpdateOne
ClearCueDefinition clears the value of the "cue_definition" field.
func (*PlatformUpdateOne) ClearEditor ¶
func (puo *PlatformUpdateOne) ClearEditor() *PlatformUpdateOne
ClearEditor clears the "editor" edge to the User entity.
func (*PlatformUpdateOne) ClearForm ¶
func (puo *PlatformUpdateOne) ClearForm() *PlatformUpdateOne
ClearForm clears the value of the "form" field.
func (*PlatformUpdateOne) ClearModel ¶
func (puo *PlatformUpdateOne) ClearModel() *PlatformUpdateOne
ClearModel clears the value of the "model" field.
func (*PlatformUpdateOne) ClearOrganization ¶
func (puo *PlatformUpdateOne) ClearOrganization() *PlatformUpdateOne
ClearOrganization clears the "organization" edge to the Organization entity.
func (*PlatformUpdateOne) Exec ¶
func (puo *PlatformUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PlatformUpdateOne) ExecX ¶
func (puo *PlatformUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformUpdateOne) Mutation ¶
func (puo *PlatformUpdateOne) Mutation() *PlatformMutation
Mutation returns the PlatformMutation object of the builder.
func (*PlatformUpdateOne) Save ¶
func (puo *PlatformUpdateOne) Save(ctx context.Context) (*Platform, error)
Save executes the query and returns the updated Platform entity.
func (*PlatformUpdateOne) SaveX ¶
func (puo *PlatformUpdateOne) SaveX(ctx context.Context) *Platform
SaveX is like Save, but panics if an error occurs.
func (*PlatformUpdateOne) Select ¶
func (puo *PlatformUpdateOne) Select(field string, fields ...string) *PlatformUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PlatformUpdateOne) SetCue ¶
func (puo *PlatformUpdateOne) SetCue(b []byte) *PlatformUpdateOne
SetCue sets the "cue" field.
func (*PlatformUpdateOne) SetCueDefinition ¶
func (puo *PlatformUpdateOne) SetCueDefinition(s string) *PlatformUpdateOne
SetCueDefinition sets the "cue_definition" field.
func (*PlatformUpdateOne) SetDisplayName ¶
func (puo *PlatformUpdateOne) SetDisplayName(s string) *PlatformUpdateOne
SetDisplayName sets the "display_name" field.
func (*PlatformUpdateOne) SetEditor ¶
func (puo *PlatformUpdateOne) SetEditor(u *User) *PlatformUpdateOne
SetEditor sets the "editor" edge to the User entity.
func (*PlatformUpdateOne) SetEditorID ¶
func (puo *PlatformUpdateOne) SetEditorID(id uuid.UUID) *PlatformUpdateOne
SetEditorID sets the "editor" edge to the User entity by ID.
func (*PlatformUpdateOne) SetForm ¶
func (puo *PlatformUpdateOne) SetForm(s *storage.Form) *PlatformUpdateOne
SetForm sets the "form" field.
func (*PlatformUpdateOne) SetModel ¶
func (puo *PlatformUpdateOne) SetModel(s *storage.Model) *PlatformUpdateOne
SetModel sets the "model" field.
func (*PlatformUpdateOne) SetName ¶
func (puo *PlatformUpdateOne) SetName(s string) *PlatformUpdateOne
SetName sets the "name" field.
func (*PlatformUpdateOne) SetNillableCueDefinition ¶
func (puo *PlatformUpdateOne) SetNillableCueDefinition(s *string) *PlatformUpdateOne
SetNillableCueDefinition sets the "cue_definition" field if the given value is not nil.
func (*PlatformUpdateOne) SetNillableDisplayName ¶
func (puo *PlatformUpdateOne) SetNillableDisplayName(s *string) *PlatformUpdateOne
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*PlatformUpdateOne) SetNillableName ¶
func (puo *PlatformUpdateOne) SetNillableName(s *string) *PlatformUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PlatformUpdateOne) SetNillableOrgID ¶
func (puo *PlatformUpdateOne) SetNillableOrgID(u *uuid.UUID) *PlatformUpdateOne
SetNillableOrgID sets the "org_id" field if the given value is not nil.
func (*PlatformUpdateOne) SetNillableUpdatedByID ¶
func (puo *PlatformUpdateOne) SetNillableUpdatedByID(u *uuid.UUID) *PlatformUpdateOne
SetNillableUpdatedByID sets the "updated_by_id" field if the given value is not nil.
func (*PlatformUpdateOne) SetOrgID ¶
func (puo *PlatformUpdateOne) SetOrgID(u uuid.UUID) *PlatformUpdateOne
SetOrgID sets the "org_id" field.
func (*PlatformUpdateOne) SetOrganization ¶
func (puo *PlatformUpdateOne) SetOrganization(o *Organization) *PlatformUpdateOne
SetOrganization sets the "organization" edge to the Organization entity.
func (*PlatformUpdateOne) SetOrganizationID ¶
func (puo *PlatformUpdateOne) SetOrganizationID(id uuid.UUID) *PlatformUpdateOne
SetOrganizationID sets the "organization" edge to the Organization entity by ID.
func (*PlatformUpdateOne) SetUpdatedAt ¶
func (puo *PlatformUpdateOne) SetUpdatedAt(t time.Time) *PlatformUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PlatformUpdateOne) SetUpdatedByID ¶
func (puo *PlatformUpdateOne) SetUpdatedByID(u uuid.UUID) *PlatformUpdateOne
SetUpdatedByID sets the "updated_by_id" field.
func (*PlatformUpdateOne) Where ¶
func (puo *PlatformUpdateOne) Where(ps ...predicate.Platform) *PlatformUpdateOne
Where appends a list predicates to the PlatformUpdate builder.
type PlatformUpsert ¶
PlatformUpsert is the "OnConflict" setter.
func (*PlatformUpsert) ClearCue ¶
func (u *PlatformUpsert) ClearCue() *PlatformUpsert
ClearCue clears the value of the "cue" field.
func (*PlatformUpsert) ClearCueDefinition ¶
func (u *PlatformUpsert) ClearCueDefinition() *PlatformUpsert
ClearCueDefinition clears the value of the "cue_definition" field.
func (*PlatformUpsert) ClearForm ¶
func (u *PlatformUpsert) ClearForm() *PlatformUpsert
ClearForm clears the value of the "form" field.
func (*PlatformUpsert) ClearModel ¶
func (u *PlatformUpsert) ClearModel() *PlatformUpsert
ClearModel clears the value of the "model" field.
func (*PlatformUpsert) SetCue ¶
func (u *PlatformUpsert) SetCue(v []byte) *PlatformUpsert
SetCue sets the "cue" field.
func (*PlatformUpsert) SetCueDefinition ¶
func (u *PlatformUpsert) SetCueDefinition(v string) *PlatformUpsert
SetCueDefinition sets the "cue_definition" field.
func (*PlatformUpsert) SetDisplayName ¶
func (u *PlatformUpsert) SetDisplayName(v string) *PlatformUpsert
SetDisplayName sets the "display_name" field.
func (*PlatformUpsert) SetForm ¶
func (u *PlatformUpsert) SetForm(v *storage.Form) *PlatformUpsert
SetForm sets the "form" field.
func (*PlatformUpsert) SetModel ¶
func (u *PlatformUpsert) SetModel(v *storage.Model) *PlatformUpsert
SetModel sets the "model" field.
func (*PlatformUpsert) SetName ¶
func (u *PlatformUpsert) SetName(v string) *PlatformUpsert
SetName sets the "name" field.
func (*PlatformUpsert) SetOrgID ¶
func (u *PlatformUpsert) SetOrgID(v uuid.UUID) *PlatformUpsert
SetOrgID sets the "org_id" field.
func (*PlatformUpsert) SetUpdatedAt ¶
func (u *PlatformUpsert) SetUpdatedAt(v time.Time) *PlatformUpsert
SetUpdatedAt sets the "updated_at" field.
func (*PlatformUpsert) SetUpdatedByID ¶
func (u *PlatformUpsert) SetUpdatedByID(v uuid.UUID) *PlatformUpsert
SetUpdatedByID sets the "updated_by_id" field.
func (*PlatformUpsert) UpdateCue ¶
func (u *PlatformUpsert) UpdateCue() *PlatformUpsert
UpdateCue sets the "cue" field to the value that was provided on create.
func (*PlatformUpsert) UpdateCueDefinition ¶
func (u *PlatformUpsert) UpdateCueDefinition() *PlatformUpsert
UpdateCueDefinition sets the "cue_definition" field to the value that was provided on create.
func (*PlatformUpsert) UpdateDisplayName ¶
func (u *PlatformUpsert) UpdateDisplayName() *PlatformUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*PlatformUpsert) UpdateForm ¶
func (u *PlatformUpsert) UpdateForm() *PlatformUpsert
UpdateForm sets the "form" field to the value that was provided on create.
func (*PlatformUpsert) UpdateModel ¶
func (u *PlatformUpsert) UpdateModel() *PlatformUpsert
UpdateModel sets the "model" field to the value that was provided on create.
func (*PlatformUpsert) UpdateName ¶
func (u *PlatformUpsert) UpdateName() *PlatformUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*PlatformUpsert) UpdateOrgID ¶
func (u *PlatformUpsert) UpdateOrgID() *PlatformUpsert
UpdateOrgID sets the "org_id" field to the value that was provided on create.
func (*PlatformUpsert) UpdateUpdatedAt ¶
func (u *PlatformUpsert) UpdateUpdatedAt() *PlatformUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PlatformUpsert) UpdateUpdatedByID ¶
func (u *PlatformUpsert) UpdateUpdatedByID() *PlatformUpsert
UpdateUpdatedByID sets the "updated_by_id" field to the value that was provided on create.
type PlatformUpsertBulk ¶
type PlatformUpsertBulk struct {
// contains filtered or unexported fields
}
PlatformUpsertBulk is the builder for "upsert"-ing a bulk of Platform nodes.
func (*PlatformUpsertBulk) ClearCue ¶
func (u *PlatformUpsertBulk) ClearCue() *PlatformUpsertBulk
ClearCue clears the value of the "cue" field.
func (*PlatformUpsertBulk) ClearCueDefinition ¶
func (u *PlatformUpsertBulk) ClearCueDefinition() *PlatformUpsertBulk
ClearCueDefinition clears the value of the "cue_definition" field.
func (*PlatformUpsertBulk) ClearForm ¶
func (u *PlatformUpsertBulk) ClearForm() *PlatformUpsertBulk
ClearForm clears the value of the "form" field.
func (*PlatformUpsertBulk) ClearModel ¶
func (u *PlatformUpsertBulk) ClearModel() *PlatformUpsertBulk
ClearModel clears the value of the "model" field.
func (*PlatformUpsertBulk) DoNothing ¶
func (u *PlatformUpsertBulk) DoNothing() *PlatformUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PlatformUpsertBulk) Exec ¶
func (u *PlatformUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformUpsertBulk) ExecX ¶
func (u *PlatformUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformUpsertBulk) Ignore ¶
func (u *PlatformUpsertBulk) Ignore() *PlatformUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Platform.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PlatformUpsertBulk) SetCue ¶
func (u *PlatformUpsertBulk) SetCue(v []byte) *PlatformUpsertBulk
SetCue sets the "cue" field.
func (*PlatformUpsertBulk) SetCueDefinition ¶
func (u *PlatformUpsertBulk) SetCueDefinition(v string) *PlatformUpsertBulk
SetCueDefinition sets the "cue_definition" field.
func (*PlatformUpsertBulk) SetDisplayName ¶
func (u *PlatformUpsertBulk) SetDisplayName(v string) *PlatformUpsertBulk
SetDisplayName sets the "display_name" field.
func (*PlatformUpsertBulk) SetForm ¶
func (u *PlatformUpsertBulk) SetForm(v *storage.Form) *PlatformUpsertBulk
SetForm sets the "form" field.
func (*PlatformUpsertBulk) SetModel ¶
func (u *PlatformUpsertBulk) SetModel(v *storage.Model) *PlatformUpsertBulk
SetModel sets the "model" field.
func (*PlatformUpsertBulk) SetName ¶
func (u *PlatformUpsertBulk) SetName(v string) *PlatformUpsertBulk
SetName sets the "name" field.
func (*PlatformUpsertBulk) SetOrgID ¶
func (u *PlatformUpsertBulk) SetOrgID(v uuid.UUID) *PlatformUpsertBulk
SetOrgID sets the "org_id" field.
func (*PlatformUpsertBulk) SetUpdatedAt ¶
func (u *PlatformUpsertBulk) SetUpdatedAt(v time.Time) *PlatformUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*PlatformUpsertBulk) SetUpdatedByID ¶
func (u *PlatformUpsertBulk) SetUpdatedByID(v uuid.UUID) *PlatformUpsertBulk
SetUpdatedByID sets the "updated_by_id" field.
func (*PlatformUpsertBulk) Update ¶
func (u *PlatformUpsertBulk) Update(set func(*PlatformUpsert)) *PlatformUpsertBulk
Update allows overriding fields `UPDATE` values. See the PlatformCreateBulk.OnConflict documentation for more info.
func (*PlatformUpsertBulk) UpdateCue ¶
func (u *PlatformUpsertBulk) UpdateCue() *PlatformUpsertBulk
UpdateCue sets the "cue" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateCueDefinition ¶
func (u *PlatformUpsertBulk) UpdateCueDefinition() *PlatformUpsertBulk
UpdateCueDefinition sets the "cue_definition" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateDisplayName ¶
func (u *PlatformUpsertBulk) UpdateDisplayName() *PlatformUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateForm ¶
func (u *PlatformUpsertBulk) UpdateForm() *PlatformUpsertBulk
UpdateForm sets the "form" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateModel ¶
func (u *PlatformUpsertBulk) UpdateModel() *PlatformUpsertBulk
UpdateModel sets the "model" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateName ¶
func (u *PlatformUpsertBulk) UpdateName() *PlatformUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateNewValues ¶
func (u *PlatformUpsertBulk) UpdateNewValues() *PlatformUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Platform.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(platform.FieldID) }), ). Exec(ctx)
func (*PlatformUpsertBulk) UpdateOrgID ¶
func (u *PlatformUpsertBulk) UpdateOrgID() *PlatformUpsertBulk
UpdateOrgID sets the "org_id" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateUpdatedAt ¶
func (u *PlatformUpsertBulk) UpdateUpdatedAt() *PlatformUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PlatformUpsertBulk) UpdateUpdatedByID ¶
func (u *PlatformUpsertBulk) UpdateUpdatedByID() *PlatformUpsertBulk
UpdateUpdatedByID sets the "updated_by_id" field to the value that was provided on create.
type PlatformUpsertOne ¶
type PlatformUpsertOne struct {
// contains filtered or unexported fields
}
PlatformUpsertOne is the builder for "upsert"-ing
one Platform node.
func (*PlatformUpsertOne) ClearCue ¶
func (u *PlatformUpsertOne) ClearCue() *PlatformUpsertOne
ClearCue clears the value of the "cue" field.
func (*PlatformUpsertOne) ClearCueDefinition ¶
func (u *PlatformUpsertOne) ClearCueDefinition() *PlatformUpsertOne
ClearCueDefinition clears the value of the "cue_definition" field.
func (*PlatformUpsertOne) ClearForm ¶
func (u *PlatformUpsertOne) ClearForm() *PlatformUpsertOne
ClearForm clears the value of the "form" field.
func (*PlatformUpsertOne) ClearModel ¶
func (u *PlatformUpsertOne) ClearModel() *PlatformUpsertOne
ClearModel clears the value of the "model" field.
func (*PlatformUpsertOne) DoNothing ¶
func (u *PlatformUpsertOne) DoNothing() *PlatformUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PlatformUpsertOne) Exec ¶
func (u *PlatformUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformUpsertOne) ExecX ¶
func (u *PlatformUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformUpsertOne) IDX ¶
func (u *PlatformUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*PlatformUpsertOne) Ignore ¶
func (u *PlatformUpsertOne) Ignore() *PlatformUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Platform.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PlatformUpsertOne) SetCue ¶
func (u *PlatformUpsertOne) SetCue(v []byte) *PlatformUpsertOne
SetCue sets the "cue" field.
func (*PlatformUpsertOne) SetCueDefinition ¶
func (u *PlatformUpsertOne) SetCueDefinition(v string) *PlatformUpsertOne
SetCueDefinition sets the "cue_definition" field.
func (*PlatformUpsertOne) SetDisplayName ¶
func (u *PlatformUpsertOne) SetDisplayName(v string) *PlatformUpsertOne
SetDisplayName sets the "display_name" field.
func (*PlatformUpsertOne) SetForm ¶
func (u *PlatformUpsertOne) SetForm(v *storage.Form) *PlatformUpsertOne
SetForm sets the "form" field.
func (*PlatformUpsertOne) SetModel ¶
func (u *PlatformUpsertOne) SetModel(v *storage.Model) *PlatformUpsertOne
SetModel sets the "model" field.
func (*PlatformUpsertOne) SetName ¶
func (u *PlatformUpsertOne) SetName(v string) *PlatformUpsertOne
SetName sets the "name" field.
func (*PlatformUpsertOne) SetOrgID ¶
func (u *PlatformUpsertOne) SetOrgID(v uuid.UUID) *PlatformUpsertOne
SetOrgID sets the "org_id" field.
func (*PlatformUpsertOne) SetUpdatedAt ¶
func (u *PlatformUpsertOne) SetUpdatedAt(v time.Time) *PlatformUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*PlatformUpsertOne) SetUpdatedByID ¶
func (u *PlatformUpsertOne) SetUpdatedByID(v uuid.UUID) *PlatformUpsertOne
SetUpdatedByID sets the "updated_by_id" field.
func (*PlatformUpsertOne) Update ¶
func (u *PlatformUpsertOne) Update(set func(*PlatformUpsert)) *PlatformUpsertOne
Update allows overriding fields `UPDATE` values. See the PlatformCreate.OnConflict documentation for more info.
func (*PlatformUpsertOne) UpdateCue ¶
func (u *PlatformUpsertOne) UpdateCue() *PlatformUpsertOne
UpdateCue sets the "cue" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateCueDefinition ¶
func (u *PlatformUpsertOne) UpdateCueDefinition() *PlatformUpsertOne
UpdateCueDefinition sets the "cue_definition" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateDisplayName ¶
func (u *PlatformUpsertOne) UpdateDisplayName() *PlatformUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateForm ¶
func (u *PlatformUpsertOne) UpdateForm() *PlatformUpsertOne
UpdateForm sets the "form" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateModel ¶
func (u *PlatformUpsertOne) UpdateModel() *PlatformUpsertOne
UpdateModel sets the "model" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateName ¶
func (u *PlatformUpsertOne) UpdateName() *PlatformUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateNewValues ¶
func (u *PlatformUpsertOne) UpdateNewValues() *PlatformUpsertOne
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.Platform.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(platform.FieldID) }), ). Exec(ctx)
func (*PlatformUpsertOne) UpdateOrgID ¶
func (u *PlatformUpsertOne) UpdateOrgID() *PlatformUpsertOne
UpdateOrgID sets the "org_id" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateUpdatedAt ¶
func (u *PlatformUpsertOne) UpdateUpdatedAt() *PlatformUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PlatformUpsertOne) UpdateUpdatedByID ¶
func (u *PlatformUpsertOne) UpdateUpdatedByID() *PlatformUpsertOne
UpdateUpdatedByID sets the "updated_by_id" field to the value that was provided on create.
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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Organization is the client for interacting with the Organization builders. Organization *OrganizationClient // Platform is the client for interacting with the Platform builders. Platform *PlatformClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
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 User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,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"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Iss holds the value of the "iss" field. Iss string `json:"iss,omitempty"` // Sub holds the value of the "sub" field. Sub string `json:"sub,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryOrganizations ¶
func (u *User) QueryOrganizations() *OrganizationQuery
QueryOrganizations queries the "organizations" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryOrganizations ¶
func (c *UserClient) QueryOrganizations(u *User) *OrganizationQuery
QueryOrganizations queries the organizations edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddOrganizationIDs ¶
func (uc *UserCreate) AddOrganizationIDs(ids ...uuid.UUID) *UserCreate
AddOrganizationIDs adds the "organizations" edge to the Organization entity by IDs.
func (*UserCreate) AddOrganizations ¶
func (uc *UserCreate) AddOrganizations(o ...*Organization) *UserCreate
AddOrganizations adds the "organizations" edges to the Organization entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIss ¶
func (uc *UserCreate) SetIss(s string) *UserCreate
SetIss sets the "iss" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetSub ¶
func (uc *UserCreate) SetSub(s string) *UserCreate
SetSub sets the "sub" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Organizations holds the value of the organizations edge. Organizations []*Organization `json:"organizations,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) OrganizationsOrErr ¶
func (e UserEdges) OrganizationsOrErr() ([]*Organization, error)
OrganizationsOrErr returns the Organizations value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddOrganizationIDs ¶
func (m *UserMutation) AddOrganizationIDs(ids ...uuid.UUID)
AddOrganizationIDs adds the "organizations" edge to the Organization entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearOrganizations ¶
func (m *UserMutation) ClearOrganizations()
ClearOrganizations clears the "organizations" edge to the Organization entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) Iss ¶
func (m *UserMutation) Iss() (r string, exists bool)
Iss returns the value of the "iss" field in the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldIss ¶
func (m *UserMutation) OldIss(ctx context.Context) (v string, err error)
OldIss returns the old "iss" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldSub ¶
func (m *UserMutation) OldSub(ctx context.Context) (v string, err error)
OldSub returns the old "sub" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OrganizationsCleared ¶
func (m *UserMutation) OrganizationsCleared() bool
OrganizationsCleared reports if the "organizations" edge to the Organization entity was cleared.
func (*UserMutation) OrganizationsIDs ¶
func (m *UserMutation) OrganizationsIDs() (ids []uuid.UUID)
OrganizationsIDs returns the "organizations" edge IDs in the mutation.
func (*UserMutation) RemoveOrganizationIDs ¶
func (m *UserMutation) RemoveOrganizationIDs(ids ...uuid.UUID)
RemoveOrganizationIDs removes the "organizations" edge to the Organization entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedOrganizationsIDs ¶
func (m *UserMutation) RemovedOrganizationsIDs() (ids []uuid.UUID)
RemovedOrganizations returns the removed IDs of the "organizations" edge to the Organization entity.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetIss ¶
func (m *UserMutation) ResetIss()
ResetIss resets all changes to the "iss" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetOrganizations ¶
func (m *UserMutation) ResetOrganizations()
ResetOrganizations resets all changes to the "organizations" edge.
func (*UserMutation) ResetSub ¶
func (m *UserMutation) ResetSub()
ResetSub resets all changes to the "sub" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) Sub ¶
func (m *UserMutation) Sub() (r string, exists bool)
Sub returns the value of the "sub" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryOrganizations ¶
func (uq *UserQuery) QueryOrganizations() *OrganizationQuery
QueryOrganizations chains the current query on the "organizations" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.User.Query(). Select(user.FieldCreatedAt). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithOrganizations ¶
func (uq *UserQuery) WithOrganizations(opts ...func(*OrganizationQuery)) *UserQuery
WithOrganizations tells the query-builder to eager-load the nodes that are connected to the "organizations" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddOrganizationIDs ¶
func (uu *UserUpdate) AddOrganizationIDs(ids ...uuid.UUID) *UserUpdate
AddOrganizationIDs adds the "organizations" edge to the Organization entity by IDs.
func (*UserUpdate) AddOrganizations ¶
func (uu *UserUpdate) AddOrganizations(o ...*Organization) *UserUpdate
AddOrganizations adds the "organizations" edges to the Organization entity.
func (*UserUpdate) ClearOrganizations ¶
func (uu *UserUpdate) ClearOrganizations() *UserUpdate
ClearOrganizations clears all "organizations" edges to the Organization entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveOrganizationIDs ¶
func (uu *UserUpdate) RemoveOrganizationIDs(ids ...uuid.UUID) *UserUpdate
RemoveOrganizationIDs removes the "organizations" edge to Organization entities by IDs.
func (*UserUpdate) RemoveOrganizations ¶
func (uu *UserUpdate) RemoveOrganizations(o ...*Organization) *UserUpdate
RemoveOrganizations removes "organizations" edges to Organization entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetIss ¶
func (uu *UserUpdate) SetIss(s string) *UserUpdate
SetIss sets the "iss" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableIss ¶
func (uu *UserUpdate) SetNillableIss(s *string) *UserUpdate
SetNillableIss sets the "iss" field if the given value is not nil.
func (*UserUpdate) SetNillableName ¶
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillableSub ¶
func (uu *UserUpdate) SetNillableSub(s *string) *UserUpdate
SetNillableSub sets the "sub" field if the given value is not nil.
func (*UserUpdate) SetSub ¶
func (uu *UserUpdate) SetSub(s string) *UserUpdate
SetSub sets the "sub" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddOrganizationIDs ¶
func (uuo *UserUpdateOne) AddOrganizationIDs(ids ...uuid.UUID) *UserUpdateOne
AddOrganizationIDs adds the "organizations" edge to the Organization entity by IDs.
func (*UserUpdateOne) AddOrganizations ¶
func (uuo *UserUpdateOne) AddOrganizations(o ...*Organization) *UserUpdateOne
AddOrganizations adds the "organizations" edges to the Organization entity.
func (*UserUpdateOne) ClearOrganizations ¶
func (uuo *UserUpdateOne) ClearOrganizations() *UserUpdateOne
ClearOrganizations clears all "organizations" edges to the Organization entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveOrganizationIDs ¶
func (uuo *UserUpdateOne) RemoveOrganizationIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveOrganizationIDs removes the "organizations" edge to Organization entities by IDs.
func (*UserUpdateOne) RemoveOrganizations ¶
func (uuo *UserUpdateOne) RemoveOrganizations(o ...*Organization) *UserUpdateOne
RemoveOrganizations removes "organizations" edges to Organization entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetIss ¶
func (uuo *UserUpdateOne) SetIss(s string) *UserUpdateOne
SetIss sets the "iss" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIss ¶
func (uuo *UserUpdateOne) SetNillableIss(s *string) *UserUpdateOne
SetNillableIss sets the "iss" field if the given value is not nil.
func (*UserUpdateOne) SetNillableName ¶
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableSub ¶
func (uuo *UserUpdateOne) SetNillableSub(s *string) *UserUpdateOne
SetNillableSub sets the "sub" field if the given value is not nil.
func (*UserUpdateOne) SetSub ¶
func (uuo *UserUpdateOne) SetSub(s string) *UserUpdateOne
SetSub sets the "sub" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetIss ¶
func (u *UserUpsert) SetIss(v string) *UserUpsert
SetIss sets the "iss" field.
func (*UserUpsert) SetName ¶
func (u *UserUpsert) SetName(v string) *UserUpsert
SetName sets the "name" field.
func (*UserUpsert) SetSub ¶
func (u *UserUpsert) SetSub(v string) *UserUpsert
SetSub sets the "sub" field.
func (*UserUpsert) SetUpdatedAt ¶
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsert) UpdateEmail ¶
func (u *UserUpsert) UpdateEmail() *UserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsert) UpdateIss ¶
func (u *UserUpsert) UpdateIss() *UserUpsert
UpdateIss sets the "iss" field to the value that was provided on create.
func (*UserUpsert) UpdateName ¶
func (u *UserUpsert) UpdateName() *UserUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsert) UpdateSub ¶
func (u *UserUpsert) UpdateSub() *UserUpsert
UpdateSub sets the "sub" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdatedAt ¶
func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetIss ¶
func (u *UserUpsertBulk) SetIss(v string) *UserUpsertBulk
SetIss sets the "iss" field.
func (*UserUpsertBulk) SetName ¶
func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
SetName sets the "name" field.
func (*UserUpsertBulk) SetSub ¶
func (u *UserUpsertBulk) SetSub(v string) *UserUpsertBulk
SetSub sets the "sub" field.
func (*UserUpsertBulk) SetUpdatedAt ¶
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateEmail ¶
func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateIss ¶
func (u *UserUpsertBulk) UpdateIss() *UserUpsertBulk
UpdateIss sets the "iss" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateName ¶
func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdateSub ¶
func (u *UserUpsertBulk) UpdateSub() *UserUpsertBulk
UpdateSub sets the "sub" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUpdatedAt ¶
func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetIss ¶
func (u *UserUpsertOne) SetIss(v string) *UserUpsertOne
SetIss sets the "iss" field.
func (*UserUpsertOne) SetName ¶
func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
SetName sets the "name" field.
func (*UserUpsertOne) SetSub ¶
func (u *UserUpsertOne) SetSub(v string) *UserUpsertOne
SetSub sets the "sub" field.
func (*UserUpsertOne) SetUpdatedAt ¶
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateEmail ¶
func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertOne) UpdateIss ¶
func (u *UserUpsertOne) UpdateIss() *UserUpsertOne
UpdateIss sets the "iss" field to the value that was provided on create.
func (*UserUpsertOne) UpdateName ¶
func (u *UserUpsertOne) UpdateName() *UserUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdateSub ¶
func (u *UserUpsertOne) UpdateSub() *UserUpsertOne
UpdateSub sets the "sub" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUpdatedAt ¶
func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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.
Source Files ¶
- client.go
- ent.go
- generate.go
- mutation.go
- organization.go
- organization_create.go
- organization_delete.go
- organization_query.go
- organization_update.go
- platform.go
- platform_create.go
- platform_delete.go
- platform_query.go
- platform_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go