ent

package
v0.0.0-...-45605f7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeCheck                = "Check"
	TypeGPTDialog            = "GPTDialog"
	TypeGitCommit            = "GitCommit"
	TypeLastChannelMessage   = "LastChannelMessage"
	TypeOrganization         = "Organization"
	TypePRNotification       = "PRNotification"
	TypeRepository           = "Repository"
	TypeTelegramChannelState = "TelegramChannelState"
	TypeTelegramSession      = "TelegramSession"
	TypeTelegramUserState    = "TelegramUserState"
	TypeUser                 = "User"
)

Variables

View Source
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 Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

GroupBy(field1, field2).
Aggregate(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 Check

type Check struct {

	// ID of the ent.
	// Value of check_run.id
	ID int64 `json:"id,omitempty"`
	// Repository id
	RepoID int64 `json:"repo_id,omitempty"`
	// Pull request id
	PullRequestID int `json:"pull_request_id,omitempty"`
	// Name of check_run
	Name string `json:"name,omitempty"`
	// The phase of the lifecycle that the check is currently in. Can be one of: queued, in_progress, completed, pending
	Status string `json:"status,omitempty"`
	// The final conclusion of the check. Can be one of: waiting, pending, startup_failure, stale, success, failure, neutral, cancelled, skipped, timed_out, action_required, null
	Conclusion string `json:"conclusion,omitempty"`
	// contains filtered or unexported fields
}

Check is the model entity for the Check schema.

func (*Check) String

func (c *Check) String() string

String implements the fmt.Stringer.

func (*Check) Unwrap

func (c *Check) Unwrap() *Check

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

func (c *Check) Update() *CheckUpdateOne

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

func (*Check) Value

func (c *Check) Value(name string) (ent.Value, error)

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

type CheckClient

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

CheckClient is a client for the Check schema.

func NewCheckClient

func NewCheckClient(c config) *CheckClient

NewCheckClient returns a client for the Check from the given config.

func (*CheckClient) Create

func (c *CheckClient) Create() *CheckCreate

Create returns a builder for creating a Check entity.

func (*CheckClient) CreateBulk

func (c *CheckClient) CreateBulk(builders ...*CheckCreate) *CheckCreateBulk

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

func (*CheckClient) Delete

func (c *CheckClient) Delete() *CheckDelete

Delete returns a delete builder for Check.

func (*CheckClient) DeleteOne

func (c *CheckClient) DeleteOne(ch *Check) *CheckDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CheckClient) DeleteOneID

func (c *CheckClient) DeleteOneID(id int64) *CheckDeleteOne

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

func (*CheckClient) Get

func (c *CheckClient) Get(ctx context.Context, id int64) (*Check, error)

Get returns a Check entity by its id.

func (*CheckClient) GetX

func (c *CheckClient) GetX(ctx context.Context, id int64) *Check

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

func (*CheckClient) Hooks

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

Hooks returns the client hooks.

func (*CheckClient) Intercept

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

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

func (*CheckClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CheckClient) MapCreateBulk

func (c *CheckClient) MapCreateBulk(slice any, setFunc func(*CheckCreate, int)) *CheckCreateBulk

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 (*CheckClient) Query

func (c *CheckClient) Query() *CheckQuery

Query returns a query builder for Check.

func (*CheckClient) Update

func (c *CheckClient) Update() *CheckUpdate

Update returns an update builder for Check.

func (*CheckClient) UpdateOne

func (c *CheckClient) UpdateOne(ch *Check) *CheckUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CheckClient) UpdateOneID

func (c *CheckClient) UpdateOneID(id int64) *CheckUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CheckClient) Use

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

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

type CheckCreate

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

CheckCreate is the builder for creating a Check entity.

func (*CheckCreate) Exec

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

Exec executes the query.

func (*CheckCreate) ExecX

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

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

func (*CheckCreate) Mutation

func (cc *CheckCreate) Mutation() *CheckMutation

Mutation returns the CheckMutation object of the builder.

func (*CheckCreate) OnConflict

func (cc *CheckCreate) OnConflict(opts ...sql.ConflictOption) *CheckUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Check.Create().
	SetRepoID(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.CheckUpsert) {
		SetRepoID(v+v).
	}).
	Exec(ctx)

func (*CheckCreate) OnConflictColumns

func (cc *CheckCreate) OnConflictColumns(columns ...string) *CheckUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Check.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CheckCreate) Save

func (cc *CheckCreate) Save(ctx context.Context) (*Check, error)

Save creates the Check in the database.

func (*CheckCreate) SaveX

func (cc *CheckCreate) SaveX(ctx context.Context) *Check

SaveX calls Save and panics if Save returns an error.

func (*CheckCreate) SetConclusion

func (cc *CheckCreate) SetConclusion(s string) *CheckCreate

SetConclusion sets the "conclusion" field.

func (*CheckCreate) SetID

func (cc *CheckCreate) SetID(i int64) *CheckCreate

SetID sets the "id" field.

func (*CheckCreate) SetName

func (cc *CheckCreate) SetName(s string) *CheckCreate

SetName sets the "name" field.

func (*CheckCreate) SetNillableConclusion

func (cc *CheckCreate) SetNillableConclusion(s *string) *CheckCreate

SetNillableConclusion sets the "conclusion" field if the given value is not nil.

func (*CheckCreate) SetPullRequestID

func (cc *CheckCreate) SetPullRequestID(i int) *CheckCreate

SetPullRequestID sets the "pull_request_id" field.

func (*CheckCreate) SetRepoID

func (cc *CheckCreate) SetRepoID(i int64) *CheckCreate

SetRepoID sets the "repo_id" field.

func (*CheckCreate) SetStatus

func (cc *CheckCreate) SetStatus(s string) *CheckCreate

SetStatus sets the "status" field.

type CheckCreateBulk

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

CheckCreateBulk is the builder for creating many Check entities in bulk.

func (*CheckCreateBulk) Exec

func (ccb *CheckCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CheckCreateBulk) ExecX

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

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

func (*CheckCreateBulk) OnConflict

func (ccb *CheckCreateBulk) OnConflict(opts ...sql.ConflictOption) *CheckUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Check.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.CheckUpsert) {
		SetRepoID(v+v).
	}).
	Exec(ctx)

func (*CheckCreateBulk) OnConflictColumns

func (ccb *CheckCreateBulk) OnConflictColumns(columns ...string) *CheckUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Check.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CheckCreateBulk) Save

func (ccb *CheckCreateBulk) Save(ctx context.Context) ([]*Check, error)

Save creates the Check entities in the database.

func (*CheckCreateBulk) SaveX

func (ccb *CheckCreateBulk) SaveX(ctx context.Context) []*Check

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

type CheckDelete

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

CheckDelete is the builder for deleting a Check entity.

func (*CheckDelete) Exec

func (cd *CheckDelete) Exec(ctx context.Context) (int, error)

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

func (*CheckDelete) ExecX

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

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

func (*CheckDelete) Where

func (cd *CheckDelete) Where(ps ...predicate.Check) *CheckDelete

Where appends a list predicates to the CheckDelete builder.

type CheckDeleteOne

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

CheckDeleteOne is the builder for deleting a single Check entity.

func (*CheckDeleteOne) Exec

func (cdo *CheckDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CheckDeleteOne) ExecX

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

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

func (*CheckDeleteOne) Where

func (cdo *CheckDeleteOne) Where(ps ...predicate.Check) *CheckDeleteOne

Where appends a list predicates to the CheckDelete builder.

type CheckGroupBy

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

CheckGroupBy is the group-by builder for Check entities.

func (*CheckGroupBy) Aggregate

func (cgb *CheckGroupBy) Aggregate(fns ...AggregateFunc) *CheckGroupBy

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

func (*CheckGroupBy) Bool

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

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

func (*CheckGroupBy) BoolX

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

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

func (*CheckGroupBy) Bools

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

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

func (*CheckGroupBy) BoolsX

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

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

func (*CheckGroupBy) Float64

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

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

func (*CheckGroupBy) Float64X

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

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

func (*CheckGroupBy) Float64s

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

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

func (*CheckGroupBy) Float64sX

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

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

func (*CheckGroupBy) Int

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

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

func (*CheckGroupBy) IntX

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

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

func (*CheckGroupBy) Ints

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

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

func (*CheckGroupBy) IntsX

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

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

func (*CheckGroupBy) Scan

func (cgb *CheckGroupBy) Scan(ctx context.Context, v any) error

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

func (*CheckGroupBy) ScanX

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

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

func (*CheckGroupBy) String

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

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

func (*CheckGroupBy) StringX

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

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

func (*CheckGroupBy) Strings

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

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

func (*CheckGroupBy) StringsX

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

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

type CheckMutation

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

CheckMutation represents an operation that mutates the Check nodes in the graph.

func (*CheckMutation) AddField

func (m *CheckMutation) 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 (*CheckMutation) AddPullRequestID

func (m *CheckMutation) AddPullRequestID(i int)

AddPullRequestID adds i to the "pull_request_id" field.

func (*CheckMutation) AddRepoID

func (m *CheckMutation) AddRepoID(i int64)

AddRepoID adds i to the "repo_id" field.

func (*CheckMutation) AddedEdges

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

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

func (*CheckMutation) AddedField

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

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

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

func (*CheckMutation) AddedIDs

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

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

func (*CheckMutation) AddedPullRequestID

func (m *CheckMutation) AddedPullRequestID() (r int, exists bool)

AddedPullRequestID returns the value that was added to the "pull_request_id" field in this mutation.

func (*CheckMutation) AddedRepoID

func (m *CheckMutation) AddedRepoID() (r int64, exists bool)

AddedRepoID returns the value that was added to the "repo_id" field in this mutation.

func (*CheckMutation) ClearConclusion

func (m *CheckMutation) ClearConclusion()

ClearConclusion clears the value of the "conclusion" field.

func (*CheckMutation) ClearEdge

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

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

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

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

func (*CheckMutation) ClearedFields

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

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

func (CheckMutation) Client

func (m CheckMutation) 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 (*CheckMutation) Conclusion

func (m *CheckMutation) Conclusion() (r string, exists bool)

Conclusion returns the value of the "conclusion" field in the mutation.

func (*CheckMutation) ConclusionCleared

func (m *CheckMutation) ConclusionCleared() bool

ConclusionCleared returns if the "conclusion" field was cleared in this mutation.

func (*CheckMutation) EdgeCleared

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

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

func (*CheckMutation) Field

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

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

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

func (*CheckMutation) Fields

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

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

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

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

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

func (*CheckMutation) OldConclusion

func (m *CheckMutation) OldConclusion(ctx context.Context) (v string, err error)

OldConclusion returns the old "conclusion" field's value of the Check entity. If the Check 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 (*CheckMutation) OldField

func (m *CheckMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CheckMutation) OldName

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

OldName returns the old "name" field's value of the Check entity. If the Check 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 (*CheckMutation) OldPullRequestID

func (m *CheckMutation) OldPullRequestID(ctx context.Context) (v int, err error)

OldPullRequestID returns the old "pull_request_id" field's value of the Check entity. If the Check 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 (*CheckMutation) OldRepoID

func (m *CheckMutation) OldRepoID(ctx context.Context) (v int64, err error)

OldRepoID returns the old "repo_id" field's value of the Check entity. If the Check 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 (*CheckMutation) OldStatus

func (m *CheckMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Check entity. If the Check 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 (*CheckMutation) Op

func (m *CheckMutation) Op() Op

Op returns the operation name.

func (*CheckMutation) PullRequestID

func (m *CheckMutation) PullRequestID() (r int, exists bool)

PullRequestID returns the value of the "pull_request_id" field in the mutation.

func (*CheckMutation) RemovedEdges

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

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

func (*CheckMutation) RemovedIDs

func (m *CheckMutation) 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 (*CheckMutation) RepoID

func (m *CheckMutation) RepoID() (r int64, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*CheckMutation) ResetConclusion

func (m *CheckMutation) ResetConclusion()

ResetConclusion resets all changes to the "conclusion" field.

func (*CheckMutation) ResetEdge

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

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

func (m *CheckMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CheckMutation) ResetPullRequestID

func (m *CheckMutation) ResetPullRequestID()

ResetPullRequestID resets all changes to the "pull_request_id" field.

func (*CheckMutation) ResetRepoID

func (m *CheckMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*CheckMutation) ResetStatus

func (m *CheckMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*CheckMutation) SetConclusion

func (m *CheckMutation) SetConclusion(s string)

SetConclusion sets the "conclusion" field.

func (*CheckMutation) SetField

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

func (m *CheckMutation) SetID(id int64)

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

func (*CheckMutation) SetName

func (m *CheckMutation) SetName(s string)

SetName sets the "name" field.

func (*CheckMutation) SetOp

func (m *CheckMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CheckMutation) SetPullRequestID

func (m *CheckMutation) SetPullRequestID(i int)

SetPullRequestID sets the "pull_request_id" field.

func (*CheckMutation) SetRepoID

func (m *CheckMutation) SetRepoID(i int64)

SetRepoID sets the "repo_id" field.

func (*CheckMutation) SetStatus

func (m *CheckMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*CheckMutation) Status

func (m *CheckMutation) Status() (r string, exists bool)

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

func (CheckMutation) Tx

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

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

func (*CheckMutation) Type

func (m *CheckMutation) Type() string

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

func (*CheckMutation) Where

func (m *CheckMutation) Where(ps ...predicate.Check)

Where appends a list predicates to the CheckMutation builder.

func (*CheckMutation) WhereP

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

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

type CheckQuery

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

CheckQuery is the builder for querying Check entities.

func (*CheckQuery) Aggregate

func (cq *CheckQuery) Aggregate(fns ...AggregateFunc) *CheckSelect

Aggregate returns a CheckSelect configured with the given aggregations.

func (*CheckQuery) All

func (cq *CheckQuery) All(ctx context.Context) ([]*Check, error)

All executes the query and returns a list of Checks.

func (*CheckQuery) AllX

func (cq *CheckQuery) AllX(ctx context.Context) []*Check

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

func (*CheckQuery) Clone

func (cq *CheckQuery) Clone() *CheckQuery

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

func (*CheckQuery) Count

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

Count returns the count of the given query.

func (*CheckQuery) CountX

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

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

func (*CheckQuery) Exist

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

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

func (*CheckQuery) ExistX

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

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

func (*CheckQuery) First

func (cq *CheckQuery) First(ctx context.Context) (*Check, error)

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

func (*CheckQuery) FirstID

func (cq *CheckQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*CheckQuery) FirstIDX

func (cq *CheckQuery) FirstIDX(ctx context.Context) int64

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

func (*CheckQuery) FirstX

func (cq *CheckQuery) FirstX(ctx context.Context) *Check

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

func (*CheckQuery) GroupBy

func (cq *CheckQuery) GroupBy(field string, fields ...string) *CheckGroupBy

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 {
	RepoID int64 `json:"repo_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Check.Query().
	GroupBy(check.FieldRepoID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CheckQuery) IDs

func (cq *CheckQuery) IDs(ctx context.Context) (ids []int64, err error)

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

func (*CheckQuery) IDsX

func (cq *CheckQuery) IDsX(ctx context.Context) []int64

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

func (*CheckQuery) Limit

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

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

func (*CheckQuery) Offset

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

Offset to start from.

func (*CheckQuery) Only

func (cq *CheckQuery) Only(ctx context.Context) (*Check, error)

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

func (*CheckQuery) OnlyID

func (cq *CheckQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*CheckQuery) OnlyIDX

func (cq *CheckQuery) OnlyIDX(ctx context.Context) int64

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

func (*CheckQuery) OnlyX

func (cq *CheckQuery) OnlyX(ctx context.Context) *Check

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

func (*CheckQuery) Order

func (cq *CheckQuery) Order(o ...check.OrderOption) *CheckQuery

Order specifies how the records should be ordered.

func (*CheckQuery) Select

func (cq *CheckQuery) Select(fields ...string) *CheckSelect

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 {
	RepoID int64 `json:"repo_id,omitempty"`
}

client.Check.Query().
	Select(check.FieldRepoID).
	Scan(ctx, &v)

func (*CheckQuery) Unique

func (cq *CheckQuery) Unique(unique bool) *CheckQuery

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

func (cq *CheckQuery) Where(ps ...predicate.Check) *CheckQuery

Where adds a new predicate for the CheckQuery builder.

type CheckSelect

type CheckSelect struct {
	*CheckQuery
	// contains filtered or unexported fields
}

CheckSelect is the builder for selecting fields of Check entities.

func (*CheckSelect) Aggregate

func (cs *CheckSelect) Aggregate(fns ...AggregateFunc) *CheckSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CheckSelect) Bool

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

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

func (*CheckSelect) BoolX

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

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

func (*CheckSelect) Bools

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

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

func (*CheckSelect) BoolsX

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

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

func (*CheckSelect) Float64

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

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

func (*CheckSelect) Float64X

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

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

func (*CheckSelect) Float64s

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

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

func (*CheckSelect) Float64sX

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

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

func (*CheckSelect) Int

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

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

func (*CheckSelect) IntX

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

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

func (*CheckSelect) Ints

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

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

func (*CheckSelect) IntsX

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

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

func (*CheckSelect) Scan

func (cs *CheckSelect) Scan(ctx context.Context, v any) error

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

func (*CheckSelect) ScanX

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

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

func (*CheckSelect) String

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

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

func (*CheckSelect) StringX

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

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

func (*CheckSelect) Strings

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

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

func (*CheckSelect) StringsX

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

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

type CheckUpdate

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

CheckUpdate is the builder for updating Check entities.

func (*CheckUpdate) AddPullRequestID

func (cu *CheckUpdate) AddPullRequestID(i int) *CheckUpdate

AddPullRequestID adds i to the "pull_request_id" field.

func (*CheckUpdate) AddRepoID

func (cu *CheckUpdate) AddRepoID(i int64) *CheckUpdate

AddRepoID adds i to the "repo_id" field.

func (*CheckUpdate) ClearConclusion

func (cu *CheckUpdate) ClearConclusion() *CheckUpdate

ClearConclusion clears the value of the "conclusion" field.

func (*CheckUpdate) Exec

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

Exec executes the query.

func (*CheckUpdate) ExecX

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

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

func (*CheckUpdate) Mutation

func (cu *CheckUpdate) Mutation() *CheckMutation

Mutation returns the CheckMutation object of the builder.

func (*CheckUpdate) Save

func (cu *CheckUpdate) Save(ctx context.Context) (int, error)

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

func (*CheckUpdate) SaveX

func (cu *CheckUpdate) SaveX(ctx context.Context) int

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

func (*CheckUpdate) SetConclusion

func (cu *CheckUpdate) SetConclusion(s string) *CheckUpdate

SetConclusion sets the "conclusion" field.

func (*CheckUpdate) SetName

func (cu *CheckUpdate) SetName(s string) *CheckUpdate

SetName sets the "name" field.

func (*CheckUpdate) SetNillableConclusion

func (cu *CheckUpdate) SetNillableConclusion(s *string) *CheckUpdate

SetNillableConclusion sets the "conclusion" field if the given value is not nil.

func (*CheckUpdate) SetNillableName

func (cu *CheckUpdate) SetNillableName(s *string) *CheckUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*CheckUpdate) SetNillablePullRequestID

func (cu *CheckUpdate) SetNillablePullRequestID(i *int) *CheckUpdate

SetNillablePullRequestID sets the "pull_request_id" field if the given value is not nil.

func (*CheckUpdate) SetNillableRepoID

func (cu *CheckUpdate) SetNillableRepoID(i *int64) *CheckUpdate

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*CheckUpdate) SetNillableStatus

func (cu *CheckUpdate) SetNillableStatus(s *string) *CheckUpdate

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

func (*CheckUpdate) SetPullRequestID

func (cu *CheckUpdate) SetPullRequestID(i int) *CheckUpdate

SetPullRequestID sets the "pull_request_id" field.

func (*CheckUpdate) SetRepoID

func (cu *CheckUpdate) SetRepoID(i int64) *CheckUpdate

SetRepoID sets the "repo_id" field.

func (*CheckUpdate) SetStatus

func (cu *CheckUpdate) SetStatus(s string) *CheckUpdate

SetStatus sets the "status" field.

func (*CheckUpdate) Where

func (cu *CheckUpdate) Where(ps ...predicate.Check) *CheckUpdate

Where appends a list predicates to the CheckUpdate builder.

type CheckUpdateOne

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

CheckUpdateOne is the builder for updating a single Check entity.

func (*CheckUpdateOne) AddPullRequestID

func (cuo *CheckUpdateOne) AddPullRequestID(i int) *CheckUpdateOne

AddPullRequestID adds i to the "pull_request_id" field.

func (*CheckUpdateOne) AddRepoID

func (cuo *CheckUpdateOne) AddRepoID(i int64) *CheckUpdateOne

AddRepoID adds i to the "repo_id" field.

func (*CheckUpdateOne) ClearConclusion

func (cuo *CheckUpdateOne) ClearConclusion() *CheckUpdateOne

ClearConclusion clears the value of the "conclusion" field.

func (*CheckUpdateOne) Exec

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

Exec executes the query on the entity.

func (*CheckUpdateOne) ExecX

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

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

func (*CheckUpdateOne) Mutation

func (cuo *CheckUpdateOne) Mutation() *CheckMutation

Mutation returns the CheckMutation object of the builder.

func (*CheckUpdateOne) Save

func (cuo *CheckUpdateOne) Save(ctx context.Context) (*Check, error)

Save executes the query and returns the updated Check entity.

func (*CheckUpdateOne) SaveX

func (cuo *CheckUpdateOne) SaveX(ctx context.Context) *Check

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

func (*CheckUpdateOne) Select

func (cuo *CheckUpdateOne) Select(field string, fields ...string) *CheckUpdateOne

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

func (*CheckUpdateOne) SetConclusion

func (cuo *CheckUpdateOne) SetConclusion(s string) *CheckUpdateOne

SetConclusion sets the "conclusion" field.

func (*CheckUpdateOne) SetName

func (cuo *CheckUpdateOne) SetName(s string) *CheckUpdateOne

SetName sets the "name" field.

func (*CheckUpdateOne) SetNillableConclusion

func (cuo *CheckUpdateOne) SetNillableConclusion(s *string) *CheckUpdateOne

SetNillableConclusion sets the "conclusion" field if the given value is not nil.

func (*CheckUpdateOne) SetNillableName

func (cuo *CheckUpdateOne) SetNillableName(s *string) *CheckUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*CheckUpdateOne) SetNillablePullRequestID

func (cuo *CheckUpdateOne) SetNillablePullRequestID(i *int) *CheckUpdateOne

SetNillablePullRequestID sets the "pull_request_id" field if the given value is not nil.

func (*CheckUpdateOne) SetNillableRepoID

func (cuo *CheckUpdateOne) SetNillableRepoID(i *int64) *CheckUpdateOne

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*CheckUpdateOne) SetNillableStatus

func (cuo *CheckUpdateOne) SetNillableStatus(s *string) *CheckUpdateOne

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

func (*CheckUpdateOne) SetPullRequestID

func (cuo *CheckUpdateOne) SetPullRequestID(i int) *CheckUpdateOne

SetPullRequestID sets the "pull_request_id" field.

func (*CheckUpdateOne) SetRepoID

func (cuo *CheckUpdateOne) SetRepoID(i int64) *CheckUpdateOne

SetRepoID sets the "repo_id" field.

func (*CheckUpdateOne) SetStatus

func (cuo *CheckUpdateOne) SetStatus(s string) *CheckUpdateOne

SetStatus sets the "status" field.

func (*CheckUpdateOne) Where

func (cuo *CheckUpdateOne) Where(ps ...predicate.Check) *CheckUpdateOne

Where appends a list predicates to the CheckUpdate builder.

type CheckUpsert

type CheckUpsert struct {
	*sql.UpdateSet
}

CheckUpsert is the "OnConflict" setter.

func (*CheckUpsert) AddPullRequestID

func (u *CheckUpsert) AddPullRequestID(v int) *CheckUpsert

AddPullRequestID adds v to the "pull_request_id" field.

func (*CheckUpsert) AddRepoID

func (u *CheckUpsert) AddRepoID(v int64) *CheckUpsert

AddRepoID adds v to the "repo_id" field.

func (*CheckUpsert) ClearConclusion

func (u *CheckUpsert) ClearConclusion() *CheckUpsert

ClearConclusion clears the value of the "conclusion" field.

func (*CheckUpsert) SetConclusion

func (u *CheckUpsert) SetConclusion(v string) *CheckUpsert

SetConclusion sets the "conclusion" field.

func (*CheckUpsert) SetName

func (u *CheckUpsert) SetName(v string) *CheckUpsert

SetName sets the "name" field.

func (*CheckUpsert) SetPullRequestID

func (u *CheckUpsert) SetPullRequestID(v int) *CheckUpsert

SetPullRequestID sets the "pull_request_id" field.

func (*CheckUpsert) SetRepoID

func (u *CheckUpsert) SetRepoID(v int64) *CheckUpsert

SetRepoID sets the "repo_id" field.

func (*CheckUpsert) SetStatus

func (u *CheckUpsert) SetStatus(v string) *CheckUpsert

SetStatus sets the "status" field.

func (*CheckUpsert) UpdateConclusion

func (u *CheckUpsert) UpdateConclusion() *CheckUpsert

UpdateConclusion sets the "conclusion" field to the value that was provided on create.

func (*CheckUpsert) UpdateName

func (u *CheckUpsert) UpdateName() *CheckUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*CheckUpsert) UpdatePullRequestID

func (u *CheckUpsert) UpdatePullRequestID() *CheckUpsert

UpdatePullRequestID sets the "pull_request_id" field to the value that was provided on create.

func (*CheckUpsert) UpdateRepoID

func (u *CheckUpsert) UpdateRepoID() *CheckUpsert

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

func (*CheckUpsert) UpdateStatus

func (u *CheckUpsert) UpdateStatus() *CheckUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

type CheckUpsertBulk

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

CheckUpsertBulk is the builder for "upsert"-ing a bulk of Check nodes.

func (*CheckUpsertBulk) AddPullRequestID

func (u *CheckUpsertBulk) AddPullRequestID(v int) *CheckUpsertBulk

AddPullRequestID adds v to the "pull_request_id" field.

func (*CheckUpsertBulk) AddRepoID

func (u *CheckUpsertBulk) AddRepoID(v int64) *CheckUpsertBulk

AddRepoID adds v to the "repo_id" field.

func (*CheckUpsertBulk) ClearConclusion

func (u *CheckUpsertBulk) ClearConclusion() *CheckUpsertBulk

ClearConclusion clears the value of the "conclusion" field.

func (*CheckUpsertBulk) DoNothing

func (u *CheckUpsertBulk) DoNothing() *CheckUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CheckUpsertBulk) Exec

func (u *CheckUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CheckUpsertBulk) ExecX

func (u *CheckUpsertBulk) ExecX(ctx context.Context)

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

func (*CheckUpsertBulk) Ignore

func (u *CheckUpsertBulk) Ignore() *CheckUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Check.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CheckUpsertBulk) SetConclusion

func (u *CheckUpsertBulk) SetConclusion(v string) *CheckUpsertBulk

SetConclusion sets the "conclusion" field.

func (*CheckUpsertBulk) SetName

func (u *CheckUpsertBulk) SetName(v string) *CheckUpsertBulk

SetName sets the "name" field.

func (*CheckUpsertBulk) SetPullRequestID

func (u *CheckUpsertBulk) SetPullRequestID(v int) *CheckUpsertBulk

SetPullRequestID sets the "pull_request_id" field.

func (*CheckUpsertBulk) SetRepoID

func (u *CheckUpsertBulk) SetRepoID(v int64) *CheckUpsertBulk

SetRepoID sets the "repo_id" field.

func (*CheckUpsertBulk) SetStatus

func (u *CheckUpsertBulk) SetStatus(v string) *CheckUpsertBulk

SetStatus sets the "status" field.

func (*CheckUpsertBulk) Update

func (u *CheckUpsertBulk) Update(set func(*CheckUpsert)) *CheckUpsertBulk

Update allows overriding fields `UPDATE` values. See the CheckCreateBulk.OnConflict documentation for more info.

func (*CheckUpsertBulk) UpdateConclusion

func (u *CheckUpsertBulk) UpdateConclusion() *CheckUpsertBulk

UpdateConclusion sets the "conclusion" field to the value that was provided on create.

func (*CheckUpsertBulk) UpdateName

func (u *CheckUpsertBulk) UpdateName() *CheckUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*CheckUpsertBulk) UpdateNewValues

func (u *CheckUpsertBulk) UpdateNewValues() *CheckUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Check.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(check.FieldID)
		}),
	).
	Exec(ctx)

func (*CheckUpsertBulk) UpdatePullRequestID

func (u *CheckUpsertBulk) UpdatePullRequestID() *CheckUpsertBulk

UpdatePullRequestID sets the "pull_request_id" field to the value that was provided on create.

func (*CheckUpsertBulk) UpdateRepoID

func (u *CheckUpsertBulk) UpdateRepoID() *CheckUpsertBulk

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

func (*CheckUpsertBulk) UpdateStatus

func (u *CheckUpsertBulk) UpdateStatus() *CheckUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

type CheckUpsertOne

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

CheckUpsertOne is the builder for "upsert"-ing

one Check node.

func (*CheckUpsertOne) AddPullRequestID

func (u *CheckUpsertOne) AddPullRequestID(v int) *CheckUpsertOne

AddPullRequestID adds v to the "pull_request_id" field.

func (*CheckUpsertOne) AddRepoID

func (u *CheckUpsertOne) AddRepoID(v int64) *CheckUpsertOne

AddRepoID adds v to the "repo_id" field.

func (*CheckUpsertOne) ClearConclusion

func (u *CheckUpsertOne) ClearConclusion() *CheckUpsertOne

ClearConclusion clears the value of the "conclusion" field.

func (*CheckUpsertOne) DoNothing

func (u *CheckUpsertOne) DoNothing() *CheckUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CheckUpsertOne) Exec

func (u *CheckUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*CheckUpsertOne) ExecX

func (u *CheckUpsertOne) ExecX(ctx context.Context)

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

func (*CheckUpsertOne) ID

func (u *CheckUpsertOne) ID(ctx context.Context) (id int64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CheckUpsertOne) IDX

func (u *CheckUpsertOne) IDX(ctx context.Context) int64

IDX is like ID, but panics if an error occurs.

func (*CheckUpsertOne) Ignore

func (u *CheckUpsertOne) Ignore() *CheckUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Check.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CheckUpsertOne) SetConclusion

func (u *CheckUpsertOne) SetConclusion(v string) *CheckUpsertOne

SetConclusion sets the "conclusion" field.

func (*CheckUpsertOne) SetName

func (u *CheckUpsertOne) SetName(v string) *CheckUpsertOne

SetName sets the "name" field.

func (*CheckUpsertOne) SetPullRequestID

func (u *CheckUpsertOne) SetPullRequestID(v int) *CheckUpsertOne

SetPullRequestID sets the "pull_request_id" field.

func (*CheckUpsertOne) SetRepoID

func (u *CheckUpsertOne) SetRepoID(v int64) *CheckUpsertOne

SetRepoID sets the "repo_id" field.

func (*CheckUpsertOne) SetStatus

func (u *CheckUpsertOne) SetStatus(v string) *CheckUpsertOne

SetStatus sets the "status" field.

func (*CheckUpsertOne) Update

func (u *CheckUpsertOne) Update(set func(*CheckUpsert)) *CheckUpsertOne

Update allows overriding fields `UPDATE` values. See the CheckCreate.OnConflict documentation for more info.

func (*CheckUpsertOne) UpdateConclusion

func (u *CheckUpsertOne) UpdateConclusion() *CheckUpsertOne

UpdateConclusion sets the "conclusion" field to the value that was provided on create.

func (*CheckUpsertOne) UpdateName

func (u *CheckUpsertOne) UpdateName() *CheckUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*CheckUpsertOne) UpdateNewValues

func (u *CheckUpsertOne) UpdateNewValues() *CheckUpsertOne

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.Check.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(check.FieldID)
		}),
	).
	Exec(ctx)

func (*CheckUpsertOne) UpdatePullRequestID

func (u *CheckUpsertOne) UpdatePullRequestID() *CheckUpsertOne

UpdatePullRequestID sets the "pull_request_id" field to the value that was provided on create.

func (*CheckUpsertOne) UpdateRepoID

func (u *CheckUpsertOne) UpdateRepoID() *CheckUpsertOne

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

func (*CheckUpsertOne) UpdateStatus

func (u *CheckUpsertOne) UpdateStatus() *CheckUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

type Checks

type Checks []*Check

Checks is a parsable slice of Check.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Check is the client for interacting with the Check builders.
	Check *CheckClient
	// GPTDialog is the client for interacting with the GPTDialog builders.
	GPTDialog *GPTDialogClient
	// GitCommit is the client for interacting with the GitCommit builders.
	GitCommit *GitCommitClient
	// LastChannelMessage is the client for interacting with the LastChannelMessage builders.
	LastChannelMessage *LastChannelMessageClient
	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// PRNotification is the client for interacting with the PRNotification builders.
	PRNotification *PRNotificationClient
	// Repository is the client for interacting with the Repository builders.
	Repository *RepositoryClient
	// TelegramChannelState is the client for interacting with the TelegramChannelState builders.
	TelegramChannelState *TelegramChannelStateClient
	// TelegramSession is the client for interacting with the TelegramSession builders.
	TelegramSession *TelegramSessionClient
	// TelegramUserState is the client for interacting with the TelegramUserState builders.
	TelegramUserState *TelegramUserStateClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Check.
	Query().
	Count(ctx)

func (*Client) Intercept

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

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

func (*Client) Mutate

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

Mutate implements the ent.Mutator interface.

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type GPTDialog

type GPTDialog struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Peer ID
	PeerID string `json:"peer_id,omitempty"`
	// Telegram message id of prompt message.
	PromptMsgID int `json:"prompt_msg_id,omitempty"`
	// Prompt message.
	PromptMsg string `json:"prompt_msg,omitempty"`
	// Telegram message id of sent message.
	GptMsgID int `json:"gpt_msg_id,omitempty"`
	// AI-generated message. Does not include prompt.
	GptMsg string `json:"gpt_msg,omitempty"`
	// Telegram thread's top message id.
	ThreadTopMsgID int `json:"thread_top_msg_id,omitempty"`
	// Message generation time. To simplify cleanup.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

GPTDialog is the model entity for the GPTDialog schema.

func (*GPTDialog) String

func (gd *GPTDialog) String() string

String implements the fmt.Stringer.

func (*GPTDialog) Unwrap

func (gd *GPTDialog) Unwrap() *GPTDialog

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

func (gd *GPTDialog) Update() *GPTDialogUpdateOne

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

func (*GPTDialog) Value

func (gd *GPTDialog) Value(name string) (ent.Value, error)

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

type GPTDialogClient

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

GPTDialogClient is a client for the GPTDialog schema.

func NewGPTDialogClient

func NewGPTDialogClient(c config) *GPTDialogClient

NewGPTDialogClient returns a client for the GPTDialog from the given config.

func (*GPTDialogClient) Create

func (c *GPTDialogClient) Create() *GPTDialogCreate

Create returns a builder for creating a GPTDialog entity.

func (*GPTDialogClient) CreateBulk

func (c *GPTDialogClient) CreateBulk(builders ...*GPTDialogCreate) *GPTDialogCreateBulk

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

func (*GPTDialogClient) Delete

func (c *GPTDialogClient) Delete() *GPTDialogDelete

Delete returns a delete builder for GPTDialog.

func (*GPTDialogClient) DeleteOne

func (c *GPTDialogClient) DeleteOne(gd *GPTDialog) *GPTDialogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GPTDialogClient) DeleteOneID

func (c *GPTDialogClient) DeleteOneID(id int) *GPTDialogDeleteOne

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

func (*GPTDialogClient) Get

func (c *GPTDialogClient) Get(ctx context.Context, id int) (*GPTDialog, error)

Get returns a GPTDialog entity by its id.

func (*GPTDialogClient) GetX

func (c *GPTDialogClient) GetX(ctx context.Context, id int) *GPTDialog

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

func (*GPTDialogClient) Hooks

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

Hooks returns the client hooks.

func (*GPTDialogClient) Intercept

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

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

func (*GPTDialogClient) Interceptors

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

Interceptors returns the client interceptors.

func (*GPTDialogClient) MapCreateBulk

func (c *GPTDialogClient) MapCreateBulk(slice any, setFunc func(*GPTDialogCreate, int)) *GPTDialogCreateBulk

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 (*GPTDialogClient) Query

func (c *GPTDialogClient) Query() *GPTDialogQuery

Query returns a query builder for GPTDialog.

func (*GPTDialogClient) Update

func (c *GPTDialogClient) Update() *GPTDialogUpdate

Update returns an update builder for GPTDialog.

func (*GPTDialogClient) UpdateOne

func (c *GPTDialogClient) UpdateOne(gd *GPTDialog) *GPTDialogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GPTDialogClient) UpdateOneID

func (c *GPTDialogClient) UpdateOneID(id int) *GPTDialogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GPTDialogClient) Use

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

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

type GPTDialogCreate

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

GPTDialogCreate is the builder for creating a GPTDialog entity.

func (*GPTDialogCreate) Exec

func (gdc *GPTDialogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GPTDialogCreate) ExecX

func (gdc *GPTDialogCreate) ExecX(ctx context.Context)

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

func (*GPTDialogCreate) Mutation

func (gdc *GPTDialogCreate) Mutation() *GPTDialogMutation

Mutation returns the GPTDialogMutation object of the builder.

func (*GPTDialogCreate) OnConflict

func (gdc *GPTDialogCreate) OnConflict(opts ...sql.ConflictOption) *GPTDialogUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GPTDialog.Create().
	SetPeerID(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.GPTDialogUpsert) {
		SetPeerID(v+v).
	}).
	Exec(ctx)

func (*GPTDialogCreate) OnConflictColumns

func (gdc *GPTDialogCreate) OnConflictColumns(columns ...string) *GPTDialogUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GPTDialog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GPTDialogCreate) Save

func (gdc *GPTDialogCreate) Save(ctx context.Context) (*GPTDialog, error)

Save creates the GPTDialog in the database.

func (*GPTDialogCreate) SaveX

func (gdc *GPTDialogCreate) SaveX(ctx context.Context) *GPTDialog

SaveX calls Save and panics if Save returns an error.

func (*GPTDialogCreate) SetCreatedAt

func (gdc *GPTDialogCreate) SetCreatedAt(t time.Time) *GPTDialogCreate

SetCreatedAt sets the "created_at" field.

func (*GPTDialogCreate) SetGptMsg

func (gdc *GPTDialogCreate) SetGptMsg(s string) *GPTDialogCreate

SetGptMsg sets the "gpt_msg" field.

func (*GPTDialogCreate) SetGptMsgID

func (gdc *GPTDialogCreate) SetGptMsgID(i int) *GPTDialogCreate

SetGptMsgID sets the "gpt_msg_id" field.

func (*GPTDialogCreate) SetNillableCreatedAt

func (gdc *GPTDialogCreate) SetNillableCreatedAt(t *time.Time) *GPTDialogCreate

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

func (*GPTDialogCreate) SetNillableThreadTopMsgID

func (gdc *GPTDialogCreate) SetNillableThreadTopMsgID(i *int) *GPTDialogCreate

SetNillableThreadTopMsgID sets the "thread_top_msg_id" field if the given value is not nil.

func (*GPTDialogCreate) SetPeerID

func (gdc *GPTDialogCreate) SetPeerID(s string) *GPTDialogCreate

SetPeerID sets the "peer_id" field.

func (*GPTDialogCreate) SetPromptMsg

func (gdc *GPTDialogCreate) SetPromptMsg(s string) *GPTDialogCreate

SetPromptMsg sets the "prompt_msg" field.

func (*GPTDialogCreate) SetPromptMsgID

func (gdc *GPTDialogCreate) SetPromptMsgID(i int) *GPTDialogCreate

SetPromptMsgID sets the "prompt_msg_id" field.

func (*GPTDialogCreate) SetThreadTopMsgID

func (gdc *GPTDialogCreate) SetThreadTopMsgID(i int) *GPTDialogCreate

SetThreadTopMsgID sets the "thread_top_msg_id" field.

type GPTDialogCreateBulk

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

GPTDialogCreateBulk is the builder for creating many GPTDialog entities in bulk.

func (*GPTDialogCreateBulk) Exec

func (gdcb *GPTDialogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GPTDialogCreateBulk) ExecX

func (gdcb *GPTDialogCreateBulk) ExecX(ctx context.Context)

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

func (*GPTDialogCreateBulk) OnConflict

func (gdcb *GPTDialogCreateBulk) OnConflict(opts ...sql.ConflictOption) *GPTDialogUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GPTDialog.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.GPTDialogUpsert) {
		SetPeerID(v+v).
	}).
	Exec(ctx)

func (*GPTDialogCreateBulk) OnConflictColumns

func (gdcb *GPTDialogCreateBulk) OnConflictColumns(columns ...string) *GPTDialogUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GPTDialog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GPTDialogCreateBulk) Save

func (gdcb *GPTDialogCreateBulk) Save(ctx context.Context) ([]*GPTDialog, error)

Save creates the GPTDialog entities in the database.

func (*GPTDialogCreateBulk) SaveX

func (gdcb *GPTDialogCreateBulk) SaveX(ctx context.Context) []*GPTDialog

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

type GPTDialogDelete

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

GPTDialogDelete is the builder for deleting a GPTDialog entity.

func (*GPTDialogDelete) Exec

func (gdd *GPTDialogDelete) Exec(ctx context.Context) (int, error)

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

func (*GPTDialogDelete) ExecX

func (gdd *GPTDialogDelete) ExecX(ctx context.Context) int

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

func (*GPTDialogDelete) Where

Where appends a list predicates to the GPTDialogDelete builder.

type GPTDialogDeleteOne

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

GPTDialogDeleteOne is the builder for deleting a single GPTDialog entity.

func (*GPTDialogDeleteOne) Exec

func (gddo *GPTDialogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GPTDialogDeleteOne) ExecX

func (gddo *GPTDialogDeleteOne) ExecX(ctx context.Context)

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

func (*GPTDialogDeleteOne) Where

Where appends a list predicates to the GPTDialogDelete builder.

type GPTDialogGroupBy

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

GPTDialogGroupBy is the group-by builder for GPTDialog entities.

func (*GPTDialogGroupBy) Aggregate

func (gdgb *GPTDialogGroupBy) Aggregate(fns ...AggregateFunc) *GPTDialogGroupBy

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

func (*GPTDialogGroupBy) Bool

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

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

func (*GPTDialogGroupBy) BoolX

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

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

func (*GPTDialogGroupBy) Bools

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

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

func (*GPTDialogGroupBy) BoolsX

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

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

func (*GPTDialogGroupBy) Float64

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

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

func (*GPTDialogGroupBy) Float64X

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

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

func (*GPTDialogGroupBy) Float64s

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

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

func (*GPTDialogGroupBy) Float64sX

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

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

func (*GPTDialogGroupBy) Int

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

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

func (*GPTDialogGroupBy) IntX

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

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

func (*GPTDialogGroupBy) Ints

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

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

func (*GPTDialogGroupBy) IntsX

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

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

func (*GPTDialogGroupBy) Scan

func (gdgb *GPTDialogGroupBy) Scan(ctx context.Context, v any) error

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

func (*GPTDialogGroupBy) ScanX

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

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

func (*GPTDialogGroupBy) String

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

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

func (*GPTDialogGroupBy) StringX

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

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

func (*GPTDialogGroupBy) Strings

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

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

func (*GPTDialogGroupBy) StringsX

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

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

type GPTDialogMutation

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

GPTDialogMutation represents an operation that mutates the GPTDialog nodes in the graph.

func (*GPTDialogMutation) AddField

func (m *GPTDialogMutation) 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 (*GPTDialogMutation) AddGptMsgID

func (m *GPTDialogMutation) AddGptMsgID(i int)

AddGptMsgID adds i to the "gpt_msg_id" field.

func (*GPTDialogMutation) AddPromptMsgID

func (m *GPTDialogMutation) AddPromptMsgID(i int)

AddPromptMsgID adds i to the "prompt_msg_id" field.

func (*GPTDialogMutation) AddThreadTopMsgID

func (m *GPTDialogMutation) AddThreadTopMsgID(i int)

AddThreadTopMsgID adds i to the "thread_top_msg_id" field.

func (*GPTDialogMutation) AddedEdges

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

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

func (*GPTDialogMutation) AddedField

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

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

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

func (*GPTDialogMutation) AddedGptMsgID

func (m *GPTDialogMutation) AddedGptMsgID() (r int, exists bool)

AddedGptMsgID returns the value that was added to the "gpt_msg_id" field in this mutation.

func (*GPTDialogMutation) AddedIDs

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

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

func (*GPTDialogMutation) AddedPromptMsgID

func (m *GPTDialogMutation) AddedPromptMsgID() (r int, exists bool)

AddedPromptMsgID returns the value that was added to the "prompt_msg_id" field in this mutation.

func (*GPTDialogMutation) AddedThreadTopMsgID

func (m *GPTDialogMutation) AddedThreadTopMsgID() (r int, exists bool)

AddedThreadTopMsgID returns the value that was added to the "thread_top_msg_id" field in this mutation.

func (*GPTDialogMutation) ClearEdge

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

func (m *GPTDialogMutation) 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 (*GPTDialogMutation) ClearThreadTopMsgID

func (m *GPTDialogMutation) ClearThreadTopMsgID()

ClearThreadTopMsgID clears the value of the "thread_top_msg_id" field.

func (*GPTDialogMutation) ClearedEdges

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

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

func (*GPTDialogMutation) ClearedFields

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

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

func (GPTDialogMutation) Client

func (m GPTDialogMutation) 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 (*GPTDialogMutation) CreatedAt

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

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

func (*GPTDialogMutation) EdgeCleared

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

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

func (*GPTDialogMutation) Field

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

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

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

func (*GPTDialogMutation) Fields

func (m *GPTDialogMutation) 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 (*GPTDialogMutation) GptMsg

func (m *GPTDialogMutation) GptMsg() (r string, exists bool)

GptMsg returns the value of the "gpt_msg" field in the mutation.

func (*GPTDialogMutation) GptMsgID

func (m *GPTDialogMutation) GptMsgID() (r int, exists bool)

GptMsgID returns the value of the "gpt_msg_id" field in the mutation.

func (*GPTDialogMutation) ID

func (m *GPTDialogMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*GPTDialogMutation) IDs

func (m *GPTDialogMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*GPTDialogMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the GPTDialog entity. If the GPTDialog 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 (*GPTDialogMutation) OldField

func (m *GPTDialogMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*GPTDialogMutation) OldGptMsg

func (m *GPTDialogMutation) OldGptMsg(ctx context.Context) (v string, err error)

OldGptMsg returns the old "gpt_msg" field's value of the GPTDialog entity. If the GPTDialog 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 (*GPTDialogMutation) OldGptMsgID

func (m *GPTDialogMutation) OldGptMsgID(ctx context.Context) (v int, err error)

OldGptMsgID returns the old "gpt_msg_id" field's value of the GPTDialog entity. If the GPTDialog 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 (*GPTDialogMutation) OldPeerID

func (m *GPTDialogMutation) OldPeerID(ctx context.Context) (v string, err error)

OldPeerID returns the old "peer_id" field's value of the GPTDialog entity. If the GPTDialog 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 (*GPTDialogMutation) OldPromptMsg

func (m *GPTDialogMutation) OldPromptMsg(ctx context.Context) (v string, err error)

OldPromptMsg returns the old "prompt_msg" field's value of the GPTDialog entity. If the GPTDialog 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 (*GPTDialogMutation) OldPromptMsgID

func (m *GPTDialogMutation) OldPromptMsgID(ctx context.Context) (v int, err error)

OldPromptMsgID returns the old "prompt_msg_id" field's value of the GPTDialog entity. If the GPTDialog 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 (*GPTDialogMutation) OldThreadTopMsgID

func (m *GPTDialogMutation) OldThreadTopMsgID(ctx context.Context) (v int, err error)

OldThreadTopMsgID returns the old "thread_top_msg_id" field's value of the GPTDialog entity. If the GPTDialog 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 (*GPTDialogMutation) Op

func (m *GPTDialogMutation) Op() Op

Op returns the operation name.

func (*GPTDialogMutation) PeerID

func (m *GPTDialogMutation) PeerID() (r string, exists bool)

PeerID returns the value of the "peer_id" field in the mutation.

func (*GPTDialogMutation) PromptMsg

func (m *GPTDialogMutation) PromptMsg() (r string, exists bool)

PromptMsg returns the value of the "prompt_msg" field in the mutation.

func (*GPTDialogMutation) PromptMsgID

func (m *GPTDialogMutation) PromptMsgID() (r int, exists bool)

PromptMsgID returns the value of the "prompt_msg_id" field in the mutation.

func (*GPTDialogMutation) RemovedEdges

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

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

func (*GPTDialogMutation) RemovedIDs

func (m *GPTDialogMutation) 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 (*GPTDialogMutation) ResetCreatedAt

func (m *GPTDialogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GPTDialogMutation) ResetEdge

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

func (m *GPTDialogMutation) 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 (*GPTDialogMutation) ResetGptMsg

func (m *GPTDialogMutation) ResetGptMsg()

ResetGptMsg resets all changes to the "gpt_msg" field.

func (*GPTDialogMutation) ResetGptMsgID

func (m *GPTDialogMutation) ResetGptMsgID()

ResetGptMsgID resets all changes to the "gpt_msg_id" field.

func (*GPTDialogMutation) ResetPeerID

func (m *GPTDialogMutation) ResetPeerID()

ResetPeerID resets all changes to the "peer_id" field.

func (*GPTDialogMutation) ResetPromptMsg

func (m *GPTDialogMutation) ResetPromptMsg()

ResetPromptMsg resets all changes to the "prompt_msg" field.

func (*GPTDialogMutation) ResetPromptMsgID

func (m *GPTDialogMutation) ResetPromptMsgID()

ResetPromptMsgID resets all changes to the "prompt_msg_id" field.

func (*GPTDialogMutation) ResetThreadTopMsgID

func (m *GPTDialogMutation) ResetThreadTopMsgID()

ResetThreadTopMsgID resets all changes to the "thread_top_msg_id" field.

func (*GPTDialogMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*GPTDialogMutation) SetField

func (m *GPTDialogMutation) 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 (*GPTDialogMutation) SetGptMsg

func (m *GPTDialogMutation) SetGptMsg(s string)

SetGptMsg sets the "gpt_msg" field.

func (*GPTDialogMutation) SetGptMsgID

func (m *GPTDialogMutation) SetGptMsgID(i int)

SetGptMsgID sets the "gpt_msg_id" field.

func (*GPTDialogMutation) SetOp

func (m *GPTDialogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GPTDialogMutation) SetPeerID

func (m *GPTDialogMutation) SetPeerID(s string)

SetPeerID sets the "peer_id" field.

func (*GPTDialogMutation) SetPromptMsg

func (m *GPTDialogMutation) SetPromptMsg(s string)

SetPromptMsg sets the "prompt_msg" field.

func (*GPTDialogMutation) SetPromptMsgID

func (m *GPTDialogMutation) SetPromptMsgID(i int)

SetPromptMsgID sets the "prompt_msg_id" field.

func (*GPTDialogMutation) SetThreadTopMsgID

func (m *GPTDialogMutation) SetThreadTopMsgID(i int)

SetThreadTopMsgID sets the "thread_top_msg_id" field.

func (*GPTDialogMutation) ThreadTopMsgID

func (m *GPTDialogMutation) ThreadTopMsgID() (r int, exists bool)

ThreadTopMsgID returns the value of the "thread_top_msg_id" field in the mutation.

func (*GPTDialogMutation) ThreadTopMsgIDCleared

func (m *GPTDialogMutation) ThreadTopMsgIDCleared() bool

ThreadTopMsgIDCleared returns if the "thread_top_msg_id" field was cleared in this mutation.

func (GPTDialogMutation) Tx

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

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

func (*GPTDialogMutation) Type

func (m *GPTDialogMutation) Type() string

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

func (*GPTDialogMutation) Where

func (m *GPTDialogMutation) Where(ps ...predicate.GPTDialog)

Where appends a list predicates to the GPTDialogMutation builder.

func (*GPTDialogMutation) WhereP

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

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

type GPTDialogQuery

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

GPTDialogQuery is the builder for querying GPTDialog entities.

func (*GPTDialogQuery) Aggregate

func (gdq *GPTDialogQuery) Aggregate(fns ...AggregateFunc) *GPTDialogSelect

Aggregate returns a GPTDialogSelect configured with the given aggregations.

func (*GPTDialogQuery) All

func (gdq *GPTDialogQuery) All(ctx context.Context) ([]*GPTDialog, error)

All executes the query and returns a list of GPTDialogs.

func (*GPTDialogQuery) AllX

func (gdq *GPTDialogQuery) AllX(ctx context.Context) []*GPTDialog

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

func (*GPTDialogQuery) Clone

func (gdq *GPTDialogQuery) Clone() *GPTDialogQuery

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

func (*GPTDialogQuery) Count

func (gdq *GPTDialogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GPTDialogQuery) CountX

func (gdq *GPTDialogQuery) CountX(ctx context.Context) int

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

func (*GPTDialogQuery) Exist

func (gdq *GPTDialogQuery) Exist(ctx context.Context) (bool, error)

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

func (*GPTDialogQuery) ExistX

func (gdq *GPTDialogQuery) ExistX(ctx context.Context) bool

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

func (*GPTDialogQuery) First

func (gdq *GPTDialogQuery) First(ctx context.Context) (*GPTDialog, error)

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

func (*GPTDialogQuery) FirstID

func (gdq *GPTDialogQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*GPTDialogQuery) FirstIDX

func (gdq *GPTDialogQuery) FirstIDX(ctx context.Context) int

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

func (*GPTDialogQuery) FirstX

func (gdq *GPTDialogQuery) FirstX(ctx context.Context) *GPTDialog

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

func (*GPTDialogQuery) GroupBy

func (gdq *GPTDialogQuery) GroupBy(field string, fields ...string) *GPTDialogGroupBy

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

client.GPTDialog.Query().
	GroupBy(gptdialog.FieldPeerID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GPTDialogQuery) IDs

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

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

func (*GPTDialogQuery) IDsX

func (gdq *GPTDialogQuery) IDsX(ctx context.Context) []int

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

func (*GPTDialogQuery) Limit

func (gdq *GPTDialogQuery) Limit(limit int) *GPTDialogQuery

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

func (*GPTDialogQuery) Offset

func (gdq *GPTDialogQuery) Offset(offset int) *GPTDialogQuery

Offset to start from.

func (*GPTDialogQuery) Only

func (gdq *GPTDialogQuery) Only(ctx context.Context) (*GPTDialog, error)

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

func (*GPTDialogQuery) OnlyID

func (gdq *GPTDialogQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*GPTDialogQuery) OnlyIDX

func (gdq *GPTDialogQuery) OnlyIDX(ctx context.Context) int

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

func (*GPTDialogQuery) OnlyX

func (gdq *GPTDialogQuery) OnlyX(ctx context.Context) *GPTDialog

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

func (*GPTDialogQuery) Order

Order specifies how the records should be ordered.

func (*GPTDialogQuery) Select

func (gdq *GPTDialogQuery) Select(fields ...string) *GPTDialogSelect

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

client.GPTDialog.Query().
	Select(gptdialog.FieldPeerID).
	Scan(ctx, &v)

func (*GPTDialogQuery) Unique

func (gdq *GPTDialogQuery) Unique(unique bool) *GPTDialogQuery

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

func (gdq *GPTDialogQuery) Where(ps ...predicate.GPTDialog) *GPTDialogQuery

Where adds a new predicate for the GPTDialogQuery builder.

type GPTDialogSelect

type GPTDialogSelect struct {
	*GPTDialogQuery
	// contains filtered or unexported fields
}

GPTDialogSelect is the builder for selecting fields of GPTDialog entities.

func (*GPTDialogSelect) Aggregate

func (gds *GPTDialogSelect) Aggregate(fns ...AggregateFunc) *GPTDialogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GPTDialogSelect) Bool

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

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

func (*GPTDialogSelect) BoolX

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

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

func (*GPTDialogSelect) Bools

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

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

func (*GPTDialogSelect) BoolsX

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

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

func (*GPTDialogSelect) Float64

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

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

func (*GPTDialogSelect) Float64X

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

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

func (*GPTDialogSelect) Float64s

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

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

func (*GPTDialogSelect) Float64sX

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

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

func (*GPTDialogSelect) Int

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

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

func (*GPTDialogSelect) IntX

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

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

func (*GPTDialogSelect) Ints

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

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

func (*GPTDialogSelect) IntsX

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

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

func (*GPTDialogSelect) Scan

func (gds *GPTDialogSelect) Scan(ctx context.Context, v any) error

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

func (*GPTDialogSelect) ScanX

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

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

func (*GPTDialogSelect) String

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

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

func (*GPTDialogSelect) StringX

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

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

func (*GPTDialogSelect) Strings

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

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

func (*GPTDialogSelect) StringsX

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

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

type GPTDialogUpdate

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

GPTDialogUpdate is the builder for updating GPTDialog entities.

func (*GPTDialogUpdate) AddGptMsgID

func (gdu *GPTDialogUpdate) AddGptMsgID(i int) *GPTDialogUpdate

AddGptMsgID adds i to the "gpt_msg_id" field.

func (*GPTDialogUpdate) AddPromptMsgID

func (gdu *GPTDialogUpdate) AddPromptMsgID(i int) *GPTDialogUpdate

AddPromptMsgID adds i to the "prompt_msg_id" field.

func (*GPTDialogUpdate) AddThreadTopMsgID

func (gdu *GPTDialogUpdate) AddThreadTopMsgID(i int) *GPTDialogUpdate

AddThreadTopMsgID adds i to the "thread_top_msg_id" field.

func (*GPTDialogUpdate) ClearThreadTopMsgID

func (gdu *GPTDialogUpdate) ClearThreadTopMsgID() *GPTDialogUpdate

ClearThreadTopMsgID clears the value of the "thread_top_msg_id" field.

func (*GPTDialogUpdate) Exec

func (gdu *GPTDialogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GPTDialogUpdate) ExecX

func (gdu *GPTDialogUpdate) ExecX(ctx context.Context)

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

func (*GPTDialogUpdate) Mutation

func (gdu *GPTDialogUpdate) Mutation() *GPTDialogMutation

Mutation returns the GPTDialogMutation object of the builder.

func (*GPTDialogUpdate) Save

func (gdu *GPTDialogUpdate) Save(ctx context.Context) (int, error)

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

func (*GPTDialogUpdate) SaveX

func (gdu *GPTDialogUpdate) SaveX(ctx context.Context) int

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

func (*GPTDialogUpdate) SetGptMsg

func (gdu *GPTDialogUpdate) SetGptMsg(s string) *GPTDialogUpdate

SetGptMsg sets the "gpt_msg" field.

func (*GPTDialogUpdate) SetGptMsgID

func (gdu *GPTDialogUpdate) SetGptMsgID(i int) *GPTDialogUpdate

SetGptMsgID sets the "gpt_msg_id" field.

func (*GPTDialogUpdate) SetNillableGptMsg

func (gdu *GPTDialogUpdate) SetNillableGptMsg(s *string) *GPTDialogUpdate

SetNillableGptMsg sets the "gpt_msg" field if the given value is not nil.

func (*GPTDialogUpdate) SetNillableGptMsgID

func (gdu *GPTDialogUpdate) SetNillableGptMsgID(i *int) *GPTDialogUpdate

SetNillableGptMsgID sets the "gpt_msg_id" field if the given value is not nil.

func (*GPTDialogUpdate) SetNillablePromptMsg

func (gdu *GPTDialogUpdate) SetNillablePromptMsg(s *string) *GPTDialogUpdate

SetNillablePromptMsg sets the "prompt_msg" field if the given value is not nil.

func (*GPTDialogUpdate) SetNillablePromptMsgID

func (gdu *GPTDialogUpdate) SetNillablePromptMsgID(i *int) *GPTDialogUpdate

SetNillablePromptMsgID sets the "prompt_msg_id" field if the given value is not nil.

func (*GPTDialogUpdate) SetNillableThreadTopMsgID

func (gdu *GPTDialogUpdate) SetNillableThreadTopMsgID(i *int) *GPTDialogUpdate

SetNillableThreadTopMsgID sets the "thread_top_msg_id" field if the given value is not nil.

func (*GPTDialogUpdate) SetPromptMsg

func (gdu *GPTDialogUpdate) SetPromptMsg(s string) *GPTDialogUpdate

SetPromptMsg sets the "prompt_msg" field.

func (*GPTDialogUpdate) SetPromptMsgID

func (gdu *GPTDialogUpdate) SetPromptMsgID(i int) *GPTDialogUpdate

SetPromptMsgID sets the "prompt_msg_id" field.

func (*GPTDialogUpdate) SetThreadTopMsgID

func (gdu *GPTDialogUpdate) SetThreadTopMsgID(i int) *GPTDialogUpdate

SetThreadTopMsgID sets the "thread_top_msg_id" field.

func (*GPTDialogUpdate) Where

Where appends a list predicates to the GPTDialogUpdate builder.

type GPTDialogUpdateOne

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

GPTDialogUpdateOne is the builder for updating a single GPTDialog entity.

func (*GPTDialogUpdateOne) AddGptMsgID

func (gduo *GPTDialogUpdateOne) AddGptMsgID(i int) *GPTDialogUpdateOne

AddGptMsgID adds i to the "gpt_msg_id" field.

func (*GPTDialogUpdateOne) AddPromptMsgID

func (gduo *GPTDialogUpdateOne) AddPromptMsgID(i int) *GPTDialogUpdateOne

AddPromptMsgID adds i to the "prompt_msg_id" field.

func (*GPTDialogUpdateOne) AddThreadTopMsgID

func (gduo *GPTDialogUpdateOne) AddThreadTopMsgID(i int) *GPTDialogUpdateOne

AddThreadTopMsgID adds i to the "thread_top_msg_id" field.

func (*GPTDialogUpdateOne) ClearThreadTopMsgID

func (gduo *GPTDialogUpdateOne) ClearThreadTopMsgID() *GPTDialogUpdateOne

ClearThreadTopMsgID clears the value of the "thread_top_msg_id" field.

func (*GPTDialogUpdateOne) Exec

func (gduo *GPTDialogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GPTDialogUpdateOne) ExecX

func (gduo *GPTDialogUpdateOne) ExecX(ctx context.Context)

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

func (*GPTDialogUpdateOne) Mutation

func (gduo *GPTDialogUpdateOne) Mutation() *GPTDialogMutation

Mutation returns the GPTDialogMutation object of the builder.

func (*GPTDialogUpdateOne) Save

func (gduo *GPTDialogUpdateOne) Save(ctx context.Context) (*GPTDialog, error)

Save executes the query and returns the updated GPTDialog entity.

func (*GPTDialogUpdateOne) SaveX

func (gduo *GPTDialogUpdateOne) SaveX(ctx context.Context) *GPTDialog

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

func (*GPTDialogUpdateOne) Select

func (gduo *GPTDialogUpdateOne) Select(field string, fields ...string) *GPTDialogUpdateOne

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

func (*GPTDialogUpdateOne) SetGptMsg

func (gduo *GPTDialogUpdateOne) SetGptMsg(s string) *GPTDialogUpdateOne

SetGptMsg sets the "gpt_msg" field.

func (*GPTDialogUpdateOne) SetGptMsgID

func (gduo *GPTDialogUpdateOne) SetGptMsgID(i int) *GPTDialogUpdateOne

SetGptMsgID sets the "gpt_msg_id" field.

func (*GPTDialogUpdateOne) SetNillableGptMsg

func (gduo *GPTDialogUpdateOne) SetNillableGptMsg(s *string) *GPTDialogUpdateOne

SetNillableGptMsg sets the "gpt_msg" field if the given value is not nil.

func (*GPTDialogUpdateOne) SetNillableGptMsgID

func (gduo *GPTDialogUpdateOne) SetNillableGptMsgID(i *int) *GPTDialogUpdateOne

SetNillableGptMsgID sets the "gpt_msg_id" field if the given value is not nil.

func (*GPTDialogUpdateOne) SetNillablePromptMsg

func (gduo *GPTDialogUpdateOne) SetNillablePromptMsg(s *string) *GPTDialogUpdateOne

SetNillablePromptMsg sets the "prompt_msg" field if the given value is not nil.

func (*GPTDialogUpdateOne) SetNillablePromptMsgID

func (gduo *GPTDialogUpdateOne) SetNillablePromptMsgID(i *int) *GPTDialogUpdateOne

SetNillablePromptMsgID sets the "prompt_msg_id" field if the given value is not nil.

func (*GPTDialogUpdateOne) SetNillableThreadTopMsgID

func (gduo *GPTDialogUpdateOne) SetNillableThreadTopMsgID(i *int) *GPTDialogUpdateOne

SetNillableThreadTopMsgID sets the "thread_top_msg_id" field if the given value is not nil.

func (*GPTDialogUpdateOne) SetPromptMsg

func (gduo *GPTDialogUpdateOne) SetPromptMsg(s string) *GPTDialogUpdateOne

SetPromptMsg sets the "prompt_msg" field.

func (*GPTDialogUpdateOne) SetPromptMsgID

func (gduo *GPTDialogUpdateOne) SetPromptMsgID(i int) *GPTDialogUpdateOne

SetPromptMsgID sets the "prompt_msg_id" field.

func (*GPTDialogUpdateOne) SetThreadTopMsgID

func (gduo *GPTDialogUpdateOne) SetThreadTopMsgID(i int) *GPTDialogUpdateOne

SetThreadTopMsgID sets the "thread_top_msg_id" field.

func (*GPTDialogUpdateOne) Where

Where appends a list predicates to the GPTDialogUpdate builder.

type GPTDialogUpsert

type GPTDialogUpsert struct {
	*sql.UpdateSet
}

GPTDialogUpsert is the "OnConflict" setter.

func (*GPTDialogUpsert) AddGptMsgID

func (u *GPTDialogUpsert) AddGptMsgID(v int) *GPTDialogUpsert

AddGptMsgID adds v to the "gpt_msg_id" field.

func (*GPTDialogUpsert) AddPromptMsgID

func (u *GPTDialogUpsert) AddPromptMsgID(v int) *GPTDialogUpsert

AddPromptMsgID adds v to the "prompt_msg_id" field.

func (*GPTDialogUpsert) AddThreadTopMsgID

func (u *GPTDialogUpsert) AddThreadTopMsgID(v int) *GPTDialogUpsert

AddThreadTopMsgID adds v to the "thread_top_msg_id" field.

func (*GPTDialogUpsert) ClearThreadTopMsgID

func (u *GPTDialogUpsert) ClearThreadTopMsgID() *GPTDialogUpsert

ClearThreadTopMsgID clears the value of the "thread_top_msg_id" field.

func (*GPTDialogUpsert) SetGptMsg

func (u *GPTDialogUpsert) SetGptMsg(v string) *GPTDialogUpsert

SetGptMsg sets the "gpt_msg" field.

func (*GPTDialogUpsert) SetGptMsgID

func (u *GPTDialogUpsert) SetGptMsgID(v int) *GPTDialogUpsert

SetGptMsgID sets the "gpt_msg_id" field.

func (*GPTDialogUpsert) SetPromptMsg

func (u *GPTDialogUpsert) SetPromptMsg(v string) *GPTDialogUpsert

SetPromptMsg sets the "prompt_msg" field.

func (*GPTDialogUpsert) SetPromptMsgID

func (u *GPTDialogUpsert) SetPromptMsgID(v int) *GPTDialogUpsert

SetPromptMsgID sets the "prompt_msg_id" field.

func (*GPTDialogUpsert) SetThreadTopMsgID

func (u *GPTDialogUpsert) SetThreadTopMsgID(v int) *GPTDialogUpsert

SetThreadTopMsgID sets the "thread_top_msg_id" field.

func (*GPTDialogUpsert) UpdateGptMsg

func (u *GPTDialogUpsert) UpdateGptMsg() *GPTDialogUpsert

UpdateGptMsg sets the "gpt_msg" field to the value that was provided on create.

func (*GPTDialogUpsert) UpdateGptMsgID

func (u *GPTDialogUpsert) UpdateGptMsgID() *GPTDialogUpsert

UpdateGptMsgID sets the "gpt_msg_id" field to the value that was provided on create.

func (*GPTDialogUpsert) UpdatePromptMsg

func (u *GPTDialogUpsert) UpdatePromptMsg() *GPTDialogUpsert

UpdatePromptMsg sets the "prompt_msg" field to the value that was provided on create.

func (*GPTDialogUpsert) UpdatePromptMsgID

func (u *GPTDialogUpsert) UpdatePromptMsgID() *GPTDialogUpsert

UpdatePromptMsgID sets the "prompt_msg_id" field to the value that was provided on create.

func (*GPTDialogUpsert) UpdateThreadTopMsgID

func (u *GPTDialogUpsert) UpdateThreadTopMsgID() *GPTDialogUpsert

UpdateThreadTopMsgID sets the "thread_top_msg_id" field to the value that was provided on create.

type GPTDialogUpsertBulk

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

GPTDialogUpsertBulk is the builder for "upsert"-ing a bulk of GPTDialog nodes.

func (*GPTDialogUpsertBulk) AddGptMsgID

func (u *GPTDialogUpsertBulk) AddGptMsgID(v int) *GPTDialogUpsertBulk

AddGptMsgID adds v to the "gpt_msg_id" field.

func (*GPTDialogUpsertBulk) AddPromptMsgID

func (u *GPTDialogUpsertBulk) AddPromptMsgID(v int) *GPTDialogUpsertBulk

AddPromptMsgID adds v to the "prompt_msg_id" field.

func (*GPTDialogUpsertBulk) AddThreadTopMsgID

func (u *GPTDialogUpsertBulk) AddThreadTopMsgID(v int) *GPTDialogUpsertBulk

AddThreadTopMsgID adds v to the "thread_top_msg_id" field.

func (*GPTDialogUpsertBulk) ClearThreadTopMsgID

func (u *GPTDialogUpsertBulk) ClearThreadTopMsgID() *GPTDialogUpsertBulk

ClearThreadTopMsgID clears the value of the "thread_top_msg_id" field.

func (*GPTDialogUpsertBulk) DoNothing

func (u *GPTDialogUpsertBulk) DoNothing() *GPTDialogUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GPTDialogUpsertBulk) Exec

Exec executes the query.

func (*GPTDialogUpsertBulk) ExecX

func (u *GPTDialogUpsertBulk) ExecX(ctx context.Context)

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

func (*GPTDialogUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GPTDialog.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GPTDialogUpsertBulk) SetGptMsg

SetGptMsg sets the "gpt_msg" field.

func (*GPTDialogUpsertBulk) SetGptMsgID

func (u *GPTDialogUpsertBulk) SetGptMsgID(v int) *GPTDialogUpsertBulk

SetGptMsgID sets the "gpt_msg_id" field.

func (*GPTDialogUpsertBulk) SetPromptMsg

func (u *GPTDialogUpsertBulk) SetPromptMsg(v string) *GPTDialogUpsertBulk

SetPromptMsg sets the "prompt_msg" field.

func (*GPTDialogUpsertBulk) SetPromptMsgID

func (u *GPTDialogUpsertBulk) SetPromptMsgID(v int) *GPTDialogUpsertBulk

SetPromptMsgID sets the "prompt_msg_id" field.

func (*GPTDialogUpsertBulk) SetThreadTopMsgID

func (u *GPTDialogUpsertBulk) SetThreadTopMsgID(v int) *GPTDialogUpsertBulk

SetThreadTopMsgID sets the "thread_top_msg_id" field.

func (*GPTDialogUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GPTDialogCreateBulk.OnConflict documentation for more info.

func (*GPTDialogUpsertBulk) UpdateGptMsg

func (u *GPTDialogUpsertBulk) UpdateGptMsg() *GPTDialogUpsertBulk

UpdateGptMsg sets the "gpt_msg" field to the value that was provided on create.

func (*GPTDialogUpsertBulk) UpdateGptMsgID

func (u *GPTDialogUpsertBulk) UpdateGptMsgID() *GPTDialogUpsertBulk

UpdateGptMsgID sets the "gpt_msg_id" field to the value that was provided on create.

func (*GPTDialogUpsertBulk) UpdateNewValues

func (u *GPTDialogUpsertBulk) UpdateNewValues() *GPTDialogUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GPTDialog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GPTDialogUpsertBulk) UpdatePromptMsg

func (u *GPTDialogUpsertBulk) UpdatePromptMsg() *GPTDialogUpsertBulk

UpdatePromptMsg sets the "prompt_msg" field to the value that was provided on create.

func (*GPTDialogUpsertBulk) UpdatePromptMsgID

func (u *GPTDialogUpsertBulk) UpdatePromptMsgID() *GPTDialogUpsertBulk

UpdatePromptMsgID sets the "prompt_msg_id" field to the value that was provided on create.

func (*GPTDialogUpsertBulk) UpdateThreadTopMsgID

func (u *GPTDialogUpsertBulk) UpdateThreadTopMsgID() *GPTDialogUpsertBulk

UpdateThreadTopMsgID sets the "thread_top_msg_id" field to the value that was provided on create.

type GPTDialogUpsertOne

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

GPTDialogUpsertOne is the builder for "upsert"-ing

one GPTDialog node.

func (*GPTDialogUpsertOne) AddGptMsgID

func (u *GPTDialogUpsertOne) AddGptMsgID(v int) *GPTDialogUpsertOne

AddGptMsgID adds v to the "gpt_msg_id" field.

func (*GPTDialogUpsertOne) AddPromptMsgID

func (u *GPTDialogUpsertOne) AddPromptMsgID(v int) *GPTDialogUpsertOne

AddPromptMsgID adds v to the "prompt_msg_id" field.

func (*GPTDialogUpsertOne) AddThreadTopMsgID

func (u *GPTDialogUpsertOne) AddThreadTopMsgID(v int) *GPTDialogUpsertOne

AddThreadTopMsgID adds v to the "thread_top_msg_id" field.

func (*GPTDialogUpsertOne) ClearThreadTopMsgID

func (u *GPTDialogUpsertOne) ClearThreadTopMsgID() *GPTDialogUpsertOne

ClearThreadTopMsgID clears the value of the "thread_top_msg_id" field.

func (*GPTDialogUpsertOne) DoNothing

func (u *GPTDialogUpsertOne) DoNothing() *GPTDialogUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GPTDialogUpsertOne) Exec

func (u *GPTDialogUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*GPTDialogUpsertOne) ExecX

func (u *GPTDialogUpsertOne) ExecX(ctx context.Context)

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

func (*GPTDialogUpsertOne) ID

func (u *GPTDialogUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GPTDialogUpsertOne) IDX

func (u *GPTDialogUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*GPTDialogUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GPTDialog.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GPTDialogUpsertOne) SetGptMsg

func (u *GPTDialogUpsertOne) SetGptMsg(v string) *GPTDialogUpsertOne

SetGptMsg sets the "gpt_msg" field.

func (*GPTDialogUpsertOne) SetGptMsgID

func (u *GPTDialogUpsertOne) SetGptMsgID(v int) *GPTDialogUpsertOne

SetGptMsgID sets the "gpt_msg_id" field.

func (*GPTDialogUpsertOne) SetPromptMsg

func (u *GPTDialogUpsertOne) SetPromptMsg(v string) *GPTDialogUpsertOne

SetPromptMsg sets the "prompt_msg" field.

func (*GPTDialogUpsertOne) SetPromptMsgID

func (u *GPTDialogUpsertOne) SetPromptMsgID(v int) *GPTDialogUpsertOne

SetPromptMsgID sets the "prompt_msg_id" field.

func (*GPTDialogUpsertOne) SetThreadTopMsgID

func (u *GPTDialogUpsertOne) SetThreadTopMsgID(v int) *GPTDialogUpsertOne

SetThreadTopMsgID sets the "thread_top_msg_id" field.

func (*GPTDialogUpsertOne) Update

func (u *GPTDialogUpsertOne) Update(set func(*GPTDialogUpsert)) *GPTDialogUpsertOne

Update allows overriding fields `UPDATE` values. See the GPTDialogCreate.OnConflict documentation for more info.

func (*GPTDialogUpsertOne) UpdateGptMsg

func (u *GPTDialogUpsertOne) UpdateGptMsg() *GPTDialogUpsertOne

UpdateGptMsg sets the "gpt_msg" field to the value that was provided on create.

func (*GPTDialogUpsertOne) UpdateGptMsgID

func (u *GPTDialogUpsertOne) UpdateGptMsgID() *GPTDialogUpsertOne

UpdateGptMsgID sets the "gpt_msg_id" field to the value that was provided on create.

func (*GPTDialogUpsertOne) UpdateNewValues

func (u *GPTDialogUpsertOne) UpdateNewValues() *GPTDialogUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GPTDialog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GPTDialogUpsertOne) UpdatePromptMsg

func (u *GPTDialogUpsertOne) UpdatePromptMsg() *GPTDialogUpsertOne

UpdatePromptMsg sets the "prompt_msg" field to the value that was provided on create.

func (*GPTDialogUpsertOne) UpdatePromptMsgID

func (u *GPTDialogUpsertOne) UpdatePromptMsgID() *GPTDialogUpsertOne

UpdatePromptMsgID sets the "prompt_msg_id" field to the value that was provided on create.

func (*GPTDialogUpsertOne) UpdateThreadTopMsgID

func (u *GPTDialogUpsertOne) UpdateThreadTopMsgID() *GPTDialogUpsertOne

UpdateThreadTopMsgID sets the "thread_top_msg_id" field to the value that was provided on create.

type GPTDialogs

type GPTDialogs []*GPTDialog

GPTDialogs is a parsable slice of GPTDialog.

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

func (gc *GitCommit) String() string

String implements the fmt.Stringer.

func (*GitCommit) Unwrap

func (gc *GitCommit) Unwrap() *GitCommit

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.

func (*GitCommit) Value

func (gc *GitCommit) Value(name string) (ent.Value, error)

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

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

func (c *GitCommitClient) Get(ctx context.Context, id string) (*GitCommit, error)

Get returns a GitCommit 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)

func (*GitCommitCreateBulk) Save

func (gccb *GitCommitCreateBulk) Save(ctx context.Context) ([]*GitCommit, error)

Save creates the GitCommit entities in the database.

func (*GitCommitCreateBulk) SaveX

func (gccb *GitCommitCreateBulk) SaveX(ctx context.Context) []*GitCommit

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

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

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

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

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

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

func (*GitCommitGroupBy) BoolX

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

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

func (*GitCommitGroupBy) Bools

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

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

func (*GitCommitGroupBy) BoolsX

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

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

func (*GitCommitGroupBy) Float64

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

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

func (*GitCommitGroupBy) Float64X

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

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

func (*GitCommitGroupBy) Float64s

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

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

func (*GitCommitGroupBy) Float64sX

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

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

func (*GitCommitGroupBy) Int

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

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

func (*GitCommitGroupBy) IntX

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

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

func (*GitCommitGroupBy) Ints

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

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

func (*GitCommitGroupBy) IntsX

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

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

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

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

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

func (*GitCommitGroupBy) String

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

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

func (*GitCommitGroupBy) StringX

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

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

func (*GitCommitGroupBy) Strings

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

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

func (*GitCommitGroupBy) StringsX

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

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

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

func (m *GitCommitMutation) OldDate(ctx context.Context) (v time.Time, err error)

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

func (m *GitCommitMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

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

func (m *GitCommitMutation) Op() Op

Op returns the operation name.

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

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

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

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

func (*GitCommitSelect) BoolX

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

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

func (*GitCommitSelect) Bools

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

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

func (*GitCommitSelect) BoolsX

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

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

func (*GitCommitSelect) Float64

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

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

func (*GitCommitSelect) Float64X

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

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

func (*GitCommitSelect) Float64s

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

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

func (*GitCommitSelect) Float64sX

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

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

func (*GitCommitSelect) Int

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

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

func (*GitCommitSelect) IntX

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

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

func (*GitCommitSelect) Ints

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

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

func (*GitCommitSelect) IntsX

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

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

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

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

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

func (*GitCommitSelect) String

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

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

func (*GitCommitSelect) StringX

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

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

func (*GitCommitSelect) Strings

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

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

func (*GitCommitSelect) StringsX

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

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

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

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

Where appends a list predicates to the GitCommitUpdate builder.

type GitCommitUpsert

type GitCommitUpsert struct {
	*sql.UpdateSet
}

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

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

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

SetDate sets the "date" field.

func (*GitCommitUpsertBulk) SetMessage

SetMessage sets the "message" field.

func (*GitCommitUpsertBulk) Update

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

IDX is like ID, but panics if an error occurs.

func (*GitCommitUpsertOne) Ignore

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

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 GitCommits

type GitCommits []*GitCommit

GitCommits is a parsable slice of GitCommit.

type Hook

type Hook = ent.Hook

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

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type LastChannelMessage

type LastChannelMessage struct {

	// ID of the ent.
	// Telegram channel ID.
	ID int64 `json:"id,omitempty"`
	// Telegram message ID of last observed message in channel.
	MessageID int `json:"message_id,omitempty"`
	// contains filtered or unexported fields
}

LastChannelMessage is the model entity for the LastChannelMessage schema.

func (*LastChannelMessage) String

func (lcm *LastChannelMessage) String() string

String implements the fmt.Stringer.

func (*LastChannelMessage) Unwrap

func (lcm *LastChannelMessage) Unwrap() *LastChannelMessage

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

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

func (*LastChannelMessage) Value

func (lcm *LastChannelMessage) Value(name string) (ent.Value, error)

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

type LastChannelMessageClient

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

LastChannelMessageClient is a client for the LastChannelMessage schema.

func NewLastChannelMessageClient

func NewLastChannelMessageClient(c config) *LastChannelMessageClient

NewLastChannelMessageClient returns a client for the LastChannelMessage from the given config.

func (*LastChannelMessageClient) Create

Create returns a builder for creating a LastChannelMessage entity.

func (*LastChannelMessageClient) CreateBulk

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

func (*LastChannelMessageClient) Delete

Delete returns a delete builder for LastChannelMessage.

func (*LastChannelMessageClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LastChannelMessageClient) DeleteOneID

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

func (*LastChannelMessageClient) Get

Get returns a LastChannelMessage entity by its id.

func (*LastChannelMessageClient) GetX

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

func (*LastChannelMessageClient) Hooks

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

Hooks returns the client hooks.

func (*LastChannelMessageClient) Intercept

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

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

func (*LastChannelMessageClient) Interceptors

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

Interceptors returns the client interceptors.

func (*LastChannelMessageClient) MapCreateBulk

func (c *LastChannelMessageClient) MapCreateBulk(slice any, setFunc func(*LastChannelMessageCreate, int)) *LastChannelMessageCreateBulk

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 (*LastChannelMessageClient) Query

Query returns a query builder for LastChannelMessage.

func (*LastChannelMessageClient) Update

Update returns an update builder for LastChannelMessage.

func (*LastChannelMessageClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*LastChannelMessageClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*LastChannelMessageClient) Use

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

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

type LastChannelMessageCreate

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

LastChannelMessageCreate is the builder for creating a LastChannelMessage entity.

func (*LastChannelMessageCreate) Exec

Exec executes the query.

func (*LastChannelMessageCreate) ExecX

func (lcmc *LastChannelMessageCreate) ExecX(ctx context.Context)

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

func (*LastChannelMessageCreate) Mutation

Mutation returns the LastChannelMessageMutation object of the builder.

func (*LastChannelMessageCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.LastChannelMessage.Create().
	SetMessageID(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.LastChannelMessageUpsert) {
		SetMessageID(v+v).
	}).
	Exec(ctx)

func (*LastChannelMessageCreate) OnConflictColumns

func (lcmc *LastChannelMessageCreate) OnConflictColumns(columns ...string) *LastChannelMessageUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.LastChannelMessage.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*LastChannelMessageCreate) Save

Save creates the LastChannelMessage in the database.

func (*LastChannelMessageCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*LastChannelMessageCreate) SetID

SetID sets the "id" field.

func (*LastChannelMessageCreate) SetMessageID

func (lcmc *LastChannelMessageCreate) SetMessageID(i int) *LastChannelMessageCreate

SetMessageID sets the "message_id" field.

type LastChannelMessageCreateBulk

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

LastChannelMessageCreateBulk is the builder for creating many LastChannelMessage entities in bulk.

func (*LastChannelMessageCreateBulk) Exec

Exec executes the query.

func (*LastChannelMessageCreateBulk) ExecX

func (lcmcb *LastChannelMessageCreateBulk) ExecX(ctx context.Context)

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

func (*LastChannelMessageCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.LastChannelMessage.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.LastChannelMessageUpsert) {
		SetMessageID(v+v).
	}).
	Exec(ctx)

func (*LastChannelMessageCreateBulk) OnConflictColumns

func (lcmcb *LastChannelMessageCreateBulk) OnConflictColumns(columns ...string) *LastChannelMessageUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.LastChannelMessage.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*LastChannelMessageCreateBulk) Save

Save creates the LastChannelMessage entities in the database.

func (*LastChannelMessageCreateBulk) SaveX

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

type LastChannelMessageDelete

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

LastChannelMessageDelete is the builder for deleting a LastChannelMessage entity.

func (*LastChannelMessageDelete) Exec

func (lcmd *LastChannelMessageDelete) Exec(ctx context.Context) (int, error)

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

func (*LastChannelMessageDelete) ExecX

func (lcmd *LastChannelMessageDelete) ExecX(ctx context.Context) int

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

func (*LastChannelMessageDelete) Where

Where appends a list predicates to the LastChannelMessageDelete builder.

type LastChannelMessageDeleteOne

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

LastChannelMessageDeleteOne is the builder for deleting a single LastChannelMessage entity.

func (*LastChannelMessageDeleteOne) Exec

Exec executes the deletion query.

func (*LastChannelMessageDeleteOne) ExecX

func (lcmdo *LastChannelMessageDeleteOne) ExecX(ctx context.Context)

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

func (*LastChannelMessageDeleteOne) Where

Where appends a list predicates to the LastChannelMessageDelete builder.

type LastChannelMessageGroupBy

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

LastChannelMessageGroupBy is the group-by builder for LastChannelMessage entities.

func (*LastChannelMessageGroupBy) Aggregate

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

func (*LastChannelMessageGroupBy) Bool

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

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

func (*LastChannelMessageGroupBy) BoolX

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

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

func (*LastChannelMessageGroupBy) Bools

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

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

func (*LastChannelMessageGroupBy) BoolsX

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

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

func (*LastChannelMessageGroupBy) Float64

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

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

func (*LastChannelMessageGroupBy) Float64X

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

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

func (*LastChannelMessageGroupBy) Float64s

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

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

func (*LastChannelMessageGroupBy) Float64sX

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

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

func (*LastChannelMessageGroupBy) Int

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

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

func (*LastChannelMessageGroupBy) IntX

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

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

func (*LastChannelMessageGroupBy) Ints

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

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

func (*LastChannelMessageGroupBy) IntsX

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

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

func (*LastChannelMessageGroupBy) Scan

func (lcmgb *LastChannelMessageGroupBy) Scan(ctx context.Context, v any) error

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

func (*LastChannelMessageGroupBy) ScanX

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

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

func (*LastChannelMessageGroupBy) String

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

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

func (*LastChannelMessageGroupBy) StringX

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

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

func (*LastChannelMessageGroupBy) Strings

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

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

func (*LastChannelMessageGroupBy) StringsX

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

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

type LastChannelMessageMutation

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

LastChannelMessageMutation represents an operation that mutates the LastChannelMessage nodes in the graph.

func (*LastChannelMessageMutation) AddField

func (m *LastChannelMessageMutation) 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 (*LastChannelMessageMutation) AddMessageID

func (m *LastChannelMessageMutation) AddMessageID(i int)

AddMessageID adds i to the "message_id" field.

func (*LastChannelMessageMutation) AddedEdges

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

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

func (*LastChannelMessageMutation) AddedField

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

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

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

func (*LastChannelMessageMutation) AddedIDs

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

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

func (*LastChannelMessageMutation) AddedMessageID

func (m *LastChannelMessageMutation) AddedMessageID() (r int, exists bool)

AddedMessageID returns the value that was added to the "message_id" field in this mutation.

func (*LastChannelMessageMutation) ClearEdge

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

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

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

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

func (*LastChannelMessageMutation) ClearedFields

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

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

func (LastChannelMessageMutation) Client

func (m LastChannelMessageMutation) 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 (*LastChannelMessageMutation) EdgeCleared

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

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

func (*LastChannelMessageMutation) Field

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

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

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

func (*LastChannelMessageMutation) Fields

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

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

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*LastChannelMessageMutation) MessageID

func (m *LastChannelMessageMutation) MessageID() (r int, exists bool)

MessageID returns the value of the "message_id" field in the mutation.

func (*LastChannelMessageMutation) OldField

func (m *LastChannelMessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*LastChannelMessageMutation) OldMessageID

func (m *LastChannelMessageMutation) OldMessageID(ctx context.Context) (v int, err error)

OldMessageID returns the old "message_id" field's value of the LastChannelMessage entity. If the LastChannelMessage 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 (*LastChannelMessageMutation) Op

Op returns the operation name.

func (*LastChannelMessageMutation) RemovedEdges

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

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

func (*LastChannelMessageMutation) RemovedIDs

func (m *LastChannelMessageMutation) 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 (*LastChannelMessageMutation) ResetEdge

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

func (m *LastChannelMessageMutation) 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 (*LastChannelMessageMutation) ResetMessageID

func (m *LastChannelMessageMutation) ResetMessageID()

ResetMessageID resets all changes to the "message_id" field.

func (*LastChannelMessageMutation) SetField

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

func (m *LastChannelMessageMutation) SetID(id int64)

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

func (*LastChannelMessageMutation) SetMessageID

func (m *LastChannelMessageMutation) SetMessageID(i int)

SetMessageID sets the "message_id" field.

func (*LastChannelMessageMutation) SetOp

func (m *LastChannelMessageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (LastChannelMessageMutation) Tx

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

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

func (*LastChannelMessageMutation) Type

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

func (*LastChannelMessageMutation) Where

Where appends a list predicates to the LastChannelMessageMutation builder.

func (*LastChannelMessageMutation) WhereP

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

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

type LastChannelMessageQuery

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

LastChannelMessageQuery is the builder for querying LastChannelMessage entities.

func (*LastChannelMessageQuery) Aggregate

Aggregate returns a LastChannelMessageSelect configured with the given aggregations.

func (*LastChannelMessageQuery) All

All executes the query and returns a list of LastChannelMessages.

func (*LastChannelMessageQuery) AllX

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

func (*LastChannelMessageQuery) Clone

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

func (*LastChannelMessageQuery) Count

func (lcmq *LastChannelMessageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LastChannelMessageQuery) CountX

func (lcmq *LastChannelMessageQuery) CountX(ctx context.Context) int

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

func (*LastChannelMessageQuery) Exist

func (lcmq *LastChannelMessageQuery) Exist(ctx context.Context) (bool, error)

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

func (*LastChannelMessageQuery) ExistX

func (lcmq *LastChannelMessageQuery) ExistX(ctx context.Context) bool

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

func (*LastChannelMessageQuery) First

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

func (*LastChannelMessageQuery) FirstID

func (lcmq *LastChannelMessageQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*LastChannelMessageQuery) FirstIDX

func (lcmq *LastChannelMessageQuery) FirstIDX(ctx context.Context) int64

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

func (*LastChannelMessageQuery) FirstX

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

func (*LastChannelMessageQuery) GroupBy

func (lcmq *LastChannelMessageQuery) GroupBy(field string, fields ...string) *LastChannelMessageGroupBy

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

client.LastChannelMessage.Query().
	GroupBy(lastchannelmessage.FieldMessageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LastChannelMessageQuery) IDs

func (lcmq *LastChannelMessageQuery) IDs(ctx context.Context) (ids []int64, err error)

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

func (*LastChannelMessageQuery) IDsX

func (lcmq *LastChannelMessageQuery) IDsX(ctx context.Context) []int64

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

func (*LastChannelMessageQuery) Limit

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

func (*LastChannelMessageQuery) Offset

func (lcmq *LastChannelMessageQuery) Offset(offset int) *LastChannelMessageQuery

Offset to start from.

func (*LastChannelMessageQuery) Only

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

func (*LastChannelMessageQuery) OnlyID

func (lcmq *LastChannelMessageQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*LastChannelMessageQuery) OnlyIDX

func (lcmq *LastChannelMessageQuery) OnlyIDX(ctx context.Context) int64

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

func (*LastChannelMessageQuery) OnlyX

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

func (*LastChannelMessageQuery) Order

Order specifies how the records should be ordered.

func (*LastChannelMessageQuery) Select

func (lcmq *LastChannelMessageQuery) Select(fields ...string) *LastChannelMessageSelect

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

client.LastChannelMessage.Query().
	Select(lastchannelmessage.FieldMessageID).
	Scan(ctx, &v)

func (*LastChannelMessageQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*LastChannelMessageQuery) Where

Where adds a new predicate for the LastChannelMessageQuery builder.

type LastChannelMessageSelect

type LastChannelMessageSelect struct {
	*LastChannelMessageQuery
	// contains filtered or unexported fields
}

LastChannelMessageSelect is the builder for selecting fields of LastChannelMessage entities.

func (*LastChannelMessageSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*LastChannelMessageSelect) Bool

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

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

func (*LastChannelMessageSelect) BoolX

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

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

func (*LastChannelMessageSelect) Bools

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

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

func (*LastChannelMessageSelect) BoolsX

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

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

func (*LastChannelMessageSelect) Float64

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

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

func (*LastChannelMessageSelect) Float64X

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

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

func (*LastChannelMessageSelect) Float64s

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

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

func (*LastChannelMessageSelect) Float64sX

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

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

func (*LastChannelMessageSelect) Int

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

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

func (*LastChannelMessageSelect) IntX

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

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

func (*LastChannelMessageSelect) Ints

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

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

func (*LastChannelMessageSelect) IntsX

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

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

func (*LastChannelMessageSelect) Scan

func (lcms *LastChannelMessageSelect) Scan(ctx context.Context, v any) error

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

func (*LastChannelMessageSelect) ScanX

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

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

func (*LastChannelMessageSelect) String

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

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

func (*LastChannelMessageSelect) StringX

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

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

func (*LastChannelMessageSelect) Strings

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

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

func (*LastChannelMessageSelect) StringsX

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

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

type LastChannelMessageUpdate

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

LastChannelMessageUpdate is the builder for updating LastChannelMessage entities.

func (*LastChannelMessageUpdate) AddMessageID

func (lcmu *LastChannelMessageUpdate) AddMessageID(i int) *LastChannelMessageUpdate

AddMessageID adds i to the "message_id" field.

func (*LastChannelMessageUpdate) Exec

Exec executes the query.

func (*LastChannelMessageUpdate) ExecX

func (lcmu *LastChannelMessageUpdate) ExecX(ctx context.Context)

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

func (*LastChannelMessageUpdate) Mutation

Mutation returns the LastChannelMessageMutation object of the builder.

func (*LastChannelMessageUpdate) Save

func (lcmu *LastChannelMessageUpdate) Save(ctx context.Context) (int, error)

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

func (*LastChannelMessageUpdate) SaveX

func (lcmu *LastChannelMessageUpdate) SaveX(ctx context.Context) int

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

func (*LastChannelMessageUpdate) SetMessageID

func (lcmu *LastChannelMessageUpdate) SetMessageID(i int) *LastChannelMessageUpdate

SetMessageID sets the "message_id" field.

func (*LastChannelMessageUpdate) SetNillableMessageID

func (lcmu *LastChannelMessageUpdate) SetNillableMessageID(i *int) *LastChannelMessageUpdate

SetNillableMessageID sets the "message_id" field if the given value is not nil.

func (*LastChannelMessageUpdate) Where

Where appends a list predicates to the LastChannelMessageUpdate builder.

type LastChannelMessageUpdateOne

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

LastChannelMessageUpdateOne is the builder for updating a single LastChannelMessage entity.

func (*LastChannelMessageUpdateOne) AddMessageID

AddMessageID adds i to the "message_id" field.

func (*LastChannelMessageUpdateOne) Exec

Exec executes the query on the entity.

func (*LastChannelMessageUpdateOne) ExecX

func (lcmuo *LastChannelMessageUpdateOne) ExecX(ctx context.Context)

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

func (*LastChannelMessageUpdateOne) Mutation

Mutation returns the LastChannelMessageMutation object of the builder.

func (*LastChannelMessageUpdateOne) Save

Save executes the query and returns the updated LastChannelMessage entity.

func (*LastChannelMessageUpdateOne) SaveX

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

func (*LastChannelMessageUpdateOne) Select

func (lcmuo *LastChannelMessageUpdateOne) Select(field string, fields ...string) *LastChannelMessageUpdateOne

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

func (*LastChannelMessageUpdateOne) SetMessageID

SetMessageID sets the "message_id" field.

func (*LastChannelMessageUpdateOne) SetNillableMessageID

func (lcmuo *LastChannelMessageUpdateOne) SetNillableMessageID(i *int) *LastChannelMessageUpdateOne

SetNillableMessageID sets the "message_id" field if the given value is not nil.

func (*LastChannelMessageUpdateOne) Where

Where appends a list predicates to the LastChannelMessageUpdate builder.

type LastChannelMessageUpsert

type LastChannelMessageUpsert struct {
	*sql.UpdateSet
}

LastChannelMessageUpsert is the "OnConflict" setter.

func (*LastChannelMessageUpsert) AddMessageID

AddMessageID adds v to the "message_id" field.

func (*LastChannelMessageUpsert) SetMessageID

SetMessageID sets the "message_id" field.

func (*LastChannelMessageUpsert) UpdateMessageID

func (u *LastChannelMessageUpsert) UpdateMessageID() *LastChannelMessageUpsert

UpdateMessageID sets the "message_id" field to the value that was provided on create.

type LastChannelMessageUpsertBulk

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

LastChannelMessageUpsertBulk is the builder for "upsert"-ing a bulk of LastChannelMessage nodes.

func (*LastChannelMessageUpsertBulk) AddMessageID

AddMessageID adds v to the "message_id" field.

func (*LastChannelMessageUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*LastChannelMessageUpsertBulk) Exec

Exec executes the query.

func (*LastChannelMessageUpsertBulk) ExecX

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

func (*LastChannelMessageUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.LastChannelMessage.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*LastChannelMessageUpsertBulk) SetMessageID

SetMessageID sets the "message_id" field.

func (*LastChannelMessageUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the LastChannelMessageCreateBulk.OnConflict documentation for more info.

func (*LastChannelMessageUpsertBulk) UpdateMessageID

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*LastChannelMessageUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.LastChannelMessage.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(lastchannelmessage.FieldID)
		}),
	).
	Exec(ctx)

type LastChannelMessageUpsertOne

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

LastChannelMessageUpsertOne is the builder for "upsert"-ing

one LastChannelMessage node.

func (*LastChannelMessageUpsertOne) AddMessageID

AddMessageID adds v to the "message_id" field.

func (*LastChannelMessageUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*LastChannelMessageUpsertOne) Exec

Exec executes the query.

func (*LastChannelMessageUpsertOne) ExecX

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

func (*LastChannelMessageUpsertOne) ID

func (u *LastChannelMessageUpsertOne) ID(ctx context.Context) (id int64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*LastChannelMessageUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*LastChannelMessageUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.LastChannelMessage.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*LastChannelMessageUpsertOne) SetMessageID

SetMessageID sets the "message_id" field.

func (*LastChannelMessageUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the LastChannelMessageCreate.OnConflict documentation for more info.

func (*LastChannelMessageUpsertOne) UpdateMessageID

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*LastChannelMessageUpsertOne) UpdateNewValues

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.LastChannelMessage.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(lastchannelmessage.FieldID)
		}),
	).
	Exec(ctx)

type LastChannelMessages

type LastChannelMessages []*LastChannelMessage

LastChannelMessages is a parsable slice of LastChannelMessage.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

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

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

func (*Organization) Value

func (o *Organization) Value(name string) (ent.Value, error)

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

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

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

Delete returns a delete builder for Organization.

func (*OrganizationClient) DeleteOne

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

Get returns a Organization entity by its id.

func (*OrganizationClient) GetX

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

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

Update returns an update builder for Organization.

func (*OrganizationClient) UpdateOne

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

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

Save creates the Organization in the database.

func (*OrganizationCreate) SaveX

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

SetID sets the "id" field.

func (*OrganizationCreate) SetName

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

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

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

Save creates the Organization entities in the database.

func (*OrganizationCreateBulk) SaveX

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

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

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

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

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

func (*OrganizationGroupBy) BoolX

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

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

func (*OrganizationGroupBy) Bools

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

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

func (*OrganizationGroupBy) BoolsX

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

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

func (*OrganizationGroupBy) Float64

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

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

func (*OrganizationGroupBy) Float64X

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

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

func (*OrganizationGroupBy) Float64s

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

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

func (*OrganizationGroupBy) Float64sX

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

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

func (*OrganizationGroupBy) Int

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

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

func (*OrganizationGroupBy) IntX

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

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

func (*OrganizationGroupBy) Ints

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

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

func (*OrganizationGroupBy) IntsX

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

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

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

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

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

func (*OrganizationGroupBy) String

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

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

func (*OrganizationGroupBy) StringX

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

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

func (*OrganizationGroupBy) Strings

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

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

func (*OrganizationGroupBy) StringsX

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

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

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

func (m *OrganizationMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

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

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

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

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

func (*OrganizationQuery) Order

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

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

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

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

func (*OrganizationSelect) BoolX

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

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

func (*OrganizationSelect) Bools

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

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

func (*OrganizationSelect) BoolsX

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

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

func (*OrganizationSelect) Float64

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

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

func (*OrganizationSelect) Float64X

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

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

func (*OrganizationSelect) Float64s

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

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

func (*OrganizationSelect) Float64sX

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

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

func (*OrganizationSelect) Int

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

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

func (*OrganizationSelect) IntX

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

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

func (*OrganizationSelect) Ints

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

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

func (*OrganizationSelect) IntsX

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

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

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

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

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

func (*OrganizationSelect) String

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

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

func (*OrganizationSelect) StringX

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

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

func (*OrganizationSelect) Strings

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

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

func (*OrganizationSelect) StringsX

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

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

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

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

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

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

Save executes the query and returns the updated Organization entity.

func (*OrganizationUpdateOne) SaveX

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

SetHTMLURL sets the "html_url" field.

func (*OrganizationUpdateOne) SetName

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

Where appends a list predicates to the OrganizationUpdate builder.

type OrganizationUpsert

type OrganizationUpsert struct {
	*sql.UpdateSet
}

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

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

ClearHTMLURL clears the value of the "html_url" field.

func (*OrganizationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrganizationUpsertBulk) Exec

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

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

SetHTMLURL sets the "html_url" field.

func (*OrganizationUpsertBulk) SetName

SetName sets the "name" field.

func (*OrganizationUpsertBulk) Update

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

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

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrganizationUpsertOne) Exec

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

IDX is like ID, but panics if an error occurs.

func (*OrganizationUpsertOne) Ignore

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

SetHTMLURL sets the "html_url" field.

func (*OrganizationUpsertOne) SetName

SetName sets the "name" field.

func (*OrganizationUpsertOne) Update

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

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 PRNotification

type PRNotification struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Github repository ID.
	RepoID int64 `json:"repo_id,omitempty"`
	// Pull request number.
	PullRequestID int `json:"pull_request_id,omitempty"`
	// Pull request title.
	PullRequestTitle string `json:"pull_request_title,omitempty"`
	// Pull request body.
	PullRequestBody string `json:"pull_request_body,omitempty"`
	// Pull request author's login.
	PullRequestAuthorLogin string `json:"pull_request_author_login,omitempty"`
	// Telegram message ID. Belongs to notify channel.
	MessageID int `json:"message_id,omitempty"`
	// contains filtered or unexported fields
}

PRNotification is the model entity for the PRNotification schema.

func (*PRNotification) String

func (pn *PRNotification) String() string

String implements the fmt.Stringer.

func (*PRNotification) Unwrap

func (pn *PRNotification) Unwrap() *PRNotification

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

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

func (*PRNotification) Value

func (pn *PRNotification) Value(name string) (ent.Value, error)

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

type PRNotificationClient

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

PRNotificationClient is a client for the PRNotification schema.

func NewPRNotificationClient

func NewPRNotificationClient(c config) *PRNotificationClient

NewPRNotificationClient returns a client for the PRNotification from the given config.

func (*PRNotificationClient) Create

Create returns a builder for creating a PRNotification entity.

func (*PRNotificationClient) CreateBulk

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

func (*PRNotificationClient) Delete

Delete returns a delete builder for PRNotification.

func (*PRNotificationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PRNotificationClient) DeleteOneID

func (c *PRNotificationClient) DeleteOneID(id int) *PRNotificationDeleteOne

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

func (*PRNotificationClient) Get

Get returns a PRNotification entity by its id.

func (*PRNotificationClient) GetX

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

func (*PRNotificationClient) Hooks

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

Hooks returns the client hooks.

func (*PRNotificationClient) Intercept

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

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

func (*PRNotificationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*PRNotificationClient) MapCreateBulk

func (c *PRNotificationClient) MapCreateBulk(slice any, setFunc func(*PRNotificationCreate, int)) *PRNotificationCreateBulk

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 (*PRNotificationClient) Query

Query returns a query builder for PRNotification.

func (*PRNotificationClient) Update

Update returns an update builder for PRNotification.

func (*PRNotificationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PRNotificationClient) UpdateOneID

func (c *PRNotificationClient) UpdateOneID(id int) *PRNotificationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PRNotificationClient) Use

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

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

type PRNotificationCreate

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

PRNotificationCreate is the builder for creating a PRNotification entity.

func (*PRNotificationCreate) Exec

func (pnc *PRNotificationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PRNotificationCreate) ExecX

func (pnc *PRNotificationCreate) ExecX(ctx context.Context)

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

func (*PRNotificationCreate) Mutation

Mutation returns the PRNotificationMutation object of the builder.

func (*PRNotificationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PRNotification.Create().
	SetRepoID(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.PRNotificationUpsert) {
		SetRepoID(v+v).
	}).
	Exec(ctx)

func (*PRNotificationCreate) OnConflictColumns

func (pnc *PRNotificationCreate) OnConflictColumns(columns ...string) *PRNotificationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PRNotification.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PRNotificationCreate) Save

Save creates the PRNotification in the database.

func (*PRNotificationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PRNotificationCreate) SetMessageID

func (pnc *PRNotificationCreate) SetMessageID(i int) *PRNotificationCreate

SetMessageID sets the "message_id" field.

func (*PRNotificationCreate) SetNillablePullRequestAuthorLogin

func (pnc *PRNotificationCreate) SetNillablePullRequestAuthorLogin(s *string) *PRNotificationCreate

SetNillablePullRequestAuthorLogin sets the "pull_request_author_login" field if the given value is not nil.

func (*PRNotificationCreate) SetNillablePullRequestBody

func (pnc *PRNotificationCreate) SetNillablePullRequestBody(s *string) *PRNotificationCreate

SetNillablePullRequestBody sets the "pull_request_body" field if the given value is not nil.

func (*PRNotificationCreate) SetNillablePullRequestTitle

func (pnc *PRNotificationCreate) SetNillablePullRequestTitle(s *string) *PRNotificationCreate

SetNillablePullRequestTitle sets the "pull_request_title" field if the given value is not nil.

func (*PRNotificationCreate) SetPullRequestAuthorLogin

func (pnc *PRNotificationCreate) SetPullRequestAuthorLogin(s string) *PRNotificationCreate

SetPullRequestAuthorLogin sets the "pull_request_author_login" field.

func (*PRNotificationCreate) SetPullRequestBody

func (pnc *PRNotificationCreate) SetPullRequestBody(s string) *PRNotificationCreate

SetPullRequestBody sets the "pull_request_body" field.

func (*PRNotificationCreate) SetPullRequestID

func (pnc *PRNotificationCreate) SetPullRequestID(i int) *PRNotificationCreate

SetPullRequestID sets the "pull_request_id" field.

func (*PRNotificationCreate) SetPullRequestTitle

func (pnc *PRNotificationCreate) SetPullRequestTitle(s string) *PRNotificationCreate

SetPullRequestTitle sets the "pull_request_title" field.

func (*PRNotificationCreate) SetRepoID

func (pnc *PRNotificationCreate) SetRepoID(i int64) *PRNotificationCreate

SetRepoID sets the "repo_id" field.

type PRNotificationCreateBulk

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

PRNotificationCreateBulk is the builder for creating many PRNotification entities in bulk.

func (*PRNotificationCreateBulk) Exec

Exec executes the query.

func (*PRNotificationCreateBulk) ExecX

func (pncb *PRNotificationCreateBulk) ExecX(ctx context.Context)

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

func (*PRNotificationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PRNotification.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.PRNotificationUpsert) {
		SetRepoID(v+v).
	}).
	Exec(ctx)

func (*PRNotificationCreateBulk) OnConflictColumns

func (pncb *PRNotificationCreateBulk) OnConflictColumns(columns ...string) *PRNotificationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PRNotification.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PRNotificationCreateBulk) Save

Save creates the PRNotification entities in the database.

func (*PRNotificationCreateBulk) SaveX

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

type PRNotificationDelete

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

PRNotificationDelete is the builder for deleting a PRNotification entity.

func (*PRNotificationDelete) Exec

func (pnd *PRNotificationDelete) Exec(ctx context.Context) (int, error)

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

func (*PRNotificationDelete) ExecX

func (pnd *PRNotificationDelete) ExecX(ctx context.Context) int

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

func (*PRNotificationDelete) Where

Where appends a list predicates to the PRNotificationDelete builder.

type PRNotificationDeleteOne

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

PRNotificationDeleteOne is the builder for deleting a single PRNotification entity.

func (*PRNotificationDeleteOne) Exec

func (pndo *PRNotificationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PRNotificationDeleteOne) ExecX

func (pndo *PRNotificationDeleteOne) ExecX(ctx context.Context)

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

func (*PRNotificationDeleteOne) Where

Where appends a list predicates to the PRNotificationDelete builder.

type PRNotificationGroupBy

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

PRNotificationGroupBy is the group-by builder for PRNotification entities.

func (*PRNotificationGroupBy) Aggregate

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

func (*PRNotificationGroupBy) Bool

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

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

func (*PRNotificationGroupBy) BoolX

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

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

func (*PRNotificationGroupBy) Bools

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

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

func (*PRNotificationGroupBy) BoolsX

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

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

func (*PRNotificationGroupBy) Float64

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

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

func (*PRNotificationGroupBy) Float64X

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

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

func (*PRNotificationGroupBy) Float64s

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

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

func (*PRNotificationGroupBy) Float64sX

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

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

func (*PRNotificationGroupBy) Int

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

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

func (*PRNotificationGroupBy) IntX

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

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

func (*PRNotificationGroupBy) Ints

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

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

func (*PRNotificationGroupBy) IntsX

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

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

func (*PRNotificationGroupBy) Scan

func (pngb *PRNotificationGroupBy) Scan(ctx context.Context, v any) error

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

func (*PRNotificationGroupBy) ScanX

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

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

func (*PRNotificationGroupBy) String

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

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

func (*PRNotificationGroupBy) StringX

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

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

func (*PRNotificationGroupBy) Strings

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

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

func (*PRNotificationGroupBy) StringsX

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

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

type PRNotificationMutation

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

PRNotificationMutation represents an operation that mutates the PRNotification nodes in the graph.

func (*PRNotificationMutation) AddField

func (m *PRNotificationMutation) 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 (*PRNotificationMutation) AddMessageID

func (m *PRNotificationMutation) AddMessageID(i int)

AddMessageID adds i to the "message_id" field.

func (*PRNotificationMutation) AddPullRequestID

func (m *PRNotificationMutation) AddPullRequestID(i int)

AddPullRequestID adds i to the "pull_request_id" field.

func (*PRNotificationMutation) AddRepoID

func (m *PRNotificationMutation) AddRepoID(i int64)

AddRepoID adds i to the "repo_id" field.

func (*PRNotificationMutation) AddedEdges

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

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

func (*PRNotificationMutation) AddedField

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

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

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

func (*PRNotificationMutation) AddedIDs

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

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

func (*PRNotificationMutation) AddedMessageID

func (m *PRNotificationMutation) AddedMessageID() (r int, exists bool)

AddedMessageID returns the value that was added to the "message_id" field in this mutation.

func (*PRNotificationMutation) AddedPullRequestID

func (m *PRNotificationMutation) AddedPullRequestID() (r int, exists bool)

AddedPullRequestID returns the value that was added to the "pull_request_id" field in this mutation.

func (*PRNotificationMutation) AddedRepoID

func (m *PRNotificationMutation) AddedRepoID() (r int64, exists bool)

AddedRepoID returns the value that was added to the "repo_id" field in this mutation.

func (*PRNotificationMutation) ClearEdge

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

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

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

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

func (*PRNotificationMutation) ClearedFields

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

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

func (PRNotificationMutation) Client

func (m PRNotificationMutation) 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 (*PRNotificationMutation) EdgeCleared

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

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

func (*PRNotificationMutation) Field

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

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

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

func (*PRNotificationMutation) Fields

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

func (m *PRNotificationMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PRNotificationMutation) IDs

func (m *PRNotificationMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PRNotificationMutation) MessageID

func (m *PRNotificationMutation) MessageID() (r int, exists bool)

MessageID returns the value of the "message_id" field in the mutation.

func (*PRNotificationMutation) OldField

func (m *PRNotificationMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PRNotificationMutation) OldMessageID

func (m *PRNotificationMutation) OldMessageID(ctx context.Context) (v int, err error)

OldMessageID returns the old "message_id" field's value of the PRNotification entity. If the PRNotification 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 (*PRNotificationMutation) OldPullRequestAuthorLogin

func (m *PRNotificationMutation) OldPullRequestAuthorLogin(ctx context.Context) (v string, err error)

OldPullRequestAuthorLogin returns the old "pull_request_author_login" field's value of the PRNotification entity. If the PRNotification 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 (*PRNotificationMutation) OldPullRequestBody

func (m *PRNotificationMutation) OldPullRequestBody(ctx context.Context) (v string, err error)

OldPullRequestBody returns the old "pull_request_body" field's value of the PRNotification entity. If the PRNotification 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 (*PRNotificationMutation) OldPullRequestID

func (m *PRNotificationMutation) OldPullRequestID(ctx context.Context) (v int, err error)

OldPullRequestID returns the old "pull_request_id" field's value of the PRNotification entity. If the PRNotification 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 (*PRNotificationMutation) OldPullRequestTitle

func (m *PRNotificationMutation) OldPullRequestTitle(ctx context.Context) (v string, err error)

OldPullRequestTitle returns the old "pull_request_title" field's value of the PRNotification entity. If the PRNotification 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 (*PRNotificationMutation) OldRepoID

func (m *PRNotificationMutation) OldRepoID(ctx context.Context) (v int64, err error)

OldRepoID returns the old "repo_id" field's value of the PRNotification entity. If the PRNotification 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 (*PRNotificationMutation) Op

func (m *PRNotificationMutation) Op() Op

Op returns the operation name.

func (*PRNotificationMutation) PullRequestAuthorLogin

func (m *PRNotificationMutation) PullRequestAuthorLogin() (r string, exists bool)

PullRequestAuthorLogin returns the value of the "pull_request_author_login" field in the mutation.

func (*PRNotificationMutation) PullRequestBody

func (m *PRNotificationMutation) PullRequestBody() (r string, exists bool)

PullRequestBody returns the value of the "pull_request_body" field in the mutation.

func (*PRNotificationMutation) PullRequestID

func (m *PRNotificationMutation) PullRequestID() (r int, exists bool)

PullRequestID returns the value of the "pull_request_id" field in the mutation.

func (*PRNotificationMutation) PullRequestTitle

func (m *PRNotificationMutation) PullRequestTitle() (r string, exists bool)

PullRequestTitle returns the value of the "pull_request_title" field in the mutation.

func (*PRNotificationMutation) RemovedEdges

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

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

func (*PRNotificationMutation) RemovedIDs

func (m *PRNotificationMutation) 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 (*PRNotificationMutation) RepoID

func (m *PRNotificationMutation) RepoID() (r int64, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*PRNotificationMutation) ResetEdge

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

func (m *PRNotificationMutation) 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 (*PRNotificationMutation) ResetMessageID

func (m *PRNotificationMutation) ResetMessageID()

ResetMessageID resets all changes to the "message_id" field.

func (*PRNotificationMutation) ResetPullRequestAuthorLogin

func (m *PRNotificationMutation) ResetPullRequestAuthorLogin()

ResetPullRequestAuthorLogin resets all changes to the "pull_request_author_login" field.

func (*PRNotificationMutation) ResetPullRequestBody

func (m *PRNotificationMutation) ResetPullRequestBody()

ResetPullRequestBody resets all changes to the "pull_request_body" field.

func (*PRNotificationMutation) ResetPullRequestID

func (m *PRNotificationMutation) ResetPullRequestID()

ResetPullRequestID resets all changes to the "pull_request_id" field.

func (*PRNotificationMutation) ResetPullRequestTitle

func (m *PRNotificationMutation) ResetPullRequestTitle()

ResetPullRequestTitle resets all changes to the "pull_request_title" field.

func (*PRNotificationMutation) ResetRepoID

func (m *PRNotificationMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*PRNotificationMutation) SetField

func (m *PRNotificationMutation) 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 (*PRNotificationMutation) SetMessageID

func (m *PRNotificationMutation) SetMessageID(i int)

SetMessageID sets the "message_id" field.

func (*PRNotificationMutation) SetOp

func (m *PRNotificationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PRNotificationMutation) SetPullRequestAuthorLogin

func (m *PRNotificationMutation) SetPullRequestAuthorLogin(s string)

SetPullRequestAuthorLogin sets the "pull_request_author_login" field.

func (*PRNotificationMutation) SetPullRequestBody

func (m *PRNotificationMutation) SetPullRequestBody(s string)

SetPullRequestBody sets the "pull_request_body" field.

func (*PRNotificationMutation) SetPullRequestID

func (m *PRNotificationMutation) SetPullRequestID(i int)

SetPullRequestID sets the "pull_request_id" field.

func (*PRNotificationMutation) SetPullRequestTitle

func (m *PRNotificationMutation) SetPullRequestTitle(s string)

SetPullRequestTitle sets the "pull_request_title" field.

func (*PRNotificationMutation) SetRepoID

func (m *PRNotificationMutation) SetRepoID(i int64)

SetRepoID sets the "repo_id" field.

func (PRNotificationMutation) Tx

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

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

func (*PRNotificationMutation) Type

func (m *PRNotificationMutation) Type() string

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

func (*PRNotificationMutation) Where

Where appends a list predicates to the PRNotificationMutation builder.

func (*PRNotificationMutation) WhereP

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

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

type PRNotificationQuery

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

PRNotificationQuery is the builder for querying PRNotification entities.

func (*PRNotificationQuery) Aggregate

func (pnq *PRNotificationQuery) Aggregate(fns ...AggregateFunc) *PRNotificationSelect

Aggregate returns a PRNotificationSelect configured with the given aggregations.

func (*PRNotificationQuery) All

All executes the query and returns a list of PRNotifications.

func (*PRNotificationQuery) AllX

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

func (*PRNotificationQuery) Clone

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

func (*PRNotificationQuery) Count

func (pnq *PRNotificationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PRNotificationQuery) CountX

func (pnq *PRNotificationQuery) CountX(ctx context.Context) int

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

func (*PRNotificationQuery) Exist

func (pnq *PRNotificationQuery) Exist(ctx context.Context) (bool, error)

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

func (*PRNotificationQuery) ExistX

func (pnq *PRNotificationQuery) ExistX(ctx context.Context) bool

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

func (*PRNotificationQuery) First

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

func (*PRNotificationQuery) FirstID

func (pnq *PRNotificationQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*PRNotificationQuery) FirstIDX

func (pnq *PRNotificationQuery) FirstIDX(ctx context.Context) int

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

func (*PRNotificationQuery) FirstX

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

func (*PRNotificationQuery) GroupBy

func (pnq *PRNotificationQuery) GroupBy(field string, fields ...string) *PRNotificationGroupBy

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 {
	RepoID int64 `json:"repo_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PRNotification.Query().
	GroupBy(prnotification.FieldRepoID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PRNotificationQuery) IDs

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

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

func (*PRNotificationQuery) IDsX

func (pnq *PRNotificationQuery) IDsX(ctx context.Context) []int

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

func (*PRNotificationQuery) Limit

func (pnq *PRNotificationQuery) Limit(limit int) *PRNotificationQuery

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

func (*PRNotificationQuery) Offset

func (pnq *PRNotificationQuery) Offset(offset int) *PRNotificationQuery

Offset to start from.

func (*PRNotificationQuery) Only

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

func (*PRNotificationQuery) OnlyID

func (pnq *PRNotificationQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*PRNotificationQuery) OnlyIDX

func (pnq *PRNotificationQuery) OnlyIDX(ctx context.Context) int

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

func (*PRNotificationQuery) OnlyX

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

func (*PRNotificationQuery) Order

Order specifies how the records should be ordered.

func (*PRNotificationQuery) Select

func (pnq *PRNotificationQuery) Select(fields ...string) *PRNotificationSelect

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 {
	RepoID int64 `json:"repo_id,omitempty"`
}

client.PRNotification.Query().
	Select(prnotification.FieldRepoID).
	Scan(ctx, &v)

func (*PRNotificationQuery) Unique

func (pnq *PRNotificationQuery) Unique(unique bool) *PRNotificationQuery

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

Where adds a new predicate for the PRNotificationQuery builder.

type PRNotificationSelect

type PRNotificationSelect struct {
	*PRNotificationQuery
	// contains filtered or unexported fields
}

PRNotificationSelect is the builder for selecting fields of PRNotification entities.

func (*PRNotificationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*PRNotificationSelect) Bool

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

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

func (*PRNotificationSelect) BoolX

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

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

func (*PRNotificationSelect) Bools

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

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

func (*PRNotificationSelect) BoolsX

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

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

func (*PRNotificationSelect) Float64

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

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

func (*PRNotificationSelect) Float64X

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

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

func (*PRNotificationSelect) Float64s

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

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

func (*PRNotificationSelect) Float64sX

func (s *PRNotificationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PRNotificationSelect) Int

func (s *PRNotificationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PRNotificationSelect) IntX

func (s *PRNotificationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PRNotificationSelect) Ints

func (s *PRNotificationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PRNotificationSelect) IntsX

func (s *PRNotificationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PRNotificationSelect) Scan

func (pns *PRNotificationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PRNotificationSelect) ScanX

func (s *PRNotificationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PRNotificationSelect) String

func (s *PRNotificationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PRNotificationSelect) StringX

func (s *PRNotificationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PRNotificationSelect) Strings

func (s *PRNotificationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PRNotificationSelect) StringsX

func (s *PRNotificationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PRNotificationUpdate

type PRNotificationUpdate struct {
	// contains filtered or unexported fields
}

PRNotificationUpdate is the builder for updating PRNotification entities.

func (*PRNotificationUpdate) AddMessageID

func (pnu *PRNotificationUpdate) AddMessageID(i int) *PRNotificationUpdate

AddMessageID adds i to the "message_id" field.

func (*PRNotificationUpdate) AddPullRequestID

func (pnu *PRNotificationUpdate) AddPullRequestID(i int) *PRNotificationUpdate

AddPullRequestID adds i to the "pull_request_id" field.

func (*PRNotificationUpdate) AddRepoID

func (pnu *PRNotificationUpdate) AddRepoID(i int64) *PRNotificationUpdate

AddRepoID adds i to the "repo_id" field.

func (*PRNotificationUpdate) Exec

func (pnu *PRNotificationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PRNotificationUpdate) ExecX

func (pnu *PRNotificationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PRNotificationUpdate) Mutation

Mutation returns the PRNotificationMutation object of the builder.

func (*PRNotificationUpdate) Save

func (pnu *PRNotificationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PRNotificationUpdate) SaveX

func (pnu *PRNotificationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PRNotificationUpdate) SetMessageID

func (pnu *PRNotificationUpdate) SetMessageID(i int) *PRNotificationUpdate

SetMessageID sets the "message_id" field.

func (*PRNotificationUpdate) SetNillableMessageID

func (pnu *PRNotificationUpdate) SetNillableMessageID(i *int) *PRNotificationUpdate

SetNillableMessageID sets the "message_id" field if the given value is not nil.

func (*PRNotificationUpdate) SetNillablePullRequestAuthorLogin

func (pnu *PRNotificationUpdate) SetNillablePullRequestAuthorLogin(s *string) *PRNotificationUpdate

SetNillablePullRequestAuthorLogin sets the "pull_request_author_login" field if the given value is not nil.

func (*PRNotificationUpdate) SetNillablePullRequestBody

func (pnu *PRNotificationUpdate) SetNillablePullRequestBody(s *string) *PRNotificationUpdate

SetNillablePullRequestBody sets the "pull_request_body" field if the given value is not nil.

func (*PRNotificationUpdate) SetNillablePullRequestID

func (pnu *PRNotificationUpdate) SetNillablePullRequestID(i *int) *PRNotificationUpdate

SetNillablePullRequestID sets the "pull_request_id" field if the given value is not nil.

func (*PRNotificationUpdate) SetNillablePullRequestTitle

func (pnu *PRNotificationUpdate) SetNillablePullRequestTitle(s *string) *PRNotificationUpdate

SetNillablePullRequestTitle sets the "pull_request_title" field if the given value is not nil.

func (*PRNotificationUpdate) SetNillableRepoID

func (pnu *PRNotificationUpdate) SetNillableRepoID(i *int64) *PRNotificationUpdate

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*PRNotificationUpdate) SetPullRequestAuthorLogin

func (pnu *PRNotificationUpdate) SetPullRequestAuthorLogin(s string) *PRNotificationUpdate

SetPullRequestAuthorLogin sets the "pull_request_author_login" field.

func (*PRNotificationUpdate) SetPullRequestBody

func (pnu *PRNotificationUpdate) SetPullRequestBody(s string) *PRNotificationUpdate

SetPullRequestBody sets the "pull_request_body" field.

func (*PRNotificationUpdate) SetPullRequestID

func (pnu *PRNotificationUpdate) SetPullRequestID(i int) *PRNotificationUpdate

SetPullRequestID sets the "pull_request_id" field.

func (*PRNotificationUpdate) SetPullRequestTitle

func (pnu *PRNotificationUpdate) SetPullRequestTitle(s string) *PRNotificationUpdate

SetPullRequestTitle sets the "pull_request_title" field.

func (*PRNotificationUpdate) SetRepoID

func (pnu *PRNotificationUpdate) SetRepoID(i int64) *PRNotificationUpdate

SetRepoID sets the "repo_id" field.

func (*PRNotificationUpdate) Where

Where appends a list predicates to the PRNotificationUpdate builder.

type PRNotificationUpdateOne

type PRNotificationUpdateOne struct {
	// contains filtered or unexported fields
}

PRNotificationUpdateOne is the builder for updating a single PRNotification entity.

func (*PRNotificationUpdateOne) AddMessageID

func (pnuo *PRNotificationUpdateOne) AddMessageID(i int) *PRNotificationUpdateOne

AddMessageID adds i to the "message_id" field.

func (*PRNotificationUpdateOne) AddPullRequestID

func (pnuo *PRNotificationUpdateOne) AddPullRequestID(i int) *PRNotificationUpdateOne

AddPullRequestID adds i to the "pull_request_id" field.

func (*PRNotificationUpdateOne) AddRepoID

AddRepoID adds i to the "repo_id" field.

func (*PRNotificationUpdateOne) Exec

func (pnuo *PRNotificationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PRNotificationUpdateOne) ExecX

func (pnuo *PRNotificationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PRNotificationUpdateOne) Mutation

Mutation returns the PRNotificationMutation object of the builder.

func (*PRNotificationUpdateOne) Save

Save executes the query and returns the updated PRNotification entity.

func (*PRNotificationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PRNotificationUpdateOne) Select

func (pnuo *PRNotificationUpdateOne) Select(field string, fields ...string) *PRNotificationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PRNotificationUpdateOne) SetMessageID

func (pnuo *PRNotificationUpdateOne) SetMessageID(i int) *PRNotificationUpdateOne

SetMessageID sets the "message_id" field.

func (*PRNotificationUpdateOne) SetNillableMessageID

func (pnuo *PRNotificationUpdateOne) SetNillableMessageID(i *int) *PRNotificationUpdateOne

SetNillableMessageID sets the "message_id" field if the given value is not nil.

func (*PRNotificationUpdateOne) SetNillablePullRequestAuthorLogin

func (pnuo *PRNotificationUpdateOne) SetNillablePullRequestAuthorLogin(s *string) *PRNotificationUpdateOne

SetNillablePullRequestAuthorLogin sets the "pull_request_author_login" field if the given value is not nil.

func (*PRNotificationUpdateOne) SetNillablePullRequestBody

func (pnuo *PRNotificationUpdateOne) SetNillablePullRequestBody(s *string) *PRNotificationUpdateOne

SetNillablePullRequestBody sets the "pull_request_body" field if the given value is not nil.

func (*PRNotificationUpdateOne) SetNillablePullRequestID

func (pnuo *PRNotificationUpdateOne) SetNillablePullRequestID(i *int) *PRNotificationUpdateOne

SetNillablePullRequestID sets the "pull_request_id" field if the given value is not nil.

func (*PRNotificationUpdateOne) SetNillablePullRequestTitle

func (pnuo *PRNotificationUpdateOne) SetNillablePullRequestTitle(s *string) *PRNotificationUpdateOne

SetNillablePullRequestTitle sets the "pull_request_title" field if the given value is not nil.

func (*PRNotificationUpdateOne) SetNillableRepoID

func (pnuo *PRNotificationUpdateOne) SetNillableRepoID(i *int64) *PRNotificationUpdateOne

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*PRNotificationUpdateOne) SetPullRequestAuthorLogin

func (pnuo *PRNotificationUpdateOne) SetPullRequestAuthorLogin(s string) *PRNotificationUpdateOne

SetPullRequestAuthorLogin sets the "pull_request_author_login" field.

func (*PRNotificationUpdateOne) SetPullRequestBody

func (pnuo *PRNotificationUpdateOne) SetPullRequestBody(s string) *PRNotificationUpdateOne

SetPullRequestBody sets the "pull_request_body" field.

func (*PRNotificationUpdateOne) SetPullRequestID

func (pnuo *PRNotificationUpdateOne) SetPullRequestID(i int) *PRNotificationUpdateOne

SetPullRequestID sets the "pull_request_id" field.

func (*PRNotificationUpdateOne) SetPullRequestTitle

func (pnuo *PRNotificationUpdateOne) SetPullRequestTitle(s string) *PRNotificationUpdateOne

SetPullRequestTitle sets the "pull_request_title" field.

func (*PRNotificationUpdateOne) SetRepoID

SetRepoID sets the "repo_id" field.

func (*PRNotificationUpdateOne) Where

Where appends a list predicates to the PRNotificationUpdate builder.

type PRNotificationUpsert

type PRNotificationUpsert struct {
	*sql.UpdateSet
}

PRNotificationUpsert is the "OnConflict" setter.

func (*PRNotificationUpsert) AddMessageID

func (u *PRNotificationUpsert) AddMessageID(v int) *PRNotificationUpsert

AddMessageID adds v to the "message_id" field.

func (*PRNotificationUpsert) AddPullRequestID

func (u *PRNotificationUpsert) AddPullRequestID(v int) *PRNotificationUpsert

AddPullRequestID adds v to the "pull_request_id" field.

func (*PRNotificationUpsert) AddRepoID

AddRepoID adds v to the "repo_id" field.

func (*PRNotificationUpsert) SetMessageID

func (u *PRNotificationUpsert) SetMessageID(v int) *PRNotificationUpsert

SetMessageID sets the "message_id" field.

func (*PRNotificationUpsert) SetPullRequestAuthorLogin

func (u *PRNotificationUpsert) SetPullRequestAuthorLogin(v string) *PRNotificationUpsert

SetPullRequestAuthorLogin sets the "pull_request_author_login" field.

func (*PRNotificationUpsert) SetPullRequestBody

func (u *PRNotificationUpsert) SetPullRequestBody(v string) *PRNotificationUpsert

SetPullRequestBody sets the "pull_request_body" field.

func (*PRNotificationUpsert) SetPullRequestID

func (u *PRNotificationUpsert) SetPullRequestID(v int) *PRNotificationUpsert

SetPullRequestID sets the "pull_request_id" field.

func (*PRNotificationUpsert) SetPullRequestTitle

func (u *PRNotificationUpsert) SetPullRequestTitle(v string) *PRNotificationUpsert

SetPullRequestTitle sets the "pull_request_title" field.

func (*PRNotificationUpsert) SetRepoID

SetRepoID sets the "repo_id" field.

func (*PRNotificationUpsert) UpdateMessageID

func (u *PRNotificationUpsert) UpdateMessageID() *PRNotificationUpsert

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*PRNotificationUpsert) UpdatePullRequestAuthorLogin

func (u *PRNotificationUpsert) UpdatePullRequestAuthorLogin() *PRNotificationUpsert

UpdatePullRequestAuthorLogin sets the "pull_request_author_login" field to the value that was provided on create.

func (*PRNotificationUpsert) UpdatePullRequestBody

func (u *PRNotificationUpsert) UpdatePullRequestBody() *PRNotificationUpsert

UpdatePullRequestBody sets the "pull_request_body" field to the value that was provided on create.

func (*PRNotificationUpsert) UpdatePullRequestID

func (u *PRNotificationUpsert) UpdatePullRequestID() *PRNotificationUpsert

UpdatePullRequestID sets the "pull_request_id" field to the value that was provided on create.

func (*PRNotificationUpsert) UpdatePullRequestTitle

func (u *PRNotificationUpsert) UpdatePullRequestTitle() *PRNotificationUpsert

UpdatePullRequestTitle sets the "pull_request_title" field to the value that was provided on create.

func (*PRNotificationUpsert) UpdateRepoID

func (u *PRNotificationUpsert) UpdateRepoID() *PRNotificationUpsert

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

type PRNotificationUpsertBulk

type PRNotificationUpsertBulk struct {
	// contains filtered or unexported fields
}

PRNotificationUpsertBulk is the builder for "upsert"-ing a bulk of PRNotification nodes.

func (*PRNotificationUpsertBulk) AddMessageID

AddMessageID adds v to the "message_id" field.

func (*PRNotificationUpsertBulk) AddPullRequestID

func (u *PRNotificationUpsertBulk) AddPullRequestID(v int) *PRNotificationUpsertBulk

AddPullRequestID adds v to the "pull_request_id" field.

func (*PRNotificationUpsertBulk) AddRepoID

AddRepoID adds v to the "repo_id" field.

func (*PRNotificationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PRNotificationUpsertBulk) Exec

Exec executes the query.

func (*PRNotificationUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*PRNotificationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PRNotification.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PRNotificationUpsertBulk) SetMessageID

SetMessageID sets the "message_id" field.

func (*PRNotificationUpsertBulk) SetPullRequestAuthorLogin

func (u *PRNotificationUpsertBulk) SetPullRequestAuthorLogin(v string) *PRNotificationUpsertBulk

SetPullRequestAuthorLogin sets the "pull_request_author_login" field.

func (*PRNotificationUpsertBulk) SetPullRequestBody

func (u *PRNotificationUpsertBulk) SetPullRequestBody(v string) *PRNotificationUpsertBulk

SetPullRequestBody sets the "pull_request_body" field.

func (*PRNotificationUpsertBulk) SetPullRequestID

func (u *PRNotificationUpsertBulk) SetPullRequestID(v int) *PRNotificationUpsertBulk

SetPullRequestID sets the "pull_request_id" field.

func (*PRNotificationUpsertBulk) SetPullRequestTitle

func (u *PRNotificationUpsertBulk) SetPullRequestTitle(v string) *PRNotificationUpsertBulk

SetPullRequestTitle sets the "pull_request_title" field.

func (*PRNotificationUpsertBulk) SetRepoID

SetRepoID sets the "repo_id" field.

func (*PRNotificationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PRNotificationCreateBulk.OnConflict documentation for more info.

func (*PRNotificationUpsertBulk) UpdateMessageID

func (u *PRNotificationUpsertBulk) UpdateMessageID() *PRNotificationUpsertBulk

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*PRNotificationUpsertBulk) UpdateNewValues

func (u *PRNotificationUpsertBulk) UpdateNewValues() *PRNotificationUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PRNotification.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PRNotificationUpsertBulk) UpdatePullRequestAuthorLogin

func (u *PRNotificationUpsertBulk) UpdatePullRequestAuthorLogin() *PRNotificationUpsertBulk

UpdatePullRequestAuthorLogin sets the "pull_request_author_login" field to the value that was provided on create.

func (*PRNotificationUpsertBulk) UpdatePullRequestBody

func (u *PRNotificationUpsertBulk) UpdatePullRequestBody() *PRNotificationUpsertBulk

UpdatePullRequestBody sets the "pull_request_body" field to the value that was provided on create.

func (*PRNotificationUpsertBulk) UpdatePullRequestID

func (u *PRNotificationUpsertBulk) UpdatePullRequestID() *PRNotificationUpsertBulk

UpdatePullRequestID sets the "pull_request_id" field to the value that was provided on create.

func (*PRNotificationUpsertBulk) UpdatePullRequestTitle

func (u *PRNotificationUpsertBulk) UpdatePullRequestTitle() *PRNotificationUpsertBulk

UpdatePullRequestTitle sets the "pull_request_title" field to the value that was provided on create.

func (*PRNotificationUpsertBulk) UpdateRepoID

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

type PRNotificationUpsertOne

type PRNotificationUpsertOne struct {
	// contains filtered or unexported fields
}

PRNotificationUpsertOne is the builder for "upsert"-ing

one PRNotification node.

func (*PRNotificationUpsertOne) AddMessageID

AddMessageID adds v to the "message_id" field.

func (*PRNotificationUpsertOne) AddPullRequestID

func (u *PRNotificationUpsertOne) AddPullRequestID(v int) *PRNotificationUpsertOne

AddPullRequestID adds v to the "pull_request_id" field.

func (*PRNotificationUpsertOne) AddRepoID

AddRepoID adds v to the "repo_id" field.

func (*PRNotificationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PRNotificationUpsertOne) Exec

Exec executes the query.

func (*PRNotificationUpsertOne) ExecX

func (u *PRNotificationUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PRNotificationUpsertOne) ID

func (u *PRNotificationUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PRNotificationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PRNotificationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PRNotification.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PRNotificationUpsertOne) SetMessageID

SetMessageID sets the "message_id" field.

func (*PRNotificationUpsertOne) SetPullRequestAuthorLogin

func (u *PRNotificationUpsertOne) SetPullRequestAuthorLogin(v string) *PRNotificationUpsertOne

SetPullRequestAuthorLogin sets the "pull_request_author_login" field.

func (*PRNotificationUpsertOne) SetPullRequestBody

func (u *PRNotificationUpsertOne) SetPullRequestBody(v string) *PRNotificationUpsertOne

SetPullRequestBody sets the "pull_request_body" field.

func (*PRNotificationUpsertOne) SetPullRequestID

func (u *PRNotificationUpsertOne) SetPullRequestID(v int) *PRNotificationUpsertOne

SetPullRequestID sets the "pull_request_id" field.

func (*PRNotificationUpsertOne) SetPullRequestTitle

func (u *PRNotificationUpsertOne) SetPullRequestTitle(v string) *PRNotificationUpsertOne

SetPullRequestTitle sets the "pull_request_title" field.

func (*PRNotificationUpsertOne) SetRepoID

SetRepoID sets the "repo_id" field.

func (*PRNotificationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PRNotificationCreate.OnConflict documentation for more info.

func (*PRNotificationUpsertOne) UpdateMessageID

func (u *PRNotificationUpsertOne) UpdateMessageID() *PRNotificationUpsertOne

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*PRNotificationUpsertOne) UpdateNewValues

func (u *PRNotificationUpsertOne) UpdateNewValues() *PRNotificationUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PRNotification.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PRNotificationUpsertOne) UpdatePullRequestAuthorLogin

func (u *PRNotificationUpsertOne) UpdatePullRequestAuthorLogin() *PRNotificationUpsertOne

UpdatePullRequestAuthorLogin sets the "pull_request_author_login" field to the value that was provided on create.

func (*PRNotificationUpsertOne) UpdatePullRequestBody

func (u *PRNotificationUpsertOne) UpdatePullRequestBody() *PRNotificationUpsertOne

UpdatePullRequestBody sets the "pull_request_body" field to the value that was provided on create.

func (*PRNotificationUpsertOne) UpdatePullRequestID

func (u *PRNotificationUpsertOne) UpdatePullRequestID() *PRNotificationUpsertOne

UpdatePullRequestID sets the "pull_request_id" field to the value that was provided on create.

func (*PRNotificationUpsertOne) UpdatePullRequestTitle

func (u *PRNotificationUpsertOne) UpdatePullRequestTitle() *PRNotificationUpsertOne

UpdatePullRequestTitle sets the "pull_request_title" field to the value that was provided on create.

func (*PRNotificationUpsertOne) UpdateRepoID

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

type PRNotifications

type PRNotifications []*PRNotification

PRNotifications is a parsable slice of PRNotification.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type Repositories

type Repositories []*Repository

Repositories is a parsable slice of Repository.

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.

func (*Repository) Value

func (r *Repository) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Repository. This includes values selected through modifiers, order, etc.

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

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

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

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

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

func (s *RepositoryGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) BoolX

func (s *RepositoryGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RepositoryGroupBy) Bools

func (s *RepositoryGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) BoolsX

func (s *RepositoryGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RepositoryGroupBy) Float64

func (s *RepositoryGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) Float64X

func (s *RepositoryGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RepositoryGroupBy) Float64s

func (s *RepositoryGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) Float64sX

func (s *RepositoryGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RepositoryGroupBy) Int

func (s *RepositoryGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) IntX

func (s *RepositoryGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RepositoryGroupBy) Ints

func (s *RepositoryGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) IntsX

func (s *RepositoryGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *RepositoryGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RepositoryGroupBy) String

func (s *RepositoryGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) StringX

func (s *RepositoryGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RepositoryGroupBy) Strings

func (s *RepositoryGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RepositoryGroupBy) StringsX

func (s *RepositoryGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *RepositoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *RepositoryMutation) OldLastEventAt(ctx context.Context) (v time.Time, err error)

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

func (m *RepositoryMutation) OldLastPushedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *RepositoryMutation) Op() Op

Op returns the operation name.

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

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

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

func (s *RepositorySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) BoolX

func (s *RepositorySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RepositorySelect) Bools

func (s *RepositorySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) BoolsX

func (s *RepositorySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RepositorySelect) Float64

func (s *RepositorySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) Float64X

func (s *RepositorySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RepositorySelect) Float64s

func (s *RepositorySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) Float64sX

func (s *RepositorySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RepositorySelect) Int

func (s *RepositorySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) IntX

func (s *RepositorySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RepositorySelect) Ints

func (s *RepositorySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) IntsX

func (s *RepositorySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *RepositorySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RepositorySelect) String

func (s *RepositorySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) StringX

func (s *RepositorySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RepositorySelect) Strings

func (s *RepositorySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RepositorySelect) StringsX

func (s *RepositorySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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

Where appends a list predicates to the RepositoryUpdate builder.

type RepositoryUpsert

type RepositoryUpsert struct {
	*sql.UpdateSet
}

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

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RepositoryUpsertBulk) Exec

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

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

SetFullName sets the "full_name" field.

func (*RepositoryUpsertBulk) SetHTMLURL

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

SetName sets the "name" field.

func (*RepositoryUpsertBulk) Update

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

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

IDX is like ID, but panics if an error occurs.

func (*RepositoryUpsertOne) Ignore

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

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

SetName sets the "name" field.

func (*RepositoryUpsertOne) Update

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

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type TelegramChannelState

type TelegramChannelState struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Channel id
	ChannelID int64 `json:"channel_id,omitempty"`
	// User id
	UserID int64 `json:"user_id,omitempty"`
	// Pts holds the value of the "pts" field.
	Pts int `json:"pts,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TelegramChannelStateQuery when eager-loading is set.
	Edges TelegramChannelStateEdges `json:"edges"`
	// contains filtered or unexported fields
}

TelegramChannelState is the model entity for the TelegramChannelState schema.

func (*TelegramChannelState) QueryUser

func (tcs *TelegramChannelState) QueryUser() *TelegramUserStateQuery

QueryUser queries the "user" edge of the TelegramChannelState entity.

func (*TelegramChannelState) String

func (tcs *TelegramChannelState) String() string

String implements the fmt.Stringer.

func (*TelegramChannelState) Unwrap

Unwrap unwraps the TelegramChannelState 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 (*TelegramChannelState) Update

Update returns a builder for updating this TelegramChannelState. Note that you need to call TelegramChannelState.Unwrap() before calling this method if this TelegramChannelState was returned from a transaction, and the transaction was committed or rolled back.

func (*TelegramChannelState) Value

func (tcs *TelegramChannelState) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TelegramChannelState. This includes values selected through modifiers, order, etc.

type TelegramChannelStateClient

type TelegramChannelStateClient struct {
	// contains filtered or unexported fields
}

TelegramChannelStateClient is a client for the TelegramChannelState schema.

func NewTelegramChannelStateClient

func NewTelegramChannelStateClient(c config) *TelegramChannelStateClient

NewTelegramChannelStateClient returns a client for the TelegramChannelState from the given config.

func (*TelegramChannelStateClient) Create

Create returns a builder for creating a TelegramChannelState entity.

func (*TelegramChannelStateClient) CreateBulk

CreateBulk returns a builder for creating a bulk of TelegramChannelState entities.

func (*TelegramChannelStateClient) Delete

Delete returns a delete builder for TelegramChannelState.

func (*TelegramChannelStateClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TelegramChannelStateClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TelegramChannelStateClient) Get

Get returns a TelegramChannelState entity by its id.

func (*TelegramChannelStateClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TelegramChannelStateClient) Hooks

func (c *TelegramChannelStateClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TelegramChannelStateClient) Intercept

func (c *TelegramChannelStateClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `telegramchannelstate.Intercept(f(g(h())))`.

func (*TelegramChannelStateClient) Interceptors

func (c *TelegramChannelStateClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TelegramChannelStateClient) MapCreateBulk

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 (*TelegramChannelStateClient) Query

Query returns a query builder for TelegramChannelState.

func (*TelegramChannelStateClient) QueryUser

QueryUser queries the user edge of a TelegramChannelState.

func (*TelegramChannelStateClient) Update

Update returns an update builder for TelegramChannelState.

func (*TelegramChannelStateClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TelegramChannelStateClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*TelegramChannelStateClient) Use

func (c *TelegramChannelStateClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `telegramchannelstate.Hooks(f(g(h())))`.

type TelegramChannelStateCreate

type TelegramChannelStateCreate struct {
	// contains filtered or unexported fields
}

TelegramChannelStateCreate is the builder for creating a TelegramChannelState entity.

func (*TelegramChannelStateCreate) Exec

Exec executes the query.

func (*TelegramChannelStateCreate) ExecX

func (tcsc *TelegramChannelStateCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateCreate) Mutation

Mutation returns the TelegramChannelStateMutation object of the builder.

func (*TelegramChannelStateCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TelegramChannelState.Create().
	SetChannelID(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.TelegramChannelStateUpsert) {
		SetChannelID(v+v).
	}).
	Exec(ctx)

func (*TelegramChannelStateCreate) OnConflictColumns

func (tcsc *TelegramChannelStateCreate) OnConflictColumns(columns ...string) *TelegramChannelStateUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TelegramChannelState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TelegramChannelStateCreate) Save

Save creates the TelegramChannelState in the database.

func (*TelegramChannelStateCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*TelegramChannelStateCreate) SetChannelID

SetChannelID sets the "channel_id" field.

func (*TelegramChannelStateCreate) SetNillablePts

func (tcsc *TelegramChannelStateCreate) SetNillablePts(i *int) *TelegramChannelStateCreate

SetNillablePts sets the "pts" field if the given value is not nil.

func (*TelegramChannelStateCreate) SetPts

SetPts sets the "pts" field.

func (*TelegramChannelStateCreate) SetUser

SetUser sets the "user" edge to the TelegramUserState entity.

func (*TelegramChannelStateCreate) SetUserID

SetUserID sets the "user_id" field.

type TelegramChannelStateCreateBulk

type TelegramChannelStateCreateBulk struct {
	// contains filtered or unexported fields
}

TelegramChannelStateCreateBulk is the builder for creating many TelegramChannelState entities in bulk.

func (*TelegramChannelStateCreateBulk) Exec

Exec executes the query.

func (*TelegramChannelStateCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TelegramChannelState.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.TelegramChannelStateUpsert) {
		SetChannelID(v+v).
	}).
	Exec(ctx)

func (*TelegramChannelStateCreateBulk) OnConflictColumns

func (tcscb *TelegramChannelStateCreateBulk) OnConflictColumns(columns ...string) *TelegramChannelStateUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TelegramChannelState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TelegramChannelStateCreateBulk) Save

Save creates the TelegramChannelState entities in the database.

func (*TelegramChannelStateCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type TelegramChannelStateDelete

type TelegramChannelStateDelete struct {
	// contains filtered or unexported fields
}

TelegramChannelStateDelete is the builder for deleting a TelegramChannelState entity.

func (*TelegramChannelStateDelete) Exec

func (tcsd *TelegramChannelStateDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TelegramChannelStateDelete) ExecX

func (tcsd *TelegramChannelStateDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateDelete) Where

Where appends a list predicates to the TelegramChannelStateDelete builder.

type TelegramChannelStateDeleteOne

type TelegramChannelStateDeleteOne struct {
	// contains filtered or unexported fields
}

TelegramChannelStateDeleteOne is the builder for deleting a single TelegramChannelState entity.

func (*TelegramChannelStateDeleteOne) Exec

Exec executes the deletion query.

func (*TelegramChannelStateDeleteOne) ExecX

func (tcsdo *TelegramChannelStateDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateDeleteOne) Where

Where appends a list predicates to the TelegramChannelStateDelete builder.

type TelegramChannelStateEdges

type TelegramChannelStateEdges struct {
	// User holds the value of the user edge.
	User *TelegramUserState `json:"user,omitempty"`
	// contains filtered or unexported fields
}

TelegramChannelStateEdges holds the relations/edges for other nodes in the graph.

func (TelegramChannelStateEdges) UserOrErr

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TelegramChannelStateGroupBy

type TelegramChannelStateGroupBy struct {
	// contains filtered or unexported fields
}

TelegramChannelStateGroupBy is the group-by builder for TelegramChannelState entities.

func (*TelegramChannelStateGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*TelegramChannelStateGroupBy) Bool

func (s *TelegramChannelStateGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) BoolX

func (s *TelegramChannelStateGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) Bools

func (s *TelegramChannelStateGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) BoolsX

func (s *TelegramChannelStateGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) Float64

func (s *TelegramChannelStateGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) Float64X

func (s *TelegramChannelStateGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) Float64s

func (s *TelegramChannelStateGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) Float64sX

func (s *TelegramChannelStateGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) Int

func (s *TelegramChannelStateGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) IntX

func (s *TelegramChannelStateGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) Ints

func (s *TelegramChannelStateGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) IntsX

func (s *TelegramChannelStateGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) Scan

func (tcsgb *TelegramChannelStateGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TelegramChannelStateGroupBy) ScanX

func (s *TelegramChannelStateGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) String

func (s *TelegramChannelStateGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) StringX

func (s *TelegramChannelStateGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TelegramChannelStateGroupBy) Strings

func (s *TelegramChannelStateGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateGroupBy) StringsX

func (s *TelegramChannelStateGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TelegramChannelStateMutation

type TelegramChannelStateMutation struct {
	// contains filtered or unexported fields
}

TelegramChannelStateMutation represents an operation that mutates the TelegramChannelState nodes in the graph.

func (*TelegramChannelStateMutation) AddChannelID

func (m *TelegramChannelStateMutation) AddChannelID(i int64)

AddChannelID adds i to the "channel_id" field.

func (*TelegramChannelStateMutation) AddField

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) AddPts

func (m *TelegramChannelStateMutation) AddPts(i int)

AddPts adds i to the "pts" field.

func (*TelegramChannelStateMutation) AddedChannelID

func (m *TelegramChannelStateMutation) AddedChannelID() (r int64, exists bool)

AddedChannelID returns the value that was added to the "channel_id" field in this mutation.

func (*TelegramChannelStateMutation) AddedEdges

func (m *TelegramChannelStateMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TelegramChannelStateMutation) AddedField

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) AddedFields

func (m *TelegramChannelStateMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TelegramChannelStateMutation) AddedIDs

func (m *TelegramChannelStateMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TelegramChannelStateMutation) AddedPts

func (m *TelegramChannelStateMutation) AddedPts() (r int, exists bool)

AddedPts returns the value that was added to the "pts" field in this mutation.

func (*TelegramChannelStateMutation) ChannelID

func (m *TelegramChannelStateMutation) ChannelID() (r int64, exists bool)

ChannelID returns the value of the "channel_id" field in the mutation.

func (*TelegramChannelStateMutation) ClearEdge

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) ClearField

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) ClearUser

func (m *TelegramChannelStateMutation) ClearUser()

ClearUser clears the "user" edge to the TelegramUserState entity.

func (*TelegramChannelStateMutation) ClearedEdges

func (m *TelegramChannelStateMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TelegramChannelStateMutation) ClearedFields

func (m *TelegramChannelStateMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) EdgeCleared

func (m *TelegramChannelStateMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TelegramChannelStateMutation) Field

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) FieldCleared

func (m *TelegramChannelStateMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TelegramChannelStateMutation) Fields

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) ID

func (m *TelegramChannelStateMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TelegramChannelStateMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TelegramChannelStateMutation) OldChannelID

func (m *TelegramChannelStateMutation) OldChannelID(ctx context.Context) (v int64, err error)

OldChannelID returns the old "channel_id" field's value of the TelegramChannelState entity. If the TelegramChannelState 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 (*TelegramChannelStateMutation) OldField

func (m *TelegramChannelStateMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*TelegramChannelStateMutation) OldPts

func (m *TelegramChannelStateMutation) OldPts(ctx context.Context) (v int, err error)

OldPts returns the old "pts" field's value of the TelegramChannelState entity. If the TelegramChannelState 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 (*TelegramChannelStateMutation) OldUserID

func (m *TelegramChannelStateMutation) OldUserID(ctx context.Context) (v int64, err error)

OldUserID returns the old "user_id" field's value of the TelegramChannelState entity. If the TelegramChannelState 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 (*TelegramChannelStateMutation) Op

Op returns the operation name.

func (*TelegramChannelStateMutation) Pts

func (m *TelegramChannelStateMutation) Pts() (r int, exists bool)

Pts returns the value of the "pts" field in the mutation.

func (*TelegramChannelStateMutation) RemovedEdges

func (m *TelegramChannelStateMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TelegramChannelStateMutation) RemovedIDs

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) ResetChannelID

func (m *TelegramChannelStateMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" field.

func (*TelegramChannelStateMutation) ResetEdge

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) ResetField

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) ResetPts

func (m *TelegramChannelStateMutation) ResetPts()

ResetPts resets all changes to the "pts" field.

func (*TelegramChannelStateMutation) ResetUser

func (m *TelegramChannelStateMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*TelegramChannelStateMutation) ResetUserID

func (m *TelegramChannelStateMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*TelegramChannelStateMutation) SetChannelID

func (m *TelegramChannelStateMutation) SetChannelID(i int64)

SetChannelID sets the "channel_id" field.

func (*TelegramChannelStateMutation) SetField

func (m *TelegramChannelStateMutation) 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 (*TelegramChannelStateMutation) SetOp

func (m *TelegramChannelStateMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TelegramChannelStateMutation) SetPts

func (m *TelegramChannelStateMutation) SetPts(i int)

SetPts sets the "pts" field.

func (*TelegramChannelStateMutation) SetUserID

func (m *TelegramChannelStateMutation) SetUserID(i int64)

SetUserID sets the "user_id" field.

func (TelegramChannelStateMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TelegramChannelStateMutation) Type

Type returns the node type of this mutation (TelegramChannelState).

func (*TelegramChannelStateMutation) UserCleared

func (m *TelegramChannelStateMutation) UserCleared() bool

UserCleared reports if the "user" edge to the TelegramUserState entity was cleared.

func (*TelegramChannelStateMutation) UserID

func (m *TelegramChannelStateMutation) UserID() (r int64, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*TelegramChannelStateMutation) UserIDs

func (m *TelegramChannelStateMutation) UserIDs() (ids []int64)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*TelegramChannelStateMutation) Where

Where appends a list predicates to the TelegramChannelStateMutation builder.

func (*TelegramChannelStateMutation) WhereP

func (m *TelegramChannelStateMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TelegramChannelStateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TelegramChannelStateQuery

type TelegramChannelStateQuery struct {
	// contains filtered or unexported fields
}

TelegramChannelStateQuery is the builder for querying TelegramChannelState entities.

func (*TelegramChannelStateQuery) Aggregate

Aggregate returns a TelegramChannelStateSelect configured with the given aggregations.

func (*TelegramChannelStateQuery) All

All executes the query and returns a list of TelegramChannelStates.

func (*TelegramChannelStateQuery) AllX

AllX is like All, but panics if an error occurs.

func (*TelegramChannelStateQuery) Clone

Clone returns a duplicate of the TelegramChannelStateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TelegramChannelStateQuery) Count

func (tcsq *TelegramChannelStateQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TelegramChannelStateQuery) CountX

func (tcsq *TelegramChannelStateQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TelegramChannelStateQuery) Exist

func (tcsq *TelegramChannelStateQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TelegramChannelStateQuery) ExistX

func (tcsq *TelegramChannelStateQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TelegramChannelStateQuery) First

First returns the first TelegramChannelState entity from the query. Returns a *NotFoundError when no TelegramChannelState was found.

func (*TelegramChannelStateQuery) FirstID

func (tcsq *TelegramChannelStateQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first TelegramChannelState ID from the query. Returns a *NotFoundError when no TelegramChannelState ID was found.

func (*TelegramChannelStateQuery) FirstIDX

func (tcsq *TelegramChannelStateQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TelegramChannelStateQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*TelegramChannelStateQuery) GroupBy

func (tcsq *TelegramChannelStateQuery) GroupBy(field string, fields ...string) *TelegramChannelStateGroupBy

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 {
	ChannelID int64 `json:"channel_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TelegramChannelState.Query().
	GroupBy(telegramchannelstate.FieldChannelID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TelegramChannelStateQuery) IDs

func (tcsq *TelegramChannelStateQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of TelegramChannelState IDs.

func (*TelegramChannelStateQuery) IDsX

func (tcsq *TelegramChannelStateQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TelegramChannelStateQuery) Limit

Limit the number of records to be returned by this query.

func (*TelegramChannelStateQuery) Offset

Offset to start from.

func (*TelegramChannelStateQuery) Only

Only returns a single TelegramChannelState entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TelegramChannelState entity is found. Returns a *NotFoundError when no TelegramChannelState entities are found.

func (*TelegramChannelStateQuery) OnlyID

func (tcsq *TelegramChannelStateQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only TelegramChannelState ID in the query. Returns a *NotSingularError when more than one TelegramChannelState ID is found. Returns a *NotFoundError when no entities are found.

func (*TelegramChannelStateQuery) OnlyIDX

func (tcsq *TelegramChannelStateQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TelegramChannelStateQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*TelegramChannelStateQuery) Order

Order specifies how the records should be ordered.

func (*TelegramChannelStateQuery) QueryUser

QueryUser chains the current query on the "user" edge.

func (*TelegramChannelStateQuery) Select

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 {
	ChannelID int64 `json:"channel_id,omitempty"`
}

client.TelegramChannelState.Query().
	Select(telegramchannelstate.FieldChannelID).
	Scan(ctx, &v)

func (*TelegramChannelStateQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*TelegramChannelStateQuery) Where

Where adds a new predicate for the TelegramChannelStateQuery builder.

func (*TelegramChannelStateQuery) WithUser

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type TelegramChannelStateSelect

type TelegramChannelStateSelect struct {
	*TelegramChannelStateQuery
	// contains filtered or unexported fields
}

TelegramChannelStateSelect is the builder for selecting fields of TelegramChannelState entities.

func (*TelegramChannelStateSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*TelegramChannelStateSelect) Bool

func (s *TelegramChannelStateSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) BoolX

func (s *TelegramChannelStateSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TelegramChannelStateSelect) Bools

func (s *TelegramChannelStateSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) BoolsX

func (s *TelegramChannelStateSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TelegramChannelStateSelect) Float64

func (s *TelegramChannelStateSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) Float64X

func (s *TelegramChannelStateSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TelegramChannelStateSelect) Float64s

func (s *TelegramChannelStateSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) Float64sX

func (s *TelegramChannelStateSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TelegramChannelStateSelect) Int

func (s *TelegramChannelStateSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) IntX

func (s *TelegramChannelStateSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TelegramChannelStateSelect) Ints

func (s *TelegramChannelStateSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) IntsX

func (s *TelegramChannelStateSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TelegramChannelStateSelect) Scan

func (tcss *TelegramChannelStateSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TelegramChannelStateSelect) ScanX

func (s *TelegramChannelStateSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TelegramChannelStateSelect) String

func (s *TelegramChannelStateSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) StringX

func (s *TelegramChannelStateSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TelegramChannelStateSelect) Strings

func (s *TelegramChannelStateSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TelegramChannelStateSelect) StringsX

func (s *TelegramChannelStateSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TelegramChannelStateUpdate

type TelegramChannelStateUpdate struct {
	// contains filtered or unexported fields
}

TelegramChannelStateUpdate is the builder for updating TelegramChannelState entities.

func (*TelegramChannelStateUpdate) AddChannelID

AddChannelID adds i to the "channel_id" field.

func (*TelegramChannelStateUpdate) AddPts

AddPts adds i to the "pts" field.

func (*TelegramChannelStateUpdate) ClearUser

ClearUser clears the "user" edge to the TelegramUserState entity.

func (*TelegramChannelStateUpdate) Exec

Exec executes the query.

func (*TelegramChannelStateUpdate) ExecX

func (tcsu *TelegramChannelStateUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateUpdate) Mutation

Mutation returns the TelegramChannelStateMutation object of the builder.

func (*TelegramChannelStateUpdate) Save

func (tcsu *TelegramChannelStateUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TelegramChannelStateUpdate) SaveX

func (tcsu *TelegramChannelStateUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TelegramChannelStateUpdate) SetChannelID

SetChannelID sets the "channel_id" field.

func (*TelegramChannelStateUpdate) SetNillableChannelID

func (tcsu *TelegramChannelStateUpdate) SetNillableChannelID(i *int64) *TelegramChannelStateUpdate

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*TelegramChannelStateUpdate) SetNillablePts

func (tcsu *TelegramChannelStateUpdate) SetNillablePts(i *int) *TelegramChannelStateUpdate

SetNillablePts sets the "pts" field if the given value is not nil.

func (*TelegramChannelStateUpdate) SetNillableUserID

func (tcsu *TelegramChannelStateUpdate) SetNillableUserID(i *int64) *TelegramChannelStateUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*TelegramChannelStateUpdate) SetPts

SetPts sets the "pts" field.

func (*TelegramChannelStateUpdate) SetUser

SetUser sets the "user" edge to the TelegramUserState entity.

func (*TelegramChannelStateUpdate) SetUserID

SetUserID sets the "user_id" field.

func (*TelegramChannelStateUpdate) Where

Where appends a list predicates to the TelegramChannelStateUpdate builder.

type TelegramChannelStateUpdateOne

type TelegramChannelStateUpdateOne struct {
	// contains filtered or unexported fields
}

TelegramChannelStateUpdateOne is the builder for updating a single TelegramChannelState entity.

func (*TelegramChannelStateUpdateOne) AddChannelID

AddChannelID adds i to the "channel_id" field.

func (*TelegramChannelStateUpdateOne) AddPts

AddPts adds i to the "pts" field.

func (*TelegramChannelStateUpdateOne) ClearUser

ClearUser clears the "user" edge to the TelegramUserState entity.

func (*TelegramChannelStateUpdateOne) Exec

Exec executes the query on the entity.

func (*TelegramChannelStateUpdateOne) ExecX

func (tcsuo *TelegramChannelStateUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateUpdateOne) Mutation

Mutation returns the TelegramChannelStateMutation object of the builder.

func (*TelegramChannelStateUpdateOne) Save

Save executes the query and returns the updated TelegramChannelState entity.

func (*TelegramChannelStateUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TelegramChannelStateUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TelegramChannelStateUpdateOne) SetChannelID

SetChannelID sets the "channel_id" field.

func (*TelegramChannelStateUpdateOne) SetNillableChannelID

func (tcsuo *TelegramChannelStateUpdateOne) SetNillableChannelID(i *int64) *TelegramChannelStateUpdateOne

SetNillableChannelID sets the "channel_id" field if the given value is not nil.

func (*TelegramChannelStateUpdateOne) SetNillablePts

SetNillablePts sets the "pts" field if the given value is not nil.

func (*TelegramChannelStateUpdateOne) SetNillableUserID

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*TelegramChannelStateUpdateOne) SetPts

SetPts sets the "pts" field.

func (*TelegramChannelStateUpdateOne) SetUser

SetUser sets the "user" edge to the TelegramUserState entity.

func (*TelegramChannelStateUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*TelegramChannelStateUpdateOne) Where

Where appends a list predicates to the TelegramChannelStateUpdate builder.

type TelegramChannelStateUpsert

type TelegramChannelStateUpsert struct {
	*sql.UpdateSet
}

TelegramChannelStateUpsert is the "OnConflict" setter.

func (*TelegramChannelStateUpsert) AddChannelID

AddChannelID adds v to the "channel_id" field.

func (*TelegramChannelStateUpsert) AddPts

AddPts adds v to the "pts" field.

func (*TelegramChannelStateUpsert) SetChannelID

SetChannelID sets the "channel_id" field.

func (*TelegramChannelStateUpsert) SetPts

SetPts sets the "pts" field.

func (*TelegramChannelStateUpsert) SetUserID

SetUserID sets the "user_id" field.

func (*TelegramChannelStateUpsert) UpdateChannelID

UpdateChannelID sets the "channel_id" field to the value that was provided on create.

func (*TelegramChannelStateUpsert) UpdatePts

UpdatePts sets the "pts" field to the value that was provided on create.

func (*TelegramChannelStateUpsert) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type TelegramChannelStateUpsertBulk

type TelegramChannelStateUpsertBulk struct {
	// contains filtered or unexported fields
}

TelegramChannelStateUpsertBulk is the builder for "upsert"-ing a bulk of TelegramChannelState nodes.

func (*TelegramChannelStateUpsertBulk) AddChannelID

AddChannelID adds v to the "channel_id" field.

func (*TelegramChannelStateUpsertBulk) AddPts

AddPts adds v to the "pts" field.

func (*TelegramChannelStateUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TelegramChannelStateUpsertBulk) Exec

Exec executes the query.

func (*TelegramChannelStateUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TelegramChannelState.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TelegramChannelStateUpsertBulk) SetChannelID

SetChannelID sets the "channel_id" field.

func (*TelegramChannelStateUpsertBulk) SetPts

SetPts sets the "pts" field.

func (*TelegramChannelStateUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*TelegramChannelStateUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the TelegramChannelStateCreateBulk.OnConflict documentation for more info.

func (*TelegramChannelStateUpsertBulk) UpdateChannelID

UpdateChannelID sets the "channel_id" field to the value that was provided on create.

func (*TelegramChannelStateUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TelegramChannelState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TelegramChannelStateUpsertBulk) UpdatePts

UpdatePts sets the "pts" field to the value that was provided on create.

func (*TelegramChannelStateUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type TelegramChannelStateUpsertOne

type TelegramChannelStateUpsertOne struct {
	// contains filtered or unexported fields
}

TelegramChannelStateUpsertOne is the builder for "upsert"-ing

one TelegramChannelState node.

func (*TelegramChannelStateUpsertOne) AddChannelID

AddChannelID adds v to the "channel_id" field.

func (*TelegramChannelStateUpsertOne) AddPts

AddPts adds v to the "pts" field.

func (*TelegramChannelStateUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TelegramChannelStateUpsertOne) Exec

Exec executes the query.

func (*TelegramChannelStateUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TelegramChannelStateUpsertOne) ID

func (u *TelegramChannelStateUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TelegramChannelStateUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*TelegramChannelStateUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TelegramChannelState.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TelegramChannelStateUpsertOne) SetChannelID

SetChannelID sets the "channel_id" field.

func (*TelegramChannelStateUpsertOne) SetPts

SetPts sets the "pts" field.

func (*TelegramChannelStateUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*TelegramChannelStateUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the TelegramChannelStateCreate.OnConflict documentation for more info.

func (*TelegramChannelStateUpsertOne) UpdateChannelID

UpdateChannelID sets the "channel_id" field to the value that was provided on create.

func (*TelegramChannelStateUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TelegramChannelState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TelegramChannelStateUpsertOne) UpdatePts

UpdatePts sets the "pts" field to the value that was provided on create.

func (*TelegramChannelStateUpsertOne) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type TelegramChannelStates

type TelegramChannelStates []*TelegramChannelState

TelegramChannelStates is a parsable slice of TelegramChannelState.

type TelegramSession

type TelegramSession struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Data holds the value of the "data" field.
	Data []byte `json:"data,omitempty"`
	// contains filtered or unexported fields
}

TelegramSession is the model entity for the TelegramSession schema.

func (*TelegramSession) String

func (ts *TelegramSession) String() string

String implements the fmt.Stringer.

func (*TelegramSession) Unwrap

func (ts *TelegramSession) Unwrap() *TelegramSession

Unwrap unwraps the TelegramSession 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 (*TelegramSession) Update

Update returns a builder for updating this TelegramSession. Note that you need to call TelegramSession.Unwrap() before calling this method if this TelegramSession was returned from a transaction, and the transaction was committed or rolled back.

func (*TelegramSession) Value

func (ts *TelegramSession) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TelegramSession. This includes values selected through modifiers, order, etc.

type TelegramSessionClient

type TelegramSessionClient struct {
	// contains filtered or unexported fields
}

TelegramSessionClient is a client for the TelegramSession schema.

func NewTelegramSessionClient

func NewTelegramSessionClient(c config) *TelegramSessionClient

NewTelegramSessionClient returns a client for the TelegramSession from the given config.

func (*TelegramSessionClient) Create

Create returns a builder for creating a TelegramSession entity.

func (*TelegramSessionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of TelegramSession entities.

func (*TelegramSessionClient) Delete

Delete returns a delete builder for TelegramSession.

func (*TelegramSessionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TelegramSessionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TelegramSessionClient) Get

Get returns a TelegramSession entity by its id.

func (*TelegramSessionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TelegramSessionClient) Hooks

func (c *TelegramSessionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TelegramSessionClient) Intercept

func (c *TelegramSessionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `telegramsession.Intercept(f(g(h())))`.

func (*TelegramSessionClient) Interceptors

func (c *TelegramSessionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TelegramSessionClient) MapCreateBulk

func (c *TelegramSessionClient) MapCreateBulk(slice any, setFunc func(*TelegramSessionCreate, int)) *TelegramSessionCreateBulk

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 (*TelegramSessionClient) Query

Query returns a query builder for TelegramSession.

func (*TelegramSessionClient) Update

Update returns an update builder for TelegramSession.

func (*TelegramSessionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TelegramSessionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*TelegramSessionClient) Use

func (c *TelegramSessionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `telegramsession.Hooks(f(g(h())))`.

type TelegramSessionCreate

type TelegramSessionCreate struct {
	// contains filtered or unexported fields
}

TelegramSessionCreate is the builder for creating a TelegramSession entity.

func (*TelegramSessionCreate) Exec

func (tsc *TelegramSessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TelegramSessionCreate) ExecX

func (tsc *TelegramSessionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionCreate) Mutation

Mutation returns the TelegramSessionMutation object of the builder.

func (*TelegramSessionCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TelegramSession.Create().
	SetData(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.TelegramSessionUpsert) {
		SetData(v+v).
	}).
	Exec(ctx)

func (*TelegramSessionCreate) OnConflictColumns

func (tsc *TelegramSessionCreate) OnConflictColumns(columns ...string) *TelegramSessionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TelegramSession.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TelegramSessionCreate) Save

Save creates the TelegramSession in the database.

func (*TelegramSessionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*TelegramSessionCreate) SetData

SetData sets the "data" field.

func (*TelegramSessionCreate) SetID

SetID sets the "id" field.

type TelegramSessionCreateBulk

type TelegramSessionCreateBulk struct {
	// contains filtered or unexported fields
}

TelegramSessionCreateBulk is the builder for creating many TelegramSession entities in bulk.

func (*TelegramSessionCreateBulk) Exec

Exec executes the query.

func (*TelegramSessionCreateBulk) ExecX

func (tscb *TelegramSessionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TelegramSession.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.TelegramSessionUpsert) {
		SetData(v+v).
	}).
	Exec(ctx)

func (*TelegramSessionCreateBulk) OnConflictColumns

func (tscb *TelegramSessionCreateBulk) OnConflictColumns(columns ...string) *TelegramSessionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TelegramSession.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TelegramSessionCreateBulk) Save

Save creates the TelegramSession entities in the database.

func (*TelegramSessionCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type TelegramSessionDelete

type TelegramSessionDelete struct {
	// contains filtered or unexported fields
}

TelegramSessionDelete is the builder for deleting a TelegramSession entity.

func (*TelegramSessionDelete) Exec

func (tsd *TelegramSessionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TelegramSessionDelete) ExecX

func (tsd *TelegramSessionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionDelete) Where

Where appends a list predicates to the TelegramSessionDelete builder.

type TelegramSessionDeleteOne

type TelegramSessionDeleteOne struct {
	// contains filtered or unexported fields
}

TelegramSessionDeleteOne is the builder for deleting a single TelegramSession entity.

func (*TelegramSessionDeleteOne) Exec

Exec executes the deletion query.

func (*TelegramSessionDeleteOne) ExecX

func (tsdo *TelegramSessionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionDeleteOne) Where

Where appends a list predicates to the TelegramSessionDelete builder.

type TelegramSessionGroupBy

type TelegramSessionGroupBy struct {
	// contains filtered or unexported fields
}

TelegramSessionGroupBy is the group-by builder for TelegramSession entities.

func (*TelegramSessionGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*TelegramSessionGroupBy) Bool

func (s *TelegramSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) BoolX

func (s *TelegramSessionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TelegramSessionGroupBy) Bools

func (s *TelegramSessionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) BoolsX

func (s *TelegramSessionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TelegramSessionGroupBy) Float64

func (s *TelegramSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) Float64X

func (s *TelegramSessionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TelegramSessionGroupBy) Float64s

func (s *TelegramSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) Float64sX

func (s *TelegramSessionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TelegramSessionGroupBy) Int

func (s *TelegramSessionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) IntX

func (s *TelegramSessionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TelegramSessionGroupBy) Ints

func (s *TelegramSessionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) IntsX

func (s *TelegramSessionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TelegramSessionGroupBy) Scan

func (tsgb *TelegramSessionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TelegramSessionGroupBy) ScanX

func (s *TelegramSessionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TelegramSessionGroupBy) String

func (s *TelegramSessionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) StringX

func (s *TelegramSessionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TelegramSessionGroupBy) Strings

func (s *TelegramSessionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TelegramSessionGroupBy) StringsX

func (s *TelegramSessionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TelegramSessionMutation

type TelegramSessionMutation struct {
	// contains filtered or unexported fields
}

TelegramSessionMutation represents an operation that mutates the TelegramSession nodes in the graph.

func (*TelegramSessionMutation) AddField

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) AddedEdges

func (m *TelegramSessionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TelegramSessionMutation) AddedField

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) AddedFields

func (m *TelegramSessionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TelegramSessionMutation) AddedIDs

func (m *TelegramSessionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TelegramSessionMutation) ClearEdge

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) ClearField

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) ClearedEdges

func (m *TelegramSessionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TelegramSessionMutation) ClearedFields

func (m *TelegramSessionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TelegramSessionMutation) Client

func (m TelegramSessionMutation) 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 (*TelegramSessionMutation) Data

func (m *TelegramSessionMutation) Data() (r []byte, exists bool)

Data returns the value of the "data" field in the mutation.

func (*TelegramSessionMutation) EdgeCleared

func (m *TelegramSessionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TelegramSessionMutation) Field

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) FieldCleared

func (m *TelegramSessionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TelegramSessionMutation) Fields

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) ID

func (m *TelegramSessionMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TelegramSessionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TelegramSessionMutation) OldData

func (m *TelegramSessionMutation) OldData(ctx context.Context) (v []byte, err error)

OldData returns the old "data" field's value of the TelegramSession entity. If the TelegramSession 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 (*TelegramSessionMutation) OldField

func (m *TelegramSessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*TelegramSessionMutation) Op

func (m *TelegramSessionMutation) Op() Op

Op returns the operation name.

func (*TelegramSessionMutation) RemovedEdges

func (m *TelegramSessionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TelegramSessionMutation) RemovedIDs

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) ResetData

func (m *TelegramSessionMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*TelegramSessionMutation) ResetEdge

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) ResetField

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) SetData

func (m *TelegramSessionMutation) SetData(b []byte)

SetData sets the "data" field.

func (*TelegramSessionMutation) SetField

func (m *TelegramSessionMutation) 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 (*TelegramSessionMutation) SetID

func (m *TelegramSessionMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TelegramSession entities.

func (*TelegramSessionMutation) SetOp

func (m *TelegramSessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (TelegramSessionMutation) Tx

func (m TelegramSessionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TelegramSessionMutation) Type

func (m *TelegramSessionMutation) Type() string

Type returns the node type of this mutation (TelegramSession).

func (*TelegramSessionMutation) Where

Where appends a list predicates to the TelegramSessionMutation builder.

func (*TelegramSessionMutation) WhereP

func (m *TelegramSessionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TelegramSessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TelegramSessionQuery

type TelegramSessionQuery struct {
	// contains filtered or unexported fields
}

TelegramSessionQuery is the builder for querying TelegramSession entities.

func (*TelegramSessionQuery) Aggregate

Aggregate returns a TelegramSessionSelect configured with the given aggregations.

func (*TelegramSessionQuery) All

All executes the query and returns a list of TelegramSessions.

func (*TelegramSessionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*TelegramSessionQuery) Clone

Clone returns a duplicate of the TelegramSessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TelegramSessionQuery) Count

func (tsq *TelegramSessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TelegramSessionQuery) CountX

func (tsq *TelegramSessionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TelegramSessionQuery) Exist

func (tsq *TelegramSessionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TelegramSessionQuery) ExistX

func (tsq *TelegramSessionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TelegramSessionQuery) First

First returns the first TelegramSession entity from the query. Returns a *NotFoundError when no TelegramSession was found.

func (*TelegramSessionQuery) FirstID

func (tsq *TelegramSessionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first TelegramSession ID from the query. Returns a *NotFoundError when no TelegramSession ID was found.

func (*TelegramSessionQuery) FirstIDX

func (tsq *TelegramSessionQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TelegramSessionQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*TelegramSessionQuery) GroupBy

func (tsq *TelegramSessionQuery) GroupBy(field string, fields ...string) *TelegramSessionGroupBy

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 {
	Data []byte `json:"data,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TelegramSession.Query().
	GroupBy(telegramsession.FieldData).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TelegramSessionQuery) IDs

func (tsq *TelegramSessionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of TelegramSession IDs.

func (*TelegramSessionQuery) IDsX

func (tsq *TelegramSessionQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TelegramSessionQuery) Limit

func (tsq *TelegramSessionQuery) Limit(limit int) *TelegramSessionQuery

Limit the number of records to be returned by this query.

func (*TelegramSessionQuery) Offset

func (tsq *TelegramSessionQuery) Offset(offset int) *TelegramSessionQuery

Offset to start from.

func (*TelegramSessionQuery) Only

Only returns a single TelegramSession entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TelegramSession entity is found. Returns a *NotFoundError when no TelegramSession entities are found.

func (*TelegramSessionQuery) OnlyID

func (tsq *TelegramSessionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only TelegramSession ID in the query. Returns a *NotSingularError when more than one TelegramSession ID is found. Returns a *NotFoundError when no entities are found.

func (*TelegramSessionQuery) OnlyIDX

func (tsq *TelegramSessionQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TelegramSessionQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*TelegramSessionQuery) Order

Order specifies how the records should be ordered.

func (*TelegramSessionQuery) Select

func (tsq *TelegramSessionQuery) Select(fields ...string) *TelegramSessionSelect

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 {
	Data []byte `json:"data,omitempty"`
}

client.TelegramSession.Query().
	Select(telegramsession.FieldData).
	Scan(ctx, &v)

func (*TelegramSessionQuery) Unique

func (tsq *TelegramSessionQuery) Unique(unique bool) *TelegramSessionQuery

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 (*TelegramSessionQuery) Where

Where adds a new predicate for the TelegramSessionQuery builder.

type TelegramSessionSelect

type TelegramSessionSelect struct {
	*TelegramSessionQuery
	// contains filtered or unexported fields
}

TelegramSessionSelect is the builder for selecting fields of TelegramSession entities.

func (*TelegramSessionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*TelegramSessionSelect) Bool

func (s *TelegramSessionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) BoolX

func (s *TelegramSessionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TelegramSessionSelect) Bools

func (s *TelegramSessionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) BoolsX

func (s *TelegramSessionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TelegramSessionSelect) Float64

func (s *TelegramSessionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) Float64X

func (s *TelegramSessionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TelegramSessionSelect) Float64s

func (s *TelegramSessionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) Float64sX

func (s *TelegramSessionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TelegramSessionSelect) Int

func (s *TelegramSessionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) IntX

func (s *TelegramSessionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TelegramSessionSelect) Ints

func (s *TelegramSessionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) IntsX

func (s *TelegramSessionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TelegramSessionSelect) Scan

func (tss *TelegramSessionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TelegramSessionSelect) ScanX

func (s *TelegramSessionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TelegramSessionSelect) String

func (s *TelegramSessionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) StringX

func (s *TelegramSessionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TelegramSessionSelect) Strings

func (s *TelegramSessionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TelegramSessionSelect) StringsX

func (s *TelegramSessionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TelegramSessionUpdate

type TelegramSessionUpdate struct {
	// contains filtered or unexported fields
}

TelegramSessionUpdate is the builder for updating TelegramSession entities.

func (*TelegramSessionUpdate) Exec

func (tsu *TelegramSessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TelegramSessionUpdate) ExecX

func (tsu *TelegramSessionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionUpdate) Mutation

Mutation returns the TelegramSessionMutation object of the builder.

func (*TelegramSessionUpdate) Save

func (tsu *TelegramSessionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TelegramSessionUpdate) SaveX

func (tsu *TelegramSessionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TelegramSessionUpdate) SetData

SetData sets the "data" field.

func (*TelegramSessionUpdate) Where

Where appends a list predicates to the TelegramSessionUpdate builder.

type TelegramSessionUpdateOne

type TelegramSessionUpdateOne struct {
	// contains filtered or unexported fields
}

TelegramSessionUpdateOne is the builder for updating a single TelegramSession entity.

func (*TelegramSessionUpdateOne) Exec

Exec executes the query on the entity.

func (*TelegramSessionUpdateOne) ExecX

func (tsuo *TelegramSessionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionUpdateOne) Mutation

Mutation returns the TelegramSessionMutation object of the builder.

func (*TelegramSessionUpdateOne) Save

Save executes the query and returns the updated TelegramSession entity.

func (*TelegramSessionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TelegramSessionUpdateOne) Select

func (tsuo *TelegramSessionUpdateOne) Select(field string, fields ...string) *TelegramSessionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TelegramSessionUpdateOne) SetData

SetData sets the "data" field.

func (*TelegramSessionUpdateOne) Where

Where appends a list predicates to the TelegramSessionUpdate builder.

type TelegramSessionUpsert

type TelegramSessionUpsert struct {
	*sql.UpdateSet
}

TelegramSessionUpsert is the "OnConflict" setter.

func (*TelegramSessionUpsert) SetData

SetData sets the "data" field.

func (*TelegramSessionUpsert) UpdateData

UpdateData sets the "data" field to the value that was provided on create.

type TelegramSessionUpsertBulk

type TelegramSessionUpsertBulk struct {
	// contains filtered or unexported fields
}

TelegramSessionUpsertBulk is the builder for "upsert"-ing a bulk of TelegramSession nodes.

func (*TelegramSessionUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TelegramSessionUpsertBulk) Exec

Exec executes the query.

func (*TelegramSessionUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TelegramSession.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TelegramSessionUpsertBulk) SetData

SetData sets the "data" field.

func (*TelegramSessionUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the TelegramSessionCreateBulk.OnConflict documentation for more info.

func (*TelegramSessionUpsertBulk) UpdateData

UpdateData sets the "data" field to the value that was provided on create.

func (*TelegramSessionUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TelegramSession.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(telegramsession.FieldID)
		}),
	).
	Exec(ctx)

type TelegramSessionUpsertOne

type TelegramSessionUpsertOne struct {
	// contains filtered or unexported fields
}

TelegramSessionUpsertOne is the builder for "upsert"-ing

one TelegramSession node.

func (*TelegramSessionUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TelegramSessionUpsertOne) Exec

Exec executes the query.

func (*TelegramSessionUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TelegramSessionUpsertOne) ID

func (u *TelegramSessionUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TelegramSessionUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*TelegramSessionUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TelegramSession.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TelegramSessionUpsertOne) SetData

SetData sets the "data" field.

func (*TelegramSessionUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the TelegramSessionCreate.OnConflict documentation for more info.

func (*TelegramSessionUpsertOne) UpdateData

UpdateData sets the "data" field to the value that was provided on create.

func (*TelegramSessionUpsertOne) UpdateNewValues

func (u *TelegramSessionUpsertOne) UpdateNewValues() *TelegramSessionUpsertOne

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.TelegramSession.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(telegramsession.FieldID)
		}),
	).
	Exec(ctx)

type TelegramSessions

type TelegramSessions []*TelegramSession

TelegramSessions is a parsable slice of TelegramSession.

type TelegramUserState

type TelegramUserState struct {

	// ID of the ent.
	// User ID
	ID int64 `json:"id,omitempty"`
	// Qts holds the value of the "qts" field.
	Qts int `json:"qts,omitempty"`
	// Pts holds the value of the "pts" field.
	Pts int `json:"pts,omitempty"`
	// Date holds the value of the "date" field.
	Date int `json:"date,omitempty"`
	// Seq holds the value of the "seq" field.
	Seq int `json:"seq,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TelegramUserStateQuery when eager-loading is set.
	Edges TelegramUserStateEdges `json:"edges"`
	// contains filtered or unexported fields
}

TelegramUserState is the model entity for the TelegramUserState schema.

func (*TelegramUserState) NamedChannels

func (tus *TelegramUserState) NamedChannels(name string) ([]*TelegramChannelState, error)

NamedChannels returns the Channels named value or an error if the edge was not loaded in eager-loading with this name.

func (*TelegramUserState) QueryChannels

func (tus *TelegramUserState) QueryChannels() *TelegramChannelStateQuery

QueryChannels queries the "channels" edge of the TelegramUserState entity.

func (*TelegramUserState) String

func (tus *TelegramUserState) String() string

String implements the fmt.Stringer.

func (*TelegramUserState) Unwrap

func (tus *TelegramUserState) Unwrap() *TelegramUserState

Unwrap unwraps the TelegramUserState 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 (*TelegramUserState) Update

Update returns a builder for updating this TelegramUserState. Note that you need to call TelegramUserState.Unwrap() before calling this method if this TelegramUserState was returned from a transaction, and the transaction was committed or rolled back.

func (*TelegramUserState) Value

func (tus *TelegramUserState) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TelegramUserState. This includes values selected through modifiers, order, etc.

type TelegramUserStateClient

type TelegramUserStateClient struct {
	// contains filtered or unexported fields
}

TelegramUserStateClient is a client for the TelegramUserState schema.

func NewTelegramUserStateClient

func NewTelegramUserStateClient(c config) *TelegramUserStateClient

NewTelegramUserStateClient returns a client for the TelegramUserState from the given config.

func (*TelegramUserStateClient) Create

Create returns a builder for creating a TelegramUserState entity.

func (*TelegramUserStateClient) CreateBulk

CreateBulk returns a builder for creating a bulk of TelegramUserState entities.

func (*TelegramUserStateClient) Delete

Delete returns a delete builder for TelegramUserState.

func (*TelegramUserStateClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TelegramUserStateClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TelegramUserStateClient) Get

Get returns a TelegramUserState entity by its id.

func (*TelegramUserStateClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TelegramUserStateClient) Hooks

func (c *TelegramUserStateClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TelegramUserStateClient) Intercept

func (c *TelegramUserStateClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `telegramuserstate.Intercept(f(g(h())))`.

func (*TelegramUserStateClient) Interceptors

func (c *TelegramUserStateClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TelegramUserStateClient) MapCreateBulk

func (c *TelegramUserStateClient) MapCreateBulk(slice any, setFunc func(*TelegramUserStateCreate, int)) *TelegramUserStateCreateBulk

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 (*TelegramUserStateClient) Query

Query returns a query builder for TelegramUserState.

func (*TelegramUserStateClient) QueryChannels

QueryChannels queries the channels edge of a TelegramUserState.

func (*TelegramUserStateClient) Update

Update returns an update builder for TelegramUserState.

func (*TelegramUserStateClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TelegramUserStateClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*TelegramUserStateClient) Use

func (c *TelegramUserStateClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `telegramuserstate.Hooks(f(g(h())))`.

type TelegramUserStateCreate

type TelegramUserStateCreate struct {
	// contains filtered or unexported fields
}

TelegramUserStateCreate is the builder for creating a TelegramUserState entity.

func (*TelegramUserStateCreate) AddChannelIDs

func (tusc *TelegramUserStateCreate) AddChannelIDs(ids ...int) *TelegramUserStateCreate

AddChannelIDs adds the "channels" edge to the TelegramChannelState entity by IDs.

func (*TelegramUserStateCreate) AddChannels

AddChannels adds the "channels" edges to the TelegramChannelState entity.

func (*TelegramUserStateCreate) Exec

func (tusc *TelegramUserStateCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TelegramUserStateCreate) ExecX

func (tusc *TelegramUserStateCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateCreate) Mutation

Mutation returns the TelegramUserStateMutation object of the builder.

func (*TelegramUserStateCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TelegramUserState.Create().
	SetQts(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.TelegramUserStateUpsert) {
		SetQts(v+v).
	}).
	Exec(ctx)

func (*TelegramUserStateCreate) OnConflictColumns

func (tusc *TelegramUserStateCreate) OnConflictColumns(columns ...string) *TelegramUserStateUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TelegramUserState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TelegramUserStateCreate) Save

Save creates the TelegramUserState in the database.

func (*TelegramUserStateCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*TelegramUserStateCreate) SetDate

SetDate sets the "date" field.

func (*TelegramUserStateCreate) SetID

SetID sets the "id" field.

func (*TelegramUserStateCreate) SetNillableDate

func (tusc *TelegramUserStateCreate) SetNillableDate(i *int) *TelegramUserStateCreate

SetNillableDate sets the "date" field if the given value is not nil.

func (*TelegramUserStateCreate) SetNillablePts

func (tusc *TelegramUserStateCreate) SetNillablePts(i *int) *TelegramUserStateCreate

SetNillablePts sets the "pts" field if the given value is not nil.

func (*TelegramUserStateCreate) SetNillableQts

func (tusc *TelegramUserStateCreate) SetNillableQts(i *int) *TelegramUserStateCreate

SetNillableQts sets the "qts" field if the given value is not nil.

func (*TelegramUserStateCreate) SetNillableSeq

func (tusc *TelegramUserStateCreate) SetNillableSeq(i *int) *TelegramUserStateCreate

SetNillableSeq sets the "seq" field if the given value is not nil.

func (*TelegramUserStateCreate) SetPts

SetPts sets the "pts" field.

func (*TelegramUserStateCreate) SetQts

SetQts sets the "qts" field.

func (*TelegramUserStateCreate) SetSeq

SetSeq sets the "seq" field.

type TelegramUserStateCreateBulk

type TelegramUserStateCreateBulk struct {
	// contains filtered or unexported fields
}

TelegramUserStateCreateBulk is the builder for creating many TelegramUserState entities in bulk.

func (*TelegramUserStateCreateBulk) Exec

Exec executes the query.

func (*TelegramUserStateCreateBulk) ExecX

func (tuscb *TelegramUserStateCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TelegramUserState.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.TelegramUserStateUpsert) {
		SetQts(v+v).
	}).
	Exec(ctx)

func (*TelegramUserStateCreateBulk) OnConflictColumns

func (tuscb *TelegramUserStateCreateBulk) OnConflictColumns(columns ...string) *TelegramUserStateUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TelegramUserState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TelegramUserStateCreateBulk) Save

Save creates the TelegramUserState entities in the database.

func (*TelegramUserStateCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type TelegramUserStateDelete

type TelegramUserStateDelete struct {
	// contains filtered or unexported fields
}

TelegramUserStateDelete is the builder for deleting a TelegramUserState entity.

func (*TelegramUserStateDelete) Exec

func (tusd *TelegramUserStateDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TelegramUserStateDelete) ExecX

func (tusd *TelegramUserStateDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateDelete) Where

Where appends a list predicates to the TelegramUserStateDelete builder.

type TelegramUserStateDeleteOne

type TelegramUserStateDeleteOne struct {
	// contains filtered or unexported fields
}

TelegramUserStateDeleteOne is the builder for deleting a single TelegramUserState entity.

func (*TelegramUserStateDeleteOne) Exec

Exec executes the deletion query.

func (*TelegramUserStateDeleteOne) ExecX

func (tusdo *TelegramUserStateDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateDeleteOne) Where

Where appends a list predicates to the TelegramUserStateDelete builder.

type TelegramUserStateEdges

type TelegramUserStateEdges struct {
	// Channels holds the value of the channels edge.
	Channels []*TelegramChannelState `json:"channels,omitempty"`
	// contains filtered or unexported fields
}

TelegramUserStateEdges holds the relations/edges for other nodes in the graph.

func (TelegramUserStateEdges) ChannelsOrErr

func (e TelegramUserStateEdges) ChannelsOrErr() ([]*TelegramChannelState, error)

ChannelsOrErr returns the Channels value or an error if the edge was not loaded in eager-loading.

type TelegramUserStateGroupBy

type TelegramUserStateGroupBy struct {
	// contains filtered or unexported fields
}

TelegramUserStateGroupBy is the group-by builder for TelegramUserState entities.

func (*TelegramUserStateGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*TelegramUserStateGroupBy) Bool

func (s *TelegramUserStateGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) BoolX

func (s *TelegramUserStateGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TelegramUserStateGroupBy) Bools

func (s *TelegramUserStateGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) BoolsX

func (s *TelegramUserStateGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TelegramUserStateGroupBy) Float64

func (s *TelegramUserStateGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) Float64X

func (s *TelegramUserStateGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TelegramUserStateGroupBy) Float64s

func (s *TelegramUserStateGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) Float64sX

func (s *TelegramUserStateGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TelegramUserStateGroupBy) Int

func (s *TelegramUserStateGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) IntX

func (s *TelegramUserStateGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TelegramUserStateGroupBy) Ints

func (s *TelegramUserStateGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) IntsX

func (s *TelegramUserStateGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TelegramUserStateGroupBy) Scan

func (tusgb *TelegramUserStateGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TelegramUserStateGroupBy) ScanX

func (s *TelegramUserStateGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TelegramUserStateGroupBy) String

func (s *TelegramUserStateGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) StringX

func (s *TelegramUserStateGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TelegramUserStateGroupBy) Strings

func (s *TelegramUserStateGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateGroupBy) StringsX

func (s *TelegramUserStateGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TelegramUserStateMutation

type TelegramUserStateMutation struct {
	// contains filtered or unexported fields
}

TelegramUserStateMutation represents an operation that mutates the TelegramUserState nodes in the graph.

func (*TelegramUserStateMutation) AddChannelIDs

func (m *TelegramUserStateMutation) AddChannelIDs(ids ...int)

AddChannelIDs adds the "channels" edge to the TelegramChannelState entity by ids.

func (*TelegramUserStateMutation) AddDate

func (m *TelegramUserStateMutation) AddDate(i int)

AddDate adds i to the "date" field.

func (*TelegramUserStateMutation) AddField

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) AddPts

func (m *TelegramUserStateMutation) AddPts(i int)

AddPts adds i to the "pts" field.

func (*TelegramUserStateMutation) AddQts

func (m *TelegramUserStateMutation) AddQts(i int)

AddQts adds i to the "qts" field.

func (*TelegramUserStateMutation) AddSeq

func (m *TelegramUserStateMutation) AddSeq(i int)

AddSeq adds i to the "seq" field.

func (*TelegramUserStateMutation) AddedDate

func (m *TelegramUserStateMutation) AddedDate() (r int, exists bool)

AddedDate returns the value that was added to the "date" field in this mutation.

func (*TelegramUserStateMutation) AddedEdges

func (m *TelegramUserStateMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TelegramUserStateMutation) AddedField

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) AddedFields

func (m *TelegramUserStateMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TelegramUserStateMutation) AddedIDs

func (m *TelegramUserStateMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TelegramUserStateMutation) AddedPts

func (m *TelegramUserStateMutation) AddedPts() (r int, exists bool)

AddedPts returns the value that was added to the "pts" field in this mutation.

func (*TelegramUserStateMutation) AddedQts

func (m *TelegramUserStateMutation) AddedQts() (r int, exists bool)

AddedQts returns the value that was added to the "qts" field in this mutation.

func (*TelegramUserStateMutation) AddedSeq

func (m *TelegramUserStateMutation) AddedSeq() (r int, exists bool)

AddedSeq returns the value that was added to the "seq" field in this mutation.

func (*TelegramUserStateMutation) ChannelsCleared

func (m *TelegramUserStateMutation) ChannelsCleared() bool

ChannelsCleared reports if the "channels" edge to the TelegramChannelState entity was cleared.

func (*TelegramUserStateMutation) ChannelsIDs

func (m *TelegramUserStateMutation) ChannelsIDs() (ids []int)

ChannelsIDs returns the "channels" edge IDs in the mutation.

func (*TelegramUserStateMutation) ClearChannels

func (m *TelegramUserStateMutation) ClearChannels()

ClearChannels clears the "channels" edge to the TelegramChannelState entity.

func (*TelegramUserStateMutation) ClearEdge

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) ClearField

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) ClearedEdges

func (m *TelegramUserStateMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TelegramUserStateMutation) ClearedFields

func (m *TelegramUserStateMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TelegramUserStateMutation) Client

func (m TelegramUserStateMutation) 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 (*TelegramUserStateMutation) Date

func (m *TelegramUserStateMutation) Date() (r int, exists bool)

Date returns the value of the "date" field in the mutation.

func (*TelegramUserStateMutation) EdgeCleared

func (m *TelegramUserStateMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TelegramUserStateMutation) Field

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) FieldCleared

func (m *TelegramUserStateMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TelegramUserStateMutation) Fields

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) ID

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TelegramUserStateMutation) OldDate

func (m *TelegramUserStateMutation) OldDate(ctx context.Context) (v int, err error)

OldDate returns the old "date" field's value of the TelegramUserState entity. If the TelegramUserState 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 (*TelegramUserStateMutation) OldField

func (m *TelegramUserStateMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*TelegramUserStateMutation) OldPts

func (m *TelegramUserStateMutation) OldPts(ctx context.Context) (v int, err error)

OldPts returns the old "pts" field's value of the TelegramUserState entity. If the TelegramUserState 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 (*TelegramUserStateMutation) OldQts

func (m *TelegramUserStateMutation) OldQts(ctx context.Context) (v int, err error)

OldQts returns the old "qts" field's value of the TelegramUserState entity. If the TelegramUserState 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 (*TelegramUserStateMutation) OldSeq

func (m *TelegramUserStateMutation) OldSeq(ctx context.Context) (v int, err error)

OldSeq returns the old "seq" field's value of the TelegramUserState entity. If the TelegramUserState 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 (*TelegramUserStateMutation) Op

func (m *TelegramUserStateMutation) Op() Op

Op returns the operation name.

func (*TelegramUserStateMutation) Pts

func (m *TelegramUserStateMutation) Pts() (r int, exists bool)

Pts returns the value of the "pts" field in the mutation.

func (*TelegramUserStateMutation) Qts

func (m *TelegramUserStateMutation) Qts() (r int, exists bool)

Qts returns the value of the "qts" field in the mutation.

func (*TelegramUserStateMutation) RemoveChannelIDs

func (m *TelegramUserStateMutation) RemoveChannelIDs(ids ...int)

RemoveChannelIDs removes the "channels" edge to the TelegramChannelState entity by IDs.

func (*TelegramUserStateMutation) RemovedChannelsIDs

func (m *TelegramUserStateMutation) RemovedChannelsIDs() (ids []int)

RemovedChannels returns the removed IDs of the "channels" edge to the TelegramChannelState entity.

func (*TelegramUserStateMutation) RemovedEdges

func (m *TelegramUserStateMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TelegramUserStateMutation) RemovedIDs

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) ResetChannels

func (m *TelegramUserStateMutation) ResetChannels()

ResetChannels resets all changes to the "channels" edge.

func (*TelegramUserStateMutation) ResetDate

func (m *TelegramUserStateMutation) ResetDate()

ResetDate resets all changes to the "date" field.

func (*TelegramUserStateMutation) ResetEdge

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) ResetField

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) ResetPts

func (m *TelegramUserStateMutation) ResetPts()

ResetPts resets all changes to the "pts" field.

func (*TelegramUserStateMutation) ResetQts

func (m *TelegramUserStateMutation) ResetQts()

ResetQts resets all changes to the "qts" field.

func (*TelegramUserStateMutation) ResetSeq

func (m *TelegramUserStateMutation) ResetSeq()

ResetSeq resets all changes to the "seq" field.

func (*TelegramUserStateMutation) Seq

func (m *TelegramUserStateMutation) Seq() (r int, exists bool)

Seq returns the value of the "seq" field in the mutation.

func (*TelegramUserStateMutation) SetDate

func (m *TelegramUserStateMutation) SetDate(i int)

SetDate sets the "date" field.

func (*TelegramUserStateMutation) SetField

func (m *TelegramUserStateMutation) 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 (*TelegramUserStateMutation) SetID

func (m *TelegramUserStateMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TelegramUserState entities.

func (*TelegramUserStateMutation) SetOp

func (m *TelegramUserStateMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TelegramUserStateMutation) SetPts

func (m *TelegramUserStateMutation) SetPts(i int)

SetPts sets the "pts" field.

func (*TelegramUserStateMutation) SetQts

func (m *TelegramUserStateMutation) SetQts(i int)

SetQts sets the "qts" field.

func (*TelegramUserStateMutation) SetSeq

func (m *TelegramUserStateMutation) SetSeq(i int)

SetSeq sets the "seq" field.

func (TelegramUserStateMutation) Tx

func (m TelegramUserStateMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TelegramUserStateMutation) Type

Type returns the node type of this mutation (TelegramUserState).

func (*TelegramUserStateMutation) Where

Where appends a list predicates to the TelegramUserStateMutation builder.

func (*TelegramUserStateMutation) WhereP

func (m *TelegramUserStateMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TelegramUserStateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TelegramUserStateQuery

type TelegramUserStateQuery struct {
	// contains filtered or unexported fields
}

TelegramUserStateQuery is the builder for querying TelegramUserState entities.

func (*TelegramUserStateQuery) Aggregate

Aggregate returns a TelegramUserStateSelect configured with the given aggregations.

func (*TelegramUserStateQuery) All

All executes the query and returns a list of TelegramUserStates.

func (*TelegramUserStateQuery) AllX

AllX is like All, but panics if an error occurs.

func (*TelegramUserStateQuery) Clone

Clone returns a duplicate of the TelegramUserStateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TelegramUserStateQuery) Count

func (tusq *TelegramUserStateQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TelegramUserStateQuery) CountX

func (tusq *TelegramUserStateQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TelegramUserStateQuery) Exist

func (tusq *TelegramUserStateQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TelegramUserStateQuery) ExistX

func (tusq *TelegramUserStateQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TelegramUserStateQuery) First

First returns the first TelegramUserState entity from the query. Returns a *NotFoundError when no TelegramUserState was found.

func (*TelegramUserStateQuery) FirstID

func (tusq *TelegramUserStateQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first TelegramUserState ID from the query. Returns a *NotFoundError when no TelegramUserState ID was found.

func (*TelegramUserStateQuery) FirstIDX

func (tusq *TelegramUserStateQuery) FirstIDX(ctx context.Context) int64

FirstIDX is like FirstID, but panics if an error occurs.

func (*TelegramUserStateQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*TelegramUserStateQuery) GroupBy

func (tusq *TelegramUserStateQuery) GroupBy(field string, fields ...string) *TelegramUserStateGroupBy

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 {
	Qts int `json:"qts,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TelegramUserState.Query().
	GroupBy(telegramuserstate.FieldQts).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TelegramUserStateQuery) IDs

func (tusq *TelegramUserStateQuery) IDs(ctx context.Context) (ids []int64, err error)

IDs executes the query and returns a list of TelegramUserState IDs.

func (*TelegramUserStateQuery) IDsX

func (tusq *TelegramUserStateQuery) IDsX(ctx context.Context) []int64

IDsX is like IDs, but panics if an error occurs.

func (*TelegramUserStateQuery) Limit

Limit the number of records to be returned by this query.

func (*TelegramUserStateQuery) Offset

func (tusq *TelegramUserStateQuery) Offset(offset int) *TelegramUserStateQuery

Offset to start from.

func (*TelegramUserStateQuery) Only

Only returns a single TelegramUserState entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TelegramUserState entity is found. Returns a *NotFoundError when no TelegramUserState entities are found.

func (*TelegramUserStateQuery) OnlyID

func (tusq *TelegramUserStateQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID is like Only, but returns the only TelegramUserState ID in the query. Returns a *NotSingularError when more than one TelegramUserState ID is found. Returns a *NotFoundError when no entities are found.

func (*TelegramUserStateQuery) OnlyIDX

func (tusq *TelegramUserStateQuery) OnlyIDX(ctx context.Context) int64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TelegramUserStateQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*TelegramUserStateQuery) Order

Order specifies how the records should be ordered.

func (*TelegramUserStateQuery) QueryChannels

func (tusq *TelegramUserStateQuery) QueryChannels() *TelegramChannelStateQuery

QueryChannels chains the current query on the "channels" edge.

func (*TelegramUserStateQuery) Select

func (tusq *TelegramUserStateQuery) Select(fields ...string) *TelegramUserStateSelect

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 {
	Qts int `json:"qts,omitempty"`
}

client.TelegramUserState.Query().
	Select(telegramuserstate.FieldQts).
	Scan(ctx, &v)

func (*TelegramUserStateQuery) Unique

func (tusq *TelegramUserStateQuery) Unique(unique bool) *TelegramUserStateQuery

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 (*TelegramUserStateQuery) Where

Where adds a new predicate for the TelegramUserStateQuery builder.

func (*TelegramUserStateQuery) WithChannels

func (tusq *TelegramUserStateQuery) WithChannels(opts ...func(*TelegramChannelStateQuery)) *TelegramUserStateQuery

WithChannels tells the query-builder to eager-load the nodes that are connected to the "channels" edge. The optional arguments are used to configure the query builder of the edge.

func (*TelegramUserStateQuery) WithNamedChannels

func (tusq *TelegramUserStateQuery) WithNamedChannels(name string, opts ...func(*TelegramChannelStateQuery)) *TelegramUserStateQuery

WithNamedChannels tells the query-builder to eager-load the nodes that are connected to the "channels" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type TelegramUserStateSelect

type TelegramUserStateSelect struct {
	*TelegramUserStateQuery
	// contains filtered or unexported fields
}

TelegramUserStateSelect is the builder for selecting fields of TelegramUserState entities.

func (*TelegramUserStateSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*TelegramUserStateSelect) Bool

func (s *TelegramUserStateSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) BoolX

func (s *TelegramUserStateSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TelegramUserStateSelect) Bools

func (s *TelegramUserStateSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) BoolsX

func (s *TelegramUserStateSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TelegramUserStateSelect) Float64

func (s *TelegramUserStateSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) Float64X

func (s *TelegramUserStateSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TelegramUserStateSelect) Float64s

func (s *TelegramUserStateSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) Float64sX

func (s *TelegramUserStateSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TelegramUserStateSelect) Int

func (s *TelegramUserStateSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) IntX

func (s *TelegramUserStateSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TelegramUserStateSelect) Ints

func (s *TelegramUserStateSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) IntsX

func (s *TelegramUserStateSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TelegramUserStateSelect) Scan

func (tuss *TelegramUserStateSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TelegramUserStateSelect) ScanX

func (s *TelegramUserStateSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TelegramUserStateSelect) String

func (s *TelegramUserStateSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) StringX

func (s *TelegramUserStateSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TelegramUserStateSelect) Strings

func (s *TelegramUserStateSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TelegramUserStateSelect) StringsX

func (s *TelegramUserStateSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TelegramUserStateUpdate

type TelegramUserStateUpdate struct {
	// contains filtered or unexported fields
}

TelegramUserStateUpdate is the builder for updating TelegramUserState entities.

func (*TelegramUserStateUpdate) AddChannelIDs

func (tusu *TelegramUserStateUpdate) AddChannelIDs(ids ...int) *TelegramUserStateUpdate

AddChannelIDs adds the "channels" edge to the TelegramChannelState entity by IDs.

func (*TelegramUserStateUpdate) AddChannels

AddChannels adds the "channels" edges to the TelegramChannelState entity.

func (*TelegramUserStateUpdate) AddDate

AddDate adds i to the "date" field.

func (*TelegramUserStateUpdate) AddPts

AddPts adds i to the "pts" field.

func (*TelegramUserStateUpdate) AddQts

AddQts adds i to the "qts" field.

func (*TelegramUserStateUpdate) AddSeq

AddSeq adds i to the "seq" field.

func (*TelegramUserStateUpdate) ClearChannels

func (tusu *TelegramUserStateUpdate) ClearChannels() *TelegramUserStateUpdate

ClearChannels clears all "channels" edges to the TelegramChannelState entity.

func (*TelegramUserStateUpdate) Exec

func (tusu *TelegramUserStateUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TelegramUserStateUpdate) ExecX

func (tusu *TelegramUserStateUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateUpdate) Mutation

Mutation returns the TelegramUserStateMutation object of the builder.

func (*TelegramUserStateUpdate) RemoveChannelIDs

func (tusu *TelegramUserStateUpdate) RemoveChannelIDs(ids ...int) *TelegramUserStateUpdate

RemoveChannelIDs removes the "channels" edge to TelegramChannelState entities by IDs.

func (*TelegramUserStateUpdate) RemoveChannels

RemoveChannels removes "channels" edges to TelegramChannelState entities.

func (*TelegramUserStateUpdate) Save

func (tusu *TelegramUserStateUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TelegramUserStateUpdate) SaveX

func (tusu *TelegramUserStateUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TelegramUserStateUpdate) SetDate

SetDate sets the "date" field.

func (*TelegramUserStateUpdate) SetNillableDate

func (tusu *TelegramUserStateUpdate) SetNillableDate(i *int) *TelegramUserStateUpdate

SetNillableDate sets the "date" field if the given value is not nil.

func (*TelegramUserStateUpdate) SetNillablePts

func (tusu *TelegramUserStateUpdate) SetNillablePts(i *int) *TelegramUserStateUpdate

SetNillablePts sets the "pts" field if the given value is not nil.

func (*TelegramUserStateUpdate) SetNillableQts

func (tusu *TelegramUserStateUpdate) SetNillableQts(i *int) *TelegramUserStateUpdate

SetNillableQts sets the "qts" field if the given value is not nil.

func (*TelegramUserStateUpdate) SetNillableSeq

func (tusu *TelegramUserStateUpdate) SetNillableSeq(i *int) *TelegramUserStateUpdate

SetNillableSeq sets the "seq" field if the given value is not nil.

func (*TelegramUserStateUpdate) SetPts

SetPts sets the "pts" field.

func (*TelegramUserStateUpdate) SetQts

SetQts sets the "qts" field.

func (*TelegramUserStateUpdate) SetSeq

SetSeq sets the "seq" field.

func (*TelegramUserStateUpdate) Where

Where appends a list predicates to the TelegramUserStateUpdate builder.

type TelegramUserStateUpdateOne

type TelegramUserStateUpdateOne struct {
	// contains filtered or unexported fields
}

TelegramUserStateUpdateOne is the builder for updating a single TelegramUserState entity.

func (*TelegramUserStateUpdateOne) AddChannelIDs

func (tusuo *TelegramUserStateUpdateOne) AddChannelIDs(ids ...int) *TelegramUserStateUpdateOne

AddChannelIDs adds the "channels" edge to the TelegramChannelState entity by IDs.

func (*TelegramUserStateUpdateOne) AddChannels

AddChannels adds the "channels" edges to the TelegramChannelState entity.

func (*TelegramUserStateUpdateOne) AddDate

AddDate adds i to the "date" field.

func (*TelegramUserStateUpdateOne) AddPts

AddPts adds i to the "pts" field.

func (*TelegramUserStateUpdateOne) AddQts

AddQts adds i to the "qts" field.

func (*TelegramUserStateUpdateOne) AddSeq

AddSeq adds i to the "seq" field.

func (*TelegramUserStateUpdateOne) ClearChannels

ClearChannels clears all "channels" edges to the TelegramChannelState entity.

func (*TelegramUserStateUpdateOne) Exec

Exec executes the query on the entity.

func (*TelegramUserStateUpdateOne) ExecX

func (tusuo *TelegramUserStateUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateUpdateOne) Mutation

Mutation returns the TelegramUserStateMutation object of the builder.

func (*TelegramUserStateUpdateOne) RemoveChannelIDs

func (tusuo *TelegramUserStateUpdateOne) RemoveChannelIDs(ids ...int) *TelegramUserStateUpdateOne

RemoveChannelIDs removes the "channels" edge to TelegramChannelState entities by IDs.

func (*TelegramUserStateUpdateOne) RemoveChannels

RemoveChannels removes "channels" edges to TelegramChannelState entities.

func (*TelegramUserStateUpdateOne) Save

Save executes the query and returns the updated TelegramUserState entity.

func (*TelegramUserStateUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TelegramUserStateUpdateOne) Select

func (tusuo *TelegramUserStateUpdateOne) Select(field string, fields ...string) *TelegramUserStateUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TelegramUserStateUpdateOne) SetDate

SetDate sets the "date" field.

func (*TelegramUserStateUpdateOne) SetNillableDate

func (tusuo *TelegramUserStateUpdateOne) SetNillableDate(i *int) *TelegramUserStateUpdateOne

SetNillableDate sets the "date" field if the given value is not nil.

func (*TelegramUserStateUpdateOne) SetNillablePts

func (tusuo *TelegramUserStateUpdateOne) SetNillablePts(i *int) *TelegramUserStateUpdateOne

SetNillablePts sets the "pts" field if the given value is not nil.

func (*TelegramUserStateUpdateOne) SetNillableQts

func (tusuo *TelegramUserStateUpdateOne) SetNillableQts(i *int) *TelegramUserStateUpdateOne

SetNillableQts sets the "qts" field if the given value is not nil.

func (*TelegramUserStateUpdateOne) SetNillableSeq

func (tusuo *TelegramUserStateUpdateOne) SetNillableSeq(i *int) *TelegramUserStateUpdateOne

SetNillableSeq sets the "seq" field if the given value is not nil.

func (*TelegramUserStateUpdateOne) SetPts

SetPts sets the "pts" field.

func (*TelegramUserStateUpdateOne) SetQts

SetQts sets the "qts" field.

func (*TelegramUserStateUpdateOne) SetSeq

SetSeq sets the "seq" field.

func (*TelegramUserStateUpdateOne) Where

Where appends a list predicates to the TelegramUserStateUpdate builder.

type TelegramUserStateUpsert

type TelegramUserStateUpsert struct {
	*sql.UpdateSet
}

TelegramUserStateUpsert is the "OnConflict" setter.

func (*TelegramUserStateUpsert) AddDate

AddDate adds v to the "date" field.

func (*TelegramUserStateUpsert) AddPts

AddPts adds v to the "pts" field.

func (*TelegramUserStateUpsert) AddQts

AddQts adds v to the "qts" field.

func (*TelegramUserStateUpsert) AddSeq

AddSeq adds v to the "seq" field.

func (*TelegramUserStateUpsert) SetDate

SetDate sets the "date" field.

func (*TelegramUserStateUpsert) SetPts

SetPts sets the "pts" field.

func (*TelegramUserStateUpsert) SetQts

SetQts sets the "qts" field.

func (*TelegramUserStateUpsert) SetSeq

SetSeq sets the "seq" field.

func (*TelegramUserStateUpsert) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*TelegramUserStateUpsert) UpdatePts

UpdatePts sets the "pts" field to the value that was provided on create.

func (*TelegramUserStateUpsert) UpdateQts

UpdateQts sets the "qts" field to the value that was provided on create.

func (*TelegramUserStateUpsert) UpdateSeq

UpdateSeq sets the "seq" field to the value that was provided on create.

type TelegramUserStateUpsertBulk

type TelegramUserStateUpsertBulk struct {
	// contains filtered or unexported fields
}

TelegramUserStateUpsertBulk is the builder for "upsert"-ing a bulk of TelegramUserState nodes.

func (*TelegramUserStateUpsertBulk) AddDate

AddDate adds v to the "date" field.

func (*TelegramUserStateUpsertBulk) AddPts

AddPts adds v to the "pts" field.

func (*TelegramUserStateUpsertBulk) AddQts

AddQts adds v to the "qts" field.

func (*TelegramUserStateUpsertBulk) AddSeq

AddSeq adds v to the "seq" field.

func (*TelegramUserStateUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TelegramUserStateUpsertBulk) Exec

Exec executes the query.

func (*TelegramUserStateUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TelegramUserState.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TelegramUserStateUpsertBulk) SetDate

SetDate sets the "date" field.

func (*TelegramUserStateUpsertBulk) SetPts

SetPts sets the "pts" field.

func (*TelegramUserStateUpsertBulk) SetQts

SetQts sets the "qts" field.

func (*TelegramUserStateUpsertBulk) SetSeq

SetSeq sets the "seq" field.

func (*TelegramUserStateUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the TelegramUserStateCreateBulk.OnConflict documentation for more info.

func (*TelegramUserStateUpsertBulk) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*TelegramUserStateUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TelegramUserState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(telegramuserstate.FieldID)
		}),
	).
	Exec(ctx)

func (*TelegramUserStateUpsertBulk) UpdatePts

UpdatePts sets the "pts" field to the value that was provided on create.

func (*TelegramUserStateUpsertBulk) UpdateQts

UpdateQts sets the "qts" field to the value that was provided on create.

func (*TelegramUserStateUpsertBulk) UpdateSeq

UpdateSeq sets the "seq" field to the value that was provided on create.

type TelegramUserStateUpsertOne

type TelegramUserStateUpsertOne struct {
	// contains filtered or unexported fields
}

TelegramUserStateUpsertOne is the builder for "upsert"-ing

one TelegramUserState node.

func (*TelegramUserStateUpsertOne) AddDate

AddDate adds v to the "date" field.

func (*TelegramUserStateUpsertOne) AddPts

AddPts adds v to the "pts" field.

func (*TelegramUserStateUpsertOne) AddQts

AddQts adds v to the "qts" field.

func (*TelegramUserStateUpsertOne) AddSeq

AddSeq adds v to the "seq" field.

func (*TelegramUserStateUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TelegramUserStateUpsertOne) Exec

Exec executes the query.

func (*TelegramUserStateUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TelegramUserStateUpsertOne) ID

func (u *TelegramUserStateUpsertOne) ID(ctx context.Context) (id int64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TelegramUserStateUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*TelegramUserStateUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TelegramUserState.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TelegramUserStateUpsertOne) SetDate

SetDate sets the "date" field.

func (*TelegramUserStateUpsertOne) SetPts

SetPts sets the "pts" field.

func (*TelegramUserStateUpsertOne) SetQts

SetQts sets the "qts" field.

func (*TelegramUserStateUpsertOne) SetSeq

SetSeq sets the "seq" field.

func (*TelegramUserStateUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the TelegramUserStateCreate.OnConflict documentation for more info.

func (*TelegramUserStateUpsertOne) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*TelegramUserStateUpsertOne) UpdateNewValues

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.TelegramUserState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(telegramuserstate.FieldID)
		}),
	).
	Exec(ctx)

func (*TelegramUserStateUpsertOne) UpdatePts

UpdatePts sets the "pts" field to the value that was provided on create.

func (*TelegramUserStateUpsertOne) UpdateQts

UpdateQts sets the "qts" field to the value that was provided on create.

func (*TelegramUserStateUpsertOne) UpdateSeq

UpdateSeq sets the "seq" field to the value that was provided on create.

type TelegramUserStates

type TelegramUserStates []*TelegramUserState

TelegramUserStates is a parsable slice of TelegramUserState.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// Check is the client for interacting with the Check builders.
	Check *CheckClient
	// GPTDialog is the client for interacting with the GPTDialog builders.
	GPTDialog *GPTDialogClient
	// GitCommit is the client for interacting with the GitCommit builders.
	GitCommit *GitCommitClient
	// LastChannelMessage is the client for interacting with the LastChannelMessage builders.
	LastChannelMessage *LastChannelMessageClient
	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// PRNotification is the client for interacting with the PRNotification builders.
	PRNotification *PRNotificationClient
	// Repository is the client for interacting with the Repository builders.
	Repository *RepositoryClient
	// TelegramChannelState is the client for interacting with the TelegramChannelState builders.
	TelegramChannelState *TelegramChannelStateClient
	// TelegramSession is the client for interacting with the TelegramSession builders.
	TelegramSession *TelegramSessionClient
	// TelegramUserState is the client for interacting with the TelegramUserState builders.
	TelegramUserState *TelegramUserStateClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// FirstName holds the value of the "first_name" field.
	FirstName string `json:"first_name,omitempty"`
	// LastName holds the value of the "last_name" field.
	LastName string `json:"last_name,omitempty"`
	// PAT
	GithubToken string `json:"github_token,omitempty"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int64) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int64) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int64) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int64) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetUsername(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetUsername(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetFirstName

func (uc *UserCreate) SetFirstName(s string) *UserCreate

SetFirstName sets the "first_name" field.

func (*UserCreate) SetGithubToken

func (uc *UserCreate) SetGithubToken(s string) *UserCreate

SetGithubToken sets the "github_token" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(i int64) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetLastName

func (uc *UserCreate) SetLastName(s string) *UserCreate

SetLastName sets the "last_name" field.

func (*UserCreate) SetNillableGithubToken

func (uc *UserCreate) SetNillableGithubToken(s *string) *UserCreate

SetNillableGithubToken sets the "github_token" field if the given value is not nil.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetUsername(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearGithubToken

func (m *UserMutation) ClearGithubToken()

ClearGithubToken clears the value of the "github_token" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) FirstName

func (m *UserMutation) FirstName() (r string, exists bool)

FirstName returns the value of the "first_name" field in the mutation.

func (*UserMutation) GithubToken

func (m *UserMutation) GithubToken() (r string, exists bool)

GithubToken returns the value of the "github_token" field in the mutation.

func (*UserMutation) GithubTokenCleared

func (m *UserMutation) GithubTokenCleared() bool

GithubTokenCleared returns if the "github_token" field was cleared in this mutation.

func (*UserMutation) ID

func (m *UserMutation) 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 (*UserMutation) IDs

func (m *UserMutation) 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 (*UserMutation) LastName

func (m *UserMutation) LastName() (r string, exists bool)

LastName returns the value of the "last_name" field in the mutation.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldFirstName

func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)

OldFirstName returns the old "first_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldGithubToken

func (m *UserMutation) OldGithubToken(ctx context.Context) (v string, err error)

OldGithubToken returns the old "github_token" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldLastName

func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)

OldLastName returns the old "last_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetFirstName

func (m *UserMutation) ResetFirstName()

ResetFirstName resets all changes to the "first_name" field.

func (*UserMutation) ResetGithubToken

func (m *UserMutation) ResetGithubToken()

ResetGithubToken resets all changes to the "github_token" field.

func (*UserMutation) ResetLastName

func (m *UserMutation) ResetLastName()

ResetLastName resets all changes to the "last_name" field.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetFirstName

func (m *UserMutation) SetFirstName(s string)

SetFirstName sets the "first_name" field.

func (*UserMutation) SetGithubToken

func (m *UserMutation) SetGithubToken(s string)

SetGithubToken sets the "github_token" field.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLastName

func (m *UserMutation) SetLastName(s string)

SetLastName sets the "last_name" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int64

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Username string `json:"username,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldUsername).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []int64, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int64

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Username string `json:"username,omitempty"`
}

client.User.Query().
	Select(user.FieldUsername).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) ClearGithubToken

func (uu *UserUpdate) ClearGithubToken() *UserUpdate

ClearGithubToken clears the value of the "github_token" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetFirstName

func (uu *UserUpdate) SetFirstName(s string) *UserUpdate

SetFirstName sets the "first_name" field.

func (*UserUpdate) SetGithubToken

func (uu *UserUpdate) SetGithubToken(s string) *UserUpdate

SetGithubToken sets the "github_token" field.

func (*UserUpdate) SetLastName

func (uu *UserUpdate) SetLastName(s string) *UserUpdate

SetLastName sets the "last_name" field.

func (*UserUpdate) SetNillableFirstName

func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserUpdate) SetNillableGithubToken

func (uu *UserUpdate) SetNillableGithubToken(s *string) *UserUpdate

SetNillableGithubToken sets the "github_token" field if the given value is not nil.

func (*UserUpdate) SetNillableLastName

func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*UserUpdate) SetNillableUsername

func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) ClearGithubToken

func (uuo *UserUpdateOne) ClearGithubToken() *UserUpdateOne

ClearGithubToken clears the value of the "github_token" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetFirstName

func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne

SetFirstName sets the "first_name" field.

func (*UserUpdateOne) SetGithubToken

func (uuo *UserUpdateOne) SetGithubToken(s string) *UserUpdateOne

SetGithubToken sets the "github_token" field.

func (*UserUpdateOne) SetLastName

func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne

SetLastName sets the "last_name" field.

func (*UserUpdateOne) SetNillableFirstName

func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableGithubToken

func (uuo *UserUpdateOne) SetNillableGithubToken(s *string) *UserUpdateOne

SetNillableGithubToken sets the "github_token" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLastName

func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableUsername

func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne

SetNillableUsername sets the "username" field if the given value is not nil.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) ClearGithubToken

func (u *UserUpsert) ClearGithubToken() *UserUpsert

ClearGithubToken clears the value of the "github_token" field.

func (*UserUpsert) SetFirstName

func (u *UserUpsert) SetFirstName(v string) *UserUpsert

SetFirstName sets the "first_name" field.

func (*UserUpsert) SetGithubToken

func (u *UserUpsert) SetGithubToken(v string) *UserUpsert

SetGithubToken sets the "github_token" field.

func (*UserUpsert) SetLastName

func (u *UserUpsert) SetLastName(v string) *UserUpsert

SetLastName sets the "last_name" field.

func (*UserUpsert) SetUsername

func (u *UserUpsert) SetUsername(v string) *UserUpsert

SetUsername sets the "username" field.

func (*UserUpsert) UpdateFirstName

func (u *UserUpsert) UpdateFirstName() *UserUpsert

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsert) UpdateGithubToken

func (u *UserUpsert) UpdateGithubToken() *UserUpsert

UpdateGithubToken sets the "github_token" field to the value that was provided on create.

func (*UserUpsert) UpdateLastName

func (u *UserUpsert) UpdateLastName() *UserUpsert

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsert) UpdateUsername

func (u *UserUpsert) UpdateUsername() *UserUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) ClearGithubToken

func (u *UserUpsertBulk) ClearGithubToken() *UserUpsertBulk

ClearGithubToken clears the value of the "github_token" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetFirstName

func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk

SetFirstName sets the "first_name" field.

func (*UserUpsertBulk) SetGithubToken

func (u *UserUpsertBulk) SetGithubToken(v string) *UserUpsertBulk

SetGithubToken sets the "github_token" field.

func (*UserUpsertBulk) SetLastName

func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk

SetLastName sets the "last_name" field.

func (*UserUpsertBulk) SetUsername

func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk

SetUsername sets the "username" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateFirstName

func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateGithubToken

func (u *UserUpsertBulk) UpdateGithubToken() *UserUpsertBulk

UpdateGithubToken sets the "github_token" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLastName

func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdateUsername

func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) ClearGithubToken

func (u *UserUpsertOne) ClearGithubToken() *UserUpsertOne

ClearGithubToken clears the value of the "github_token" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id int64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) int64

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetFirstName

func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne

SetFirstName sets the "first_name" field.

func (*UserUpsertOne) SetGithubToken

func (u *UserUpsertOne) SetGithubToken(v string) *UserUpsertOne

SetGithubToken sets the "github_token" field.

func (*UserUpsertOne) SetLastName

func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne

SetLastName sets the "last_name" field.

func (*UserUpsertOne) SetUsername

func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne

SetUsername sets the "username" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateFirstName

func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateGithubToken

func (u *UserUpsertOne) UpdateGithubToken() *UserUpsertOne

UpdateGithubToken sets the "github_token" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLastName

func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdateUsername

func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL