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 GitCommit
- type GitCommitClient
- func (c *GitCommitClient) Create() *GitCommitCreate
- func (c *GitCommitClient) CreateBulk(builders ...*GitCommitCreate) *GitCommitCreateBulk
- func (c *GitCommitClient) Delete() *GitCommitDelete
- func (c *GitCommitClient) DeleteOne(gc *GitCommit) *GitCommitDeleteOne
- func (c *GitCommitClient) DeleteOneID(id string) *GitCommitDeleteOne
- func (c *GitCommitClient) Get(ctx context.Context, id string) (*GitCommit, error)
- func (c *GitCommitClient) GetX(ctx context.Context, id string) *GitCommit
- func (c *GitCommitClient) Hooks() []Hook
- func (c *GitCommitClient) Intercept(interceptors ...Interceptor)
- func (c *GitCommitClient) Interceptors() []Interceptor
- func (c *GitCommitClient) MapCreateBulk(slice any, setFunc func(*GitCommitCreate, int)) *GitCommitCreateBulk
- func (c *GitCommitClient) Query() *GitCommitQuery
- func (c *GitCommitClient) QueryRepository(gc *GitCommit) *RepositoryQuery
- func (c *GitCommitClient) Update() *GitCommitUpdate
- func (c *GitCommitClient) UpdateOne(gc *GitCommit) *GitCommitUpdateOne
- func (c *GitCommitClient) UpdateOneID(id string) *GitCommitUpdateOne
- func (c *GitCommitClient) Use(hooks ...Hook)
- type GitCommitCreate
- func (gcc *GitCommitCreate) Exec(ctx context.Context) error
- func (gcc *GitCommitCreate) ExecX(ctx context.Context)
- func (gcc *GitCommitCreate) Mutation() *GitCommitMutation
- func (gcc *GitCommitCreate) OnConflict(opts ...sql.ConflictOption) *GitCommitUpsertOne
- func (gcc *GitCommitCreate) OnConflictColumns(columns ...string) *GitCommitUpsertOne
- func (gcc *GitCommitCreate) Save(ctx context.Context) (*GitCommit, error)
- func (gcc *GitCommitCreate) SaveX(ctx context.Context) *GitCommit
- func (gcc *GitCommitCreate) SetAuthorID(i int64) *GitCommitCreate
- func (gcc *GitCommitCreate) SetAuthorLogin(s string) *GitCommitCreate
- func (gcc *GitCommitCreate) SetDate(t time.Time) *GitCommitCreate
- func (gcc *GitCommitCreate) SetID(s string) *GitCommitCreate
- func (gcc *GitCommitCreate) SetMessage(s string) *GitCommitCreate
- func (gcc *GitCommitCreate) SetNillableRepositoryID(id *int64) *GitCommitCreate
- func (gcc *GitCommitCreate) SetRepository(r *Repository) *GitCommitCreate
- func (gcc *GitCommitCreate) SetRepositoryID(id int64) *GitCommitCreate
- type GitCommitCreateBulk
- func (gccb *GitCommitCreateBulk) Exec(ctx context.Context) error
- func (gccb *GitCommitCreateBulk) ExecX(ctx context.Context)
- func (gccb *GitCommitCreateBulk) OnConflict(opts ...sql.ConflictOption) *GitCommitUpsertBulk
- func (gccb *GitCommitCreateBulk) OnConflictColumns(columns ...string) *GitCommitUpsertBulk
- func (gccb *GitCommitCreateBulk) Save(ctx context.Context) ([]*GitCommit, error)
- func (gccb *GitCommitCreateBulk) SaveX(ctx context.Context) []*GitCommit
- type GitCommitDelete
- type GitCommitDeleteOne
- type GitCommitEdges
- type GitCommitGroupBy
- func (gcgb *GitCommitGroupBy) Aggregate(fns ...AggregateFunc) *GitCommitGroupBy
- func (s *GitCommitGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GitCommitGroupBy) BoolX(ctx context.Context) bool
- func (s *GitCommitGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GitCommitGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GitCommitGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GitCommitGroupBy) Float64X(ctx context.Context) float64
- func (s *GitCommitGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GitCommitGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GitCommitGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GitCommitGroupBy) IntX(ctx context.Context) int
- func (s *GitCommitGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GitCommitGroupBy) IntsX(ctx context.Context) []int
- func (gcgb *GitCommitGroupBy) Scan(ctx context.Context, v any) error
- func (s *GitCommitGroupBy) ScanX(ctx context.Context, v any)
- func (s *GitCommitGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GitCommitGroupBy) StringX(ctx context.Context) string
- func (s *GitCommitGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GitCommitGroupBy) StringsX(ctx context.Context) []string
- type GitCommitMutation
- func (m *GitCommitMutation) AddAuthorID(i int64)
- func (m *GitCommitMutation) AddField(name string, value ent.Value) error
- func (m *GitCommitMutation) AddedAuthorID() (r int64, exists bool)
- func (m *GitCommitMutation) AddedEdges() []string
- func (m *GitCommitMutation) AddedField(name string) (ent.Value, bool)
- func (m *GitCommitMutation) AddedFields() []string
- func (m *GitCommitMutation) AddedIDs(name string) []ent.Value
- func (m *GitCommitMutation) AuthorID() (r int64, exists bool)
- func (m *GitCommitMutation) AuthorLogin() (r string, exists bool)
- func (m *GitCommitMutation) ClearEdge(name string) error
- func (m *GitCommitMutation) ClearField(name string) error
- func (m *GitCommitMutation) ClearRepository()
- func (m *GitCommitMutation) ClearedEdges() []string
- func (m *GitCommitMutation) ClearedFields() []string
- func (m GitCommitMutation) Client() *Client
- func (m *GitCommitMutation) Date() (r time.Time, exists bool)
- func (m *GitCommitMutation) EdgeCleared(name string) bool
- func (m *GitCommitMutation) Field(name string) (ent.Value, bool)
- func (m *GitCommitMutation) FieldCleared(name string) bool
- func (m *GitCommitMutation) Fields() []string
- func (m *GitCommitMutation) ID() (id string, exists bool)
- func (m *GitCommitMutation) IDs(ctx context.Context) ([]string, error)
- func (m *GitCommitMutation) Message() (r string, exists bool)
- func (m *GitCommitMutation) OldAuthorID(ctx context.Context) (v int64, err error)
- func (m *GitCommitMutation) OldAuthorLogin(ctx context.Context) (v string, err error)
- func (m *GitCommitMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *GitCommitMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GitCommitMutation) OldMessage(ctx context.Context) (v string, err error)
- func (m *GitCommitMutation) Op() Op
- func (m *GitCommitMutation) RemovedEdges() []string
- func (m *GitCommitMutation) RemovedIDs(name string) []ent.Value
- func (m *GitCommitMutation) RepositoryCleared() bool
- func (m *GitCommitMutation) RepositoryID() (id int64, exists bool)
- func (m *GitCommitMutation) RepositoryIDs() (ids []int64)
- func (m *GitCommitMutation) ResetAuthorID()
- func (m *GitCommitMutation) ResetAuthorLogin()
- func (m *GitCommitMutation) ResetDate()
- func (m *GitCommitMutation) ResetEdge(name string) error
- func (m *GitCommitMutation) ResetField(name string) error
- func (m *GitCommitMutation) ResetMessage()
- func (m *GitCommitMutation) ResetRepository()
- func (m *GitCommitMutation) SetAuthorID(i int64)
- func (m *GitCommitMutation) SetAuthorLogin(s string)
- func (m *GitCommitMutation) SetDate(t time.Time)
- func (m *GitCommitMutation) SetField(name string, value ent.Value) error
- func (m *GitCommitMutation) SetID(id string)
- func (m *GitCommitMutation) SetMessage(s string)
- func (m *GitCommitMutation) SetOp(op Op)
- func (m *GitCommitMutation) SetRepositoryID(id int64)
- func (m GitCommitMutation) Tx() (*Tx, error)
- func (m *GitCommitMutation) Type() string
- func (m *GitCommitMutation) Where(ps ...predicate.GitCommit)
- func (m *GitCommitMutation) WhereP(ps ...func(*sql.Selector))
- type GitCommitQuery
- func (gcq *GitCommitQuery) Aggregate(fns ...AggregateFunc) *GitCommitSelect
- func (gcq *GitCommitQuery) All(ctx context.Context) ([]*GitCommit, error)
- func (gcq *GitCommitQuery) AllX(ctx context.Context) []*GitCommit
- func (gcq *GitCommitQuery) Clone() *GitCommitQuery
- func (gcq *GitCommitQuery) Count(ctx context.Context) (int, error)
- func (gcq *GitCommitQuery) CountX(ctx context.Context) int
- func (gcq *GitCommitQuery) Exist(ctx context.Context) (bool, error)
- func (gcq *GitCommitQuery) ExistX(ctx context.Context) bool
- func (gcq *GitCommitQuery) First(ctx context.Context) (*GitCommit, error)
- func (gcq *GitCommitQuery) FirstID(ctx context.Context) (id string, err error)
- func (gcq *GitCommitQuery) FirstIDX(ctx context.Context) string
- func (gcq *GitCommitQuery) FirstX(ctx context.Context) *GitCommit
- func (gcq *GitCommitQuery) GroupBy(field string, fields ...string) *GitCommitGroupBy
- func (gcq *GitCommitQuery) IDs(ctx context.Context) (ids []string, err error)
- func (gcq *GitCommitQuery) IDsX(ctx context.Context) []string
- func (gcq *GitCommitQuery) Limit(limit int) *GitCommitQuery
- func (gcq *GitCommitQuery) Offset(offset int) *GitCommitQuery
- func (gcq *GitCommitQuery) Only(ctx context.Context) (*GitCommit, error)
- func (gcq *GitCommitQuery) OnlyID(ctx context.Context) (id string, err error)
- func (gcq *GitCommitQuery) OnlyIDX(ctx context.Context) string
- func (gcq *GitCommitQuery) OnlyX(ctx context.Context) *GitCommit
- func (gcq *GitCommitQuery) Order(o ...gitcommit.OrderOption) *GitCommitQuery
- func (gcq *GitCommitQuery) QueryRepository() *RepositoryQuery
- func (gcq *GitCommitQuery) Select(fields ...string) *GitCommitSelect
- func (gcq *GitCommitQuery) Unique(unique bool) *GitCommitQuery
- func (gcq *GitCommitQuery) Where(ps ...predicate.GitCommit) *GitCommitQuery
- func (gcq *GitCommitQuery) WithRepository(opts ...func(*RepositoryQuery)) *GitCommitQuery
- type GitCommitSelect
- func (gcs *GitCommitSelect) Aggregate(fns ...AggregateFunc) *GitCommitSelect
- func (s *GitCommitSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GitCommitSelect) BoolX(ctx context.Context) bool
- func (s *GitCommitSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GitCommitSelect) BoolsX(ctx context.Context) []bool
- func (s *GitCommitSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GitCommitSelect) Float64X(ctx context.Context) float64
- func (s *GitCommitSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GitCommitSelect) Float64sX(ctx context.Context) []float64
- func (s *GitCommitSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GitCommitSelect) IntX(ctx context.Context) int
- func (s *GitCommitSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GitCommitSelect) IntsX(ctx context.Context) []int
- func (gcs *GitCommitSelect) Scan(ctx context.Context, v any) error
- func (s *GitCommitSelect) ScanX(ctx context.Context, v any)
- func (s *GitCommitSelect) String(ctx context.Context) (_ string, err error)
- func (s *GitCommitSelect) StringX(ctx context.Context) string
- func (s *GitCommitSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GitCommitSelect) StringsX(ctx context.Context) []string
- type GitCommitUpdate
- func (gcu *GitCommitUpdate) AddAuthorID(i int64) *GitCommitUpdate
- func (gcu *GitCommitUpdate) ClearRepository() *GitCommitUpdate
- func (gcu *GitCommitUpdate) Exec(ctx context.Context) error
- func (gcu *GitCommitUpdate) ExecX(ctx context.Context)
- func (gcu *GitCommitUpdate) Mutation() *GitCommitMutation
- func (gcu *GitCommitUpdate) Save(ctx context.Context) (int, error)
- func (gcu *GitCommitUpdate) SaveX(ctx context.Context) int
- func (gcu *GitCommitUpdate) SetAuthorID(i int64) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetAuthorLogin(s string) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetDate(t time.Time) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetMessage(s string) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetNillableAuthorID(i *int64) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetNillableAuthorLogin(s *string) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetNillableDate(t *time.Time) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetNillableMessage(s *string) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetNillableRepositoryID(id *int64) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetRepository(r *Repository) *GitCommitUpdate
- func (gcu *GitCommitUpdate) SetRepositoryID(id int64) *GitCommitUpdate
- func (gcu *GitCommitUpdate) Where(ps ...predicate.GitCommit) *GitCommitUpdate
- type GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) AddAuthorID(i int64) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) ClearRepository() *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) Exec(ctx context.Context) error
- func (gcuo *GitCommitUpdateOne) ExecX(ctx context.Context)
- func (gcuo *GitCommitUpdateOne) Mutation() *GitCommitMutation
- func (gcuo *GitCommitUpdateOne) Save(ctx context.Context) (*GitCommit, error)
- func (gcuo *GitCommitUpdateOne) SaveX(ctx context.Context) *GitCommit
- func (gcuo *GitCommitUpdateOne) Select(field string, fields ...string) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetAuthorID(i int64) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetAuthorLogin(s string) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetDate(t time.Time) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetMessage(s string) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetNillableAuthorID(i *int64) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetNillableAuthorLogin(s *string) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetNillableDate(t *time.Time) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetNillableMessage(s *string) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetNillableRepositoryID(id *int64) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetRepository(r *Repository) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) SetRepositoryID(id int64) *GitCommitUpdateOne
- func (gcuo *GitCommitUpdateOne) Where(ps ...predicate.GitCommit) *GitCommitUpdateOne
- type GitCommitUpsert
- func (u *GitCommitUpsert) AddAuthorID(v int64) *GitCommitUpsert
- func (u *GitCommitUpsert) SetAuthorID(v int64) *GitCommitUpsert
- func (u *GitCommitUpsert) SetAuthorLogin(v string) *GitCommitUpsert
- func (u *GitCommitUpsert) SetDate(v time.Time) *GitCommitUpsert
- func (u *GitCommitUpsert) SetMessage(v string) *GitCommitUpsert
- func (u *GitCommitUpsert) UpdateAuthorID() *GitCommitUpsert
- func (u *GitCommitUpsert) UpdateAuthorLogin() *GitCommitUpsert
- func (u *GitCommitUpsert) UpdateDate() *GitCommitUpsert
- func (u *GitCommitUpsert) UpdateMessage() *GitCommitUpsert
- type GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) AddAuthorID(v int64) *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) DoNothing() *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) Exec(ctx context.Context) error
- func (u *GitCommitUpsertBulk) ExecX(ctx context.Context)
- func (u *GitCommitUpsertBulk) Ignore() *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) SetAuthorID(v int64) *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) SetAuthorLogin(v string) *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) SetDate(v time.Time) *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) SetMessage(v string) *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) Update(set func(*GitCommitUpsert)) *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) UpdateAuthorID() *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) UpdateAuthorLogin() *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) UpdateDate() *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) UpdateMessage() *GitCommitUpsertBulk
- func (u *GitCommitUpsertBulk) UpdateNewValues() *GitCommitUpsertBulk
- type GitCommitUpsertOne
- func (u *GitCommitUpsertOne) AddAuthorID(v int64) *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) DoNothing() *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) Exec(ctx context.Context) error
- func (u *GitCommitUpsertOne) ExecX(ctx context.Context)
- func (u *GitCommitUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *GitCommitUpsertOne) IDX(ctx context.Context) string
- func (u *GitCommitUpsertOne) Ignore() *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) SetAuthorID(v int64) *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) SetAuthorLogin(v string) *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) SetDate(v time.Time) *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) SetMessage(v string) *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) Update(set func(*GitCommitUpsert)) *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) UpdateAuthorID() *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) UpdateAuthorLogin() *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) UpdateDate() *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) UpdateMessage() *GitCommitUpsertOne
- func (u *GitCommitUpsertOne) UpdateNewValues() *GitCommitUpsertOne
- type GitCommits
- 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) NamedRepositories(name string) ([]*Repository, error)
- func (o *Organization) QueryRepositories() *RepositoryQuery
- 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 int64) *OrganizationDeleteOne
- func (c *OrganizationClient) Get(ctx context.Context, id int64) (*Organization, error)
- func (c *OrganizationClient) GetX(ctx context.Context, id int64) *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) QueryRepositories(o *Organization) *RepositoryQuery
- func (c *OrganizationClient) Update() *OrganizationUpdate
- func (c *OrganizationClient) UpdateOne(o *Organization) *OrganizationUpdateOne
- func (c *OrganizationClient) UpdateOneID(id int64) *OrganizationUpdateOne
- func (c *OrganizationClient) Use(hooks ...Hook)
- type OrganizationCreate
- func (oc *OrganizationCreate) AddRepositories(r ...*Repository) *OrganizationCreate
- func (oc *OrganizationCreate) AddRepositoryIDs(ids ...int64) *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) SetHTMLURL(s string) *OrganizationCreate
- func (oc *OrganizationCreate) SetID(i int64) *OrganizationCreate
- func (oc *OrganizationCreate) SetName(s string) *OrganizationCreate
- func (oc *OrganizationCreate) SetNillableHTMLURL(s *string) *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) AddRepositoryIDs(ids ...int64)
- 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) ClearEdge(name string) error
- func (m *OrganizationMutation) ClearField(name string) error
- func (m *OrganizationMutation) ClearHTMLURL()
- func (m *OrganizationMutation) ClearRepositories()
- func (m *OrganizationMutation) ClearedEdges() []string
- func (m *OrganizationMutation) ClearedFields() []string
- func (m OrganizationMutation) Client() *Client
- func (m *OrganizationMutation) EdgeCleared(name string) bool
- func (m *OrganizationMutation) Field(name string) (ent.Value, bool)
- func (m *OrganizationMutation) FieldCleared(name string) bool
- func (m *OrganizationMutation) Fields() []string
- func (m *OrganizationMutation) HTMLURL() (r string, exists bool)
- func (m *OrganizationMutation) HTMLURLCleared() bool
- func (m *OrganizationMutation) ID() (id int64, exists bool)
- func (m *OrganizationMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *OrganizationMutation) Name() (r string, exists bool)
- func (m *OrganizationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrganizationMutation) OldHTMLURL(ctx context.Context) (v string, err error)
- func (m *OrganizationMutation) OldName(ctx context.Context) (v string, err error)
- func (m *OrganizationMutation) Op() Op
- func (m *OrganizationMutation) RemoveRepositoryIDs(ids ...int64)
- func (m *OrganizationMutation) RemovedEdges() []string
- func (m *OrganizationMutation) RemovedIDs(name string) []ent.Value
- func (m *OrganizationMutation) RemovedRepositoriesIDs() (ids []int64)
- func (m *OrganizationMutation) RepositoriesCleared() bool
- func (m *OrganizationMutation) RepositoriesIDs() (ids []int64)
- func (m *OrganizationMutation) ResetEdge(name string) error
- func (m *OrganizationMutation) ResetField(name string) error
- func (m *OrganizationMutation) ResetHTMLURL()
- func (m *OrganizationMutation) ResetName()
- func (m *OrganizationMutation) ResetRepositories()
- func (m *OrganizationMutation) SetField(name string, value ent.Value) error
- func (m *OrganizationMutation) SetHTMLURL(s string)
- func (m *OrganizationMutation) SetID(id int64)
- func (m *OrganizationMutation) SetName(s string)
- func (m *OrganizationMutation) SetOp(op Op)
- func (m OrganizationMutation) Tx() (*Tx, error)
- func (m *OrganizationMutation) Type() string
- 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 int64, err error)
- func (oq *OrganizationQuery) FirstIDX(ctx context.Context) int64
- 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 []int64, err error)
- func (oq *OrganizationQuery) IDsX(ctx context.Context) []int64
- 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 int64, err error)
- func (oq *OrganizationQuery) OnlyIDX(ctx context.Context) int64
- func (oq *OrganizationQuery) OnlyX(ctx context.Context) *Organization
- func (oq *OrganizationQuery) Order(o ...organization.OrderOption) *OrganizationQuery
- func (oq *OrganizationQuery) QueryRepositories() *RepositoryQuery
- 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) WithNamedRepositories(name string, opts ...func(*RepositoryQuery)) *OrganizationQuery
- func (oq *OrganizationQuery) WithRepositories(opts ...func(*RepositoryQuery)) *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) AddRepositories(r ...*Repository) *OrganizationUpdate
- func (ou *OrganizationUpdate) AddRepositoryIDs(ids ...int64) *OrganizationUpdate
- func (ou *OrganizationUpdate) ClearHTMLURL() *OrganizationUpdate
- func (ou *OrganizationUpdate) ClearRepositories() *OrganizationUpdate
- func (ou *OrganizationUpdate) Exec(ctx context.Context) error
- func (ou *OrganizationUpdate) ExecX(ctx context.Context)
- func (ou *OrganizationUpdate) Mutation() *OrganizationMutation
- func (ou *OrganizationUpdate) RemoveRepositories(r ...*Repository) *OrganizationUpdate
- func (ou *OrganizationUpdate) RemoveRepositoryIDs(ids ...int64) *OrganizationUpdate
- func (ou *OrganizationUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrganizationUpdate) SaveX(ctx context.Context) int
- func (ou *OrganizationUpdate) SetHTMLURL(s string) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetName(s string) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetNillableHTMLURL(s *string) *OrganizationUpdate
- func (ou *OrganizationUpdate) SetNillableName(s *string) *OrganizationUpdate
- func (ou *OrganizationUpdate) Where(ps ...predicate.Organization) *OrganizationUpdate
- type OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) AddRepositories(r ...*Repository) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) AddRepositoryIDs(ids ...int64) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) ClearHTMLURL() *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) ClearRepositories() *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrganizationUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrganizationUpdateOne) Mutation() *OrganizationMutation
- func (ouo *OrganizationUpdateOne) RemoveRepositories(r ...*Repository) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) RemoveRepositoryIDs(ids ...int64) *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) SetHTMLURL(s string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetName(s string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetNillableHTMLURL(s *string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) SetNillableName(s *string) *OrganizationUpdateOne
- func (ouo *OrganizationUpdateOne) Where(ps ...predicate.Organization) *OrganizationUpdateOne
- type OrganizationUpsert
- func (u *OrganizationUpsert) ClearHTMLURL() *OrganizationUpsert
- func (u *OrganizationUpsert) SetHTMLURL(v string) *OrganizationUpsert
- func (u *OrganizationUpsert) SetName(v string) *OrganizationUpsert
- func (u *OrganizationUpsert) UpdateHTMLURL() *OrganizationUpsert
- func (u *OrganizationUpsert) UpdateName() *OrganizationUpsert
- type OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) ClearHTMLURL() *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) SetHTMLURL(v string) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) SetName(v string) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) Update(set func(*OrganizationUpsert)) *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateHTMLURL() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateName() *OrganizationUpsertBulk
- func (u *OrganizationUpsertBulk) UpdateNewValues() *OrganizationUpsertBulk
- type OrganizationUpsertOne
- func (u *OrganizationUpsertOne) ClearHTMLURL() *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 int64, err error)
- func (u *OrganizationUpsertOne) IDX(ctx context.Context) int64
- func (u *OrganizationUpsertOne) Ignore() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) SetHTMLURL(v string) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) SetName(v string) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) Update(set func(*OrganizationUpsert)) *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateHTMLURL() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateName() *OrganizationUpsertOne
- func (u *OrganizationUpsertOne) UpdateNewValues() *OrganizationUpsertOne
- type Organizations
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Repositories
- type Repository
- func (r *Repository) NamedCommits(name string) ([]*GitCommit, error)
- func (r *Repository) QueryCommits() *GitCommitQuery
- func (r *Repository) QueryOrganization() *OrganizationQuery
- func (r *Repository) String() string
- func (r *Repository) Unwrap() *Repository
- func (r *Repository) Update() *RepositoryUpdateOne
- func (r *Repository) Value(name string) (ent.Value, error)
- type RepositoryClient
- func (c *RepositoryClient) Create() *RepositoryCreate
- func (c *RepositoryClient) CreateBulk(builders ...*RepositoryCreate) *RepositoryCreateBulk
- func (c *RepositoryClient) Delete() *RepositoryDelete
- func (c *RepositoryClient) DeleteOne(r *Repository) *RepositoryDeleteOne
- func (c *RepositoryClient) DeleteOneID(id int64) *RepositoryDeleteOne
- func (c *RepositoryClient) Get(ctx context.Context, id int64) (*Repository, error)
- func (c *RepositoryClient) GetX(ctx context.Context, id int64) *Repository
- func (c *RepositoryClient) Hooks() []Hook
- func (c *RepositoryClient) Intercept(interceptors ...Interceptor)
- func (c *RepositoryClient) Interceptors() []Interceptor
- func (c *RepositoryClient) MapCreateBulk(slice any, setFunc func(*RepositoryCreate, int)) *RepositoryCreateBulk
- func (c *RepositoryClient) Query() *RepositoryQuery
- func (c *RepositoryClient) QueryCommits(r *Repository) *GitCommitQuery
- func (c *RepositoryClient) QueryOrganization(r *Repository) *OrganizationQuery
- func (c *RepositoryClient) Update() *RepositoryUpdate
- func (c *RepositoryClient) UpdateOne(r *Repository) *RepositoryUpdateOne
- func (c *RepositoryClient) UpdateOneID(id int64) *RepositoryUpdateOne
- func (c *RepositoryClient) Use(hooks ...Hook)
- type RepositoryCreate
- func (rc *RepositoryCreate) AddCommitIDs(ids ...string) *RepositoryCreate
- func (rc *RepositoryCreate) AddCommits(g ...*GitCommit) *RepositoryCreate
- func (rc *RepositoryCreate) Exec(ctx context.Context) error
- func (rc *RepositoryCreate) ExecX(ctx context.Context)
- func (rc *RepositoryCreate) Mutation() *RepositoryMutation
- func (rc *RepositoryCreate) OnConflict(opts ...sql.ConflictOption) *RepositoryUpsertOne
- func (rc *RepositoryCreate) OnConflictColumns(columns ...string) *RepositoryUpsertOne
- func (rc *RepositoryCreate) Save(ctx context.Context) (*Repository, error)
- func (rc *RepositoryCreate) SaveX(ctx context.Context) *Repository
- func (rc *RepositoryCreate) SetDescription(s string) *RepositoryCreate
- func (rc *RepositoryCreate) SetFullName(s string) *RepositoryCreate
- func (rc *RepositoryCreate) SetHTMLURL(s string) *RepositoryCreate
- func (rc *RepositoryCreate) SetID(i int64) *RepositoryCreate
- func (rc *RepositoryCreate) SetLastEventAt(t time.Time) *RepositoryCreate
- func (rc *RepositoryCreate) SetLastPushedAt(t time.Time) *RepositoryCreate
- func (rc *RepositoryCreate) SetName(s string) *RepositoryCreate
- func (rc *RepositoryCreate) SetNillableDescription(s *string) *RepositoryCreate
- func (rc *RepositoryCreate) SetNillableHTMLURL(s *string) *RepositoryCreate
- func (rc *RepositoryCreate) SetNillableLastEventAt(t *time.Time) *RepositoryCreate
- func (rc *RepositoryCreate) SetNillableLastPushedAt(t *time.Time) *RepositoryCreate
- func (rc *RepositoryCreate) SetNillableOrganizationID(id *int64) *RepositoryCreate
- func (rc *RepositoryCreate) SetOrganization(o *Organization) *RepositoryCreate
- func (rc *RepositoryCreate) SetOrganizationID(id int64) *RepositoryCreate
- type RepositoryCreateBulk
- func (rcb *RepositoryCreateBulk) Exec(ctx context.Context) error
- func (rcb *RepositoryCreateBulk) ExecX(ctx context.Context)
- func (rcb *RepositoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *RepositoryUpsertBulk
- func (rcb *RepositoryCreateBulk) OnConflictColumns(columns ...string) *RepositoryUpsertBulk
- func (rcb *RepositoryCreateBulk) Save(ctx context.Context) ([]*Repository, error)
- func (rcb *RepositoryCreateBulk) SaveX(ctx context.Context) []*Repository
- type RepositoryDelete
- type RepositoryDeleteOne
- type RepositoryEdges
- type RepositoryGroupBy
- func (rgb *RepositoryGroupBy) Aggregate(fns ...AggregateFunc) *RepositoryGroupBy
- func (s *RepositoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RepositoryGroupBy) BoolX(ctx context.Context) bool
- func (s *RepositoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RepositoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RepositoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RepositoryGroupBy) Float64X(ctx context.Context) float64
- func (s *RepositoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RepositoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RepositoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RepositoryGroupBy) IntX(ctx context.Context) int
- func (s *RepositoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RepositoryGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RepositoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *RepositoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *RepositoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RepositoryGroupBy) StringX(ctx context.Context) string
- func (s *RepositoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RepositoryGroupBy) StringsX(ctx context.Context) []string
- type RepositoryMutation
- func (m *RepositoryMutation) AddCommitIDs(ids ...string)
- func (m *RepositoryMutation) AddField(name string, value ent.Value) error
- func (m *RepositoryMutation) AddedEdges() []string
- func (m *RepositoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *RepositoryMutation) AddedFields() []string
- func (m *RepositoryMutation) AddedIDs(name string) []ent.Value
- func (m *RepositoryMutation) ClearCommits()
- func (m *RepositoryMutation) ClearEdge(name string) error
- func (m *RepositoryMutation) ClearField(name string) error
- func (m *RepositoryMutation) ClearHTMLURL()
- func (m *RepositoryMutation) ClearLastEventAt()
- func (m *RepositoryMutation) ClearLastPushedAt()
- func (m *RepositoryMutation) ClearOrganization()
- func (m *RepositoryMutation) ClearedEdges() []string
- func (m *RepositoryMutation) ClearedFields() []string
- func (m RepositoryMutation) Client() *Client
- func (m *RepositoryMutation) CommitsCleared() bool
- func (m *RepositoryMutation) CommitsIDs() (ids []string)
- func (m *RepositoryMutation) Description() (r string, exists bool)
- func (m *RepositoryMutation) EdgeCleared(name string) bool
- func (m *RepositoryMutation) Field(name string) (ent.Value, bool)
- func (m *RepositoryMutation) FieldCleared(name string) bool
- func (m *RepositoryMutation) Fields() []string
- func (m *RepositoryMutation) FullName() (r string, exists bool)
- func (m *RepositoryMutation) HTMLURL() (r string, exists bool)
- func (m *RepositoryMutation) HTMLURLCleared() bool
- func (m *RepositoryMutation) ID() (id int64, exists bool)
- func (m *RepositoryMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RepositoryMutation) LastEventAt() (r time.Time, exists bool)
- func (m *RepositoryMutation) LastEventAtCleared() bool
- func (m *RepositoryMutation) LastPushedAt() (r time.Time, exists bool)
- func (m *RepositoryMutation) LastPushedAtCleared() bool
- func (m *RepositoryMutation) Name() (r string, exists bool)
- func (m *RepositoryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *RepositoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RepositoryMutation) OldFullName(ctx context.Context) (v string, err error)
- func (m *RepositoryMutation) OldHTMLURL(ctx context.Context) (v string, err error)
- func (m *RepositoryMutation) OldLastEventAt(ctx context.Context) (v time.Time, err error)
- func (m *RepositoryMutation) OldLastPushedAt(ctx context.Context) (v time.Time, err error)
- func (m *RepositoryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *RepositoryMutation) Op() Op
- func (m *RepositoryMutation) OrganizationCleared() bool
- func (m *RepositoryMutation) OrganizationID() (id int64, exists bool)
- func (m *RepositoryMutation) OrganizationIDs() (ids []int64)
- func (m *RepositoryMutation) RemoveCommitIDs(ids ...string)
- func (m *RepositoryMutation) RemovedCommitsIDs() (ids []string)
- func (m *RepositoryMutation) RemovedEdges() []string
- func (m *RepositoryMutation) RemovedIDs(name string) []ent.Value
- func (m *RepositoryMutation) ResetCommits()
- func (m *RepositoryMutation) ResetDescription()
- func (m *RepositoryMutation) ResetEdge(name string) error
- func (m *RepositoryMutation) ResetField(name string) error
- func (m *RepositoryMutation) ResetFullName()
- func (m *RepositoryMutation) ResetHTMLURL()
- func (m *RepositoryMutation) ResetLastEventAt()
- func (m *RepositoryMutation) ResetLastPushedAt()
- func (m *RepositoryMutation) ResetName()
- func (m *RepositoryMutation) ResetOrganization()
- func (m *RepositoryMutation) SetDescription(s string)
- func (m *RepositoryMutation) SetField(name string, value ent.Value) error
- func (m *RepositoryMutation) SetFullName(s string)
- func (m *RepositoryMutation) SetHTMLURL(s string)
- func (m *RepositoryMutation) SetID(id int64)
- func (m *RepositoryMutation) SetLastEventAt(t time.Time)
- func (m *RepositoryMutation) SetLastPushedAt(t time.Time)
- func (m *RepositoryMutation) SetName(s string)
- func (m *RepositoryMutation) SetOp(op Op)
- func (m *RepositoryMutation) SetOrganizationID(id int64)
- func (m RepositoryMutation) Tx() (*Tx, error)
- func (m *RepositoryMutation) Type() string
- func (m *RepositoryMutation) Where(ps ...predicate.Repository)
- func (m *RepositoryMutation) WhereP(ps ...func(*sql.Selector))
- type RepositoryQuery
- func (rq *RepositoryQuery) Aggregate(fns ...AggregateFunc) *RepositorySelect
- func (rq *RepositoryQuery) All(ctx context.Context) ([]*Repository, error)
- func (rq *RepositoryQuery) AllX(ctx context.Context) []*Repository
- func (rq *RepositoryQuery) Clone() *RepositoryQuery
- func (rq *RepositoryQuery) Count(ctx context.Context) (int, error)
- func (rq *RepositoryQuery) CountX(ctx context.Context) int
- func (rq *RepositoryQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RepositoryQuery) ExistX(ctx context.Context) bool
- func (rq *RepositoryQuery) First(ctx context.Context) (*Repository, error)
- func (rq *RepositoryQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rq *RepositoryQuery) FirstIDX(ctx context.Context) int64
- func (rq *RepositoryQuery) FirstX(ctx context.Context) *Repository
- func (rq *RepositoryQuery) GroupBy(field string, fields ...string) *RepositoryGroupBy
- func (rq *RepositoryQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (rq *RepositoryQuery) IDsX(ctx context.Context) []int64
- func (rq *RepositoryQuery) Limit(limit int) *RepositoryQuery
- func (rq *RepositoryQuery) Offset(offset int) *RepositoryQuery
- func (rq *RepositoryQuery) Only(ctx context.Context) (*Repository, error)
- func (rq *RepositoryQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rq *RepositoryQuery) OnlyIDX(ctx context.Context) int64
- func (rq *RepositoryQuery) OnlyX(ctx context.Context) *Repository
- func (rq *RepositoryQuery) Order(o ...repository.OrderOption) *RepositoryQuery
- func (rq *RepositoryQuery) QueryCommits() *GitCommitQuery
- func (rq *RepositoryQuery) QueryOrganization() *OrganizationQuery
- func (rq *RepositoryQuery) Select(fields ...string) *RepositorySelect
- func (rq *RepositoryQuery) Unique(unique bool) *RepositoryQuery
- func (rq *RepositoryQuery) Where(ps ...predicate.Repository) *RepositoryQuery
- func (rq *RepositoryQuery) WithCommits(opts ...func(*GitCommitQuery)) *RepositoryQuery
- func (rq *RepositoryQuery) WithNamedCommits(name string, opts ...func(*GitCommitQuery)) *RepositoryQuery
- func (rq *RepositoryQuery) WithOrganization(opts ...func(*OrganizationQuery)) *RepositoryQuery
- type RepositorySelect
- func (rs *RepositorySelect) Aggregate(fns ...AggregateFunc) *RepositorySelect
- func (s *RepositorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RepositorySelect) BoolX(ctx context.Context) bool
- func (s *RepositorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RepositorySelect) BoolsX(ctx context.Context) []bool
- func (s *RepositorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RepositorySelect) Float64X(ctx context.Context) float64
- func (s *RepositorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RepositorySelect) Float64sX(ctx context.Context) []float64
- func (s *RepositorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *RepositorySelect) IntX(ctx context.Context) int
- func (s *RepositorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *RepositorySelect) IntsX(ctx context.Context) []int
- func (rs *RepositorySelect) Scan(ctx context.Context, v any) error
- func (s *RepositorySelect) ScanX(ctx context.Context, v any)
- func (s *RepositorySelect) String(ctx context.Context) (_ string, err error)
- func (s *RepositorySelect) StringX(ctx context.Context) string
- func (s *RepositorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *RepositorySelect) StringsX(ctx context.Context) []string
- type RepositoryUpdate
- func (ru *RepositoryUpdate) AddCommitIDs(ids ...string) *RepositoryUpdate
- func (ru *RepositoryUpdate) AddCommits(g ...*GitCommit) *RepositoryUpdate
- func (ru *RepositoryUpdate) ClearCommits() *RepositoryUpdate
- func (ru *RepositoryUpdate) ClearHTMLURL() *RepositoryUpdate
- func (ru *RepositoryUpdate) ClearLastEventAt() *RepositoryUpdate
- func (ru *RepositoryUpdate) ClearLastPushedAt() *RepositoryUpdate
- func (ru *RepositoryUpdate) ClearOrganization() *RepositoryUpdate
- func (ru *RepositoryUpdate) Exec(ctx context.Context) error
- func (ru *RepositoryUpdate) ExecX(ctx context.Context)
- func (ru *RepositoryUpdate) Mutation() *RepositoryMutation
- func (ru *RepositoryUpdate) RemoveCommitIDs(ids ...string) *RepositoryUpdate
- func (ru *RepositoryUpdate) RemoveCommits(g ...*GitCommit) *RepositoryUpdate
- func (ru *RepositoryUpdate) Save(ctx context.Context) (int, error)
- func (ru *RepositoryUpdate) SaveX(ctx context.Context) int
- func (ru *RepositoryUpdate) SetDescription(s string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetFullName(s string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetHTMLURL(s string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetLastEventAt(t time.Time) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetLastPushedAt(t time.Time) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetName(s string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetNillableDescription(s *string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetNillableFullName(s *string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetNillableHTMLURL(s *string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetNillableLastEventAt(t *time.Time) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetNillableLastPushedAt(t *time.Time) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetNillableName(s *string) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetNillableOrganizationID(id *int64) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetOrganization(o *Organization) *RepositoryUpdate
- func (ru *RepositoryUpdate) SetOrganizationID(id int64) *RepositoryUpdate
- func (ru *RepositoryUpdate) Where(ps ...predicate.Repository) *RepositoryUpdate
- type RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) AddCommitIDs(ids ...string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) AddCommits(g ...*GitCommit) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) ClearCommits() *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) ClearHTMLURL() *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) ClearLastEventAt() *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) ClearLastPushedAt() *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) ClearOrganization() *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) Exec(ctx context.Context) error
- func (ruo *RepositoryUpdateOne) ExecX(ctx context.Context)
- func (ruo *RepositoryUpdateOne) Mutation() *RepositoryMutation
- func (ruo *RepositoryUpdateOne) RemoveCommitIDs(ids ...string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) RemoveCommits(g ...*GitCommit) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) Save(ctx context.Context) (*Repository, error)
- func (ruo *RepositoryUpdateOne) SaveX(ctx context.Context) *Repository
- func (ruo *RepositoryUpdateOne) Select(field string, fields ...string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetDescription(s string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetFullName(s string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetHTMLURL(s string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetLastEventAt(t time.Time) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetLastPushedAt(t time.Time) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetName(s string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetNillableDescription(s *string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetNillableFullName(s *string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetNillableHTMLURL(s *string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetNillableLastEventAt(t *time.Time) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetNillableLastPushedAt(t *time.Time) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetNillableName(s *string) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetNillableOrganizationID(id *int64) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetOrganization(o *Organization) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) SetOrganizationID(id int64) *RepositoryUpdateOne
- func (ruo *RepositoryUpdateOne) Where(ps ...predicate.Repository) *RepositoryUpdateOne
- type RepositoryUpsert
- func (u *RepositoryUpsert) ClearHTMLURL() *RepositoryUpsert
- func (u *RepositoryUpsert) ClearLastEventAt() *RepositoryUpsert
- func (u *RepositoryUpsert) ClearLastPushedAt() *RepositoryUpsert
- func (u *RepositoryUpsert) SetDescription(v string) *RepositoryUpsert
- func (u *RepositoryUpsert) SetFullName(v string) *RepositoryUpsert
- func (u *RepositoryUpsert) SetHTMLURL(v string) *RepositoryUpsert
- func (u *RepositoryUpsert) SetLastEventAt(v time.Time) *RepositoryUpsert
- func (u *RepositoryUpsert) SetLastPushedAt(v time.Time) *RepositoryUpsert
- func (u *RepositoryUpsert) SetName(v string) *RepositoryUpsert
- func (u *RepositoryUpsert) UpdateDescription() *RepositoryUpsert
- func (u *RepositoryUpsert) UpdateFullName() *RepositoryUpsert
- func (u *RepositoryUpsert) UpdateHTMLURL() *RepositoryUpsert
- func (u *RepositoryUpsert) UpdateLastEventAt() *RepositoryUpsert
- func (u *RepositoryUpsert) UpdateLastPushedAt() *RepositoryUpsert
- func (u *RepositoryUpsert) UpdateName() *RepositoryUpsert
- type RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) ClearHTMLURL() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) ClearLastEventAt() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) ClearLastPushedAt() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) DoNothing() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) Exec(ctx context.Context) error
- func (u *RepositoryUpsertBulk) ExecX(ctx context.Context)
- func (u *RepositoryUpsertBulk) Ignore() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) SetDescription(v string) *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) SetFullName(v string) *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) SetHTMLURL(v string) *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) SetLastEventAt(v time.Time) *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) SetLastPushedAt(v time.Time) *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) SetName(v string) *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) Update(set func(*RepositoryUpsert)) *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) UpdateDescription() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) UpdateFullName() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) UpdateHTMLURL() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) UpdateLastEventAt() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) UpdateLastPushedAt() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) UpdateName() *RepositoryUpsertBulk
- func (u *RepositoryUpsertBulk) UpdateNewValues() *RepositoryUpsertBulk
- type RepositoryUpsertOne
- func (u *RepositoryUpsertOne) ClearHTMLURL() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) ClearLastEventAt() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) ClearLastPushedAt() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) DoNothing() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) Exec(ctx context.Context) error
- func (u *RepositoryUpsertOne) ExecX(ctx context.Context)
- func (u *RepositoryUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *RepositoryUpsertOne) IDX(ctx context.Context) int64
- func (u *RepositoryUpsertOne) Ignore() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) SetDescription(v string) *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) SetFullName(v string) *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) SetHTMLURL(v string) *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) SetLastEventAt(v time.Time) *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) SetLastPushedAt(v time.Time) *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) SetName(v string) *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) Update(set func(*RepositoryUpsert)) *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) UpdateDescription() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) UpdateFullName() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) UpdateHTMLURL() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) UpdateLastEventAt() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) UpdateLastPushedAt() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) UpdateName() *RepositoryUpsertOne
- func (u *RepositoryUpsertOne) UpdateNewValues() *RepositoryUpsertOne
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeGitCommit = "GitCommit" TypeOrganization = "Organization" TypeRepository = "Repository" )
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 // GitCommit is the client for interacting with the GitCommit builders. GitCommit *GitCommitClient // Organization is the client for interacting with the Organization builders. Organization *OrganizationClient // Repository is the client for interacting with the Repository builders. Repository *RepositoryClient // 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(). GitCommit. 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 GitCommit ¶
type GitCommit struct { // ID of the ent. // GitCommit SHA. ID string `json:"id,omitempty"` // GitCommit message. Message string `json:"message,omitempty"` // GitCommit author. AuthorLogin string `json:"author_login,omitempty"` // GitCommit author ID. AuthorID int64 `json:"author_id,omitempty"` // GitCommit date. Date time.Time `json:"date,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GitCommitQuery when eager-loading is set. Edges GitCommitEdges `json:"edges"` // contains filtered or unexported fields }
GitCommit is the model entity for the GitCommit schema.
func (*GitCommit) QueryRepository ¶
func (gc *GitCommit) QueryRepository() *RepositoryQuery
QueryRepository queries the "repository" edge of the GitCommit entity.
func (*GitCommit) Unwrap ¶
Unwrap unwraps the GitCommit 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 (*GitCommit) Update ¶
func (gc *GitCommit) Update() *GitCommitUpdateOne
Update returns a builder for updating this GitCommit. Note that you need to call GitCommit.Unwrap() before calling this method if this GitCommit was returned from a transaction, and the transaction was committed or rolled back.
type GitCommitClient ¶
type GitCommitClient struct {
// contains filtered or unexported fields
}
GitCommitClient is a client for the GitCommit schema.
func NewGitCommitClient ¶
func NewGitCommitClient(c config) *GitCommitClient
NewGitCommitClient returns a client for the GitCommit from the given config.
func (*GitCommitClient) Create ¶
func (c *GitCommitClient) Create() *GitCommitCreate
Create returns a builder for creating a GitCommit entity.
func (*GitCommitClient) CreateBulk ¶
func (c *GitCommitClient) CreateBulk(builders ...*GitCommitCreate) *GitCommitCreateBulk
CreateBulk returns a builder for creating a bulk of GitCommit entities.
func (*GitCommitClient) Delete ¶
func (c *GitCommitClient) Delete() *GitCommitDelete
Delete returns a delete builder for GitCommit.
func (*GitCommitClient) DeleteOne ¶
func (c *GitCommitClient) DeleteOne(gc *GitCommit) *GitCommitDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GitCommitClient) DeleteOneID ¶
func (c *GitCommitClient) DeleteOneID(id string) *GitCommitDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GitCommitClient) GetX ¶
func (c *GitCommitClient) GetX(ctx context.Context, id string) *GitCommit
GetX is like Get, but panics if an error occurs.
func (*GitCommitClient) Hooks ¶
func (c *GitCommitClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GitCommitClient) Intercept ¶
func (c *GitCommitClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gitcommit.Intercept(f(g(h())))`.
func (*GitCommitClient) Interceptors ¶
func (c *GitCommitClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GitCommitClient) MapCreateBulk ¶
func (c *GitCommitClient) MapCreateBulk(slice any, setFunc func(*GitCommitCreate, int)) *GitCommitCreateBulk
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 (*GitCommitClient) Query ¶
func (c *GitCommitClient) Query() *GitCommitQuery
Query returns a query builder for GitCommit.
func (*GitCommitClient) QueryRepository ¶
func (c *GitCommitClient) QueryRepository(gc *GitCommit) *RepositoryQuery
QueryRepository queries the repository edge of a GitCommit.
func (*GitCommitClient) Update ¶
func (c *GitCommitClient) Update() *GitCommitUpdate
Update returns an update builder for GitCommit.
func (*GitCommitClient) UpdateOne ¶
func (c *GitCommitClient) UpdateOne(gc *GitCommit) *GitCommitUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GitCommitClient) UpdateOneID ¶
func (c *GitCommitClient) UpdateOneID(id string) *GitCommitUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GitCommitClient) Use ¶
func (c *GitCommitClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gitcommit.Hooks(f(g(h())))`.
type GitCommitCreate ¶
type GitCommitCreate struct {
// contains filtered or unexported fields
}
GitCommitCreate is the builder for creating a GitCommit entity.
func (*GitCommitCreate) Exec ¶
func (gcc *GitCommitCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GitCommitCreate) ExecX ¶
func (gcc *GitCommitCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitCreate) Mutation ¶
func (gcc *GitCommitCreate) Mutation() *GitCommitMutation
Mutation returns the GitCommitMutation object of the builder.
func (*GitCommitCreate) OnConflict ¶
func (gcc *GitCommitCreate) OnConflict(opts ...sql.ConflictOption) *GitCommitUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GitCommit.Create(). SetMessage(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.GitCommitUpsert) { SetMessage(v+v). }). Exec(ctx)
func (*GitCommitCreate) OnConflictColumns ¶
func (gcc *GitCommitCreate) OnConflictColumns(columns ...string) *GitCommitUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GitCommit.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GitCommitCreate) Save ¶
func (gcc *GitCommitCreate) Save(ctx context.Context) (*GitCommit, error)
Save creates the GitCommit in the database.
func (*GitCommitCreate) SaveX ¶
func (gcc *GitCommitCreate) SaveX(ctx context.Context) *GitCommit
SaveX calls Save and panics if Save returns an error.
func (*GitCommitCreate) SetAuthorID ¶
func (gcc *GitCommitCreate) SetAuthorID(i int64) *GitCommitCreate
SetAuthorID sets the "author_id" field.
func (*GitCommitCreate) SetAuthorLogin ¶
func (gcc *GitCommitCreate) SetAuthorLogin(s string) *GitCommitCreate
SetAuthorLogin sets the "author_login" field.
func (*GitCommitCreate) SetDate ¶
func (gcc *GitCommitCreate) SetDate(t time.Time) *GitCommitCreate
SetDate sets the "date" field.
func (*GitCommitCreate) SetID ¶
func (gcc *GitCommitCreate) SetID(s string) *GitCommitCreate
SetID sets the "id" field.
func (*GitCommitCreate) SetMessage ¶
func (gcc *GitCommitCreate) SetMessage(s string) *GitCommitCreate
SetMessage sets the "message" field.
func (*GitCommitCreate) SetNillableRepositoryID ¶
func (gcc *GitCommitCreate) SetNillableRepositoryID(id *int64) *GitCommitCreate
SetNillableRepositoryID sets the "repository" edge to the Repository entity by ID if the given value is not nil.
func (*GitCommitCreate) SetRepository ¶
func (gcc *GitCommitCreate) SetRepository(r *Repository) *GitCommitCreate
SetRepository sets the "repository" edge to the Repository entity.
func (*GitCommitCreate) SetRepositoryID ¶
func (gcc *GitCommitCreate) SetRepositoryID(id int64) *GitCommitCreate
SetRepositoryID sets the "repository" edge to the Repository entity by ID.
type GitCommitCreateBulk ¶
type GitCommitCreateBulk struct {
// contains filtered or unexported fields
}
GitCommitCreateBulk is the builder for creating many GitCommit entities in bulk.
func (*GitCommitCreateBulk) Exec ¶
func (gccb *GitCommitCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GitCommitCreateBulk) ExecX ¶
func (gccb *GitCommitCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitCreateBulk) OnConflict ¶
func (gccb *GitCommitCreateBulk) OnConflict(opts ...sql.ConflictOption) *GitCommitUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GitCommit.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.GitCommitUpsert) { SetMessage(v+v). }). Exec(ctx)
func (*GitCommitCreateBulk) OnConflictColumns ¶
func (gccb *GitCommitCreateBulk) OnConflictColumns(columns ...string) *GitCommitUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GitCommit.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type GitCommitDelete ¶
type GitCommitDelete struct {
// contains filtered or unexported fields
}
GitCommitDelete is the builder for deleting a GitCommit entity.
func (*GitCommitDelete) Exec ¶
func (gcd *GitCommitDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GitCommitDelete) ExecX ¶
func (gcd *GitCommitDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitDelete) Where ¶
func (gcd *GitCommitDelete) Where(ps ...predicate.GitCommit) *GitCommitDelete
Where appends a list predicates to the GitCommitDelete builder.
type GitCommitDeleteOne ¶
type GitCommitDeleteOne struct {
// contains filtered or unexported fields
}
GitCommitDeleteOne is the builder for deleting a single GitCommit entity.
func (*GitCommitDeleteOne) Exec ¶
func (gcdo *GitCommitDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GitCommitDeleteOne) ExecX ¶
func (gcdo *GitCommitDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitDeleteOne) Where ¶
func (gcdo *GitCommitDeleteOne) Where(ps ...predicate.GitCommit) *GitCommitDeleteOne
Where appends a list predicates to the GitCommitDelete builder.
type GitCommitEdges ¶
type GitCommitEdges struct { // GitHub Repository. Repository *Repository `json:"repository,omitempty"` // contains filtered or unexported fields }
GitCommitEdges holds the relations/edges for other nodes in the graph.
func (GitCommitEdges) RepositoryOrErr ¶
func (e GitCommitEdges) RepositoryOrErr() (*Repository, error)
RepositoryOrErr returns the Repository value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GitCommitGroupBy ¶
type GitCommitGroupBy struct {
// contains filtered or unexported fields
}
GitCommitGroupBy is the group-by builder for GitCommit entities.
func (*GitCommitGroupBy) Aggregate ¶
func (gcgb *GitCommitGroupBy) Aggregate(fns ...AggregateFunc) *GitCommitGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GitCommitGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GitCommitGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GitCommitGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GitCommitGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GitCommitGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GitCommitGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GitCommitGroupBy) Scan ¶
func (gcgb *GitCommitGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GitCommitGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GitCommitMutation ¶
type GitCommitMutation struct {
// contains filtered or unexported fields
}
GitCommitMutation represents an operation that mutates the GitCommit nodes in the graph.
func (*GitCommitMutation) AddAuthorID ¶
func (m *GitCommitMutation) AddAuthorID(i int64)
AddAuthorID adds i to the "author_id" field.
func (*GitCommitMutation) AddField ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) AddedAuthorID ¶
func (m *GitCommitMutation) AddedAuthorID() (r int64, exists bool)
AddedAuthorID returns the value that was added to the "author_id" field in this mutation.
func (*GitCommitMutation) AddedEdges ¶
func (m *GitCommitMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GitCommitMutation) AddedField ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) AddedFields ¶
func (m *GitCommitMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GitCommitMutation) AddedIDs ¶
func (m *GitCommitMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GitCommitMutation) AuthorID ¶
func (m *GitCommitMutation) AuthorID() (r int64, exists bool)
AuthorID returns the value of the "author_id" field in the mutation.
func (*GitCommitMutation) AuthorLogin ¶
func (m *GitCommitMutation) AuthorLogin() (r string, exists bool)
AuthorLogin returns the value of the "author_login" field in the mutation.
func (*GitCommitMutation) ClearEdge ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) ClearField ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) ClearRepository ¶
func (m *GitCommitMutation) ClearRepository()
ClearRepository clears the "repository" edge to the Repository entity.
func (*GitCommitMutation) ClearedEdges ¶
func (m *GitCommitMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GitCommitMutation) ClearedFields ¶
func (m *GitCommitMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GitCommitMutation) Client ¶
func (m GitCommitMutation) 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 (*GitCommitMutation) Date ¶
func (m *GitCommitMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*GitCommitMutation) EdgeCleared ¶
func (m *GitCommitMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GitCommitMutation) Field ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) FieldCleared ¶
func (m *GitCommitMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GitCommitMutation) Fields ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) ID ¶
func (m *GitCommitMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GitCommitMutation) IDs ¶
func (m *GitCommitMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GitCommitMutation) Message ¶
func (m *GitCommitMutation) Message() (r string, exists bool)
Message returns the value of the "message" field in the mutation.
func (*GitCommitMutation) OldAuthorID ¶
func (m *GitCommitMutation) OldAuthorID(ctx context.Context) (v int64, err error)
OldAuthorID returns the old "author_id" field's value of the GitCommit entity. If the GitCommit 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 (*GitCommitMutation) OldAuthorLogin ¶
func (m *GitCommitMutation) OldAuthorLogin(ctx context.Context) (v string, err error)
OldAuthorLogin returns the old "author_login" field's value of the GitCommit entity. If the GitCommit 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 (*GitCommitMutation) OldDate ¶
OldDate returns the old "date" field's value of the GitCommit entity. If the GitCommit 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 (*GitCommitMutation) 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 (*GitCommitMutation) OldMessage ¶
func (m *GitCommitMutation) OldMessage(ctx context.Context) (v string, err error)
OldMessage returns the old "message" field's value of the GitCommit entity. If the GitCommit 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 (*GitCommitMutation) RemovedEdges ¶
func (m *GitCommitMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GitCommitMutation) RemovedIDs ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) RepositoryCleared ¶
func (m *GitCommitMutation) RepositoryCleared() bool
RepositoryCleared reports if the "repository" edge to the Repository entity was cleared.
func (*GitCommitMutation) RepositoryID ¶
func (m *GitCommitMutation) RepositoryID() (id int64, exists bool)
RepositoryID returns the "repository" edge ID in the mutation.
func (*GitCommitMutation) RepositoryIDs ¶
func (m *GitCommitMutation) RepositoryIDs() (ids []int64)
RepositoryIDs returns the "repository" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RepositoryID instead. It exists only for internal usage by the builders.
func (*GitCommitMutation) ResetAuthorID ¶
func (m *GitCommitMutation) ResetAuthorID()
ResetAuthorID resets all changes to the "author_id" field.
func (*GitCommitMutation) ResetAuthorLogin ¶
func (m *GitCommitMutation) ResetAuthorLogin()
ResetAuthorLogin resets all changes to the "author_login" field.
func (*GitCommitMutation) ResetDate ¶
func (m *GitCommitMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*GitCommitMutation) ResetEdge ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) ResetField ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) ResetMessage ¶
func (m *GitCommitMutation) ResetMessage()
ResetMessage resets all changes to the "message" field.
func (*GitCommitMutation) ResetRepository ¶
func (m *GitCommitMutation) ResetRepository()
ResetRepository resets all changes to the "repository" edge.
func (*GitCommitMutation) SetAuthorID ¶
func (m *GitCommitMutation) SetAuthorID(i int64)
SetAuthorID sets the "author_id" field.
func (*GitCommitMutation) SetAuthorLogin ¶
func (m *GitCommitMutation) SetAuthorLogin(s string)
SetAuthorLogin sets the "author_login" field.
func (*GitCommitMutation) SetDate ¶
func (m *GitCommitMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*GitCommitMutation) SetField ¶
func (m *GitCommitMutation) 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 (*GitCommitMutation) SetID ¶
func (m *GitCommitMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GitCommit entities.
func (*GitCommitMutation) SetMessage ¶
func (m *GitCommitMutation) SetMessage(s string)
SetMessage sets the "message" field.
func (*GitCommitMutation) SetOp ¶
func (m *GitCommitMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GitCommitMutation) SetRepositoryID ¶
func (m *GitCommitMutation) SetRepositoryID(id int64)
SetRepositoryID sets the "repository" edge to the Repository entity by id.
func (GitCommitMutation) Tx ¶
func (m GitCommitMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GitCommitMutation) Type ¶
func (m *GitCommitMutation) Type() string
Type returns the node type of this mutation (GitCommit).
func (*GitCommitMutation) Where ¶
func (m *GitCommitMutation) Where(ps ...predicate.GitCommit)
Where appends a list predicates to the GitCommitMutation builder.
func (*GitCommitMutation) WhereP ¶
func (m *GitCommitMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GitCommitMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GitCommitQuery ¶
type GitCommitQuery struct {
// contains filtered or unexported fields
}
GitCommitQuery is the builder for querying GitCommit entities.
func (*GitCommitQuery) Aggregate ¶
func (gcq *GitCommitQuery) Aggregate(fns ...AggregateFunc) *GitCommitSelect
Aggregate returns a GitCommitSelect configured with the given aggregations.
func (*GitCommitQuery) All ¶
func (gcq *GitCommitQuery) All(ctx context.Context) ([]*GitCommit, error)
All executes the query and returns a list of GitCommits.
func (*GitCommitQuery) AllX ¶
func (gcq *GitCommitQuery) AllX(ctx context.Context) []*GitCommit
AllX is like All, but panics if an error occurs.
func (*GitCommitQuery) Clone ¶
func (gcq *GitCommitQuery) Clone() *GitCommitQuery
Clone returns a duplicate of the GitCommitQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GitCommitQuery) Count ¶
func (gcq *GitCommitQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GitCommitQuery) CountX ¶
func (gcq *GitCommitQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GitCommitQuery) Exist ¶
func (gcq *GitCommitQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GitCommitQuery) ExistX ¶
func (gcq *GitCommitQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GitCommitQuery) First ¶
func (gcq *GitCommitQuery) First(ctx context.Context) (*GitCommit, error)
First returns the first GitCommit entity from the query. Returns a *NotFoundError when no GitCommit was found.
func (*GitCommitQuery) FirstID ¶
func (gcq *GitCommitQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first GitCommit ID from the query. Returns a *NotFoundError when no GitCommit ID was found.
func (*GitCommitQuery) FirstIDX ¶
func (gcq *GitCommitQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*GitCommitQuery) FirstX ¶
func (gcq *GitCommitQuery) FirstX(ctx context.Context) *GitCommit
FirstX is like First, but panics if an error occurs.
func (*GitCommitQuery) GroupBy ¶
func (gcq *GitCommitQuery) GroupBy(field string, fields ...string) *GitCommitGroupBy
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 { Message string `json:"message,omitempty"` Count int `json:"count,omitempty"` } client.GitCommit.Query(). GroupBy(gitcommit.FieldMessage). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GitCommitQuery) IDs ¶
func (gcq *GitCommitQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of GitCommit IDs.
func (*GitCommitQuery) IDsX ¶
func (gcq *GitCommitQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*GitCommitQuery) Limit ¶
func (gcq *GitCommitQuery) Limit(limit int) *GitCommitQuery
Limit the number of records to be returned by this query.
func (*GitCommitQuery) Offset ¶
func (gcq *GitCommitQuery) Offset(offset int) *GitCommitQuery
Offset to start from.
func (*GitCommitQuery) Only ¶
func (gcq *GitCommitQuery) Only(ctx context.Context) (*GitCommit, error)
Only returns a single GitCommit entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GitCommit entity is found. Returns a *NotFoundError when no GitCommit entities are found.
func (*GitCommitQuery) OnlyID ¶
func (gcq *GitCommitQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only GitCommit ID in the query. Returns a *NotSingularError when more than one GitCommit ID is found. Returns a *NotFoundError when no entities are found.
func (*GitCommitQuery) OnlyIDX ¶
func (gcq *GitCommitQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GitCommitQuery) OnlyX ¶
func (gcq *GitCommitQuery) OnlyX(ctx context.Context) *GitCommit
OnlyX is like Only, but panics if an error occurs.
func (*GitCommitQuery) Order ¶
func (gcq *GitCommitQuery) Order(o ...gitcommit.OrderOption) *GitCommitQuery
Order specifies how the records should be ordered.
func (*GitCommitQuery) QueryRepository ¶
func (gcq *GitCommitQuery) QueryRepository() *RepositoryQuery
QueryRepository chains the current query on the "repository" edge.
func (*GitCommitQuery) Select ¶
func (gcq *GitCommitQuery) Select(fields ...string) *GitCommitSelect
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 { Message string `json:"message,omitempty"` } client.GitCommit.Query(). Select(gitcommit.FieldMessage). Scan(ctx, &v)
func (*GitCommitQuery) Unique ¶
func (gcq *GitCommitQuery) Unique(unique bool) *GitCommitQuery
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 (*GitCommitQuery) Where ¶
func (gcq *GitCommitQuery) Where(ps ...predicate.GitCommit) *GitCommitQuery
Where adds a new predicate for the GitCommitQuery builder.
func (*GitCommitQuery) WithRepository ¶
func (gcq *GitCommitQuery) WithRepository(opts ...func(*RepositoryQuery)) *GitCommitQuery
WithRepository tells the query-builder to eager-load the nodes that are connected to the "repository" edge. The optional arguments are used to configure the query builder of the edge.
type GitCommitSelect ¶
type GitCommitSelect struct { *GitCommitQuery // contains filtered or unexported fields }
GitCommitSelect is the builder for selecting fields of GitCommit entities.
func (*GitCommitSelect) Aggregate ¶
func (gcs *GitCommitSelect) Aggregate(fns ...AggregateFunc) *GitCommitSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GitCommitSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GitCommitSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GitCommitSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GitCommitSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GitCommitSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GitCommitSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GitCommitSelect) Scan ¶
func (gcs *GitCommitSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GitCommitSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GitCommitUpdate ¶
type GitCommitUpdate struct {
// contains filtered or unexported fields
}
GitCommitUpdate is the builder for updating GitCommit entities.
func (*GitCommitUpdate) AddAuthorID ¶
func (gcu *GitCommitUpdate) AddAuthorID(i int64) *GitCommitUpdate
AddAuthorID adds i to the "author_id" field.
func (*GitCommitUpdate) ClearRepository ¶
func (gcu *GitCommitUpdate) ClearRepository() *GitCommitUpdate
ClearRepository clears the "repository" edge to the Repository entity.
func (*GitCommitUpdate) Exec ¶
func (gcu *GitCommitUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GitCommitUpdate) ExecX ¶
func (gcu *GitCommitUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitUpdate) Mutation ¶
func (gcu *GitCommitUpdate) Mutation() *GitCommitMutation
Mutation returns the GitCommitMutation object of the builder.
func (*GitCommitUpdate) Save ¶
func (gcu *GitCommitUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GitCommitUpdate) SaveX ¶
func (gcu *GitCommitUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GitCommitUpdate) SetAuthorID ¶
func (gcu *GitCommitUpdate) SetAuthorID(i int64) *GitCommitUpdate
SetAuthorID sets the "author_id" field.
func (*GitCommitUpdate) SetAuthorLogin ¶
func (gcu *GitCommitUpdate) SetAuthorLogin(s string) *GitCommitUpdate
SetAuthorLogin sets the "author_login" field.
func (*GitCommitUpdate) SetDate ¶
func (gcu *GitCommitUpdate) SetDate(t time.Time) *GitCommitUpdate
SetDate sets the "date" field.
func (*GitCommitUpdate) SetMessage ¶
func (gcu *GitCommitUpdate) SetMessage(s string) *GitCommitUpdate
SetMessage sets the "message" field.
func (*GitCommitUpdate) SetNillableAuthorID ¶
func (gcu *GitCommitUpdate) SetNillableAuthorID(i *int64) *GitCommitUpdate
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
func (*GitCommitUpdate) SetNillableAuthorLogin ¶
func (gcu *GitCommitUpdate) SetNillableAuthorLogin(s *string) *GitCommitUpdate
SetNillableAuthorLogin sets the "author_login" field if the given value is not nil.
func (*GitCommitUpdate) SetNillableDate ¶
func (gcu *GitCommitUpdate) SetNillableDate(t *time.Time) *GitCommitUpdate
SetNillableDate sets the "date" field if the given value is not nil.
func (*GitCommitUpdate) SetNillableMessage ¶
func (gcu *GitCommitUpdate) SetNillableMessage(s *string) *GitCommitUpdate
SetNillableMessage sets the "message" field if the given value is not nil.
func (*GitCommitUpdate) SetNillableRepositoryID ¶
func (gcu *GitCommitUpdate) SetNillableRepositoryID(id *int64) *GitCommitUpdate
SetNillableRepositoryID sets the "repository" edge to the Repository entity by ID if the given value is not nil.
func (*GitCommitUpdate) SetRepository ¶
func (gcu *GitCommitUpdate) SetRepository(r *Repository) *GitCommitUpdate
SetRepository sets the "repository" edge to the Repository entity.
func (*GitCommitUpdate) SetRepositoryID ¶
func (gcu *GitCommitUpdate) SetRepositoryID(id int64) *GitCommitUpdate
SetRepositoryID sets the "repository" edge to the Repository entity by ID.
func (*GitCommitUpdate) Where ¶
func (gcu *GitCommitUpdate) Where(ps ...predicate.GitCommit) *GitCommitUpdate
Where appends a list predicates to the GitCommitUpdate builder.
type GitCommitUpdateOne ¶
type GitCommitUpdateOne struct {
// contains filtered or unexported fields
}
GitCommitUpdateOne is the builder for updating a single GitCommit entity.
func (*GitCommitUpdateOne) AddAuthorID ¶
func (gcuo *GitCommitUpdateOne) AddAuthorID(i int64) *GitCommitUpdateOne
AddAuthorID adds i to the "author_id" field.
func (*GitCommitUpdateOne) ClearRepository ¶
func (gcuo *GitCommitUpdateOne) ClearRepository() *GitCommitUpdateOne
ClearRepository clears the "repository" edge to the Repository entity.
func (*GitCommitUpdateOne) Exec ¶
func (gcuo *GitCommitUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GitCommitUpdateOne) ExecX ¶
func (gcuo *GitCommitUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitUpdateOne) Mutation ¶
func (gcuo *GitCommitUpdateOne) Mutation() *GitCommitMutation
Mutation returns the GitCommitMutation object of the builder.
func (*GitCommitUpdateOne) Save ¶
func (gcuo *GitCommitUpdateOne) Save(ctx context.Context) (*GitCommit, error)
Save executes the query and returns the updated GitCommit entity.
func (*GitCommitUpdateOne) SaveX ¶
func (gcuo *GitCommitUpdateOne) SaveX(ctx context.Context) *GitCommit
SaveX is like Save, but panics if an error occurs.
func (*GitCommitUpdateOne) Select ¶
func (gcuo *GitCommitUpdateOne) Select(field string, fields ...string) *GitCommitUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GitCommitUpdateOne) SetAuthorID ¶
func (gcuo *GitCommitUpdateOne) SetAuthorID(i int64) *GitCommitUpdateOne
SetAuthorID sets the "author_id" field.
func (*GitCommitUpdateOne) SetAuthorLogin ¶
func (gcuo *GitCommitUpdateOne) SetAuthorLogin(s string) *GitCommitUpdateOne
SetAuthorLogin sets the "author_login" field.
func (*GitCommitUpdateOne) SetDate ¶
func (gcuo *GitCommitUpdateOne) SetDate(t time.Time) *GitCommitUpdateOne
SetDate sets the "date" field.
func (*GitCommitUpdateOne) SetMessage ¶
func (gcuo *GitCommitUpdateOne) SetMessage(s string) *GitCommitUpdateOne
SetMessage sets the "message" field.
func (*GitCommitUpdateOne) SetNillableAuthorID ¶
func (gcuo *GitCommitUpdateOne) SetNillableAuthorID(i *int64) *GitCommitUpdateOne
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
func (*GitCommitUpdateOne) SetNillableAuthorLogin ¶
func (gcuo *GitCommitUpdateOne) SetNillableAuthorLogin(s *string) *GitCommitUpdateOne
SetNillableAuthorLogin sets the "author_login" field if the given value is not nil.
func (*GitCommitUpdateOne) SetNillableDate ¶
func (gcuo *GitCommitUpdateOne) SetNillableDate(t *time.Time) *GitCommitUpdateOne
SetNillableDate sets the "date" field if the given value is not nil.
func (*GitCommitUpdateOne) SetNillableMessage ¶
func (gcuo *GitCommitUpdateOne) SetNillableMessage(s *string) *GitCommitUpdateOne
SetNillableMessage sets the "message" field if the given value is not nil.
func (*GitCommitUpdateOne) SetNillableRepositoryID ¶
func (gcuo *GitCommitUpdateOne) SetNillableRepositoryID(id *int64) *GitCommitUpdateOne
SetNillableRepositoryID sets the "repository" edge to the Repository entity by ID if the given value is not nil.
func (*GitCommitUpdateOne) SetRepository ¶
func (gcuo *GitCommitUpdateOne) SetRepository(r *Repository) *GitCommitUpdateOne
SetRepository sets the "repository" edge to the Repository entity.
func (*GitCommitUpdateOne) SetRepositoryID ¶
func (gcuo *GitCommitUpdateOne) SetRepositoryID(id int64) *GitCommitUpdateOne
SetRepositoryID sets the "repository" edge to the Repository entity by ID.
func (*GitCommitUpdateOne) Where ¶
func (gcuo *GitCommitUpdateOne) Where(ps ...predicate.GitCommit) *GitCommitUpdateOne
Where appends a list predicates to the GitCommitUpdate builder.
type GitCommitUpsert ¶
GitCommitUpsert is the "OnConflict" setter.
func (*GitCommitUpsert) AddAuthorID ¶
func (u *GitCommitUpsert) AddAuthorID(v int64) *GitCommitUpsert
AddAuthorID adds v to the "author_id" field.
func (*GitCommitUpsert) SetAuthorID ¶
func (u *GitCommitUpsert) SetAuthorID(v int64) *GitCommitUpsert
SetAuthorID sets the "author_id" field.
func (*GitCommitUpsert) SetAuthorLogin ¶
func (u *GitCommitUpsert) SetAuthorLogin(v string) *GitCommitUpsert
SetAuthorLogin sets the "author_login" field.
func (*GitCommitUpsert) SetDate ¶
func (u *GitCommitUpsert) SetDate(v time.Time) *GitCommitUpsert
SetDate sets the "date" field.
func (*GitCommitUpsert) SetMessage ¶
func (u *GitCommitUpsert) SetMessage(v string) *GitCommitUpsert
SetMessage sets the "message" field.
func (*GitCommitUpsert) UpdateAuthorID ¶
func (u *GitCommitUpsert) UpdateAuthorID() *GitCommitUpsert
UpdateAuthorID sets the "author_id" field to the value that was provided on create.
func (*GitCommitUpsert) UpdateAuthorLogin ¶
func (u *GitCommitUpsert) UpdateAuthorLogin() *GitCommitUpsert
UpdateAuthorLogin sets the "author_login" field to the value that was provided on create.
func (*GitCommitUpsert) UpdateDate ¶
func (u *GitCommitUpsert) UpdateDate() *GitCommitUpsert
UpdateDate sets the "date" field to the value that was provided on create.
func (*GitCommitUpsert) UpdateMessage ¶
func (u *GitCommitUpsert) UpdateMessage() *GitCommitUpsert
UpdateMessage sets the "message" field to the value that was provided on create.
type GitCommitUpsertBulk ¶
type GitCommitUpsertBulk struct {
// contains filtered or unexported fields
}
GitCommitUpsertBulk is the builder for "upsert"-ing a bulk of GitCommit nodes.
func (*GitCommitUpsertBulk) AddAuthorID ¶
func (u *GitCommitUpsertBulk) AddAuthorID(v int64) *GitCommitUpsertBulk
AddAuthorID adds v to the "author_id" field.
func (*GitCommitUpsertBulk) DoNothing ¶
func (u *GitCommitUpsertBulk) DoNothing() *GitCommitUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GitCommitUpsertBulk) Exec ¶
func (u *GitCommitUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GitCommitUpsertBulk) ExecX ¶
func (u *GitCommitUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitUpsertBulk) Ignore ¶
func (u *GitCommitUpsertBulk) Ignore() *GitCommitUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GitCommit.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GitCommitUpsertBulk) SetAuthorID ¶
func (u *GitCommitUpsertBulk) SetAuthorID(v int64) *GitCommitUpsertBulk
SetAuthorID sets the "author_id" field.
func (*GitCommitUpsertBulk) SetAuthorLogin ¶
func (u *GitCommitUpsertBulk) SetAuthorLogin(v string) *GitCommitUpsertBulk
SetAuthorLogin sets the "author_login" field.
func (*GitCommitUpsertBulk) SetDate ¶
func (u *GitCommitUpsertBulk) SetDate(v time.Time) *GitCommitUpsertBulk
SetDate sets the "date" field.
func (*GitCommitUpsertBulk) SetMessage ¶
func (u *GitCommitUpsertBulk) SetMessage(v string) *GitCommitUpsertBulk
SetMessage sets the "message" field.
func (*GitCommitUpsertBulk) Update ¶
func (u *GitCommitUpsertBulk) Update(set func(*GitCommitUpsert)) *GitCommitUpsertBulk
Update allows overriding fields `UPDATE` values. See the GitCommitCreateBulk.OnConflict documentation for more info.
func (*GitCommitUpsertBulk) UpdateAuthorID ¶
func (u *GitCommitUpsertBulk) UpdateAuthorID() *GitCommitUpsertBulk
UpdateAuthorID sets the "author_id" field to the value that was provided on create.
func (*GitCommitUpsertBulk) UpdateAuthorLogin ¶
func (u *GitCommitUpsertBulk) UpdateAuthorLogin() *GitCommitUpsertBulk
UpdateAuthorLogin sets the "author_login" field to the value that was provided on create.
func (*GitCommitUpsertBulk) UpdateDate ¶
func (u *GitCommitUpsertBulk) UpdateDate() *GitCommitUpsertBulk
UpdateDate sets the "date" field to the value that was provided on create.
func (*GitCommitUpsertBulk) UpdateMessage ¶
func (u *GitCommitUpsertBulk) UpdateMessage() *GitCommitUpsertBulk
UpdateMessage sets the "message" field to the value that was provided on create.
func (*GitCommitUpsertBulk) UpdateNewValues ¶
func (u *GitCommitUpsertBulk) UpdateNewValues() *GitCommitUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GitCommit.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gitcommit.FieldID) }), ). Exec(ctx)
type GitCommitUpsertOne ¶
type GitCommitUpsertOne struct {
// contains filtered or unexported fields
}
GitCommitUpsertOne is the builder for "upsert"-ing
one GitCommit node.
func (*GitCommitUpsertOne) AddAuthorID ¶
func (u *GitCommitUpsertOne) AddAuthorID(v int64) *GitCommitUpsertOne
AddAuthorID adds v to the "author_id" field.
func (*GitCommitUpsertOne) DoNothing ¶
func (u *GitCommitUpsertOne) DoNothing() *GitCommitUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GitCommitUpsertOne) Exec ¶
func (u *GitCommitUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GitCommitUpsertOne) ExecX ¶
func (u *GitCommitUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GitCommitUpsertOne) ID ¶
func (u *GitCommitUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GitCommitUpsertOne) IDX ¶
func (u *GitCommitUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*GitCommitUpsertOne) Ignore ¶
func (u *GitCommitUpsertOne) Ignore() *GitCommitUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GitCommit.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GitCommitUpsertOne) SetAuthorID ¶
func (u *GitCommitUpsertOne) SetAuthorID(v int64) *GitCommitUpsertOne
SetAuthorID sets the "author_id" field.
func (*GitCommitUpsertOne) SetAuthorLogin ¶
func (u *GitCommitUpsertOne) SetAuthorLogin(v string) *GitCommitUpsertOne
SetAuthorLogin sets the "author_login" field.
func (*GitCommitUpsertOne) SetDate ¶
func (u *GitCommitUpsertOne) SetDate(v time.Time) *GitCommitUpsertOne
SetDate sets the "date" field.
func (*GitCommitUpsertOne) SetMessage ¶
func (u *GitCommitUpsertOne) SetMessage(v string) *GitCommitUpsertOne
SetMessage sets the "message" field.
func (*GitCommitUpsertOne) Update ¶
func (u *GitCommitUpsertOne) Update(set func(*GitCommitUpsert)) *GitCommitUpsertOne
Update allows overriding fields `UPDATE` values. See the GitCommitCreate.OnConflict documentation for more info.
func (*GitCommitUpsertOne) UpdateAuthorID ¶
func (u *GitCommitUpsertOne) UpdateAuthorID() *GitCommitUpsertOne
UpdateAuthorID sets the "author_id" field to the value that was provided on create.
func (*GitCommitUpsertOne) UpdateAuthorLogin ¶
func (u *GitCommitUpsertOne) UpdateAuthorLogin() *GitCommitUpsertOne
UpdateAuthorLogin sets the "author_login" field to the value that was provided on create.
func (*GitCommitUpsertOne) UpdateDate ¶
func (u *GitCommitUpsertOne) UpdateDate() *GitCommitUpsertOne
UpdateDate sets the "date" field to the value that was provided on create.
func (*GitCommitUpsertOne) UpdateMessage ¶
func (u *GitCommitUpsertOne) UpdateMessage() *GitCommitUpsertOne
UpdateMessage sets the "message" field to the value that was provided on create.
func (*GitCommitUpsertOne) UpdateNewValues ¶
func (u *GitCommitUpsertOne) UpdateNewValues() *GitCommitUpsertOne
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.GitCommit.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gitcommit.FieldID) }), ). Exec(ctx)
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. // GitHub organization ID. ID int64 `json:"id,omitempty"` // GitHub organization name. Name string `json:"name,omitempty"` // GitHub organization URL. HTMLURL string `json:"html_url,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) NamedRepositories ¶
func (o *Organization) NamedRepositories(name string) ([]*Repository, error)
NamedRepositories returns the Repositories named value or an error if the edge was not loaded in eager-loading with this name.
func (*Organization) QueryRepositories ¶
func (o *Organization) QueryRepositories() *RepositoryQuery
QueryRepositories queries the "repositories" 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 int64) *OrganizationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrganizationClient) Get ¶
func (c *OrganizationClient) Get(ctx context.Context, id int64) (*Organization, error)
Get returns a Organization entity by its id.
func (*OrganizationClient) GetX ¶
func (c *OrganizationClient) GetX(ctx context.Context, id int64) *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) QueryRepositories ¶
func (c *OrganizationClient) QueryRepositories(o *Organization) *RepositoryQuery
QueryRepositories queries the repositories 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 int64) *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) AddRepositories ¶
func (oc *OrganizationCreate) AddRepositories(r ...*Repository) *OrganizationCreate
AddRepositories adds the "repositories" edges to the Repository entity.
func (*OrganizationCreate) AddRepositoryIDs ¶
func (oc *OrganizationCreate) AddRepositoryIDs(ids ...int64) *OrganizationCreate
AddRepositoryIDs adds the "repositories" edge to the Repository entity by IDs.
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(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.OrganizationUpsert) { SetName(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) SetHTMLURL ¶
func (oc *OrganizationCreate) SetHTMLURL(s string) *OrganizationCreate
SetHTMLURL sets the "html_url" field.
func (*OrganizationCreate) SetID ¶
func (oc *OrganizationCreate) SetID(i int64) *OrganizationCreate
SetID sets the "id" field.
func (*OrganizationCreate) SetName ¶
func (oc *OrganizationCreate) SetName(s string) *OrganizationCreate
SetName sets the "name" field.
func (*OrganizationCreate) SetNillableHTMLURL ¶
func (oc *OrganizationCreate) SetNillableHTMLURL(s *string) *OrganizationCreate
SetNillableHTMLURL sets the "html_url" field if the given value is not nil.
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) { SetName(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 { // GitHub repositories. Repositories []*Repository `json:"repositories,omitempty"` // contains filtered or unexported fields }
OrganizationEdges holds the relations/edges for other nodes in the graph.
func (OrganizationEdges) RepositoriesOrErr ¶
func (e OrganizationEdges) RepositoriesOrErr() ([]*Repository, error)
RepositoriesOrErr returns the Repositories 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) AddRepositoryIDs ¶
func (m *OrganizationMutation) AddRepositoryIDs(ids ...int64)
AddRepositoryIDs adds the "repositories" edge to the Repository 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) 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) 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) ClearHTMLURL ¶
func (m *OrganizationMutation) ClearHTMLURL()
ClearHTMLURL clears the value of the "html_url" field.
func (*OrganizationMutation) ClearRepositories ¶
func (m *OrganizationMutation) ClearRepositories()
ClearRepositories clears the "repositories" edge to the Repository 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) 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) 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) HTMLURL ¶
func (m *OrganizationMutation) HTMLURL() (r string, exists bool)
HTMLURL returns the value of the "html_url" field in the mutation.
func (*OrganizationMutation) HTMLURLCleared ¶
func (m *OrganizationMutation) HTMLURLCleared() bool
HTMLURLCleared returns if the "html_url" field was cleared in this mutation.
func (*OrganizationMutation) ID ¶
func (m *OrganizationMutation) ID() (id int64, 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 ¶
func (m *OrganizationMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrganizationMutation) Name ¶
func (m *OrganizationMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
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) OldHTMLURL ¶
func (m *OrganizationMutation) OldHTMLURL(ctx context.Context) (v string, err error)
OldHTMLURL returns the old "html_url" 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) 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) Op ¶
func (m *OrganizationMutation) Op() Op
Op returns the operation name.
func (*OrganizationMutation) RemoveRepositoryIDs ¶
func (m *OrganizationMutation) RemoveRepositoryIDs(ids ...int64)
RemoveRepositoryIDs removes the "repositories" edge to the Repository 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) RemovedRepositoriesIDs ¶
func (m *OrganizationMutation) RemovedRepositoriesIDs() (ids []int64)
RemovedRepositories returns the removed IDs of the "repositories" edge to the Repository entity.
func (*OrganizationMutation) RepositoriesCleared ¶
func (m *OrganizationMutation) RepositoriesCleared() bool
RepositoriesCleared reports if the "repositories" edge to the Repository entity was cleared.
func (*OrganizationMutation) RepositoriesIDs ¶
func (m *OrganizationMutation) RepositoriesIDs() (ids []int64)
RepositoriesIDs returns the "repositories" edge IDs in the mutation.
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) 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) ResetHTMLURL ¶
func (m *OrganizationMutation) ResetHTMLURL()
ResetHTMLURL resets all changes to the "html_url" field.
func (*OrganizationMutation) ResetName ¶
func (m *OrganizationMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*OrganizationMutation) ResetRepositories ¶
func (m *OrganizationMutation) ResetRepositories()
ResetRepositories resets all changes to the "repositories" edge.
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) SetHTMLURL ¶
func (m *OrganizationMutation) SetHTMLURL(s string)
SetHTMLURL sets the "html_url" field.
func (*OrganizationMutation) SetID ¶
func (m *OrganizationMutation) SetID(id int64)
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) 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) 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 ¶
func (oq *OrganizationQuery) FirstID(ctx context.Context) (id int64, err error)
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) int64
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Organization.Query(). GroupBy(organization.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrganizationQuery) IDs ¶
func (oq *OrganizationQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Organization IDs.
func (*OrganizationQuery) IDsX ¶
func (oq *OrganizationQuery) IDsX(ctx context.Context) []int64
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 ¶
func (oq *OrganizationQuery) OnlyID(ctx context.Context) (id int64, err error)
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) int64
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) QueryRepositories ¶
func (oq *OrganizationQuery) QueryRepositories() *RepositoryQuery
QueryRepositories chains the current query on the "repositories" 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 { Name string `json:"name,omitempty"` } client.Organization.Query(). Select(organization.FieldName). 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) WithNamedRepositories ¶
func (oq *OrganizationQuery) WithNamedRepositories(name string, opts ...func(*RepositoryQuery)) *OrganizationQuery
WithNamedRepositories tells the query-builder to eager-load the nodes that are connected to the "repositories" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*OrganizationQuery) WithRepositories ¶
func (oq *OrganizationQuery) WithRepositories(opts ...func(*RepositoryQuery)) *OrganizationQuery
WithRepositories tells the query-builder to eager-load the nodes that are connected to the "repositories" 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) AddRepositories ¶
func (ou *OrganizationUpdate) AddRepositories(r ...*Repository) *OrganizationUpdate
AddRepositories adds the "repositories" edges to the Repository entity.
func (*OrganizationUpdate) AddRepositoryIDs ¶
func (ou *OrganizationUpdate) AddRepositoryIDs(ids ...int64) *OrganizationUpdate
AddRepositoryIDs adds the "repositories" edge to the Repository entity by IDs.
func (*OrganizationUpdate) ClearHTMLURL ¶
func (ou *OrganizationUpdate) ClearHTMLURL() *OrganizationUpdate
ClearHTMLURL clears the value of the "html_url" field.
func (*OrganizationUpdate) ClearRepositories ¶
func (ou *OrganizationUpdate) ClearRepositories() *OrganizationUpdate
ClearRepositories clears all "repositories" edges to the Repository 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) RemoveRepositories ¶
func (ou *OrganizationUpdate) RemoveRepositories(r ...*Repository) *OrganizationUpdate
RemoveRepositories removes "repositories" edges to Repository entities.
func (*OrganizationUpdate) RemoveRepositoryIDs ¶
func (ou *OrganizationUpdate) RemoveRepositoryIDs(ids ...int64) *OrganizationUpdate
RemoveRepositoryIDs removes the "repositories" edge to Repository entities by IDs.
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) SetHTMLURL ¶
func (ou *OrganizationUpdate) SetHTMLURL(s string) *OrganizationUpdate
SetHTMLURL sets the "html_url" field.
func (*OrganizationUpdate) SetName ¶
func (ou *OrganizationUpdate) SetName(s string) *OrganizationUpdate
SetName sets the "name" field.
func (*OrganizationUpdate) SetNillableHTMLURL ¶
func (ou *OrganizationUpdate) SetNillableHTMLURL(s *string) *OrganizationUpdate
SetNillableHTMLURL sets the "html_url" 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) 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) AddRepositories ¶
func (ouo *OrganizationUpdateOne) AddRepositories(r ...*Repository) *OrganizationUpdateOne
AddRepositories adds the "repositories" edges to the Repository entity.
func (*OrganizationUpdateOne) AddRepositoryIDs ¶
func (ouo *OrganizationUpdateOne) AddRepositoryIDs(ids ...int64) *OrganizationUpdateOne
AddRepositoryIDs adds the "repositories" edge to the Repository entity by IDs.
func (*OrganizationUpdateOne) ClearHTMLURL ¶
func (ouo *OrganizationUpdateOne) ClearHTMLURL() *OrganizationUpdateOne
ClearHTMLURL clears the value of the "html_url" field.
func (*OrganizationUpdateOne) ClearRepositories ¶
func (ouo *OrganizationUpdateOne) ClearRepositories() *OrganizationUpdateOne
ClearRepositories clears all "repositories" edges to the Repository 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) RemoveRepositories ¶
func (ouo *OrganizationUpdateOne) RemoveRepositories(r ...*Repository) *OrganizationUpdateOne
RemoveRepositories removes "repositories" edges to Repository entities.
func (*OrganizationUpdateOne) RemoveRepositoryIDs ¶
func (ouo *OrganizationUpdateOne) RemoveRepositoryIDs(ids ...int64) *OrganizationUpdateOne
RemoveRepositoryIDs removes the "repositories" edge to Repository entities by IDs.
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) SetHTMLURL ¶
func (ouo *OrganizationUpdateOne) SetHTMLURL(s string) *OrganizationUpdateOne
SetHTMLURL sets the "html_url" field.
func (*OrganizationUpdateOne) SetName ¶
func (ouo *OrganizationUpdateOne) SetName(s string) *OrganizationUpdateOne
SetName sets the "name" field.
func (*OrganizationUpdateOne) SetNillableHTMLURL ¶
func (ouo *OrganizationUpdateOne) SetNillableHTMLURL(s *string) *OrganizationUpdateOne
SetNillableHTMLURL sets the "html_url" 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) 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) ClearHTMLURL ¶
func (u *OrganizationUpsert) ClearHTMLURL() *OrganizationUpsert
ClearHTMLURL clears the value of the "html_url" field.
func (*OrganizationUpsert) SetHTMLURL ¶
func (u *OrganizationUpsert) SetHTMLURL(v string) *OrganizationUpsert
SetHTMLURL sets the "html_url" field.
func (*OrganizationUpsert) SetName ¶
func (u *OrganizationUpsert) SetName(v string) *OrganizationUpsert
SetName sets the "name" field.
func (*OrganizationUpsert) UpdateHTMLURL ¶
func (u *OrganizationUpsert) UpdateHTMLURL() *OrganizationUpsert
UpdateHTMLURL sets the "html_url" 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.
type OrganizationUpsertBulk ¶
type OrganizationUpsertBulk struct {
// contains filtered or unexported fields
}
OrganizationUpsertBulk is the builder for "upsert"-ing a bulk of Organization nodes.
func (*OrganizationUpsertBulk) ClearHTMLURL ¶
func (u *OrganizationUpsertBulk) ClearHTMLURL() *OrganizationUpsertBulk
ClearHTMLURL clears the value of the "html_url" field.
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) SetHTMLURL ¶
func (u *OrganizationUpsertBulk) SetHTMLURL(v string) *OrganizationUpsertBulk
SetHTMLURL sets the "html_url" field.
func (*OrganizationUpsertBulk) SetName ¶
func (u *OrganizationUpsertBulk) SetName(v string) *OrganizationUpsertBulk
SetName sets the "name" 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) UpdateHTMLURL ¶
func (u *OrganizationUpsertBulk) UpdateHTMLURL() *OrganizationUpsertBulk
UpdateHTMLURL sets the "html_url" 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)
type OrganizationUpsertOne ¶
type OrganizationUpsertOne struct {
// contains filtered or unexported fields
}
OrganizationUpsertOne is the builder for "upsert"-ing
one Organization node.
func (*OrganizationUpsertOne) ClearHTMLURL ¶
func (u *OrganizationUpsertOne) ClearHTMLURL() *OrganizationUpsertOne
ClearHTMLURL clears the value of the "html_url" field.
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 ¶
func (u *OrganizationUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*OrganizationUpsertOne) IDX ¶
func (u *OrganizationUpsertOne) IDX(ctx context.Context) int64
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) SetHTMLURL ¶
func (u *OrganizationUpsertOne) SetHTMLURL(v string) *OrganizationUpsertOne
SetHTMLURL sets the "html_url" field.
func (*OrganizationUpsertOne) SetName ¶
func (u *OrganizationUpsertOne) SetName(v string) *OrganizationUpsertOne
SetName sets the "name" 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) UpdateHTMLURL ¶
func (u *OrganizationUpsertOne) UpdateHTMLURL() *OrganizationUpsertOne
UpdateHTMLURL sets the "html_url" 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)
type Organizations ¶
type Organizations []*Organization
Organizations is a parsable slice of Organization.
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 Repository ¶
type Repository struct { // ID of the ent. // GitHub repository ID. ID int64 `json:"id,omitempty"` // GitHub repository name. Name string `json:"name,omitempty"` // GitHub repository full name. FullName string `json:"full_name,omitempty"` // GitHub repository URL. HTMLURL string `json:"html_url,omitempty"` // GitHub repository description. Description string `json:"description,omitempty"` // LastPushedAt holds the value of the "last_pushed_at" field. LastPushedAt time.Time `json:"last_pushed_at,omitempty"` // LastEventAt holds the value of the "last_event_at" field. LastEventAt time.Time `json:"last_event_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RepositoryQuery when eager-loading is set. Edges RepositoryEdges `json:"edges"` // contains filtered or unexported fields }
Repository is the model entity for the Repository schema.
func (*Repository) NamedCommits ¶
func (r *Repository) NamedCommits(name string) ([]*GitCommit, error)
NamedCommits returns the Commits named value or an error if the edge was not loaded in eager-loading with this name.
func (*Repository) QueryCommits ¶
func (r *Repository) QueryCommits() *GitCommitQuery
QueryCommits queries the "commits" edge of the Repository entity.
func (*Repository) QueryOrganization ¶
func (r *Repository) QueryOrganization() *OrganizationQuery
QueryOrganization queries the "organization" edge of the Repository entity.
func (*Repository) String ¶
func (r *Repository) String() string
String implements the fmt.Stringer.
func (*Repository) Unwrap ¶
func (r *Repository) Unwrap() *Repository
Unwrap unwraps the Repository 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 (*Repository) Update ¶
func (r *Repository) Update() *RepositoryUpdateOne
Update returns a builder for updating this Repository. Note that you need to call Repository.Unwrap() before calling this method if this Repository was returned from a transaction, and the transaction was committed or rolled back.
type RepositoryClient ¶
type RepositoryClient struct {
// contains filtered or unexported fields
}
RepositoryClient is a client for the Repository schema.
func NewRepositoryClient ¶
func NewRepositoryClient(c config) *RepositoryClient
NewRepositoryClient returns a client for the Repository from the given config.
func (*RepositoryClient) Create ¶
func (c *RepositoryClient) Create() *RepositoryCreate
Create returns a builder for creating a Repository entity.
func (*RepositoryClient) CreateBulk ¶
func (c *RepositoryClient) CreateBulk(builders ...*RepositoryCreate) *RepositoryCreateBulk
CreateBulk returns a builder for creating a bulk of Repository entities.
func (*RepositoryClient) Delete ¶
func (c *RepositoryClient) Delete() *RepositoryDelete
Delete returns a delete builder for Repository.
func (*RepositoryClient) DeleteOne ¶
func (c *RepositoryClient) DeleteOne(r *Repository) *RepositoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RepositoryClient) DeleteOneID ¶
func (c *RepositoryClient) DeleteOneID(id int64) *RepositoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RepositoryClient) Get ¶
func (c *RepositoryClient) Get(ctx context.Context, id int64) (*Repository, error)
Get returns a Repository entity by its id.
func (*RepositoryClient) GetX ¶
func (c *RepositoryClient) GetX(ctx context.Context, id int64) *Repository
GetX is like Get, but panics if an error occurs.
func (*RepositoryClient) Hooks ¶
func (c *RepositoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RepositoryClient) Intercept ¶
func (c *RepositoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `repository.Intercept(f(g(h())))`.
func (*RepositoryClient) Interceptors ¶
func (c *RepositoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RepositoryClient) MapCreateBulk ¶
func (c *RepositoryClient) MapCreateBulk(slice any, setFunc func(*RepositoryCreate, int)) *RepositoryCreateBulk
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 (*RepositoryClient) Query ¶
func (c *RepositoryClient) Query() *RepositoryQuery
Query returns a query builder for Repository.
func (*RepositoryClient) QueryCommits ¶
func (c *RepositoryClient) QueryCommits(r *Repository) *GitCommitQuery
QueryCommits queries the commits edge of a Repository.
func (*RepositoryClient) QueryOrganization ¶
func (c *RepositoryClient) QueryOrganization(r *Repository) *OrganizationQuery
QueryOrganization queries the organization edge of a Repository.
func (*RepositoryClient) Update ¶
func (c *RepositoryClient) Update() *RepositoryUpdate
Update returns an update builder for Repository.
func (*RepositoryClient) UpdateOne ¶
func (c *RepositoryClient) UpdateOne(r *Repository) *RepositoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RepositoryClient) UpdateOneID ¶
func (c *RepositoryClient) UpdateOneID(id int64) *RepositoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RepositoryClient) Use ¶
func (c *RepositoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `repository.Hooks(f(g(h())))`.
type RepositoryCreate ¶
type RepositoryCreate struct {
// contains filtered or unexported fields
}
RepositoryCreate is the builder for creating a Repository entity.
func (*RepositoryCreate) AddCommitIDs ¶
func (rc *RepositoryCreate) AddCommitIDs(ids ...string) *RepositoryCreate
AddCommitIDs adds the "commits" edge to the GitCommit entity by IDs.
func (*RepositoryCreate) AddCommits ¶
func (rc *RepositoryCreate) AddCommits(g ...*GitCommit) *RepositoryCreate
AddCommits adds the "commits" edges to the GitCommit entity.
func (*RepositoryCreate) Exec ¶
func (rc *RepositoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RepositoryCreate) ExecX ¶
func (rc *RepositoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryCreate) Mutation ¶
func (rc *RepositoryCreate) Mutation() *RepositoryMutation
Mutation returns the RepositoryMutation object of the builder.
func (*RepositoryCreate) OnConflict ¶
func (rc *RepositoryCreate) OnConflict(opts ...sql.ConflictOption) *RepositoryUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Repository.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RepositoryUpsert) { SetName(v+v). }). Exec(ctx)
func (*RepositoryCreate) OnConflictColumns ¶
func (rc *RepositoryCreate) OnConflictColumns(columns ...string) *RepositoryUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Repository.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RepositoryCreate) Save ¶
func (rc *RepositoryCreate) Save(ctx context.Context) (*Repository, error)
Save creates the Repository in the database.
func (*RepositoryCreate) SaveX ¶
func (rc *RepositoryCreate) SaveX(ctx context.Context) *Repository
SaveX calls Save and panics if Save returns an error.
func (*RepositoryCreate) SetDescription ¶
func (rc *RepositoryCreate) SetDescription(s string) *RepositoryCreate
SetDescription sets the "description" field.
func (*RepositoryCreate) SetFullName ¶
func (rc *RepositoryCreate) SetFullName(s string) *RepositoryCreate
SetFullName sets the "full_name" field.
func (*RepositoryCreate) SetHTMLURL ¶
func (rc *RepositoryCreate) SetHTMLURL(s string) *RepositoryCreate
SetHTMLURL sets the "html_url" field.
func (*RepositoryCreate) SetID ¶
func (rc *RepositoryCreate) SetID(i int64) *RepositoryCreate
SetID sets the "id" field.
func (*RepositoryCreate) SetLastEventAt ¶
func (rc *RepositoryCreate) SetLastEventAt(t time.Time) *RepositoryCreate
SetLastEventAt sets the "last_event_at" field.
func (*RepositoryCreate) SetLastPushedAt ¶
func (rc *RepositoryCreate) SetLastPushedAt(t time.Time) *RepositoryCreate
SetLastPushedAt sets the "last_pushed_at" field.
func (*RepositoryCreate) SetName ¶
func (rc *RepositoryCreate) SetName(s string) *RepositoryCreate
SetName sets the "name" field.
func (*RepositoryCreate) SetNillableDescription ¶
func (rc *RepositoryCreate) SetNillableDescription(s *string) *RepositoryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*RepositoryCreate) SetNillableHTMLURL ¶
func (rc *RepositoryCreate) SetNillableHTMLURL(s *string) *RepositoryCreate
SetNillableHTMLURL sets the "html_url" field if the given value is not nil.
func (*RepositoryCreate) SetNillableLastEventAt ¶
func (rc *RepositoryCreate) SetNillableLastEventAt(t *time.Time) *RepositoryCreate
SetNillableLastEventAt sets the "last_event_at" field if the given value is not nil.
func (*RepositoryCreate) SetNillableLastPushedAt ¶
func (rc *RepositoryCreate) SetNillableLastPushedAt(t *time.Time) *RepositoryCreate
SetNillableLastPushedAt sets the "last_pushed_at" field if the given value is not nil.
func (*RepositoryCreate) SetNillableOrganizationID ¶
func (rc *RepositoryCreate) SetNillableOrganizationID(id *int64) *RepositoryCreate
SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.
func (*RepositoryCreate) SetOrganization ¶
func (rc *RepositoryCreate) SetOrganization(o *Organization) *RepositoryCreate
SetOrganization sets the "organization" edge to the Organization entity.
func (*RepositoryCreate) SetOrganizationID ¶
func (rc *RepositoryCreate) SetOrganizationID(id int64) *RepositoryCreate
SetOrganizationID sets the "organization" edge to the Organization entity by ID.
type RepositoryCreateBulk ¶
type RepositoryCreateBulk struct {
// contains filtered or unexported fields
}
RepositoryCreateBulk is the builder for creating many Repository entities in bulk.
func (*RepositoryCreateBulk) Exec ¶
func (rcb *RepositoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RepositoryCreateBulk) ExecX ¶
func (rcb *RepositoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryCreateBulk) OnConflict ¶
func (rcb *RepositoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *RepositoryUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Repository.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.RepositoryUpsert) { SetName(v+v). }). Exec(ctx)
func (*RepositoryCreateBulk) OnConflictColumns ¶
func (rcb *RepositoryCreateBulk) OnConflictColumns(columns ...string) *RepositoryUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Repository.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RepositoryCreateBulk) Save ¶
func (rcb *RepositoryCreateBulk) Save(ctx context.Context) ([]*Repository, error)
Save creates the Repository entities in the database.
func (*RepositoryCreateBulk) SaveX ¶
func (rcb *RepositoryCreateBulk) SaveX(ctx context.Context) []*Repository
SaveX is like Save, but panics if an error occurs.
type RepositoryDelete ¶
type RepositoryDelete struct {
// contains filtered or unexported fields
}
RepositoryDelete is the builder for deleting a Repository entity.
func (*RepositoryDelete) Exec ¶
func (rd *RepositoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RepositoryDelete) ExecX ¶
func (rd *RepositoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryDelete) Where ¶
func (rd *RepositoryDelete) Where(ps ...predicate.Repository) *RepositoryDelete
Where appends a list predicates to the RepositoryDelete builder.
type RepositoryDeleteOne ¶
type RepositoryDeleteOne struct {
// contains filtered or unexported fields
}
RepositoryDeleteOne is the builder for deleting a single Repository entity.
func (*RepositoryDeleteOne) Exec ¶
func (rdo *RepositoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RepositoryDeleteOne) ExecX ¶
func (rdo *RepositoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryDeleteOne) Where ¶
func (rdo *RepositoryDeleteOne) Where(ps ...predicate.Repository) *RepositoryDeleteOne
Where appends a list predicates to the RepositoryDelete builder.
type RepositoryEdges ¶
type RepositoryEdges struct { // GitHub organization. Organization *Organization `json:"organization,omitempty"` // Commits. Commits []*GitCommit `json:"commits,omitempty"` // contains filtered or unexported fields }
RepositoryEdges holds the relations/edges for other nodes in the graph.
func (RepositoryEdges) CommitsOrErr ¶
func (e RepositoryEdges) CommitsOrErr() ([]*GitCommit, error)
CommitsOrErr returns the Commits value or an error if the edge was not loaded in eager-loading.
func (RepositoryEdges) OrganizationOrErr ¶
func (e RepositoryEdges) 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 RepositoryGroupBy ¶
type RepositoryGroupBy struct {
// contains filtered or unexported fields
}
RepositoryGroupBy is the group-by builder for Repository entities.
func (*RepositoryGroupBy) Aggregate ¶
func (rgb *RepositoryGroupBy) Aggregate(fns ...AggregateFunc) *RepositoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RepositoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RepositoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RepositoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RepositoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RepositoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RepositoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RepositoryGroupBy) Scan ¶
func (rgb *RepositoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RepositoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RepositoryMutation ¶
type RepositoryMutation struct {
// contains filtered or unexported fields
}
RepositoryMutation represents an operation that mutates the Repository nodes in the graph.
func (*RepositoryMutation) AddCommitIDs ¶
func (m *RepositoryMutation) AddCommitIDs(ids ...string)
AddCommitIDs adds the "commits" edge to the GitCommit entity by ids.
func (*RepositoryMutation) AddField ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) AddedEdges ¶
func (m *RepositoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RepositoryMutation) AddedField ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) AddedFields ¶
func (m *RepositoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RepositoryMutation) AddedIDs ¶
func (m *RepositoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RepositoryMutation) ClearCommits ¶
func (m *RepositoryMutation) ClearCommits()
ClearCommits clears the "commits" edge to the GitCommit entity.
func (*RepositoryMutation) ClearEdge ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) ClearField ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) ClearHTMLURL ¶
func (m *RepositoryMutation) ClearHTMLURL()
ClearHTMLURL clears the value of the "html_url" field.
func (*RepositoryMutation) ClearLastEventAt ¶
func (m *RepositoryMutation) ClearLastEventAt()
ClearLastEventAt clears the value of the "last_event_at" field.
func (*RepositoryMutation) ClearLastPushedAt ¶
func (m *RepositoryMutation) ClearLastPushedAt()
ClearLastPushedAt clears the value of the "last_pushed_at" field.
func (*RepositoryMutation) ClearOrganization ¶
func (m *RepositoryMutation) ClearOrganization()
ClearOrganization clears the "organization" edge to the Organization entity.
func (*RepositoryMutation) ClearedEdges ¶
func (m *RepositoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RepositoryMutation) ClearedFields ¶
func (m *RepositoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RepositoryMutation) Client ¶
func (m RepositoryMutation) 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 (*RepositoryMutation) CommitsCleared ¶
func (m *RepositoryMutation) CommitsCleared() bool
CommitsCleared reports if the "commits" edge to the GitCommit entity was cleared.
func (*RepositoryMutation) CommitsIDs ¶
func (m *RepositoryMutation) CommitsIDs() (ids []string)
CommitsIDs returns the "commits" edge IDs in the mutation.
func (*RepositoryMutation) Description ¶
func (m *RepositoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*RepositoryMutation) EdgeCleared ¶
func (m *RepositoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RepositoryMutation) Field ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) FieldCleared ¶
func (m *RepositoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RepositoryMutation) Fields ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) FullName ¶
func (m *RepositoryMutation) FullName() (r string, exists bool)
FullName returns the value of the "full_name" field in the mutation.
func (*RepositoryMutation) HTMLURL ¶
func (m *RepositoryMutation) HTMLURL() (r string, exists bool)
HTMLURL returns the value of the "html_url" field in the mutation.
func (*RepositoryMutation) HTMLURLCleared ¶
func (m *RepositoryMutation) HTMLURLCleared() bool
HTMLURLCleared returns if the "html_url" field was cleared in this mutation.
func (*RepositoryMutation) ID ¶
func (m *RepositoryMutation) ID() (id int64, 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 (*RepositoryMutation) IDs ¶
func (m *RepositoryMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RepositoryMutation) LastEventAt ¶
func (m *RepositoryMutation) LastEventAt() (r time.Time, exists bool)
LastEventAt returns the value of the "last_event_at" field in the mutation.
func (*RepositoryMutation) LastEventAtCleared ¶
func (m *RepositoryMutation) LastEventAtCleared() bool
LastEventAtCleared returns if the "last_event_at" field was cleared in this mutation.
func (*RepositoryMutation) LastPushedAt ¶
func (m *RepositoryMutation) LastPushedAt() (r time.Time, exists bool)
LastPushedAt returns the value of the "last_pushed_at" field in the mutation.
func (*RepositoryMutation) LastPushedAtCleared ¶
func (m *RepositoryMutation) LastPushedAtCleared() bool
LastPushedAtCleared returns if the "last_pushed_at" field was cleared in this mutation.
func (*RepositoryMutation) Name ¶
func (m *RepositoryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RepositoryMutation) OldDescription ¶
func (m *RepositoryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) 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 (*RepositoryMutation) OldFullName ¶
func (m *RepositoryMutation) OldFullName(ctx context.Context) (v string, err error)
OldFullName returns the old "full_name" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldHTMLURL ¶
func (m *RepositoryMutation) OldHTMLURL(ctx context.Context) (v string, err error)
OldHTMLURL returns the old "html_url" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldLastEventAt ¶
OldLastEventAt returns the old "last_event_at" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldLastPushedAt ¶
OldLastPushedAt returns the old "last_pushed_at" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldName ¶
func (m *RepositoryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OrganizationCleared ¶
func (m *RepositoryMutation) OrganizationCleared() bool
OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.
func (*RepositoryMutation) OrganizationID ¶
func (m *RepositoryMutation) OrganizationID() (id int64, exists bool)
OrganizationID returns the "organization" edge ID in the mutation.
func (*RepositoryMutation) OrganizationIDs ¶
func (m *RepositoryMutation) OrganizationIDs() (ids []int64)
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 (*RepositoryMutation) RemoveCommitIDs ¶
func (m *RepositoryMutation) RemoveCommitIDs(ids ...string)
RemoveCommitIDs removes the "commits" edge to the GitCommit entity by IDs.
func (*RepositoryMutation) RemovedCommitsIDs ¶
func (m *RepositoryMutation) RemovedCommitsIDs() (ids []string)
RemovedCommits returns the removed IDs of the "commits" edge to the GitCommit entity.
func (*RepositoryMutation) RemovedEdges ¶
func (m *RepositoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RepositoryMutation) RemovedIDs ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) ResetCommits ¶
func (m *RepositoryMutation) ResetCommits()
ResetCommits resets all changes to the "commits" edge.
func (*RepositoryMutation) ResetDescription ¶
func (m *RepositoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*RepositoryMutation) ResetEdge ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) ResetField ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) ResetFullName ¶
func (m *RepositoryMutation) ResetFullName()
ResetFullName resets all changes to the "full_name" field.
func (*RepositoryMutation) ResetHTMLURL ¶
func (m *RepositoryMutation) ResetHTMLURL()
ResetHTMLURL resets all changes to the "html_url" field.
func (*RepositoryMutation) ResetLastEventAt ¶
func (m *RepositoryMutation) ResetLastEventAt()
ResetLastEventAt resets all changes to the "last_event_at" field.
func (*RepositoryMutation) ResetLastPushedAt ¶
func (m *RepositoryMutation) ResetLastPushedAt()
ResetLastPushedAt resets all changes to the "last_pushed_at" field.
func (*RepositoryMutation) ResetName ¶
func (m *RepositoryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RepositoryMutation) ResetOrganization ¶
func (m *RepositoryMutation) ResetOrganization()
ResetOrganization resets all changes to the "organization" edge.
func (*RepositoryMutation) SetDescription ¶
func (m *RepositoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*RepositoryMutation) SetField ¶
func (m *RepositoryMutation) 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 (*RepositoryMutation) SetFullName ¶
func (m *RepositoryMutation) SetFullName(s string)
SetFullName sets the "full_name" field.
func (*RepositoryMutation) SetHTMLURL ¶
func (m *RepositoryMutation) SetHTMLURL(s string)
SetHTMLURL sets the "html_url" field.
func (*RepositoryMutation) SetID ¶
func (m *RepositoryMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Repository entities.
func (*RepositoryMutation) SetLastEventAt ¶
func (m *RepositoryMutation) SetLastEventAt(t time.Time)
SetLastEventAt sets the "last_event_at" field.
func (*RepositoryMutation) SetLastPushedAt ¶
func (m *RepositoryMutation) SetLastPushedAt(t time.Time)
SetLastPushedAt sets the "last_pushed_at" field.
func (*RepositoryMutation) SetName ¶
func (m *RepositoryMutation) SetName(s string)
SetName sets the "name" field.
func (*RepositoryMutation) SetOp ¶
func (m *RepositoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RepositoryMutation) SetOrganizationID ¶
func (m *RepositoryMutation) SetOrganizationID(id int64)
SetOrganizationID sets the "organization" edge to the Organization entity by id.
func (RepositoryMutation) Tx ¶
func (m RepositoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RepositoryMutation) Type ¶
func (m *RepositoryMutation) Type() string
Type returns the node type of this mutation (Repository).
func (*RepositoryMutation) Where ¶
func (m *RepositoryMutation) Where(ps ...predicate.Repository)
Where appends a list predicates to the RepositoryMutation builder.
func (*RepositoryMutation) WhereP ¶
func (m *RepositoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RepositoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RepositoryQuery ¶
type RepositoryQuery struct {
// contains filtered or unexported fields
}
RepositoryQuery is the builder for querying Repository entities.
func (*RepositoryQuery) Aggregate ¶
func (rq *RepositoryQuery) Aggregate(fns ...AggregateFunc) *RepositorySelect
Aggregate returns a RepositorySelect configured with the given aggregations.
func (*RepositoryQuery) All ¶
func (rq *RepositoryQuery) All(ctx context.Context) ([]*Repository, error)
All executes the query and returns a list of Repositories.
func (*RepositoryQuery) AllX ¶
func (rq *RepositoryQuery) AllX(ctx context.Context) []*Repository
AllX is like All, but panics if an error occurs.
func (*RepositoryQuery) Clone ¶
func (rq *RepositoryQuery) Clone() *RepositoryQuery
Clone returns a duplicate of the RepositoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RepositoryQuery) Count ¶
func (rq *RepositoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RepositoryQuery) CountX ¶
func (rq *RepositoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RepositoryQuery) Exist ¶
func (rq *RepositoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RepositoryQuery) ExistX ¶
func (rq *RepositoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RepositoryQuery) First ¶
func (rq *RepositoryQuery) First(ctx context.Context) (*Repository, error)
First returns the first Repository entity from the query. Returns a *NotFoundError when no Repository was found.
func (*RepositoryQuery) FirstID ¶
func (rq *RepositoryQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Repository ID from the query. Returns a *NotFoundError when no Repository ID was found.
func (*RepositoryQuery) FirstIDX ¶
func (rq *RepositoryQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RepositoryQuery) FirstX ¶
func (rq *RepositoryQuery) FirstX(ctx context.Context) *Repository
FirstX is like First, but panics if an error occurs.
func (*RepositoryQuery) GroupBy ¶
func (rq *RepositoryQuery) GroupBy(field string, fields ...string) *RepositoryGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Repository.Query(). GroupBy(repository.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RepositoryQuery) IDs ¶
func (rq *RepositoryQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Repository IDs.
func (*RepositoryQuery) IDsX ¶
func (rq *RepositoryQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RepositoryQuery) Limit ¶
func (rq *RepositoryQuery) Limit(limit int) *RepositoryQuery
Limit the number of records to be returned by this query.
func (*RepositoryQuery) Offset ¶
func (rq *RepositoryQuery) Offset(offset int) *RepositoryQuery
Offset to start from.
func (*RepositoryQuery) Only ¶
func (rq *RepositoryQuery) Only(ctx context.Context) (*Repository, error)
Only returns a single Repository entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Repository entity is found. Returns a *NotFoundError when no Repository entities are found.
func (*RepositoryQuery) OnlyID ¶
func (rq *RepositoryQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Repository ID in the query. Returns a *NotSingularError when more than one Repository ID is found. Returns a *NotFoundError when no entities are found.
func (*RepositoryQuery) OnlyIDX ¶
func (rq *RepositoryQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RepositoryQuery) OnlyX ¶
func (rq *RepositoryQuery) OnlyX(ctx context.Context) *Repository
OnlyX is like Only, but panics if an error occurs.
func (*RepositoryQuery) Order ¶
func (rq *RepositoryQuery) Order(o ...repository.OrderOption) *RepositoryQuery
Order specifies how the records should be ordered.
func (*RepositoryQuery) QueryCommits ¶
func (rq *RepositoryQuery) QueryCommits() *GitCommitQuery
QueryCommits chains the current query on the "commits" edge.
func (*RepositoryQuery) QueryOrganization ¶
func (rq *RepositoryQuery) QueryOrganization() *OrganizationQuery
QueryOrganization chains the current query on the "organization" edge.
func (*RepositoryQuery) Select ¶
func (rq *RepositoryQuery) Select(fields ...string) *RepositorySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Repository.Query(). Select(repository.FieldName). Scan(ctx, &v)
func (*RepositoryQuery) Unique ¶
func (rq *RepositoryQuery) Unique(unique bool) *RepositoryQuery
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 (*RepositoryQuery) Where ¶
func (rq *RepositoryQuery) Where(ps ...predicate.Repository) *RepositoryQuery
Where adds a new predicate for the RepositoryQuery builder.
func (*RepositoryQuery) WithCommits ¶
func (rq *RepositoryQuery) WithCommits(opts ...func(*GitCommitQuery)) *RepositoryQuery
WithCommits tells the query-builder to eager-load the nodes that are connected to the "commits" edge. The optional arguments are used to configure the query builder of the edge.
func (*RepositoryQuery) WithNamedCommits ¶
func (rq *RepositoryQuery) WithNamedCommits(name string, opts ...func(*GitCommitQuery)) *RepositoryQuery
WithNamedCommits tells the query-builder to eager-load the nodes that are connected to the "commits" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*RepositoryQuery) WithOrganization ¶
func (rq *RepositoryQuery) WithOrganization(opts ...func(*OrganizationQuery)) *RepositoryQuery
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 RepositorySelect ¶
type RepositorySelect struct { *RepositoryQuery // contains filtered or unexported fields }
RepositorySelect is the builder for selecting fields of Repository entities.
func (*RepositorySelect) Aggregate ¶
func (rs *RepositorySelect) Aggregate(fns ...AggregateFunc) *RepositorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*RepositorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RepositorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RepositorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RepositorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RepositorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RepositorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RepositorySelect) Scan ¶
func (rs *RepositorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RepositorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RepositoryUpdate ¶
type RepositoryUpdate struct {
// contains filtered or unexported fields
}
RepositoryUpdate is the builder for updating Repository entities.
func (*RepositoryUpdate) AddCommitIDs ¶
func (ru *RepositoryUpdate) AddCommitIDs(ids ...string) *RepositoryUpdate
AddCommitIDs adds the "commits" edge to the GitCommit entity by IDs.
func (*RepositoryUpdate) AddCommits ¶
func (ru *RepositoryUpdate) AddCommits(g ...*GitCommit) *RepositoryUpdate
AddCommits adds the "commits" edges to the GitCommit entity.
func (*RepositoryUpdate) ClearCommits ¶
func (ru *RepositoryUpdate) ClearCommits() *RepositoryUpdate
ClearCommits clears all "commits" edges to the GitCommit entity.
func (*RepositoryUpdate) ClearHTMLURL ¶
func (ru *RepositoryUpdate) ClearHTMLURL() *RepositoryUpdate
ClearHTMLURL clears the value of the "html_url" field.
func (*RepositoryUpdate) ClearLastEventAt ¶
func (ru *RepositoryUpdate) ClearLastEventAt() *RepositoryUpdate
ClearLastEventAt clears the value of the "last_event_at" field.
func (*RepositoryUpdate) ClearLastPushedAt ¶
func (ru *RepositoryUpdate) ClearLastPushedAt() *RepositoryUpdate
ClearLastPushedAt clears the value of the "last_pushed_at" field.
func (*RepositoryUpdate) ClearOrganization ¶
func (ru *RepositoryUpdate) ClearOrganization() *RepositoryUpdate
ClearOrganization clears the "organization" edge to the Organization entity.
func (*RepositoryUpdate) Exec ¶
func (ru *RepositoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RepositoryUpdate) ExecX ¶
func (ru *RepositoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryUpdate) Mutation ¶
func (ru *RepositoryUpdate) Mutation() *RepositoryMutation
Mutation returns the RepositoryMutation object of the builder.
func (*RepositoryUpdate) RemoveCommitIDs ¶
func (ru *RepositoryUpdate) RemoveCommitIDs(ids ...string) *RepositoryUpdate
RemoveCommitIDs removes the "commits" edge to GitCommit entities by IDs.
func (*RepositoryUpdate) RemoveCommits ¶
func (ru *RepositoryUpdate) RemoveCommits(g ...*GitCommit) *RepositoryUpdate
RemoveCommits removes "commits" edges to GitCommit entities.
func (*RepositoryUpdate) Save ¶
func (ru *RepositoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RepositoryUpdate) SaveX ¶
func (ru *RepositoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RepositoryUpdate) SetDescription ¶
func (ru *RepositoryUpdate) SetDescription(s string) *RepositoryUpdate
SetDescription sets the "description" field.
func (*RepositoryUpdate) SetFullName ¶
func (ru *RepositoryUpdate) SetFullName(s string) *RepositoryUpdate
SetFullName sets the "full_name" field.
func (*RepositoryUpdate) SetHTMLURL ¶
func (ru *RepositoryUpdate) SetHTMLURL(s string) *RepositoryUpdate
SetHTMLURL sets the "html_url" field.
func (*RepositoryUpdate) SetLastEventAt ¶
func (ru *RepositoryUpdate) SetLastEventAt(t time.Time) *RepositoryUpdate
SetLastEventAt sets the "last_event_at" field.
func (*RepositoryUpdate) SetLastPushedAt ¶
func (ru *RepositoryUpdate) SetLastPushedAt(t time.Time) *RepositoryUpdate
SetLastPushedAt sets the "last_pushed_at" field.
func (*RepositoryUpdate) SetName ¶
func (ru *RepositoryUpdate) SetName(s string) *RepositoryUpdate
SetName sets the "name" field.
func (*RepositoryUpdate) SetNillableDescription ¶
func (ru *RepositoryUpdate) SetNillableDescription(s *string) *RepositoryUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*RepositoryUpdate) SetNillableFullName ¶
func (ru *RepositoryUpdate) SetNillableFullName(s *string) *RepositoryUpdate
SetNillableFullName sets the "full_name" field if the given value is not nil.
func (*RepositoryUpdate) SetNillableHTMLURL ¶
func (ru *RepositoryUpdate) SetNillableHTMLURL(s *string) *RepositoryUpdate
SetNillableHTMLURL sets the "html_url" field if the given value is not nil.
func (*RepositoryUpdate) SetNillableLastEventAt ¶
func (ru *RepositoryUpdate) SetNillableLastEventAt(t *time.Time) *RepositoryUpdate
SetNillableLastEventAt sets the "last_event_at" field if the given value is not nil.
func (*RepositoryUpdate) SetNillableLastPushedAt ¶
func (ru *RepositoryUpdate) SetNillableLastPushedAt(t *time.Time) *RepositoryUpdate
SetNillableLastPushedAt sets the "last_pushed_at" field if the given value is not nil.
func (*RepositoryUpdate) SetNillableName ¶
func (ru *RepositoryUpdate) SetNillableName(s *string) *RepositoryUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*RepositoryUpdate) SetNillableOrganizationID ¶
func (ru *RepositoryUpdate) SetNillableOrganizationID(id *int64) *RepositoryUpdate
SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.
func (*RepositoryUpdate) SetOrganization ¶
func (ru *RepositoryUpdate) SetOrganization(o *Organization) *RepositoryUpdate
SetOrganization sets the "organization" edge to the Organization entity.
func (*RepositoryUpdate) SetOrganizationID ¶
func (ru *RepositoryUpdate) SetOrganizationID(id int64) *RepositoryUpdate
SetOrganizationID sets the "organization" edge to the Organization entity by ID.
func (*RepositoryUpdate) Where ¶
func (ru *RepositoryUpdate) Where(ps ...predicate.Repository) *RepositoryUpdate
Where appends a list predicates to the RepositoryUpdate builder.
type RepositoryUpdateOne ¶
type RepositoryUpdateOne struct {
// contains filtered or unexported fields
}
RepositoryUpdateOne is the builder for updating a single Repository entity.
func (*RepositoryUpdateOne) AddCommitIDs ¶
func (ruo *RepositoryUpdateOne) AddCommitIDs(ids ...string) *RepositoryUpdateOne
AddCommitIDs adds the "commits" edge to the GitCommit entity by IDs.
func (*RepositoryUpdateOne) AddCommits ¶
func (ruo *RepositoryUpdateOne) AddCommits(g ...*GitCommit) *RepositoryUpdateOne
AddCommits adds the "commits" edges to the GitCommit entity.
func (*RepositoryUpdateOne) ClearCommits ¶
func (ruo *RepositoryUpdateOne) ClearCommits() *RepositoryUpdateOne
ClearCommits clears all "commits" edges to the GitCommit entity.
func (*RepositoryUpdateOne) ClearHTMLURL ¶
func (ruo *RepositoryUpdateOne) ClearHTMLURL() *RepositoryUpdateOne
ClearHTMLURL clears the value of the "html_url" field.
func (*RepositoryUpdateOne) ClearLastEventAt ¶
func (ruo *RepositoryUpdateOne) ClearLastEventAt() *RepositoryUpdateOne
ClearLastEventAt clears the value of the "last_event_at" field.
func (*RepositoryUpdateOne) ClearLastPushedAt ¶
func (ruo *RepositoryUpdateOne) ClearLastPushedAt() *RepositoryUpdateOne
ClearLastPushedAt clears the value of the "last_pushed_at" field.
func (*RepositoryUpdateOne) ClearOrganization ¶
func (ruo *RepositoryUpdateOne) ClearOrganization() *RepositoryUpdateOne
ClearOrganization clears the "organization" edge to the Organization entity.
func (*RepositoryUpdateOne) Exec ¶
func (ruo *RepositoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RepositoryUpdateOne) ExecX ¶
func (ruo *RepositoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryUpdateOne) Mutation ¶
func (ruo *RepositoryUpdateOne) Mutation() *RepositoryMutation
Mutation returns the RepositoryMutation object of the builder.
func (*RepositoryUpdateOne) RemoveCommitIDs ¶
func (ruo *RepositoryUpdateOne) RemoveCommitIDs(ids ...string) *RepositoryUpdateOne
RemoveCommitIDs removes the "commits" edge to GitCommit entities by IDs.
func (*RepositoryUpdateOne) RemoveCommits ¶
func (ruo *RepositoryUpdateOne) RemoveCommits(g ...*GitCommit) *RepositoryUpdateOne
RemoveCommits removes "commits" edges to GitCommit entities.
func (*RepositoryUpdateOne) Save ¶
func (ruo *RepositoryUpdateOne) Save(ctx context.Context) (*Repository, error)
Save executes the query and returns the updated Repository entity.
func (*RepositoryUpdateOne) SaveX ¶
func (ruo *RepositoryUpdateOne) SaveX(ctx context.Context) *Repository
SaveX is like Save, but panics if an error occurs.
func (*RepositoryUpdateOne) Select ¶
func (ruo *RepositoryUpdateOne) Select(field string, fields ...string) *RepositoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RepositoryUpdateOne) SetDescription ¶
func (ruo *RepositoryUpdateOne) SetDescription(s string) *RepositoryUpdateOne
SetDescription sets the "description" field.
func (*RepositoryUpdateOne) SetFullName ¶
func (ruo *RepositoryUpdateOne) SetFullName(s string) *RepositoryUpdateOne
SetFullName sets the "full_name" field.
func (*RepositoryUpdateOne) SetHTMLURL ¶
func (ruo *RepositoryUpdateOne) SetHTMLURL(s string) *RepositoryUpdateOne
SetHTMLURL sets the "html_url" field.
func (*RepositoryUpdateOne) SetLastEventAt ¶
func (ruo *RepositoryUpdateOne) SetLastEventAt(t time.Time) *RepositoryUpdateOne
SetLastEventAt sets the "last_event_at" field.
func (*RepositoryUpdateOne) SetLastPushedAt ¶
func (ruo *RepositoryUpdateOne) SetLastPushedAt(t time.Time) *RepositoryUpdateOne
SetLastPushedAt sets the "last_pushed_at" field.
func (*RepositoryUpdateOne) SetName ¶
func (ruo *RepositoryUpdateOne) SetName(s string) *RepositoryUpdateOne
SetName sets the "name" field.
func (*RepositoryUpdateOne) SetNillableDescription ¶
func (ruo *RepositoryUpdateOne) SetNillableDescription(s *string) *RepositoryUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*RepositoryUpdateOne) SetNillableFullName ¶
func (ruo *RepositoryUpdateOne) SetNillableFullName(s *string) *RepositoryUpdateOne
SetNillableFullName sets the "full_name" field if the given value is not nil.
func (*RepositoryUpdateOne) SetNillableHTMLURL ¶
func (ruo *RepositoryUpdateOne) SetNillableHTMLURL(s *string) *RepositoryUpdateOne
SetNillableHTMLURL sets the "html_url" field if the given value is not nil.
func (*RepositoryUpdateOne) SetNillableLastEventAt ¶
func (ruo *RepositoryUpdateOne) SetNillableLastEventAt(t *time.Time) *RepositoryUpdateOne
SetNillableLastEventAt sets the "last_event_at" field if the given value is not nil.
func (*RepositoryUpdateOne) SetNillableLastPushedAt ¶
func (ruo *RepositoryUpdateOne) SetNillableLastPushedAt(t *time.Time) *RepositoryUpdateOne
SetNillableLastPushedAt sets the "last_pushed_at" field if the given value is not nil.
func (*RepositoryUpdateOne) SetNillableName ¶
func (ruo *RepositoryUpdateOne) SetNillableName(s *string) *RepositoryUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*RepositoryUpdateOne) SetNillableOrganizationID ¶
func (ruo *RepositoryUpdateOne) SetNillableOrganizationID(id *int64) *RepositoryUpdateOne
SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.
func (*RepositoryUpdateOne) SetOrganization ¶
func (ruo *RepositoryUpdateOne) SetOrganization(o *Organization) *RepositoryUpdateOne
SetOrganization sets the "organization" edge to the Organization entity.
func (*RepositoryUpdateOne) SetOrganizationID ¶
func (ruo *RepositoryUpdateOne) SetOrganizationID(id int64) *RepositoryUpdateOne
SetOrganizationID sets the "organization" edge to the Organization entity by ID.
func (*RepositoryUpdateOne) Where ¶
func (ruo *RepositoryUpdateOne) Where(ps ...predicate.Repository) *RepositoryUpdateOne
Where appends a list predicates to the RepositoryUpdate builder.
type RepositoryUpsert ¶
RepositoryUpsert is the "OnConflict" setter.
func (*RepositoryUpsert) ClearHTMLURL ¶
func (u *RepositoryUpsert) ClearHTMLURL() *RepositoryUpsert
ClearHTMLURL clears the value of the "html_url" field.
func (*RepositoryUpsert) ClearLastEventAt ¶
func (u *RepositoryUpsert) ClearLastEventAt() *RepositoryUpsert
ClearLastEventAt clears the value of the "last_event_at" field.
func (*RepositoryUpsert) ClearLastPushedAt ¶
func (u *RepositoryUpsert) ClearLastPushedAt() *RepositoryUpsert
ClearLastPushedAt clears the value of the "last_pushed_at" field.
func (*RepositoryUpsert) SetDescription ¶
func (u *RepositoryUpsert) SetDescription(v string) *RepositoryUpsert
SetDescription sets the "description" field.
func (*RepositoryUpsert) SetFullName ¶
func (u *RepositoryUpsert) SetFullName(v string) *RepositoryUpsert
SetFullName sets the "full_name" field.
func (*RepositoryUpsert) SetHTMLURL ¶
func (u *RepositoryUpsert) SetHTMLURL(v string) *RepositoryUpsert
SetHTMLURL sets the "html_url" field.
func (*RepositoryUpsert) SetLastEventAt ¶
func (u *RepositoryUpsert) SetLastEventAt(v time.Time) *RepositoryUpsert
SetLastEventAt sets the "last_event_at" field.
func (*RepositoryUpsert) SetLastPushedAt ¶
func (u *RepositoryUpsert) SetLastPushedAt(v time.Time) *RepositoryUpsert
SetLastPushedAt sets the "last_pushed_at" field.
func (*RepositoryUpsert) SetName ¶
func (u *RepositoryUpsert) SetName(v string) *RepositoryUpsert
SetName sets the "name" field.
func (*RepositoryUpsert) UpdateDescription ¶
func (u *RepositoryUpsert) UpdateDescription() *RepositoryUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*RepositoryUpsert) UpdateFullName ¶
func (u *RepositoryUpsert) UpdateFullName() *RepositoryUpsert
UpdateFullName sets the "full_name" field to the value that was provided on create.
func (*RepositoryUpsert) UpdateHTMLURL ¶
func (u *RepositoryUpsert) UpdateHTMLURL() *RepositoryUpsert
UpdateHTMLURL sets the "html_url" field to the value that was provided on create.
func (*RepositoryUpsert) UpdateLastEventAt ¶
func (u *RepositoryUpsert) UpdateLastEventAt() *RepositoryUpsert
UpdateLastEventAt sets the "last_event_at" field to the value that was provided on create.
func (*RepositoryUpsert) UpdateLastPushedAt ¶
func (u *RepositoryUpsert) UpdateLastPushedAt() *RepositoryUpsert
UpdateLastPushedAt sets the "last_pushed_at" field to the value that was provided on create.
func (*RepositoryUpsert) UpdateName ¶
func (u *RepositoryUpsert) UpdateName() *RepositoryUpsert
UpdateName sets the "name" field to the value that was provided on create.
type RepositoryUpsertBulk ¶
type RepositoryUpsertBulk struct {
// contains filtered or unexported fields
}
RepositoryUpsertBulk is the builder for "upsert"-ing a bulk of Repository nodes.
func (*RepositoryUpsertBulk) ClearHTMLURL ¶
func (u *RepositoryUpsertBulk) ClearHTMLURL() *RepositoryUpsertBulk
ClearHTMLURL clears the value of the "html_url" field.
func (*RepositoryUpsertBulk) ClearLastEventAt ¶
func (u *RepositoryUpsertBulk) ClearLastEventAt() *RepositoryUpsertBulk
ClearLastEventAt clears the value of the "last_event_at" field.
func (*RepositoryUpsertBulk) ClearLastPushedAt ¶
func (u *RepositoryUpsertBulk) ClearLastPushedAt() *RepositoryUpsertBulk
ClearLastPushedAt clears the value of the "last_pushed_at" field.
func (*RepositoryUpsertBulk) DoNothing ¶
func (u *RepositoryUpsertBulk) DoNothing() *RepositoryUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RepositoryUpsertBulk) Exec ¶
func (u *RepositoryUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RepositoryUpsertBulk) ExecX ¶
func (u *RepositoryUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryUpsertBulk) Ignore ¶
func (u *RepositoryUpsertBulk) Ignore() *RepositoryUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Repository.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RepositoryUpsertBulk) SetDescription ¶
func (u *RepositoryUpsertBulk) SetDescription(v string) *RepositoryUpsertBulk
SetDescription sets the "description" field.
func (*RepositoryUpsertBulk) SetFullName ¶
func (u *RepositoryUpsertBulk) SetFullName(v string) *RepositoryUpsertBulk
SetFullName sets the "full_name" field.
func (*RepositoryUpsertBulk) SetHTMLURL ¶
func (u *RepositoryUpsertBulk) SetHTMLURL(v string) *RepositoryUpsertBulk
SetHTMLURL sets the "html_url" field.
func (*RepositoryUpsertBulk) SetLastEventAt ¶
func (u *RepositoryUpsertBulk) SetLastEventAt(v time.Time) *RepositoryUpsertBulk
SetLastEventAt sets the "last_event_at" field.
func (*RepositoryUpsertBulk) SetLastPushedAt ¶
func (u *RepositoryUpsertBulk) SetLastPushedAt(v time.Time) *RepositoryUpsertBulk
SetLastPushedAt sets the "last_pushed_at" field.
func (*RepositoryUpsertBulk) SetName ¶
func (u *RepositoryUpsertBulk) SetName(v string) *RepositoryUpsertBulk
SetName sets the "name" field.
func (*RepositoryUpsertBulk) Update ¶
func (u *RepositoryUpsertBulk) Update(set func(*RepositoryUpsert)) *RepositoryUpsertBulk
Update allows overriding fields `UPDATE` values. See the RepositoryCreateBulk.OnConflict documentation for more info.
func (*RepositoryUpsertBulk) UpdateDescription ¶
func (u *RepositoryUpsertBulk) UpdateDescription() *RepositoryUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*RepositoryUpsertBulk) UpdateFullName ¶
func (u *RepositoryUpsertBulk) UpdateFullName() *RepositoryUpsertBulk
UpdateFullName sets the "full_name" field to the value that was provided on create.
func (*RepositoryUpsertBulk) UpdateHTMLURL ¶
func (u *RepositoryUpsertBulk) UpdateHTMLURL() *RepositoryUpsertBulk
UpdateHTMLURL sets the "html_url" field to the value that was provided on create.
func (*RepositoryUpsertBulk) UpdateLastEventAt ¶
func (u *RepositoryUpsertBulk) UpdateLastEventAt() *RepositoryUpsertBulk
UpdateLastEventAt sets the "last_event_at" field to the value that was provided on create.
func (*RepositoryUpsertBulk) UpdateLastPushedAt ¶
func (u *RepositoryUpsertBulk) UpdateLastPushedAt() *RepositoryUpsertBulk
UpdateLastPushedAt sets the "last_pushed_at" field to the value that was provided on create.
func (*RepositoryUpsertBulk) UpdateName ¶
func (u *RepositoryUpsertBulk) UpdateName() *RepositoryUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*RepositoryUpsertBulk) UpdateNewValues ¶
func (u *RepositoryUpsertBulk) UpdateNewValues() *RepositoryUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Repository.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(repository.FieldID) }), ). Exec(ctx)
type RepositoryUpsertOne ¶
type RepositoryUpsertOne struct {
// contains filtered or unexported fields
}
RepositoryUpsertOne is the builder for "upsert"-ing
one Repository node.
func (*RepositoryUpsertOne) ClearHTMLURL ¶
func (u *RepositoryUpsertOne) ClearHTMLURL() *RepositoryUpsertOne
ClearHTMLURL clears the value of the "html_url" field.
func (*RepositoryUpsertOne) ClearLastEventAt ¶
func (u *RepositoryUpsertOne) ClearLastEventAt() *RepositoryUpsertOne
ClearLastEventAt clears the value of the "last_event_at" field.
func (*RepositoryUpsertOne) ClearLastPushedAt ¶
func (u *RepositoryUpsertOne) ClearLastPushedAt() *RepositoryUpsertOne
ClearLastPushedAt clears the value of the "last_pushed_at" field.
func (*RepositoryUpsertOne) DoNothing ¶
func (u *RepositoryUpsertOne) DoNothing() *RepositoryUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RepositoryUpsertOne) Exec ¶
func (u *RepositoryUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RepositoryUpsertOne) ExecX ¶
func (u *RepositoryUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RepositoryUpsertOne) ID ¶
func (u *RepositoryUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*RepositoryUpsertOne) IDX ¶
func (u *RepositoryUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*RepositoryUpsertOne) Ignore ¶
func (u *RepositoryUpsertOne) Ignore() *RepositoryUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Repository.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RepositoryUpsertOne) SetDescription ¶
func (u *RepositoryUpsertOne) SetDescription(v string) *RepositoryUpsertOne
SetDescription sets the "description" field.
func (*RepositoryUpsertOne) SetFullName ¶
func (u *RepositoryUpsertOne) SetFullName(v string) *RepositoryUpsertOne
SetFullName sets the "full_name" field.
func (*RepositoryUpsertOne) SetHTMLURL ¶
func (u *RepositoryUpsertOne) SetHTMLURL(v string) *RepositoryUpsertOne
SetHTMLURL sets the "html_url" field.
func (*RepositoryUpsertOne) SetLastEventAt ¶
func (u *RepositoryUpsertOne) SetLastEventAt(v time.Time) *RepositoryUpsertOne
SetLastEventAt sets the "last_event_at" field.
func (*RepositoryUpsertOne) SetLastPushedAt ¶
func (u *RepositoryUpsertOne) SetLastPushedAt(v time.Time) *RepositoryUpsertOne
SetLastPushedAt sets the "last_pushed_at" field.
func (*RepositoryUpsertOne) SetName ¶
func (u *RepositoryUpsertOne) SetName(v string) *RepositoryUpsertOne
SetName sets the "name" field.
func (*RepositoryUpsertOne) Update ¶
func (u *RepositoryUpsertOne) Update(set func(*RepositoryUpsert)) *RepositoryUpsertOne
Update allows overriding fields `UPDATE` values. See the RepositoryCreate.OnConflict documentation for more info.
func (*RepositoryUpsertOne) UpdateDescription ¶
func (u *RepositoryUpsertOne) UpdateDescription() *RepositoryUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*RepositoryUpsertOne) UpdateFullName ¶
func (u *RepositoryUpsertOne) UpdateFullName() *RepositoryUpsertOne
UpdateFullName sets the "full_name" field to the value that was provided on create.
func (*RepositoryUpsertOne) UpdateHTMLURL ¶
func (u *RepositoryUpsertOne) UpdateHTMLURL() *RepositoryUpsertOne
UpdateHTMLURL sets the "html_url" field to the value that was provided on create.
func (*RepositoryUpsertOne) UpdateLastEventAt ¶
func (u *RepositoryUpsertOne) UpdateLastEventAt() *RepositoryUpsertOne
UpdateLastEventAt sets the "last_event_at" field to the value that was provided on create.
func (*RepositoryUpsertOne) UpdateLastPushedAt ¶
func (u *RepositoryUpsertOne) UpdateLastPushedAt() *RepositoryUpsertOne
UpdateLastPushedAt sets the "last_pushed_at" field to the value that was provided on create.
func (*RepositoryUpsertOne) UpdateName ¶
func (u *RepositoryUpsertOne) UpdateName() *RepositoryUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*RepositoryUpsertOne) UpdateNewValues ¶
func (u *RepositoryUpsertOne) UpdateNewValues() *RepositoryUpsertOne
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.Repository.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(repository.FieldID) }), ). Exec(ctx)
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 { // GitCommit is the client for interacting with the GitCommit builders. GitCommit *GitCommitClient // Organization is the client for interacting with the Organization builders. Organization *OrganizationClient // Repository is the client for interacting with the Repository builders. Repository *RepositoryClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- ent.go
- generate.go
- gitcommit.go
- gitcommit_create.go
- gitcommit_delete.go
- gitcommit_query.go
- gitcommit_update.go
- mutation.go
- organization.go
- organization_create.go
- organization_delete.go
- organization_query.go
- organization_update.go
- repository.go
- repository_create.go
- repository_delete.go
- repository_query.go
- repository_update.go
- runtime.go
- tx.go